[all-commits] [llvm/llvm-project] 6273b5: Roll back use of #warning for header deprecations

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu May 26 11:51:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6273b5cbcdd346a833120c55061ab56f61827068
      https://github.com/llvm/llvm-project/commit/6273b5cbcdd346a833120c55061ab56f61827068
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M clang/lib/Headers/stdbool.h
    M clang/lib/Headers/stdnoreturn.h
    M clang/test/Headers/stdbool.c
    M clang/test/Sema/c2x-noreturn.c

  Log Message:
  -----------
  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.




More information about the All-commits mailing list