forked from OSchip/llvm-project
Fix a bug handling hex floats in c90 mode, pointed out by Neil.
llvm-svn: 44120
This commit is contained in:
parent
a509f04034
commit
e6c7a858b0
|
@ -224,7 +224,7 @@ NumericLiteralParser(const char *begin, const char *end,
|
|||
}
|
||||
// A binary exponent can appear with or with a '.'. If dotted, the
|
||||
// binary exponent is required.
|
||||
if (*s == 'p' || *s == 'P') {
|
||||
if ((*s == 'p' || *s == 'P') && PP.getLangOptions().HexFloats) {
|
||||
s++;
|
||||
saw_exponent = true;
|
||||
if (*s == '+' || *s == '-') s++; // sign
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: clang -std=c90 -fsyntax-only %s -verify
|
||||
|
||||
enum { cast_hex = (long) (
|
||||
0x0p-1 /* expected-error {{invalid suffix 'p' on integer constant}} */
|
||||
) };
|
Loading…
Reference in New Issue