[Bug 255290] _POSIX_C_SOURCE=200809 hides static_assert

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Apr 21 14:09:45 UTC 2021


Warner Losh <imp at FreeBSD.org> changed:

           What    |Removed                     |Added
                 CC|                            |imp at FreeBSD.org

--- Comment #1 from Warner Losh <imp at FreeBSD.org> ---
(In reply to Tobias Kortkamp from comment #0)
> I've reported this upstream
> but we have found no evidence that POSIX 2008 mandates C99 and
> should hide static_assert.

If POSIX 2008 and/or C99 do not mandate static_assert, it must be hidden for
them. A general rule is that system headers cannot pollute name spaces of the
user when directed to do so by things like POSIX_C_SOURCE.

static_assert was added, I believe, in C11 and C++11. As such, it should be
hidden from the 2008 posix environment.

I've not checked to see if there's a newer value of POSIX_C_SOURCE that should
define a higher value of either __POSIX_VISIBLE or __ISO_C_VISIBLE, but since
you're using 200809, that's not relevant.

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

More information about the freebsd-standards mailing list