On Wed, Apr 29, 2020 at 11:34:06AM -0400, David Malcolm wrote:
> > I think it will be called infrequently, and emitting a diagnostic is
> > already
> > slow.  
> 
> I was more concerned about the case for which the url is built but then
> the "inform" is not called - I was worried it might happen per field of
> a struct - but if you think that code path is infrequent, then I trust
> your judgment.

When get_changes_url is called, then inform is also always called, and
I think inform even doesn't do any -Wsystem-headers disabling.
On rs6000 it should be clear from the patch itself, on aarch64/arm it is less 
so,
but it does:
if (... && warn_psabi && warn_psabi_flags && ...)
{
char *url = get_changes_url ("...");
if (warn_psabi_flags & WARN_PSABI_NO_UNIQUE_ADDRESS)
  inform (..., url);
else if (warn_psabi_flags & WARN_PSABI_EMPTY_CXX17_BASE)
  inform (..., url);
}
and the two bits are the only ones ever set in warn_psabi_flags.
So, this is not called e.g. with -Wno-psabi or not called again if it is the
same type as reported last time.

BTW, the patch successfully passed bootstrap/regtest on
{x86_64,i686,powerpc64le}-linux.

        Jakub

Reply via email to