Using -fno-second-underscore with gfortran gives a spurious warning: $ gfortran -fno-second-underscore -c common.F90 cc1: warning: command line option "-fno-second-underscore" is valid for F95 but not for C
Confirmed, the issue is that we are passing the options to the cc1, the preprocessor (and the C compiler).
*** Bug 20138 has been marked as a duplicate of this bug. ***
*** Bug 20374 has been marked as a duplicate of this bug. ***
This one is certainly going to annoy lots of people (when 4.0 is released, I think we will get bug-reports by the ton). This should be easy to solve for someone who knows the interactions between GCC components. How can we ask some help?
It is annoying enough that the preprocessor is invoked via cc1. Is there a reason for this, besides that it is the example given in the specfiles?
*** Bug 20943 has been marked as a duplicate of this bug. ***
(In reply to comment #5) > It is annoying enough that the preprocessor is invoked via cc1. Is there a > reason for this, besides that it is the example given in the specfiles? Besides that is the only preprocessor any more, there is not a seperate one anymore, it is integrated into cc1 now.
Subject: Re: -fno-second-underscore induces warning for fortran that needs preprocessing pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-11 12:48 ------- > (In reply to comment #5) > >>It is annoying enough that the preprocessor is invoked via cc1. Is there a >>reason for this, besides that it is the example given in the specfiles? > > Besides that is the only preprocessor any more, there is not a seperate one anymore, it is integrated > into cc1 now. > We're using the traditional preprocessor. This is a separate executable, cpp, which is built separately. So the question remains: why do we run cc1?
(In reply to comment #8) > We're using the traditional preprocessor. This is a separate executable, cpp, > which is built separately. So the question remains: why do we run cc1? cpp just calls cc1. There used to be a cpp0 but that was removed a while back, long before gfortran was added, there was code in cc1 which made us not warn about the g77 options, that should be brought back.
Subject: Re: -fno-second-underscore induces warning for fortran that needs preprocessing pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-11 17:20 ------- > (In reply to comment #8) > >>We're using the traditional preprocessor. This is a separate executable, cpp, >>which is built separately. So the question remains: why do we run cc1? > > cpp just calls cc1. > There used to be a cpp0 but that was removed a while back, long before gfortran was added, there was > code in cc1 which made us not warn about the g77 options, that should be brought back. Oh, ok. OTOH one could maybe strip out options that are meaningless to preprocessing before calling cc1.
Probably the right way to solve this is to call the code in c-ppoutput.c from the Fortran frontend.
*** Bug 23176 has been marked as a duplicate of this bug. ***
*** Bug 23532 has been marked as a duplicate of this bug. ***
FX's recent commit to trap IEEE exceptions via the -ffpe-trap command-line option is affected by this bug as well
Subject: Bug 18452 Author: fxcoudert Date: Wed Nov 2 21:57:35 2005 New Revision: 106402 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106402 Log: PR fortran/18452 * lang-specs.h: Pass -lang-fortran to the preprocessor. * gcc/c.opt: Add a -lang-fortran option. * gcc/c-opts.c: Add a lang_fortran flag. (c_common_init_options): Handling the -lang-fortran option. (c_common_handle_option): Add a case for Fortran options in preprocessing. Remove cases for -ffixed-form and -ffixed-line-length. Add a case for -lang-fortran. Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/c-opts.c branches/gcc-4_0-branch/gcc/c.opt branches/gcc-4_0-branch/gcc/fortran/ChangeLog branches/gcc-4_0-branch/gcc/fortran/lang-specs.h
Subject: Bug 18452 Author: fxcoudert Date: Fri Nov 4 08:29:16 2005 New Revision: 106483 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106483 Log: PR fortran/18452 * gcc/fortran/lang-specs.h: Pass -lang-fortran to the preprocessor. * gcc/c.opt: Add a -lang-fortran option. * gcc/c-opts.c: Add a lang_fortran flag. (c_common_init_options): Handling the -lang-fortran option. (c_common_handle_option): Add a case for Fortran options in preprocessing. Remove cases for -ffixed-form and -ffixed-line-length. Add a case for -lang-fortran. Modified: trunk/gcc/ChangeLog trunk/gcc/c-opts.c trunk/gcc/c.opt trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/lang-specs.h
Hurray, hurray, this bug is fixed! Now, could we get libgfortran building with -Werror? :)