[PATCH v2 01/10] ldbl-128ibm-compat: workaround C++ redirect limitations
Joseph Myers
joseph@codesourcery.com
Wed Apr 1 23:07:12 GMT 2020
On Wed, 1 Apr 2020, Paul E Murphy via Libc-alpha wrote:
> GCC 9.2 is more pedantic about type checking the redirect declarations
> for non-system headers. I am not sure if there is less obtrusive way
> to dodge these warnings when building C++ tests using the headers from
> the glibc under construction.
Warnings about inconsistency of attributes for aliases were addressed by
using __attribute_copy__ in alias macros. Those warnings typically
indicated that code using the aliases would be suboptimal in some way (not
fully optimized based on attributes, or with diagnostics based on those
attributes potentially missing).
This seems like something similar, but about C++ exception specifications
instead of attributes. If there isn't some way to copy exception
specifications, maybe there needs to be a variant of __LDBL_REDIR_DECL
where attributes / exception specifications / ... can be passed in
explicitly. Then you can include __THROWNL in that call to
__LDBL_REDIR_DECL and similarly for all other such redirected functions
where __THROWNL is part of the declaration of the original function.
> I noticed this occurs on FSF GCC 9.2, but not 9.3 and newer. The
> documentation is vague about which warnings and errors are disabled by
> system_header pragma.
Or if it's a GCC bug it would be useful to identify exactly which bug in
GCC Bugzilla it is / which commit fixed it (and potentially have a
workaround that is explicitly conditioned on the buggy GCC versions with a
comment referencing the exact bug and fixed versions).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list