On Sun, Aug 29, 2021 at 8:34 AM Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Sun, Aug 29, 2021 at 08:24:10AM -0700, H.J. Lu via Gcc-patches wrote:
> > +      if (gcc_version)
> > +     {
> > +       if (in_return)
> > +         {
> > +           static bool warnedm64_ret;
> > +           if (!warnedm64_ret)
> > +             {
> > +               if (warning (OPT_Wpsabi,
> > +                            "the ABI of returning structure with a "
> > +                            "64-bit vector has changed in GCC %d.1",
> > +                            gcc_version))
> > +                 warnedm64_ret = true;
> > +             }
> > +         }
> > +       else
> > +         {
> > +           static bool warnedm64;
> > +           if (!warnedm64)
> > +             {
> > +               if (warning (OPT_Wpsabi,
> > +                            "the ABI of passing structure with a "
> > +                            "64-bit vector has changed in GCC %d.1",
> > +                            gcc_version))
> > +                 warnedm64 = true;
> > +             }
> > +         }
> > +     }
>
> Other -Wpsabi diagnostics in i386.c seems to be done using inform rather
> than warning, why the change?

I will fix it.

> And, can you add wwwdocs description of the ABI change and use
> in %{GCC %d.1%}, so that on recent terminals people can find out the
> details by clicking on it?

How does it work?

[hjl@gnu-tgl-2 gcc]$ gcc -S -m32
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.target/i386/pr65146.c
/export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.target/i386/pr65146.c:5:8:
note: the alignment of ‘_Atomic long long int’ fields changed in GCC
11.1
    5 | struct A { char a; _Atomic long long b; };
      |        ^
[hjl@gnu-tgl-2 gcc]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-gcc-major-version-only
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=generic
--with-arch_32=i686 --with-multilib-list=m32,m64,mx32
--build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)
[hjl@gnu-tgl-2 gcc]$

There is no URL to click.

> See
>           if (!warned && warn_psabi)
>             {
>               const char *url
>                 = CHANGES_ROOT_URL "gcc-11/changes.html#ia32_atomic";
>
>               warned = true;
>               inform (input_location, "the alignment of %<_Atomic %T%> "
>                                       "fields changed in %{GCC 11.1%}",
>                       TYPE_MAIN_VARIANT (type), url);
>             }
>
>         Jakub
>


-- 
H.J.

Reply via email to