On Jan 23, 2020, Jonathan Wakely <jwak...@redhat.com> wrote: > On 23/01/20 00:20 -0300, Alexandre Oliva wrote: >> On Jan 22, 2020, Jonathan Wakely <jwak...@redhat.com> wrote: >> >>> Isn't allowing arithmetic on function pointers a GNU extension? >> >> Does that matter? This test is only supposed to be compiled by GCC.
> Maybe if somebody was crazy enough to build GCC with -pedantic-errors? In TFLAGS while configuring libstdc++... Yeah, that would fail. >>> I think just adding the #undef to what you had originally is the best >>> version. >> >> 'k, thanks, will adjust, test, post and install. > Thanks. Here's the revised version I'm about to install... Regstrapped on x86_64-linux-gnu along with other patches, also retested on an affected target. reject macros in math decl check From: Alexandre Oliva <ol...@adacore.com> The C++ headers #undef the functions we are testing for, just in case they're implemented as macros, so do that in the cross math decl tests as well. for libstdc++-v3/ChangeLog * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros. * configure: Rebuild. --- libstdc++-v3/configure | 22 ++++++++++++++++++++++ libstdc++-v3/crossconfig.m4 | 1 + 2 files changed, 23 insertions(+) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 2a0cb04..fe18288 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -333,6 +333,7 @@ AC_DEFUN([GLIBCXX_CHECK_MATH_DECL], [ #ifdef HAVE_IEEEFP_H # include <ieeefp.h> #endif +#undef $1 ], [ void (*f)(void) = (void (*)(void))$1; ], [glibcxx_cv_func_$1_use=yes -- Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer FSMatrix: It was he who freed the first of us FSF & FSFLA board member The Savior shall return (true);