This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Problems with '-x f95-cpp-input' and '-pedantic-errors'
- From: Philippe Schaffnit <P dot Schaffnit at access dot rwth-aachen dot de>
- To: GFortran <fortran at gcc dot gnu dot org>
- Date: Fri, 08 Sep 2006 14:45:29 +0200
- Subject: Problems with '-x f95-cpp-input' and '-pedantic-errors'
- Organization: Access e.V.
Hi!
I've tried to send the following mail, but it doesn't seem to show up on
the list, so I try again, this time with the attachment as plain text,
which make spoil the effect, though it doesn't seem to for me...
I'm experiencing some problems related to '-x f95-cpp-input' and
'-pedantic-errors' (or at least I think so...). I'm quite surprised
because I'm routinely doing very similar things, but this very one has
been baffling me for several days now, and I can't see anything wrong
there...
Ideally, I would like to have both '-x f95-cpp-input -pedantic-errors',
but when I set these two switches I get the following error: 'error: no
newline at end of file', which I don't seem to be able to get around
(...), more surprising, if I remove '-pedantic-errors' I get a quite
long list of errors. To top it, if I remove both switches, everything
goes smoothly...
I know this is not the best for anyone, but I attach a zip archive with
a small test case along with three sets of compiler flags ('1': this 'no
newline at end of file' error, '2': more errors, '3': without these
flags: much better).
I'm thouroughly lost with that, so if a kind soul could give me some
hints, it would be greatly appreciated...
Thanks!
Philippe
PS: I'm using quite up-to-date sources: '4.2.0 20060907' (under Linux)
!
SUBROUTINE Hello
!
IMPLICIT NONE
!
WRITE ( 6, "(/A/)" ) "Hello world!"
!
RETURN
END SUBROUTINE Hello
!
PROGRAM Test
!
CALL Hello
!
END PROGRAM Test
!
gfortran -g -x f95-cpp-input -pedantic-errors -c Hello.f90
gfortran -g -x f95-cpp-input -pedantic-errors -c Test.f90
gfortran -g -x f95-cpp-input -pedantic-errors Hello.o Test.o -o Test
gfortran -g -x f95-cpp-input -c Hello.f90
gfortran -g -x f95-cpp-input -c Test.f90
gfortran -g -x f95-cpp-input Hello.o Test.o -o Test
gfortran -g -c Hello.f90
gfortran -g -c Test.f90
gfortran -g Hello.o Test.o -o Test