[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280210] '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Jul 2024 18:38:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280210 Bug ID: 280210 Summary: '#include <stdatomic.h>' fails when -std=c99 and -pedantic-errors options are specified (found on the multimedia/librist port) Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: yuri@freebsd.org Created attachment 251956 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=251956&action=edit 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. -- You are receiving this mail because: You are the assignee for the bug.