compat-common.h workaround for indent bug

Richard Henderson rth@redhat.com
Mon Dec 27 04:29:00 GMT 2004


Indent will break pp-numbers.  Given "1ULi", indent will
produce "1UL i".  It doesn't have the same problem with 
just plain "1i" though, so....


r~


        * gcc.dg/compat/compat-common.h (CINT, CDBL): Use multiplication
        by 1i instead of token pasting.

Index: gcc.dg/compat/compat-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/compat/compat-common.h,v
retrieving revision 1.5
diff -c -p -d -u -r1.5 compat-common.h
--- gcc.dg/compat/compat-common.h	30 Jun 2004 21:08:03 -0000	1.5
+++ gcc.dg/compat/compat-common.h	27 Dec 2004 04:25:36 -0000
@@ -25,8 +25,8 @@
 #endif
 
 #ifdef __GNUC__
-#define CINT(x, y) (x + __extension__ y##i)
-#define CDBL(x, y) (x + __extension__ y##i)
+#define CINT(x, y) (x + y * __extension__ 1i)
+#define CDBL(x, y) (x + y * __extension__ 1i)
 #else
 #ifdef __SUNPRO_C
 /* ??? Complex support without <complex.h>.  */



More information about the Gcc-patches mailing list