c++/10069: -include switch is improperly handled
sean@mcneil.com
sean@mcneil.com
Fri Mar 14 01:48:00 GMT 2003
>Number: 10069
>Category: c++
>Synopsis: -include switch is improperly handled
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 14 00:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Sean McNeil
>Release: current CVS
>Organization:
>Environment:
All
>Description:
C++ front end improperly handles the -include switch because it doesn't recognize it as a switch that takes an argument. The following patch was already posted to gcc@gcc.gnu.org but no response was ever given.
Cheers,
Sean
>How-To-Repeat:
Invoke g++/gcc with a C++ source file and passing "-include some_file.h"
>Fix:
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/g++spec.c,v
retrieving revision 1.36
diff -c -3 -p -r1.36 g++spec.c
*** gcc/cp/g++spec.c 10 Mar 2003 23:41:39 -0000 1.36
--- gcc/cp/g++spec.c 13 Mar 2003 23:58:56 -0000
*************** lang_specific_driver (in_argc, in_argv,
*** 174,179 ****
--- 174,180 ----
}
else if (((argv[i][2] == '\0'
&& (char *)strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
+ || strcmp (argv[i], "-include") == 0
|| strcmp (argv[i], "-Xlinker") == 0
|| strcmp (argv[i], "-Tdata") == 0))
quote = argv[i];
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list