------- Comment #12 from anlauf at gmx dot de 2006-05-05 07:09 ------- (In reply to comment #11)
> I've looked at the problem. The -Wall option will set the -Wnonstd-intrinsic > option. This flag appears to trigger a warning when used with -pedantic. > It does not trigger a warning if you use it with just -std=f95. I am getting rather confused now. I would like to compile code that (with regard to language) is mostly strict Fortran 95 *except* using the rather common intrinsic extensions iargc and getarg. Therefore I use "-std=f95 -Wall", but not -pedantic, because I also use other people's code that I do not want to fix. If something does not strictly adhere to the standard, getting a warning is fine, but stopping with an error is annoying. (This is how I used g77 and why I liked it very much. Easy to handle.) BTW: I just checked -Wnonstd-intrinsics (did not know about it before) and found that I cannot turn it off by using "-Wno-nonstd-intrinsics". I guess that this is a bug. Back to your suggestion: > I have a patch that will turn this back into a warning. Will this > make you happy? > > troutmask:sgk[255] gfc4x -std=f95 -fall-intrinsics -Wnonstd-intrinsics -o z > iargc.f90 > In file iargc.f90:5 > > print *, iargc() > 1 > Warning: Intrinsic 'iargc' at (1) is not included in the selected standard > troutmask:sgk[256] ./z 2 > 1 > Any chance that "-std=f95 -Wall -fall-intrinsics" could do the same, maybe (*cough*) without (*cough*) a warning, needless to say an error? If I want a warning even with -fall-intrinsics, I would turn it on again with -Wnonstd-intrinsics. Cheers, -ha -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20248