2009-12-15 23:14:24 +03:00
/* RUN: %clang_cc1 -std=c90 -fsyntax-only %s -verify -pedantic-errors
2008-07-25 22:42:46 +04:00
*/
2007-11-14 19:14:50 +03:00
enum { cast_hex = ( long ) (
2008-07-25 22:42:46 +04:00
0x0 p - 1 /* expected-error {{hexadecimal floating constants are a C99 feature}} */
2007-11-14 19:14:50 +03:00
) } ;
2009-01-17 01:39:25 +03:00
/* PR2477 */
int test1 ( int a , int b ) { return a //* This is a divide followed by block comment in c89 mode */
b ; }
// comment accepted as extension /* expected-error {{// comments are not allowed in this language}}
2010-07-20 18:33:20 +04:00
void test2 ( ) {
const char * str =
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds " // expected-error{{string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support}}
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds "
" sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds " ;
}