Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 2021 14:33:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 255290] _POSIX_C_SOURCE=200809 hides static_assert
Message-ID:  <bug-255290-99-CbRbD2JzR8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255290-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255290-99@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=3D255290

--- Comment #4 from Tobias Kortkamp <tobik@freebsd.org> ---
> static_assert was added, I believe, in C11 and C++11. As such, it should
> be hidden from the 2008 posix environment.

This was my initial reaction too when I tried to defend FreeBSD's behavior.
But what are you basing this on?

> 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.

That would be fine if we were asking for C99 but we are asking for
C11 with POSIX 2008 specifically, so should static_assert then not
be unhidden since it is allowed by C11?

> Additional symbols not required or explicitly permitted by IEEE Std 1003.=
1-2001
> to be in that header shall not be made visible, except when enabled by an=
other
> feature test macro.

Would you interpret -std=3D{c,gnu}11 as "another feature test macro" (or
something that sets some, specifically __STDC_VERSION__=3D201112)?

--=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-255290-99-CbRbD2JzR8>