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]

[patch] Unreviewed: Fix -fdump switch parsing in C front-end


I sent this patch a few days ago.  It still hasn't been reviewed.
The patch bootstraps and -fdump-X now works on the C front-end.

Thanks.  Diego.

-----------------------------------------------------------------------------

The C front-end is not parsing the -fdump-X option properly.
When calling dump_switch_p() we should remove the -f prefix.

Bootstrapping in process, but the change is somewhat obvious.

Diego.


	* c-decl.c (c_decode_option): Skip '-f' prefix before calling
	dump_switch_p.

Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.242
diff -d -p -d -u -p -r1.242 c-decl.c
--- c-decl.c	2001/08/09 22:33:17	1.242
+++ c-decl.c	2001/08/19 17:08:35
@@ -594,7 +594,7 @@ c_decode_option (argc, argv)
     flag_no_builtin = 0;
   else if (!strcmp (p, "-fno-builtin"))
     flag_no_builtin = 1;
-  else if (dump_switch_p (p))
+  else if (p[0] == '-' && p[1] == 'f' && dump_switch_p (p + 2))
     ;
   else if (!strcmp (p, "-ansi"))
     goto iso_1990;


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