egcs-20000403 Build Failure on SunOS 4.1.5

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Apr 4 12:46:00 GMT 2000


 > egcs-20000403 fails to build on SunOS 4.1.5.  I suspect that one of
 > the changes this week is not compatible with the Sun /usr/bin/cc
 > compiler.
 > 
 > "../../egcs/gcc/cpplib.c", line 126: syntax error at or near variable name "define"
 > "../../egcs/gcc/cpplib.c", line 126: unknown size
 > "../../egcs/gcc/cpplib.c", line 126: redeclaration of do_
 > [...]





Does this fix it?


2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* cpplib.c (D): Adjust to call CONCAT2 macro without whitespace.

diff -rup ../egcs-CVS20000404/gcc/cpplib.c egcs-CVS20000404/gcc/cpplib.c
--- ../egcs-CVS20000404/gcc/cpplib.c	Mon Apr  3 11:28:28 2000
+++ egcs-CVS20000404/gcc/cpplib.c	Tue Apr  4 15:28:52 2000
@@ -122,7 +122,8 @@ SCCS_ENTRY
    instead of void, because some old compilers have trouble with
    pointers to functions returning void.  */
 
-#define D(name, t, o) static int CONCAT2(do_, name) PARAMS ((cpp_reader *));
+/* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */
+#define D(name, t, o) static int CONCAT2(do_,name) PARAMS ((cpp_reader *));
 DIRECTIVE_TABLE
 #undef D
 
@@ -134,8 +135,9 @@ enum
 };
 #undef D
 
+/* Don't invoke CONCAT2 with any whitespace or K&R cc will fail. */
 #define D(name, t, origin) \
-{ CONCAT2(do_, name), STRINGX(name), sizeof STRINGX(name) - 1, origin },
+{ CONCAT2(do_,name), STRINGX(name), sizeof STRINGX(name) - 1, origin },
 static const struct directive dtable[] =
 {
 DIRECTIVE_TABLE


More information about the Gcc-patches mailing list