This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about unnamed namespace
- To: eyal dot ben-david at aks dot com
- Subject: Re: Questions about unnamed namespace
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 08 Oct 1998 00:57:34 -300
- Cc: egcs at cygnus dot com
- References: <42256695.00664E73.00@aks.com>
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