[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Aw: Re: GCC 13.1 compile error when using CXXFLAGS=-std=c++20
From:       Jakub Jelinek via Gcc <gcc () gcc ! gnu ! org>
Date:       2023-04-27 9:40:39
Message-ID: ZEpDFyAXbt63plXA () tucnak
[Download RAW message or body]

On Thu, Apr 27, 2023 at 11:35:23AM +0200, Helmut Zeisel wrote:
> > Von: "Jakub Jelinek" <jakub@redhat.com>
> > An: "Helmut Zeisel" <HZ2012@gmx.at>
> > Cc: gcc@gcc.gnu.org
> > Betreff: Re: GCC 13.1 compile error when using CXXFLAGS=-std=c++20
> > 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. 
> 
> Dont do *what*?
> export CXXFLAGS=... ?

Include explicit -std= settings in such exported variables, especially when
building GCC.  Packages should decide themselves in which language version
they are written in, or if they are written in common subset, they should
just defer to the compiler default.
Note, doing that would break building even much older GCC versions.

> unset CXXFLAGS ?
> Compile GCC 13 with GCC 12?

	Jakub


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic