Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gfortran 4.8 "-J" switch

80 views
Skip to first unread message

Mohammad

unread,
Jan 8, 2013, 10:52:47 PM1/8/13
to
I have noticed the development version of gfortran (i.e. 4.8) parses the -J switch differently from 4.7

Assuming the .mod files are in "obj/debug" directory, calling gfortran as below

Format 1: gfortran -Jobj/debug/ .... fails
Format 2: gfortran -Jobj/debug .... works

Using the first syntax, gfortran complains that : "Nonexistent directory obj/debug/".

Is the change in the interpretation of "-Jdirname\" and "-Jdirname" a new feature of GFortran (GCC) (i.e. it was made intentionally) or it is a bug which should be fixed?

glen herrmannsfeldt

unread,
Jan 8, 2013, 11:55:40 PM1/8/13
to
What OS are you using? Most Unix/Linux systems that I know about ignore
extra /.

I just tried

mkdir xx///

and it happily created directory xx ignoring the ///.

-- glen

Tobias Burnus

unread,
Jan 9, 2013, 12:17:39 PM1/9/13
to
Mohammad wrote:
> I have noticed the development version of gfortran (i.e. 4.8) parses the -J switch differently from 4.7

> Assuming the .mod files are in "obj/debug" directory, calling gfortran as below
>
> Format 1: gfortran -Jobj/debug/ .... fails
> Format 2: gfortran -Jobj/debug .... works
>
> Using the first syntax, gfortran complains that : "Nonexistent directory obj/debug/".

That's a side effect of adding a warning for nonexisting directories
(before there wasn't one). Unfortunately, - on Windows - the used
library function doesn't handle trailing "/" or "\". (Hence, it works
under Linux.)

Note: It is much better report bugs either by filling a PR yourself or
by writing to gfortran's mailing list. Postings to comp.lang.fortran
will easily be overlooked.

Tobias

* I have now filled a PR: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55919

Mohammad

unread,
Jan 17, 2013, 1:10:41 AM1/17/13
to
It is Windows 7. I checked this both on Win 7 32b and 64b.

Mohammad

unread,
Jan 17, 2013, 1:13:03 AM1/17/13
to
Thank you Tobias. Sure later I will report to gfortran mailing list.
0 new messages