From: Jakub Jelinek <jakub@redhat.com>
To: Helmut Zeisel <HZ2012@gmx.at>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC 13.1 compile error when using CXXFLAGS=-std=c++20
Date: Thu, 27 Apr 2023 11:22:57 +0200 [thread overview]
Message-ID: <ZEo+8Tyu/Mdw+PMH@tucnak> (raw)
In-Reply-To: <trinity-d118f32d-cf85-46cf-b493-568f0c7858f0-1682586559423@3c-app-gmx-bs25>
On Thu, Apr 27, 2023 at 11:09:19AM +0200, Helmut Zeisel via Gcc wrote:
> I compiled GCC 13.1.0 with GCC 12 and had the environment variable CXXFLAGS set to -std=c++20
> This gives the error (both linux and cygin)
>
> gcc-13.1.0/libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications
> 51 | _M_get(size_t __sz) throw(std::bad_alloc)
>
> After
>
> unset CXXFLAGS
>
> compilation works
Don't do it. libstdc++ carefully decides which parts of it should be
compiled by which C++ standard version. By forcing it to use
something it wasn't designed to work with you are breaking its assumptions.
Obviously c++98 code can use C++98 features...
Jakub
next prev parent reply other threads:[~2023-04-27 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 9:09 Helmut Zeisel
2023-04-27 9:22 ` Jakub Jelinek [this message]
2023-04-27 9:35 ` Aw: " Helmut Zeisel
2023-04-27 9:40 ` Jakub Jelinek
2023-05-08 8:38 ` NightStrike
2023-05-08 8:51 ` Jonathan Wakely
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=ZEo+8Tyu/Mdw+PMH@tucnak \
--to=jakub@redhat.com \
--cc=HZ2012@gmx.at \
--cc=gcc@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).