This is the mail archive of the gcc@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: Questions about unnamed namespace


eyal ben-david <eyal.ben-david@aks.com> writes:

> Does 'extern' inside a function imply global scope or this is a
> bug in EGCS ?

It's a bug.  I've added this test-case to the testsuite, thanks.

> After replacing the static with unnamed namespace block, the functions
> were expanded inline but code for them was written in the assembly file
> and hence the obj file and probably in the executable (I'm not sure
> about the last since the linker can eliminate unused functions).

> Is there any reason why the compiler (EGCS 1.1) behaves this way ?

Probably just because the special case for anonymous namespaces was
not handled, and out-of-line versions of the functions are provided
like for any other namespace.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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