Date: Tue, 7 Jul 2026 17:42:31 +0000 (UTC)
On Tue, 7 Jul 2026, Jāāā Gustedt via Liaison wrote:
> Joshua,
>
> on Mon, 6 Jul 2026 11:15:28 -0400 you (Joshua Berne <berne_at_[hidden]>) wrote:
>
> > Is there any precedent for a control macro (one defined by users to
> > alter the behavior of the program, not by the implementation itself)
> > to begin with __? Or to begin with STDC? Or any other particular
> > form? I could not find any other obvious examples in C or C++ other
> > than NDEBUG whose naming convention we hopefully don't want to use as
> > a precedent.
>
> We currently have `__STDC_WANT_IEC_60559_EXT__`,
> `__STDC_WANT_IEC_60559_TYPES_EXT__` and `__STDC_WANT_LIB_EXT1__` that
> have such a form and semantics.
Note in this regard that there is no consistency in how different WANT
macros are specified (the semantics of different values, requirements for
consistency when different headers are included, reservations with
external linkage). See
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2174.htm - various
details of feature test macros have changed since 2017, but there still
aren't any uniform conventions for their semantics.
> Joshua,
>
> on Mon, 6 Jul 2026 11:15:28 -0400 you (Joshua Berne <berne_at_[hidden]>) wrote:
>
> > Is there any precedent for a control macro (one defined by users to
> > alter the behavior of the program, not by the implementation itself)
> > to begin with __? Or to begin with STDC? Or any other particular
> > form? I could not find any other obvious examples in C or C++ other
> > than NDEBUG whose naming convention we hopefully don't want to use as
> > a precedent.
>
> We currently have `__STDC_WANT_IEC_60559_EXT__`,
> `__STDC_WANT_IEC_60559_TYPES_EXT__` and `__STDC_WANT_LIB_EXT1__` that
> have such a form and semantics.
Note in this regard that there is no consistency in how different WANT
macros are specified (the semantics of different values, requirements for
consistency when different headers are included, reservations with
external linkage). See
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2174.htm - various
details of feature test macros have changed since 2017, but there still
aren't any uniform conventions for their semantics.
-- Joseph S. Myers josmyers_at_[hidden]
Received on 2026-07-07 17:42:41
