This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: a quick about namespaces
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Nic Ferrier <nferrier at tapsellferrier dot co dot uk>
- Cc: java at gcc dot gnu dot org
- Date: 23 Jan 2002 00:26:01 -0200
- Subject: Re: a quick about namespaces
- Organization: GCC Team, Red Hat
- References: <878zapyfvq.fsf@tf1.tapsellferrier.co.uk>
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