public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/111639] New: HAVE_ACOSF etc. are wrong on avr
@ 2023-09-29 13:35 redi at gcc dot gnu.org
  2023-09-29 14:07 ` [Bug libstdc++/111639] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2023-09-29 13:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111639

            Bug ID: 111639
           Summary: HAVE_ACOSF etc. are wrong on avr
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---
            Target: avr

The <math.h> in avr-libc does things like this:

extern double acos(double __x) __ATTR_CONST__;
#define acosf   acos            /**< The alias for acos().      */

and then crossconfig.m4 does:

  avr*-*-*)
    AC_DEFINE(HAVE_ACOSF)
    AC_DEFINE(HAVE_ASINF)
    AC_DEFINE(HAVE_ATAN2F)
    AC_DEFINE(HAVE_ATANF)
    AC_DEFINE(HAVE_CEILF)
    AC_DEFINE(HAVE_COSF)
    AC_DEFINE(HAVE_COSHF)
    AC_DEFINE(HAVE_EXPF)
    AC_DEFINE(HAVE_FABSF)
    AC_DEFINE(HAVE_FLOORF)
    AC_DEFINE(HAVE_FMODF)
    AC_DEFINE(HAVE_FREXPF)
    AC_DEFINE(HAVE_SQRTF)
    AC_DEFINE(HAVE_HYPOTF)
    AC_DEFINE(HAVE_LDEXPF)
    AC_DEFINE(HAVE_LOG10F)
    AC_DEFINE(HAVE_LOGF)
    AC_DEFINE(HAVE_MODFF)
    AC_DEFINE(HAVE_POWF)
    AC_DEFINE(HAVE_SINF)
    AC_DEFINE(HAVE_SINHF)
    AC_DEFINE(HAVE_TANF)
    AC_DEFINE(HAVE_TANHF)
    ;;

But this doesn't work, because <cmath> has to #undef all math function names,
so we #undef the acosf macro and then the HAVE_ACOSF macro is left defined but
is now lying.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-15 13:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29 13:35 [Bug libstdc++/111639] New: HAVE_ACOSF etc. are wrong on avr redi at gcc dot gnu.org
2023-09-29 14:07 ` [Bug libstdc++/111639] " redi at gcc dot gnu.org
2023-09-30 19:16 ` gjl at gcc dot gnu.org
2023-09-30 19:21 ` redi at gcc dot gnu.org
2023-10-01  8:17 ` gjl at gcc dot gnu.org
2023-10-01  8:37 ` redi at gcc dot gnu.org
2023-10-01 16:54 ` gjl at gcc dot gnu.org
2023-10-01 19:04 ` redi at gcc dot gnu.org
2023-10-01 19:05 ` redi at gcc dot gnu.org
2024-06-15 13:28 ` gjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).