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]

RFA [Re: Bug in integrated cpp]


[This ORBS thing is really getting to me.  I have to send many of my
posts multiple times to get through.  Last week it was so bad one post
needed 12 reposts.]

Hi Kaveh,

I *think* the patch below fixes C++; I'll have to wait for at least
stage3 to test.  It fixes your C problem, I'm sure.

OK to commit the specs change if I bootstrap and it fixes the bug?

Neil.

	* cpplib.c (do_line): Only warn pedantically if not reading
	preprocessed input.
	* cp/lang-specs.h: Fix -save-temps specs under USE_CPPLIB.

Index: cpplib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.c,v
retrieving revision 1.213
diff -u -p -r1.213 cpplib.c
--- cpplib.c	2000/11/01 20:21:08	1.213
+++ cpplib.c	2000/11/03 22:35:09
@@ -743,7 +743,7 @@ do_line (pfile)
 
       if (read_line_number (pfile, &action_number) != 0)
 	{
-	  if (CPP_PEDANTIC (pfile))
+	  if (! CPP_OPTION (pfile, preprocessed) && CPP_PEDANTIC (pfile))
 	    cpp_pedwarn (pfile,  "extra tokens at end of #line directive");
 
 	  if (action_number == 1)
Index: cp/lang-specs.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lang-specs.h,v
retrieving revision 1.30
diff -u -p -r1.30 lang-specs.h
--- lang-specs.h	2000/09/26 17:28:07	1.30
+++ lang-specs.h	2000/11/03 22:35:15
@@ -38,11 +38,12 @@ Boston, MA 02111-1307, USA.  */
      %{!E:%{!M:%{!MM:\
        %{save-temps:cpp0 -lang-c++ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
 		    %(cpp_options) %b.ii \n}\
-      cc1plus %{save-temps: -fpreprocessed %b.ii} -lang-c++\
+      cc1plus %{save-temps:-fpreprocessed %b.ii}\
+              %{!save-temps:%(cpp_options)} -lang-c++\
        %{!no-gcc:-D__GNUG__=%v1}\
        %{fnew-abi:-D__GXX_ABI_VERSION=100}\
        %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
-       %(cpp_options) %(cc1_options) %{+e*}\
+       %(cc1_options) %{+e*}\
        %{!fsyntax-only:%(invoke_as)}}}}"
 #else /* ! USE_CPPLIB */
     "cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\

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