g++ 12 -std=gnu++20

Dimitry Andric dimitry@unified-streaming.com
Wed Oct 30 16:00:44 GMT 2024


On 30 Oct 2024, at 16:06, Brian Inglis via Cygwin <cygwin@cygwin.com> wrote:
> Trying to update a package using c++ (requires gcc 12.4+ for adequate c++ 2020 support) and getting confusing error messages.
> 
> It appears that noexcept in the header files may here redefined by the compiler or headers as __GLIBC_NOEXCEPT.
> Those errors look to me like a failure to detect that *glibc* is not available.
> Or is *GLIBCXX* actually *glib* for *cxx*, so this could be a library or compiler issue?
> 
> It appears that str::size() should be a constexpr but something messes it up.
> Or is something else going on here?

As far as I can determine, even a simple example does not work for gcc 12:

#include<string>
#include<cassert>

constexpr bool foo()
{
  std::string str2{"abcwe"};
  return str2.size()==5;
}

static_assert(foo());

int main()
{
  assert(foo());
}

As far as I know, there is no gcc 13 for Cygwin yet, but on Linux and FreeBSD this does compile with gcc 13.

-Dimitry



More information about the Cygwin mailing list