public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/109814] [13/14 Regression] freestanding using cmath does not compile anymore
Date: Thu, 11 May 2023 15:58:42 +0000	[thread overview]
Message-ID: <bug-109814-4-d7dDaVkW2r@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109814-4@http.gcc.gnu.org/bugzilla/>

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-05-11
      Known to work|                            |12.3.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
            Summary|freestanding using cmath    |[13/14 Regression]
                   |does not compile anymore    |freestanding using cmath
                   |                            |does not compile anymore
      Known to fail|                            |13.1.0, 14.0

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The new behaviour is documented at
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/libstdc++/manual/manual/using.html
and
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/libstdc++/manual/manual/using_dynamic_or_shared.html
and I've just added something to the release notes about it:
https://gcc.gnu.org/gcc-13/changes.html#libstdcxx

But that doesn't help anybody affected by this.

Is it just <cmath> that you're using? We could pretty easily remove the
<bits/requires_hosted.h> include from that file, and then you could include
<cmath> with -ffreestanding. But if you have a truly freestanding environment
(i.e. no libm present) then nothing in <cmath> is actually going to work.

If people are using more than just <cmath> with -ffreestanding then things get
harder. Where do we draw the line of what is part of the freestanding subset of
libstdc++? Do we just let people include everything, and it's their fault if
they create dependencies on malloc, __cxa_throw, RTTI etc.? That doesn't seem
nice.

  parent reply	other threads:[~2023-05-11 15:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 15:27 [Bug libstdc++/109814] New: " lestofante88 at gmail dot com
2023-05-11 15:38 ` [Bug libstdc++/109814] " xry111 at gcc dot gnu.org
2023-05-11 15:52 ` redi at gcc dot gnu.org
2023-05-11 15:58 ` redi at gcc dot gnu.org [this message]
2023-05-11 16:00 ` [Bug libstdc++/109814] [13/14 Regression] " redi at gcc dot gnu.org
2023-05-11 16:48 ` lestofante88 at gmail dot com
2023-05-11 17:43 ` redi at gcc dot gnu.org
2023-05-11 19:22 ` arsen at gcc dot gnu.org
2023-05-11 19:29 ` pinskia at gcc dot gnu.org
2023-05-12 20:04 ` lestofante88 at gmail dot com
2023-05-12 22:34 ` arsen at gcc dot gnu.org
2023-05-16 20:44 ` pinskia at gcc dot gnu.org
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2023-07-27 10:54 ` redi at gcc dot gnu.org
2023-07-28 10:54 ` arsen at gcc dot gnu.org
2024-05-21  9:15 ` [Bug libstdc++/109814] [13/14/15 " jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109814-4-d7dDaVkW2r@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).