[PATCH] D108865: [AMDGPU] Use gcc pragmas to disable -Wtype-limits warning
Vince Bridgers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 28 03:58:40 PDT 2021
vabridgers created this revision.
vabridgers added a reviewer: foad.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
vabridgers requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Use gcc pragmas to disable warning in generated filed. This is producing
a warning when using using gcc 9.3.0.
lib/Target/AMDGPU/R600GenSubtargetInfo.inc:282:62: warning: comparison
of unsigned expression < 0 is always false [-Wtype-limits]
if (Bits[R600::FeatureLocalMemorySize0] && LocalMemorySize <0)
LocalMemorySize = 0;
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108865
Files:
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -37,7 +37,10 @@
#define GET_SUBTARGETINFO_TARGET_DESC
#define GET_SUBTARGETINFO_CTOR
#define AMDGPUSubtarget GCNSubtarget
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wtype-limits"
#include "AMDGPUGenSubtargetInfo.inc"
+#pragma GCC diagnostic pop
#undef AMDGPUSubtarget
static cl::opt<bool> DisablePowerSched(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108865.369248.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210828/a83255b5/attachment.bin>
More information about the llvm-commits
mailing list