Bugs in RISC System/6000 C compiler
jim frost
madd at world.std.com
Sat Sep 22 05:19:37 AEST 1990
jim at segue.segue.com (Jim Balter) writes:
>In article <9756 at bunny.GTE.COM> hhd0 at GTE.COM (Horace Dediu) writes:
>[ problems with macros ]
>The problem is most likely in your CAT macro, which probably looks like
>#define CAT(a,b) a/**/b
>instead you should use
>#ifdef __STDC__
>#define CAT(a,b) a##b
>#else
>#define IDENT(x)x
>#define CAT(a,b)IDENT(a)b
>#endif
Yes, it depends on mode. In `cc' mode (-qlanglvl=extended) the
old-style concatenation works. In `xlc' mode (ANSI) you must use the
double-sharp.
Thus you can write:
#ifdef __STDC__
#define CAT(a,b) a##b
#else
#define CAT(a,b) a/**/b
#endif
jim frost
saber software
jimf at saber.com
More information about the Comp.unix.aix
mailing list