Roll back use of #warning for header deprecations
authorAaron Ballman <aaron@aaronballman.com>
Thu, 26 May 2022 18:43:28 +0000 (14:43 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 26 May 2022 18:51:39 +0000 (14:51 -0400)
commit6273b5cbcdd346a833120c55061ab56f61827068
tree10ff4c4c9e2f48cdfeebd1d65abe6a709729c68e
parent7c13ae6490b102a7d14d75c8f502f3e003118f49
Roll back use of #warning for header deprecations

e5ccd668019888de2704ae670da88a7be8cf7e0f and
5029dce492b3cf3ac191eda0b5bf268c3acac2e0 added deprecation warnings to
the <stdbool.h> and <stdnoreturn.h> headers, respectively, because the
headers are deprecated in C2x.

However, there are system headers that include these headers
unconditionally, and #warning diagnostics within system headers are
shown to users instead of suppressed, which means these deprecation
warnings are being triggered in circumstances that users have no
control over except to disable all the warnings through the
_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS macro or other means.

This removes the problematic #warning uses until we find a more
palatable solution.
clang/lib/Headers/stdbool.h
clang/lib/Headers/stdnoreturn.h
clang/test/Headers/stdbool.c
clang/test/Sema/c2x-noreturn.c