Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2021 03:45:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 257827] Providing _POSIX_C_SOURCE causes some C++ headers to fail
Message-ID:  <bug-257827-99-C3q1qyo410@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-257827-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-257827-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=3D257827

--- Comment #3 from Warner Losh <imp@FreeBSD.org> ---
It's not illegal to call POSIX code from C++. They are just functions after
all.

What's undefined is to ask for a strict POSIX namespace using the feature t=
est
macros. Without them, everything will be visible. Since the C++ headers use
POSIX features in unspecified ways, I don't think you can come up with a se=
t of
feature test macros that's guaranteed to work in that environment. Since th=
ese
feature test macros are for the user to request things outside of the POSIX
standard defines not be defined, the simplest workaround is to not define t=
hem.

I've not kept up with the Austin Group's standardization process to know if
they are including C++ or not with their next refresh of the standard. We've
not had anything other than technical corrections since 2008.

--=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-257827-99-C3q1qyo410>