This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Fix PR37468
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Franke <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Dec 2008 18:13:17 +0100
- Subject: Re: [patch, fortran] Fix PR37468
- References: <200811290020.53975.franke.daniel@gmail.com>
Daniel Franke wrote:
> The patch below fixes a user-visible problem with option-parsing and passing.
> Analysis of the problem can be found in PR37468, comment #6.
>
> The patch itself should qualify as obvious, but as we are in stage4: ok to
> commit for 4.4?
>
OK, I convinced myself that the patch should not break anything; it
might cause that some errors or warnings are printed twice,* but I think
that's better than if a warning/error is printed never.
Tobias
* = once by libcpp and once by Fortran; example: "gfortran -i8
foo.F90"; ".F90" causes CPP preprocessing and the -i8 is afterwards
passed to Fortran; for "foo.f90" or for "-cpp foo.f90 foo.F90" the error
is printed only once; for "foo.f90" by only Fortran and for "-cpp" only
by libcpp.
> 2008-11-29 Daniel Franke <franke.daniel@gmail.com>
>
> PR fortran/37468
> * lang-specs.h: Pass on -i* options to f951 to (probably) report
> them as unknown.
>
> Regression tested on i686-pc-linux-gnu.
>
> Regards
>
> Daniel
>
>
> Index: lang-specs.h
> ===================================================================
> --- lang-specs.h (revision 142255)
> +++ lang-specs.h (working copy)
> @@ -23,7 +23,7 @@
>
> #define F951_CPP_OPTIONS "%{!nocpp: -cpp %g.f90 %(cpp_options)\
> %{E|M|MM:%(cpp_debug_options) -fsyntax-only} %{E}}"
> -#define F951_OPTIONS "%(cc1_options) %{J*} %{!cpp: %{I*}}\
> +#define F951_OPTIONS "%(cc1_options) %{J*} %{!cpp: %{I*} %{i*}}\
> %{!nostdinc:-fintrinsic-modules-path finclude%s}\
> %{!fsyntax-only:%(invoke_as)}"
> #define F951_SOURCE_FORM "%{!ffree-form:-ffixed-form}"
>
>
>