public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
@ 2003-01-04 17:32 Erik Schnetter
  2003-01-04 19:10 ` Toon Moene
  2003-01-04 19:58 ` Neil Booth
  0 siblings, 2 replies; 6+ messages in thread
From: Erik Schnetter @ 2003-01-04 17:32 UTC (permalink / raw)
  To: Toon Moene, gcc

Why does g77 invoce cc1?  I thought it would invoke cpp directly.  Will 
cc1 invoke the external cpp, or will cc1 rather use the built-in cpp 
library?

I thought, but I can be wrong here, that the cpp library doesn't really 
support the "-traditional" mode any more, whereas the cpp executable 
does.

-erik

-- 
Erik Schnetter <schnetter@uni-tuebingen.de>
Web: http://www.tat.physik.uni-tuebingen.de/~schnette/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
  2003-01-04 17:32 g77 -fixed-line-length-none -x f77-cpp-input -c blah.f Erik Schnetter
@ 2003-01-04 19:10 ` Toon Moene
  2003-01-04 19:58 ` Neil Booth
  1 sibling, 0 replies; 6+ messages in thread
From: Toon Moene @ 2003-01-04 19:10 UTC (permalink / raw)
  To: Erik Schnetter; +Cc: gcc

Erik Schnetter wrote:
> Why does g77 invoce cc1?  I thought it would invoke cpp directly.  Will 
> cc1 invoke the external cpp, or will cc1 rather use the built-in cpp 
> library?
> 
> I thought, but I can be wrong here, that the cpp library doesn't really 
> support the "-traditional" mode any more, whereas the cpp executable 
> does.

Apparently, Neil Booth thinks otherwise, and he's the PreProcessor Guru 
in town.

 From gcc/gcc/f/ChangeLog:

Thu June 20 21:56:34 2002  Neil Booth  <neil@daikokuya.demon.co.uk>

	* lang-specs.h: Use cc1 for traditional preprocessing.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
  2003-01-04 17:32 g77 -fixed-line-length-none -x f77-cpp-input -c blah.f Erik Schnetter
  2003-01-04 19:10 ` Toon Moene
@ 2003-01-04 19:58 ` Neil Booth
  2003-01-05 17:59   ` Alexandre Oliva
  1 sibling, 1 reply; 6+ messages in thread
From: Neil Booth @ 2003-01-04 19:58 UTC (permalink / raw)
  To: Erik Schnetter; +Cc: Toon Moene, gcc

Erik Schnetter wrote:-

> Why does g77 invoce cc1?  I thought it would invoke cpp directly.  Will 
> cc1 invoke the external cpp, or will cc1 rather use the built-in cpp 
> library?
> 
> I thought, but I can be wrong here, that the cpp library doesn't really 
> support the "-traditional" mode any more, whereas the cpp executable 
> does.

"cpp" is just a driver and never did any preprocessing.  The
preprocessing has been done by either cccp (2.95.x), cpp0 / tradcpp0
combo (3.0), cc1 / tradcpp0 combo (3.1, 3.2) or cc1 alone (>= 3.3).
I think 8-)

Neil.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
  2003-01-04 19:58 ` Neil Booth
@ 2003-01-05 17:59   ` Alexandre Oliva
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Oliva @ 2003-01-05 17:59 UTC (permalink / raw)
  To: Neil Booth; +Cc: Erik Schnetter, Toon Moene, gcc

On Jan  4, 2003, Neil Booth <neil@daikokuya.co.uk> wrote:

> "cpp" is just a driver and never did any preprocessing.  The
> preprocessing has been done by either cccp (2.95.x), cpp0 / tradcpp0
> combo (3.0), cc1 / tradcpp0 combo (3.1, 3.2) or cc1 alone (>= 3.3).
> I think 8-)

cccp was first renamed to cpp, and only then to cpp0.  I believe gcc
2.96ish snapshots (or was it egcs?) used cpp for the internal name,
which caused a lot of grief in case gcc failed to find the internal
cpp, searched the PATH, found the cpp driver and ran it.  The cpp
driver then happily searched for an internal cpp, failed, and then
searched the PATH, finding the cpp driver, which it then proceeded to
start, and so on, and so forth, until the whole thing blew up.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
  2003-01-04 14:07 Toon Moene
@ 2003-01-04 16:21 ` Paul Brook
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Brook @ 2003-01-04 16:21 UTC (permalink / raw)
  To: Toon Moene, gcc

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},


^ permalink raw reply	[flat|nested] 6+ messages in thread

* g77 -fixed-line-length-none -x f77-cpp-input -c blah.f
@ 2003-01-04 14:07 Toon Moene
  2003-01-04 16:21 ` Paul Brook
  0 siblings, 1 reply; 6+ messages in thread
From: Toon Moene @ 2003-01-04 14:07 UTC (permalink / raw)
  To: gcc

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 ?

Thanks in advance,

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-05 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-04 17:32 g77 -fixed-line-length-none -x f77-cpp-input -c blah.f Erik Schnetter
2003-01-04 19:10 ` Toon Moene
2003-01-04 19:58 ` Neil Booth
2003-01-05 17:59   ` Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2003-01-04 14:07 Toon Moene
2003-01-04 16:21 ` Paul Brook

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).