[PATCH] test-assert-c++-variadic.cc: Disable assert_works for GCC 14.2 or later
Tomasz Kaminski
tkaminsk@redhat.com
Wed Mar 4 13:53:22 GMT 2026
On Wed, Mar 4, 2026 at 1:52 PM Florian Weimer <fweimer@redhat.com> wrote:
> * Tomasz Kamiński:
>
> > PR118629 [1] resolved issue with usage of __PRETTY_FUNCTION__
> > (to which assert expands) inside unevaluated context for GCC 14.3.
> >
> > clang supports above snippet for all version that supports --std=c++26
> > flag (since 17.0.1).
> >
> > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118629
> > ---
> > Omitting DCO signed-off-by footer on purpose, the change does not seem
> > copyrightable.
> >
> > assert/test-assert-c++-variadic.cc | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/assert/test-assert-c++-variadic.cc
> b/assert/test-assert-c++-variadic.cc
> > index c220611c4f..3a5c431ae8 100644
> > --- a/assert/test-assert-c++-variadic.cc
> > +++ b/assert/test-assert-c++-variadic.cc
> > @@ -65,6 +65,9 @@ test_enabled ()
> > }
> > }
> >
> > +// GCC PR118629 fixed the handling of assert inside requires clause
> > +#if __GNUC_PREREQ (14, 3) || __clang__
>
> Needs to be: defined __clang__
>
Could you elaborate? clang defines __clang__ to value 1.
And if the __clang__ macro is not present, || __clang__ is false.
>
> Thanks,
> Florian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260304/0f5ae00f/attachment-0001.htm>
More information about the Libc-alpha
mailing list