This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Disable a fortran option to fix a bunch of FAILs fromthe C preprocessor
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 16 Oct 2003 20:06:37 +0200
- Subject: [tree-ssa] Disable a fortran option to fix a bunch of FAILs fromthe C preprocessor
Hi,
Several cpp testcases fail on tree-ssa because the new options handling
mechanism can't handle different option flags from different languages.
The FAILs happen for any invocation of cc1 with the "-M" option. For C,
in c.opt, this option is defined as:
M
C ObjC C++ ObjC++
Generate make dependencies
i.e. nice and clean, not joined. For gfortran, we had in lang.opt:
M
F95 Joined
-M<directory> Put MODULE files in 'directory'
Neil's new option mechanism then builds the list of options+flags and it
doesn't notice/cannot handle that F95 expects CL_JOINED and C does not.
The flag is just set for the -M option for _all_ languagues. Then we do
"cc1 -M", get into opts.c, and look at option->flags,
/* Sort out any argument the switch takes. */
if (option->flags & CL_JOINED)
{
The C version of the option is not joined, but the option handler thinks
it is:
cc1: error: missing argument to "-M"
I've installed this patch as obvious, to paper over the problem.
gfortran has had the -J option from the start as a duplicate for -M
because it also didn't work with the old options handling.
IMHO the issue should still be fixed properly, by allowing different
languages to have different options flags...
Gr.
Steven
fortran/
* lang.c: Remove -M option for now, it's in the way for C.
Index: fortran/lang.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/Attic/lang.opt,v
retrieving revision 1.1.2.3
diff -c -3 -p -r1.1.2.3 lang.opt
*** fortran/lang.opt 10 Aug 2003 13:52:31 -0000 1.1.2.3
--- fortran/lang.opt 16 Oct 2003 17:52:13 -0000
*************** J
*** 33,42 ****
F95 Joined
-J<directory> Put MODULE files in 'directory'
- M
- F95 Joined
- -M<directory> Put MODULE files in 'directory'
-
Wall
F95 RejectNegative
; Documented in C
--- 33,38 ----