Implement -Wfour-char-constants, which is an extension, not an extwarn,
and apparently not part of -Wall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70329 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Lexer/constants.c b/test/Lexer/constants.c
index f5fc9e1..c035531 100644
--- a/test/Lexer/constants.c
+++ b/test/Lexer/constants.c
@@ -16,14 +16,20 @@
char c[] = {
- 'df', // expected-warning {{multi-character character constant}}
+ 'df', // expected-warning {{multi-character character constant}}
'\t',
'\\
t',
- '??!' // expected-warning {{trigraph converted to '|' character}}
+ '??!', // expected-warning {{trigraph converted to '|' character}}
+ 'abcd' // expected-warning {{multi-character character constant}}
};
#pragma GCC diagnostic ignored "-Wmultichar"
char d = 'df'; // no warning.
+char e = 'abcd'; // still warn: expected-warning {{multi-character character constant}}
+
+#pragma GCC diagnostic ignored "-Wfour-char-constants"
+
+char f = 'abcd'; // ignored.