Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jul 2003 10:40:56 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Mike Bristow <mike@urgle.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: Q) jdk1.4.1 compile on -current
Message-ID:  <Pine.GSO.4.10.10307271037190.4242-100000@pcnet5.pcnet.com>
In-Reply-To: <1059315714.47363.4.camel@lir.urgle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27 Jul 2003, Mike Bristow wrote:

> On Sun, 2003-07-27 at 14:23, Sheldon Hearn wrote:
> > On (2003/07/27 15:05), Sheldon Hearn wrote:
> > 
> > > > It's not a GCC bug, it's a JDK bug which GCC used to silently ignore.
> > > > The ## operator should only be used to paste together parts of what is
> > > > meant to be a single token, but apparently a lot of people use it
> > > > between tokens in macro definitions (which is not only incorrect but
> > > > also completely unnecessary).
> > > 
> > > So name##_t is supposed to be name_t?  Any idea what the original
> > > programmer wanted to achieve or avoid by doing this?
> > 
> > Ah, wait.  Those are bad examples (and don't produce errors).
> > 
> > I've just looked at the standard and seen what you're talking about.
> > It's easy to imagine the author of the failing code thinking this was
> > necessary.
>
> I've been looking at this problem too, and while the patch you have is
> neccessary, it isn't complete.  You'll blow up in the same way later.
> 
> The attached patch touches all the problems I've found, but the first
> time the built java is used (in the build process) it dumps core, so
> I've obviously done something stupid. 
> 
> 
> --- ../../hotspot/src/share/vm/runtime/mutexLocker.cpp.orig	Sat Jul 26
> 19:49:23 2003
> +++ ../../hotspot/src/share/vm/runtime/mutexLocker.cpp	Sat Jul 26
> 19:48:45 2003
> @@ -95,7 +95,7 @@
>  #endif
>  
>  #define def(var, type, pri, vm_block) \
> -  var = new type(Mutex::##pri, #var, vm_block)
> +  var = new type(Mutex::pri, #var, vm_block)

Anyone know what "#var" does?

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10307271037190.4242-100000>