Created attachment 251956 [details] test.shar When the C file with a single include is compiled with 'cc -std=c99 -pedantic-errors test.c' - it fails: $ sh run.sh In file included from test.c:1: /usr/include/stdatomic.h:385:10: error: member reference base type '_Bool' is not a structure or union 385 | return (atomic_exchange_explicit(&__object->__flag, 1, __order)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/stdatomic.h:303:39: note: expanded from macro 'atomic_exchange_explicit' 303 | ((void)(order), __sync_swap(&(object)->__val, desired)) | ~~~~~~~~^ ~~~~~ /usr/include/stdatomic.h:392:2: error: member reference base type '_Bool' is not a structure or union 392 | atomic_store_explicit(&__object->__flag, 0, __order); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/stdatomic.h:334:9: note: expanded from macro 'atomic_store_explicit' 334 | ((void)atomic_exchange_explicit(object, desired, order)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/stdatomic.h:303:39: note: expanded from macro 'atomic_exchange_explicit' 303 | ((void)(order), __sync_swap(&(object)->__val, desired)) | ~~~~~~~~^ ~~~~~ 2 errors generated.
The problem started happening ~2024-06-22.
stdatomic.h is the C11 feature.
(In reply to Konstantin Belousov from comment #2) Then maybe there should be a check for this with a graceful error message.
The feature is C11, but the error is self-inflicting: code is compiled in pedantic mode + gnu99. Otherwise, it would just work.
There's no graceful way to check for this. You've asked for non-standard things in the C99 environment, so you may not be able to enable all error messages possible, even if it did used to work... As the compilers are updated for newer standards, they may produce new errors for older system... It's interesting that it's visible on this port. I'll take a look, but it may need to be tweaked how it builds.
I'm a little surprised it's trying to compile c99, though, given it's meson.build file: default_options: ['c_std=c11', 'warning_level=3', 'libdir=lib'],
(In reply to Warner Losh from comment #6) oh, I see that was the "fix"....
Closing this based on the above discussion. Please feel free to re-open if that makes sense.