public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/113398] New: <string> no longer usable with -ffreestanding
@ 2024-01-15 13:10 redi at gcc dot gnu.org
  2024-01-15 13:12 ` [Bug libstdc++/113398] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2024-01-15 13:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113398
           Summary: <string> no longer usable with -ffreestanding
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

This used to work with GCC 12 when compiled with -ffreestanding

#include <string>

// Defined by the user.
void* operator new(std::size_t n);
void operator delete(void*, std::size_t n);

int main()
{
  std::string s = "a string that needs to allocate from the heap";
  return s.size();
}


Since GCC 13 the -ffreestanding option also selects a freestanding libstdc++,
which doesn't allow std::string to be used.

The change was done intentionally, to provide a more clearly defined and
documented freestanding library, but it removes functionality that was being
used.

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

end of thread, other threads:[~2024-01-24  3:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 13:10 [Bug libstdc++/113398] New: <string> no longer usable with -ffreestanding redi at gcc dot gnu.org
2024-01-15 13:12 ` [Bug libstdc++/113398] " redi at gcc dot gnu.org
2024-01-15 14:06 ` redi at gcc dot gnu.org
2024-01-24  3:42 ` hp 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).