This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Unreviewed: Fix -fdump switch parsing in C front-end
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] Unreviewed: Fix -fdump switch parsing in C front-end
- From: Diego Novillo <dnovillo at redhat dot com>
- Date: Thu, 30 Aug 2001 16:13:19 -0400
- Organization: Red Hat Canada
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;