[Bug 255290] _POSIX_C_SOURCE=200809 hides static_assert

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Apr 21 14:13:41 UTC 2021


--- Comment #3 from Warner Losh <imp at FreeBSD.org> ---
Further, the 2004 edition of the Open Group standard has the following in its
Base Specification Issue 6, section 2.2.1. I imagine that similar text is in
all the standards:

---- Quoted from
https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html by
fair use:

The _POSIX_C_SOURCE Feature Test Macro
A POSIX-conforming application should ensure that the feature test macro
_POSIX_C_SOURCE is defined before inclusion of any header.

When an application includes a header described by IEEE Std 1003.1-2001, and
when this feature test macro is defined to have the value 200112L:

All symbols required by IEEE Std 1003.1-2001 to appear when the header is
included shall be made visible.

Symbols that are explicitly permitted, but not required, by IEEE Std
1003.1-2001 to appear in that header (including those in reserved name spaces)
may be made visible.

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 another
feature test macro.

Identifiers in IEEE Std 1003.1-2001 may only be undefined using the #undef
directive as described in Use and Implementation of Functions or The Name
Space. These #undef directives shall follow all #include directives of any
header in IEEE Std 1003.1-2001.

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

More information about the freebsd-standards mailing list