public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/11417] New: 3.4 regresson
@ 2003-07-03 2:01 bdavis9659 at comcast dot net
2003-07-03 12:49 ` [Bug driver/11417] [3.4 regresson] fortran options warned about in cc1 when *.F or -x f77-cpp-input pinskia at physics dot uc dot edu
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: bdavis9659 at comcast dot net @ 2003-07-03 2:01 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
Summary: 3.4 regresson
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bdavis9659 at comcast dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
-fugly assign and -x f77-cpp-input together on the command line cause an error
message.
[bdavis@rh bin]$ /usr/local/bin/g77 -x f77-cpp-input -fugly-assign x.f
cc1: warning: command line option "-fugly-assign" is valid for F77 but not for C
-fugly assign and -x f77-cpp-input are valid g77 options and work in gcc3.3.
The version used:
[bdavis@rh bin]$ /usr/local/bin/g77 -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --enable-languages=f77,c
Thread model: posix
gcc version 3.4 20030702 (experimental)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regresson] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
@ 2003-07-03 12:49 ` pinskia at physics dot uc dot edu
2003-07-04 17:27 ` [Bug driver/11417] [3.4 regression] " toon at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-03 12:49 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|fortran |driver
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-07-03 12:49:34
date| |
Summary|3.4 regresson |[3.4 regresson] fortran
| |options warned about in cc1
| |when *.F or -x f77-cpp-input
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-03 12:49 -------
Confirmed on the mainline (20030702), I think this is caused by Neil's options handling
work. It looks like on the mainline, cc1 is warning about -fugly-assign while in 3.3.1, it
does not. maybe the driver should not be passing -fugly-assign down to cc1. It also
happens with a file *.F.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
2003-07-03 12:49 ` [Bug driver/11417] [3.4 regresson] fortran options warned about in cc1 when *.F or -x f77-cpp-input pinskia at physics dot uc dot edu
@ 2003-07-04 17:27 ` toon at gcc dot gnu dot org
2003-07-04 17:28 ` toon at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: toon at gcc dot gnu dot org @ 2003-07-04 17:27 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
toon at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Last reconfirmed|2003-07-03 12:49:34 |2003-07-04 17:27:20
date| |
Summary|[3.4 regresson] fortran |[3.4 regression] fortran
|options warned about in cc1 |options warned about in cc1
|when *.F or -x f77-cpp-input|when *.F or -x f77-cpp-input
------- Additional Comments From toon at gcc dot gnu dot org 2003-07-04 17:27 -------
This must be Neil's doing.
Toon Moene.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
2003-07-03 12:49 ` [Bug driver/11417] [3.4 regresson] fortran options warned about in cc1 when *.F or -x f77-cpp-input pinskia at physics dot uc dot edu
2003-07-04 17:27 ` [Bug driver/11417] [3.4 regression] " toon at gcc dot gnu dot org
@ 2003-07-04 17:28 ` toon at gcc dot gnu dot org
2003-07-04 22:40 ` neil at daikokuya dot co dot uk
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: toon at gcc dot gnu dot org @ 2003-07-04 17:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
toon at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |neil at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
------- Additional Comments From toon at gcc dot gnu dot org 2003-07-04 17:28 -------
This must be Neil's doing.
Toon Moene.
Now really reassign ....
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
` (2 preceding siblings ...)
2003-07-04 17:28 ` toon at gcc dot gnu dot org
@ 2003-07-04 22:40 ` neil at daikokuya dot co dot uk
2003-07-05 7:20 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: neil at daikokuya dot co dot uk @ 2003-07-04 22:40 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
------- Additional Comments From neil at daikokuya dot co dot uk 2003-07-04 22:40 -------
Subject: Re: [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
toon at gcc dot gnu dot org wrote:-
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
>
>
> toon at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> AssignedTo|unassigned at gcc dot gnu |neil at gcc dot gnu dot org
> |dot org |
> Status|NEW |ASSIGNED
>
>
> ------- Additional Comments From toon at gcc dot gnu dot org 2003-07-04 17:28 -------
> This must be Neil's doing.
Sadly there isn't a clean and simple solution to this, since the real
problem is the driver passing down switches to cc1 that apply to
Fortran. This is the best I can think of.
Neil.
PR driver/11417
* c-opts.c (permit_fortran_options): New.
(c_common_init_options): Accept fortran front end options if
it looks like we might be preprocessing Fortran.
(c_common_handle_option): Don't reject switch if permit_fotran_options.
Index: c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.67
diff -u -p -r1.67 c-opts.c
--- c-opts.c 3 Jul 2003 23:17:52 -0000 1.67
+++ c-opts.c 4 Jul 2003 22:35:28 -0000
@@ -98,6 +98,9 @@ static size_t deferred_count;
/* Number of deferred options scanned for -include. */
static size_t include_cursor;
+/* Permit Fotran front-end options. */
+static bool permit_fortran_options;
+
void missing_arg (enum opt_code);
static void set_Wimplicit (int);
static void print_help (void);
@@ -201,6 +204,7 @@ unsigned int
c_common_init_options (unsigned int argc, const char **argv ATTRIBUTE_UNUSED)
{
static const unsigned int lang_flags[] = {CL_C, CL_ObjC, CL_CXX, CL_ObjCXX};
+ unsigned int result;
/* This is conditionalized only because that is the way the front
ends used to do it. Maybe this should be unconditional? */
@@ -232,7 +236,20 @@ c_common_init_options (unsigned int argc
deferred_opts = (struct deferred_opt *)
xmalloc (argc * sizeof (struct deferred_opt));
- return lang_flags[c_language];
+ result = lang_flags[c_language];
+
+ /* If potentially preprocessing Fortran we have to accept its front
+ end options since the driver passes most of them through. */
+#ifdef CL_F77
+ if (c_language == clk_c && argc > 2
+ && !strcmp (argv[2], "-traditional-cpp" ))
+ {
+ permit_fortran_options = true;
+ result |= CL_F77;
+ }
+#endif
+
+ return result;
}
/* Handle switch SCODE with argument ARG. ON is true, unless no-
@@ -261,7 +278,8 @@ c_common_handle_option (size_t scode, co
switch (code)
{
default:
- return 0;
+ result = permit_fortran_options;
+ break;
case OPT__help:
print_help ();
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
` (3 preceding siblings ...)
2003-07-04 22:40 ` neil at daikokuya dot co dot uk
@ 2003-07-05 7:20 ` cvs-commit at gcc dot gnu dot org
2003-07-05 19:24 ` toon at moene dot indiv dot nluug dot nl
2003-07-05 21:02 ` neil at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-05 7:20 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-07-05 07:20 -------
Subject: Bug 11417
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: neil@gcc.gnu.org 2003-07-05 07:20:32
Modified files:
gcc : ChangeLog c-opts.c
Log message:
PR driver/11417
* c-opts.c (permit_fortran_options): New.
(c_common_init_options): Accept fortran front end options if
it looks like we might be preprocessing Fortran.
(c_common_handle_option): Don't reject switch if permit_fotran_options.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.341&r2=2.342
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-opts.c.diff?cvsroot=gcc&r1=1.68&r2=1.69
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
` (4 preceding siblings ...)
2003-07-05 7:20 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-05 19:24 ` toon at moene dot indiv dot nluug dot nl
2003-07-05 21:02 ` neil at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: toon at moene dot indiv dot nluug dot nl @ 2003-07-05 19:24 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
------- Additional Comments From toon at moene dot indiv dot nluug dot nl 2003-07-05 19:24 -------
Subject: Re: [3.4 regression] fortran options warned about
in cc1 when *.F or -x f77-cpp-input
Neil Booth wrote:
> toon at gcc dot gnu dot org wrote:-
>>This must be Neil's doing.
>
> Sadly there isn't a clean and simple solution to this, since the real
> problem is the driver passing down switches to cc1 that apply to
> Fortran. This is the best I can think of.
>
> Neil.
>
> PR driver/11417
> * c-opts.c (permit_fortran_options): New.
> (c_common_init_options): Accept fortran front end options if
> it looks like we might be preprocessing Fortran.
> (c_common_handle_option): Don't reject switch if permit_fotran_options.
Thanks !
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/11417] [3.4 regression] fortran options warned about in cc1 when *.F or -x f77-cpp-input
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
` (5 preceding siblings ...)
2003-07-05 19:24 ` toon at moene dot indiv dot nluug dot nl
@ 2003-07-05 21:02 ` neil at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: neil at gcc dot gnu dot org @ 2003-07-05 21:02 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11417
neil at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From neil at gcc dot gnu dot org 2003-07-05 21:02 -------
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-07-05 21:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 2:01 [Bug fortran/11417] New: 3.4 regresson bdavis9659 at comcast dot net
2003-07-03 12:49 ` [Bug driver/11417] [3.4 regresson] fortran options warned about in cc1 when *.F or -x f77-cpp-input pinskia at physics dot uc dot edu
2003-07-04 17:27 ` [Bug driver/11417] [3.4 regression] " toon at gcc dot gnu dot org
2003-07-04 17:28 ` toon at gcc dot gnu dot org
2003-07-04 22:40 ` neil at daikokuya dot co dot uk
2003-07-05 7:20 ` cvs-commit at gcc dot gnu dot org
2003-07-05 19:24 ` toon at moene dot indiv dot nluug dot nl
2003-07-05 21:02 ` neil at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).