This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: a quick about namespaces


On Jan 23, 2002, Nic Ferrier <nferrier@tapsellferrier.co.uk> wrote:

>    throw new java::lang::IllegalStateException ( ... );

> but the code generated by current gcjh does this:

>    throw new ::java::lang::IllegalStateException ( ... );


> Is this significant? Is there something here that I have to
> understand?

What if your package had a sub-package named java?  The initial `::'
tells g++ to start from the global namespace, so that it will never
start from the current namespace.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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