This is the mail archive of the gcc-patches@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]

Re: CPP fails to build in current CVS when using cc for stage1


 > From: Zack Weinberg <zack@wolery.cumb.org>
 > 
 > > Since I didn't want to change intl.h to remove the parens and make
 > > gcc's copy of it special, the only solution I could think of was to
 > > make these strings macros instead.  I haven't done a full bootstrap
 > > yet, just made sure OSF4 cc can compile all of stage1.
 > 
 > Provided that (a) bootstrap succeeds, and (b) nothing sneaks into
 > the writable data segment, that patch is fine.  Thanks for tracking
 > this down.
 > zw

Okay full bootstrap completed.  Here's what I installed:


Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.5907
diff -u -p -r1.5907 ChangeLog
--- ChangeLog	2000/03/12 00:32:00	1.5907
+++ ChangeLog	2000/03/12 04:32:23
@@ -1,3 +1,8 @@
+2000-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* cppinit.c (no_arg, no_ass, no_dir, no_fil, no_mac, no_pth):
+	Change from char[] to macros.
+
 2000-03-12  Neil Booth  <NeilB@earthling.net>
 
 	* cppinit.c (cpp_start_read): Update indirect function
Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppinit.c,v
retrieving revision 1.59
diff -u -p -r1.59 cppinit.c
--- cppinit.c	2000/03/12 00:32:01	1.59
+++ cppinit.c	2000/03/12 04:32:23
@@ -1080,12 +1080,15 @@ struct cl_option
   enum opt_code opt_code;
 };
 
-static const char no_arg[] = N_("Argument missing after `%s' option");
-static const char no_ass[] = N_("Assertion missing after `%s' option");
-static const char no_dir[] = N_("Directory name missing after `%s' option");
-static const char no_fil[] = N_("File name missing after `%s' option");
-static const char no_mac[] = N_("Macro name missing after `%s' option");
-static const char no_pth[] = N_("Path name missing after `%s' option");
+/* Irix6 "cc -n32" and OSF4 cc have problems with char foo[] = ("string");
+   I.e. a const string initializer with parens around it.  That is
+   what N_("string") resolves to, so we make no_* be macros instead.  */
+#define no_arg N_("Argument missing after `%s' option")
+#define no_ass N_("Assertion missing after `%s' option")
+#define no_dir N_("Directory name missing after `%s' option")
+#define no_fil N_("File name missing after `%s' option")
+#define no_mac N_("Macro name missing after `%s' option")
+#define no_pth N_("Path name missing after `%s' option")
 
 /* This list must be ASCII sorted. Make enum order above match this. */
 #define DEF_OPT(text, msg, code) {text, msg, sizeof(text) - 1, code}

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