Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | /* RUN: clang-cc -std=c90 -fsyntax-only %s -verify -pedantic-errors |
Chris Lattner | 806c3b9 | 2008-07-25 18:42:46 +0000 | [diff] [blame] | 2 | */ |
Chris Lattner | 921e9ff | 2007-11-14 16:14:50 +0000 | [diff] [blame] | 3 | |
| 4 | enum { cast_hex = (long) ( |
Chris Lattner | 806c3b9 | 2008-07-25 18:42:46 +0000 | [diff] [blame] | 5 | 0x0p-1 /* expected-error {{hexadecimal floating constants are a C99 feature}} */ |
Chris Lattner | 921e9ff | 2007-11-14 16:14:50 +0000 | [diff] [blame] | 6 | ) }; |
Chris Lattner | 8402c73 | 2009-01-16 22:39:25 +0000 | [diff] [blame] | 7 | |
| 8 | /* PR2477 */ |
| 9 | int test1(int a,int b) {return a//* This is a divide followed by block comment in c89 mode */ |
| 10 | b;} |
| 11 | |
| 12 | // comment accepted as extension /* expected-error {{// comments are not allowed in this language}} |
| 13 | |