This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] PR32778 - pedantic warning: intrinsics that are GNU extensions not part of -std=gnu
On Mon, Jul 23, 2007 at 11:12:19PM +0200, Daniel Franke wrote:
> On Monday 23 July 2007 02:38:22 Steve Kargl wrote:
> > I could be wrong (still building and testing), but it appears
> > that this patch removes the usefulness of -fall-intrinsics.
> > The original intent of this option was to permit someone to
> > check the conformance of one's code to either -std=f95
> > and -std=f2003 while permitting nonstandard GNU intrinsic
> > procedures.
>
> I have to admit that I wasn't aware of that option.
>
>
> > I suspect you need to modify this
> >
> > + /* Do not warn about GNU-extensions if -std=gnu. */
> > + if (!gfc_option.warn_nonstd_intrinsics
> > + || (standard == GFC_STD_GNU && gfc_option.warn_std & GFC_STD_GNU)
> >
> > || gfc_option.flag_all_intrinsics == 0)
> >
> > + return SUCCESS;
>
> Yes and no. At the end of options.c (gfc_post_options), one finds:
>
> if (gfc_option.flag_all_intrinsics)
> gfc_option.warn_nonstd_intrinsics = 0;
>
> Hence, IMO, no need to change anything.
Ah, yes, you're correct. A quick test showed that -fall-intrinsics
was still honored, but I hadn't tried to look into why. I don't
remember the options.c(gfc_post_options) bits (may be someone else
added those after my initial patch).
Anyway, the patch is OK for trunk.
--
Steve