This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Static linkage and anonymous namespace


>>>>> Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:

 >> 2) The whole point of the anonymous namespace is to allow file-local
 >>    things to be used in situations where a name with external linkage is
 >>    required; for example, in template arguments.

 > I don't understand this point (didn't the last time). What code would
 > not compile anymore that currently does?

I can't think of any examples offhand that the compiler currently supports,
but passing the address of a variable in the unnamed namespace to an
exported template would break.  I'd like not to have to change this back
when we implement export.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]