[fortran] Disable use of -malign-double

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Feb 1 12:24:00 GMT 2007

On 01/02/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> On 2/1/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> > > (Note I agree with Andrew that no special action should be required,
> > > the documentation is quite clear)
> >
> > I think it might not be clear from the point of view of a Fortran user
> > (who knows nothing about the compiler actually linking in a library
> > that the user never required).
> >
> > Perhaps a section "GCC options that most probably won't work for your
> > Fortran code" could be added to the gfortran doc? There, we would
> > explain:
> >   * the reasons why options changing ABI can't be used directly for
> > Fortran programs, even if there's no library involved (because the
> > compiler links in a library)
> >   * a list of common such options
> >   * a hint about the way to work around that if you really need it
> > (ie, building the libraries, including libgfortran, with your
> > ABi-changing option)
> >

(Excuse me if I am saying something idiotic, not sure if I understood
the issue completely)

g++ has an option -Wabi. Why not implement it for Fortran and enable
it by default? Then, if you use -malign-double or any other option or
feature that may break fortran ABI, you get a warning (or an error if
compiling with -Werror). People that really really really want to use
-malign-double can always do -Wno-abi.

Well, just an idea.

More information about the Gcc-patches mailing list