This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: PR fortran/9038, a regression in 3.3/3.4 with respect to 3.2.


[ I'll take Paul out of the loop ]

Neil Booth wrote:

Toon Moene wrote:

Definitely. So the question is: how do we prevent the passing on of this switch to the rest of cc1 in case cc1 is called with the -E switch ....

In f771, we just return -1 from ffe_decode_option - does that mean that setting `result' to -1 in c_common_decode_option will have the same effect ?

I don't understand the problem.  I thought the original problem was that
the C front end doesn't accept the switch.  So I tell you how to get it
to accept it.  Then you say the problem is that the C front end accepts
the switch?

The correct place to modify C front end options is the big table in
c-opts.c; nowhere else.

OK - I start to see the mismatch in our descriptions what the problem is.


Prior to 3.3, preprocessing Fortran source (e.g., when the source file's name ends in .F) was taken care of by a separate preprocessor that *only* performed preprocessing. So any option that didn't make sense to preprocessing was "automagically" ignored by this program.

Nowadays - i.e., from 3.3 onwards - preprocessing is performed by cc1 -E.

That in itself wouldn't be a problem, if not every option that's passed to g77 gets passed to *both* cc1 -E and f771 by virtue of the way specs is written.

f771 knows that it shouldn't hand down -ffixed-form and -ffixed-line-length-<blah> options to other option processors, because they only have a definite meaning to the Fortran front end, and would give rise to spurious "unknown register: form" messages if not stopped short in the option processing for Fortran.

Now what I want to accomplish is to teach cc1 the same. In fact, it would only be necessary to teach cc1 if -E is specified, but it probably won't hurt to simply prevent passing -ffixed-form and -ffixed-line-length-<blah> downwards to other option processors.

Hope this explanation helps,

--
Toon Moene - mailto:toon at moene dot indiv dot nluug dot nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)


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