]> granicus.if.org Git - clang/commitdiff
Create a warning group "non-gcc" for diagnostics which are not enabled
authorJohn McCall <rjmccall@apple.com>
Fri, 6 Nov 2009 07:53:21 +0000 (07:53 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 6 Nov 2009 07:53:21 +0000 (07:53 +0000)
by default in GCC.  Users who want to emulate gcc's warning behavior
exactly should be able to use CC="clang -Wno-non-gcc";  this should help
projects to transition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86241 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td

index 2a998d17c66ee6591da99c89158ce5e4aa4d8a1e..bfaebae873cbf0a08c75e082dfa17e161fa0369c 100644 (file)
@@ -159,3 +159,7 @@ def : DiagGroup<"all", [Most, Parentheses]>;
 def : DiagGroup<"", [Extra]>;  // -W = -Wextra
 def : DiagGroup<"endif-labels", [ExtraTokens]>; // endif-labels = endif-tokens
 
+// A warning group for warnings that we want to have on by default in clang,
+// but which aren't no by default in GCC.
+def NonGCC : DiagGroup<"non-gcc",
+    [SignCompare]>;