blob: f5fc9e1493e64c4ce0663f5a8a70bb4b7e63446c [file] [log] [blame]
Chris Lattnerb77f41e2009-04-28 18:52:02 +00001// RUN: clang-cc -fsyntax-only -verify -pedantic -trigraphs %s
Chris Lattner136f93a2007-07-16 06:55:01 +00002
Chris Lattner2dec3a12009-04-28 18:43:12 +00003int x = 000000080; // expected-error {{invalid digit}}
Chris Lattner136f93a2007-07-16 06:55:01 +00004
5int y = 0000\
Chris Lattner2dec3a12009-04-28 18:43:12 +0000600080; // expected-error {{invalid digit}}
Chris Lattner136f93a2007-07-16 06:55:01 +00007
Chris Lattner2dec3a12009-04-28 18:43:12 +00008
9
10float X = 1.17549435e-38F;
11float Y = 08.123456;
12
13// PR2252
14#if -0x8000000000000000 // should not warn.
15#endif
Chris Lattnerb77f41e2009-04-28 18:52:02 +000016
17
18char c[] = {
19 'df', // expected-warning {{multi-character character constant}}
20 '\t',
21 '\\
22t',
23 '??!' // expected-warning {{trigraph converted to '|' character}}
24};
25
26
27#pragma GCC diagnostic ignored "-Wmultichar"
28
29char d = 'df'; // no warning.