[PATCH] D143885: Adjust #pragma warning so GCC is not unhappy

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 01:09:34 PST 2023


rogfer01 created this revision.
rogfer01 added a reviewer: lenary.
Herald added a project: All.
rogfer01 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In  https://github.com/llvm/llvm-project/commit/d768bf994f508d7eaf9541a568be3d71096febf5 a warning to help transitioning was added to `llvm/Support/Host.h` but it includes extra parentheses which make GCC unhappy (clang seems to accept them fine)

  llvm/include/llvm/Support/Host.h:15:20: error: invalid "#pragma GCC warning" directive
     15 | #pragma GCC warning(                                                           \
        |                    ^

This change removes the parentheses around the string literal.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143885

Files:
  llvm/include/llvm/Support/Host.h


Index: llvm/include/llvm/Support/Host.h
===================================================================
--- llvm/include/llvm/Support/Host.h
+++ llvm/include/llvm/Support/Host.h
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #ifdef __GNUC__
-#pragma GCC warning(                                                           \
-    "This header is deprecated, please use llvm/TargetParser/Host.h")
+#pragma GCC warning                                                            \
+    "This header is deprecated, please use llvm/TargetParser/Host.h"
 #endif
 #include "llvm/TargetParser/Host.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143885.496862.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230213/16471845/attachment.bin>


More information about the llvm-commits mailing list