[all-commits] [llvm/llvm-project] d54dfd: [Clang] Fix build with GCC 14 on ARM (#78704)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jan 19 06:20:11 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d54dfdd1b53ff72344287d250c2b67329792c840
      https://github.com/llvm/llvm-project/commit/d54dfdd1b53ff72344287d250c2b67329792c840
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-01-19 (Fri, 19 Jan 2024)

  Changed paths:
    M clang/include/clang/Basic/AttributeCommonInfo.h
    M clang/include/clang/Basic/TokenKinds.def
    M clang/utils/TableGen/ClangAttrEmitter.cpp

  Log Message:
  -----------
  [Clang] Fix build with GCC 14 on ARM (#78704)

GCC 14 defines `__arm_streaming` as a macro expanding to
`[[arm::streaming]]`. Due to the nested macro use, this gets expanded
prior to concatenation.

It doesn't look like C++ has a really clean way to prevent macro
expansion. The best I have found is to use `EMPTY ## X` where `EMPTY` is
an empty macro argument, so this is the hack I'm implementing here.

Fixes https://github.com/llvm/llvm-project/issues/78691.




More information about the All-commits mailing list