Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 08:05:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 276738] clang: static_assert conflicts with -std=c++98 -pedantic-errors
Message-ID:  <bug-276738-29464-HEUB2zOavB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-276738-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-276738-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276738

--- Comment #2 from Henri Menke <henri@henrimenke.de> ---
Created attachment 248087
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D248087&action=
=3Dedit
Dockerfile

Thanks for taking a look. While the documentation states that it targets ma=
inly
C++11 and above it doesn't say anywhere explicitly that C++98 is unsupporte=
d.
In fact, there is a subpage on the extended C++03 support in libc++:
https://libcxx.llvm.org/DesignDocs/ExtendedCXX03Support.html

The reason why I believe that this is a bug in FreeBSD, is that using upstr=
eam
clang-17 with the exact same example on a Linux system does not produce the
error (see Dockerfile attached).

Finally I'd like to point out that this problem has been reported on other
issue trackers as well:
https://github.com/google/benchmark/issues/1593
https://github.com/Mbed-TLS/mbedtls/issues/3693
https://stackoverflow.com/questions/70848614/getting-static-assert-is-a-c11=
-specific-feature-with-std-c99-on-freebsd

However, if you decide that C++98 with libc++ is unsupported on FreeBSD, pl=
ease
patch clang to throw an appropriate error message.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276738-29464-HEUB2zOavB>