[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / Lexer / constants.c
blob3d2da2c764e6d536a6b1123099ae3784fc25a633
1 // RUN: %clang_cc1 -fsyntax-only -verify -pedantic -trigraphs %s
3 int x = 000000080; // expected-error {{invalid digit}}
5 int y = 0000\
6 00080; // expected-error {{invalid digit}}
10 float X = 1.17549435e-38F;
11 float Y = 08.123456;
13 // PR2252
14 #if -0x8000000000000000 // should not warn.
15 #endif
18 int c[] = {
19 'df', // expected-warning {{multi-character character constant}}
20 '\t',
21 '\\
22 t',
23 '??!', // expected-warning {{trigraph converted to '|' character}}
24 'abcd' // expected-warning {{multi-character character constant}}
27 // PR4499
28 int m0 = '0';
29 int m1 = '\\\''; // expected-warning {{multi-character character constant}}
30 int m2 = '\\\\'; // expected-warning {{multi-character character constant}}
31 int m3 = '\\\
35 #pragma clang diagnostic ignored "-Wmultichar"
37 int d = 'df'; // no warning.
38 int e = 'abcd'; // still warn: expected-warning {{multi-character character constant}}
40 #pragma clang diagnostic ignored "-Wfour-char-constants"
42 int f = 'abcd'; // ignored.
44 // rdar://problem/6974641
45 float t0[] = {
46 1.9e20f,
47 1.9e-20f,
48 1.9e50f, // expected-warning {{too large}}
49 1.9e-50f, // expected-warning {{too small}}
50 -1.9e20f,
51 -1.9e-20f,
52 -1.9e50f, // expected-warning {{too large}}
53 -1.9e-50f // expected-warning {{too small}}
55 double t1[] = {
56 1.9e50,
57 1.9e-50,
58 1.9e500, // expected-warning {{too large}}
59 1.9e-500, // expected-warning {{too small}}
60 -1.9e50,
61 -1.9e-50,
62 -1.9e500, // expected-warning {{too large}}
63 -1.9e-500 // expected-warning {{too small}}
66 // PR7888
67 double g = 1e100000000; // expected-warning {{too large}}