https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100128

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Travis Downs from comment #0)
> Evidently, the behavior and definitions exposed by these headers should not
> depend on the order of include. I suspect there are other cases besides the
> __NO_CTYPE as long as files that don't trigger the C++ header include chain
> like ctype.h exist.

I think that's the only one.

Glibc should probably act as though __NO_CTYPE is implicitly defined by
__cplusplus, so that the effect is independent of the order of includes.

Alternatively, libstdc++ could add its own <ctype.h> wrapper to ensure that we
always include os_defines.h before the libc <ctype.h>.

Reply via email to