https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to jo.rickert from comment #6)
> Thanks, I thought the name had to be unique per translation unit.

That can't possibly work. You would have to define the entire program in one
translation unit, because otherwise you could never declare:

struct X { void func(); };

and define X::func() in one translation unit and call it from a different
translation unit.  Under your mental model, it would be a different X, and the
linker could never find the definition of X::func.

Reply via email to