This is the mail archive of the gcc-bugs@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]

[Bug fortran/33141] Intrinsic procedures: Improve warning/error with -std=*



------- Comment #7 from burnus at gcc dot gnu dot org  2008-07-21 14:31 -------
> Regarding -Wnonstd-intrinsic, what should I do there?  It is ignored now, and
> I'll change this in the documentation (as well as mentioning the new flags, of
> course); but do I also have to add some "deprecated" flag (if there is
> something like that), or does the note in the documentation suffice?

I think one should either remove the flag (-> gives an error if one uses an
non-existing -W...) or one should print an error message. Silently ignoring an
option sounds wrong. I think I would go for the former. One should also mention
it in the release notes (http://gcc.gnu.org/gcc-4.4/changes.html). [I currently
all changes are at http://gcc.gnu.org/wiki/GFortran#news but they need to be
transferred at some point to the release notes.]

Thus I think removing the option from both the man page and the f951 is OK;
deprecating it and printing a warning message when using it is also OK.

> Finally:  If an intrinsic called is included in a standard mentioned in
> gfc_option.warn_std, I'm issuing a warning but calling this intrinsic instead
> of treating it EXTERNAL; however, check_intrinsic_standard in intrinsic.c did
> not issue such a warning for GNU extension intrinsics, and I had to take over
> this behaviour as otherwise I'm getting tons of errors about "abort" in the
> testsuite  (because of -pedantic); that's quite ok so, but please confirm this
> is the way to go.

I think with the default options (i.e. -std=gnu) no warning should be printed
with -pedantic when calling  "ABORT()" but for -std=f95 calling "ABORT()"
should cause the an  external abort_ to be called. (Otherwise one can simply
use "-std=f2003 -fall-intrinsics").

That was the case with gfortran 4.2 and makes sense (grep for -fall-intrinsics
in the test cases). Using "gfortran-4.2 -std=f95 test.f90" I get an error that
"abort_" was not found, unless I use -fall-intrinsics.

 * * *

I would suggest to write an email to fortran@ to state the suggested changes.
(This can be done before the patch or together with the patch.) That way,
others can comment on the change. (I think with regards to intrinsics, there
exist bold opinions, though not necessarily on fortran@.)

Maybe one should also try to find the emails about the time -Wnostd-intrinsics
was introduced or when -std=f95 started to silently use the intrinsic function.
I vaguely remember that Daniel Franke was doing some intrinsic checking work -
and this might have been part of it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33141


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