Re: [PATCH] More c++ math reject macros
Apologies! Will do so in the future. Doug On 6/1/20 6:15 AM, Jonathan Wakely wrote: Please CC libstd...@gcc.gnu.org on all libstdc++ patches, even if the approval is coming from a target port maintainer, not from a libstdc++ maintainer. Thanks.
Re: [PATCH] More c++ math reject macros
Please CC libstd...@gcc.gnu.org on all libstdc++ patches, even if the approval is coming from a target port maintainer, not from a libstdc++ maintainer. Thanks.
Re: [PATCH] More c++ math reject macros
Hi, Doug, Sorry about the delay, I'd somehow missed your email. On May 20, 2020, Douglas B Rupp wrote: > 2020-05-20 Douglas B Rupp > libstdc++v3/ > * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): More reject macros. > * configure: Rebuild. The change is ok, but the ChangeLog entry isn't. You're not modifying the m4 macro associated with the name between parentheses, but rather a use thereof. The entry of mine that you based it on actually introduced the m4 macro (and its use), so the parenthesized ChangeLog construct made sense there. Without a change to that macro, as in your patch, it doesn't seem correct. I also realized my own ChangeLog entry was misleading and unclear: macros could refer to both the preprocessor macros defined by the checks, that are then used to reject replacement definitions, or to the standard math functions themselves, that might be implemented by macros in C, and we can't allow such macro implementations to pollute all C++ namespaces. Patch is ok with the following ChangeLog entry: * crossconfig.m4 <*-vxworks>: Check for more math decls. * configure: Rebuild. Thanks! -- Alexandre Oliva, freedom fighterhe/himhttps://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically
[PATCH] More c++ math reject macros
Greetings Alex, You added some math reject macros on 2020-01-23 in gcc-10. Here are a few more. If approved, also request permission to backport to gcc-10 branch. --Douglas Rupp, AdaCore diff --git libstdc++-v3/configure libstdc++-v3/configure index 502f6602001..6b54078ad79 100755 --- libstdc++-v3/configure +++ libstdc++-v3/configure @@ -74116,6 +74116,261 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotl declaration" >&5 +$as_echo_n "checking for hypotl declaration... " >&6; } +if ${glibcxx_cv_func_hypotl_use+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_IEEEFP_H +# include +#endif +#undef hypotl + +int +main () +{ + + void (*f)(void) = (void (*)(void))hypotl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_func_hypotl_use=yes + +else + glibcxx_cv_func_hypotl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotl_use" >&5 +$as_echo "$glibcxx_cv_func_hypotl_use" >&6; } + if test "x$glibcxx_cv_func_hypotl_use" = xyes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_HYPOTL 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpf declaration" >&5 +$as_echo_n "checking for ldexpf declaration... " >&6; } +if ${glibcxx_cv_func_ldexpf_use+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_IEEEFP_H +# include +#endif +#undef ldexpf + +int +main () +{ + + void (*f)(void) = (void (*)(void))ldexpf; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_func_ldexpf_use=yes + +else + glibcxx_cv_func_ldexpf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpf_use" >&5 +$as_echo "$glibcxx_cv_func_ldexpf_use" >&6; } + if test "x$glibcxx_cv_func_ldexpf_use" = xyes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_LDEXPF 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modff declaration" >&5 +$as_echo_n "checking for modff declaration... " >&6; } +if ${glibcxx_cv_func_modff_use+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_IEEEFP_H +# include +#endif +#undef modff + +int +main () +{ + + void (*f)(void) = (void (*)(void))modff; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_func_modff_use=yes + +else + glibcxx_cv_func_modff_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modff_use" >&5 +$as_echo "$glibcxx_cv_func_modff_use" >&6; } + if test "x$glibcxx_cv_func_modff_use" = xyes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_MODFF 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotf declaration" >&5 +$as_echo_n "checking for hypotf declaration... " >&6; } +if ${glibcxx_cv_func_hypotf_use+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_IEEEFP_H +# include +#endif +#undef hypotf + +int +main () +{ + + void (*f)(void) = (void (*)(void))hypotf; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_func_hypotf_use=yes + +else + glibcxx_cv_func_hypotf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotf_use" >&5 +$as_echo "$glibcxx_cv_func_hypotf_use" >&6; } + if test "x$glibcxx_cv_func_hypotf_use" = xyes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_HYPOTF 1 +_ACEOF + + fi + + + + { $as_echo