[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / Lexer / c90.c
blobd91057257dfbd4d425d39b8b2562e536ea2e4ee2
1 /* RUN: %clang_cc1 -std=c90 -fsyntax-only %s -verify -pedantic-errors
2 */
4 enum { cast_hex = (long) (
5 0x0p-1 /* expected-error {{hexadecimal floating constants are a C99 feature}} */
6 ) };
8 /* PR2477 */
9 int test1(int a,int b) {return a//* This is a divide followed by block comment in c89 mode */
10 b;}
12 // comment accepted as extension /* expected-error {{// comments are not allowed in this language}}
14 void test2() {
15 const char * str =
16 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds" // expected-error{{string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support}}
17 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
18 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
19 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
20 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
21 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
22 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
23 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
24 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
25 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
26 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
27 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
28 "sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds";
31 void test3() {
32 (void)L"\u1234"; // expected-error {{unicode escape sequences are only valid in C99 or C++}}
33 (void)L'\u1234'; // expected-error {{unicode escape sequences are only valid in C99 or C++}}