On Tue, Jul 20, 2021 at 05:24:57PM +0200, Jakub Jelinek wrote:
> On Tue, Jul 20, 2021 at 10:17:08AM -0500, Segher Boessenkool wrote:
> > > I think not all of the -Wpsabi diagnostics is emitted with warning{,_at}
> > > etc. that -w disables, others are emitted with inform.
> > 
> > /* An informative note at LOCATION.  Use this for additional details on an 
> > error
> >    message.  */
> > void
> > inform (location_t location, const char *gmsgid, ...)
> > 
> > So inform is misused in -Wpsabi?
> 
> I bet it is done intentionally not to trigger -Werror, e.g. i386.c uses it
> for the notes that some old GCC version had different ABI for certain
> passing than the current one.

The huge workaround that is -Werror needs more workarounds, how great :-(

> > If using it like this is deemed correct, then inhibit_warnings should
> > turn it off just like it turns off all *stronger* warnings.  The current
> > situation doesn't make much sense.
> > 
> > > The -Wno-psabi
> > > also makes it clear that it is the psabi stuff that is what the testcase
> > > cares about.  Whether -w is also needed or not is something I don't know,
> > > in the past it certainly was needed on various architectures, but maybe it
> > > got fixed and only -Wno-psabi would do the trick?
> > > If so, perhaps we could replace all -Wno-psabi -w occurrences in testsuite
> > > dg-options with just -Wno-psabi and see how far we get.
> > > find testsuite/ -type f | xargs grep -- '-w -Wno-psabi' 2>/dev/null | 
> > > grep -v ChangeLog | wc -l
> > > 49
> > > find testsuite/ -type f | xargs grep -- '-Wno-psabi -w' 2>/dev/null | 
> > > grep -v ChangeLog | wc -l
> > > 24
> > 
> > Note we will disable the -Wpsabi vector warnings for rs6000 from GCC 12
> > on.  It should have been done earlier, but we need a time machine to
> > install a time machine in the past, etc. :-)
> 
> I could understand dropping -Wpsabi warnings of the kind that some very old
> GCC version had different ABI if sufficient number of releases passed since
> then,

That is exactly what we will do, yes.

> but at least x86 also has -Wpsabi warnings that returning a certain
> vector or taking certain vector as parameter has different ABI without
> some particular ISA option.  And those options are valid all the time and
> something people should be aware, e.g. returning 16-byte vector without
> -msse, or 32-byte vector without -mavx, or 64-byte vector without -mavx512f
> - without those ISA switches they are passed/returned as generic vectors,
> while with that option in vector registers.

Yup, understood.  I'm just removing the warnings from rs6000 that are
past their usefulness (and are super annoying in practice).  I brought
it up here because that will remove the need for -Wpsabi in the
testsuite in many cases.  Maybe what I call "many" is heavily influenced
by what I run most though :-)


Segher

Reply via email to