Stabilization status

Zack Weinberg zack@rabi.columbia.edu
Tue Feb 9 07:36:00 GMT 1999


On Tue, 09 Feb 1999 09:16:48 -0500, Zack Weinberg wrote:
>On Tue, 09 Feb 1999 00:21:17 -0700, Jeffrey A Law wrote:
>>
>>  In message <199902021837.NAA06399@blastula.phys.columbia.edu>you write:
>>  > On Tue, 02 Feb 1999 11:01:57 -0700, Jeffrey A Law wrote:
>>  > >
>>  > >fixheader/fixproto seem to be spewing out many more warnings/errors than
>>  > >before.  This needs to be investigated.
>>  > 
>>  > Might conceivably be due to recent changes in cpplib.  What
>>  > warnings/errors were you getting?  (I don't have a system that needs
>>  > fixheader and can compile snapshots in a reasonable length of time.)
>>For example, on aix4.2 I now get this kind of stuff from fix-header:
>>
>>.../X11/Intrinsic.h:0: warning: `__STDC__' redefined
>>.../X11/Xfuncs.h:0: warning: `__STDC__' redefined
>
>You get this warning when cpplib has -D__STDC__[=something] on the
>command line.  Maybe I should allow this, cccp does and fixproto might
>have a legitimate reason to do it.  Can you verify this is the
>problem?

On further investigation, -D__STDC__ is clearly intended to be legal,
the warning is caused by an oversight on my part.  I've committed this
patch to fix the problem.

zw

1999-02-09 10:30 -0500  Zack Weinberg  <zack@rabi.columbia.edu>

	* cpplib.c (do_define): Allow redefining __STDC__ with -D.

============================================================
Index: cpplib.c
--- cpplib.c	1999/02/08 20:27:22	1.68
+++ cpplib.c	1999/02/09 07:31:56	1.69
@@ -1410,7 +1410,7 @@
       else if (hp->type == T_MACRO)
 	ok = ! compare_defs (pfile, mdef.defn, hp->value.defn);
       /* Redefining a constant is ok with -D.  */
-      else if (hp->type == T_CONST)
+      else if (hp->type == T_CONST || hp->type == T_STDC)
         ok = ! CPP_OPTIONS (pfile)->done_initializing;
       /* Print the warning if it's not ok.  */
       if (!ok)


More information about the Gcc-patches mailing list