This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

dia-0.91 fails compile on gcc 3.3


We are recently getting complains about Dia not compiling
with gcc 3.3. But I'm pretty sure it is valid preprocessor
usage (##) which makes gcc 3.3 fail, where previous version did
not. One bug report is at:

http://bugzilla.gnome.org/show_bug.cgi?id=117204

Am I missing something? (More info below)

Thanks in advance,
	Hans

Output:
-march=athlon-tbird -O3 -pipe -fomit-frame-pointer -maccumulate-outgoing-ar
gs -ftracer -w   -Wall -Wunused -Winline -Wmissing-prototypes -Wmissing-dec
larations -finline-functions -fstrict-aliasing -c pydia-image.c
pydia-geometry.c:219:22: pasting "." and "top" does not give a valid
preprocessing token

I'm pretty sure it is a gcc preprocessor issue cause it works
flawlessly with earlier gcc versions and with different msvc 
versions as well. Recently tested with gcc 3.2.2 (Gentoo Linux 1.4
3.2.2-r2)

The magic macro is :
#define I_OR_F(v) \
  (self->is_int ? \
   PyInt_FromLong(self->r.ri.##v) : PyFloat_FromDouble(self->r.rf.##v))

invoked as :
  I_OR_F(top);

Though it would be easy to workaround in Dia, shouldn't this be
fixed with gcc ?


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert


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