Q) jdk1.4.1 compile on -current
Daniel Eischen
eischen at vigrid.com
Sun Jul 27 07:41:00 PDT 2003
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
More information about the freebsd-java
mailing list