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: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f


On Saturday 04 January 2003 2:14 pm, Toon Moene wrote:
> PR Fortran/9038 is about the following:
>
> g77 -ffixed-line-length-none -x f77-cpp-input -c blah.f gives:
> warning: unknown register name line-length-none.
>
> Without the -x f77-cpp-input this doesn't happen; with it, it does,
> because on seeing -x f77-cpp-input g77 invokes cc1 to do the
> preprocessing (using the now builtin preprocessor).
>
> Unfortunately, cc1 sees -ffixed-line-length-none and decides this is an
> option of the form -ffixed-<some register> and gives the warning.
>
> How is this supposed to work ? (in this case it's a warning, but I can
> imagine more nasty things happening if cc1 tries to interpret other
> language processor's options).
>
> Could one of the kings of spec provide some insight ?

The following works for me:
Index: lang-specs.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/f/lang-specs.h,v
retrieving revision 1.32.2.3
diff -u -r1.32.2.3 lang-specs.h
--- lang-specs.h	1 Nov 2002 18:41:30 -0000	1.32.2.3
+++ lang-specs.h	4 Jan 2003 16:00:05 -0000
@@ -29,8 +29,8 @@
   {".fpp", "@f77-cpp-input", 0},
   {".FPP", "@f77-cpp-input", 0},
   {"@f77-cpp-input",
-   "cc1 -E -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \
-        %{E|M|MM:%(cpp_debug_options)}\
+   "cc1 -E -traditional-cpp -D_LANGUAGE_FORTRAN %<ffixed-line-length-* \
+        %(cpp_options) %{E|M|MM:%(cpp_debug_options)}\
         %{!M:%{!MM:%{!E: %|.f |\n\
     f771 %|.f %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}", 0},
   {".r", "@ratfor", 0},



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