aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 914da81..37d175a 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -1092,9 +1092,7 @@ lex_number (str, len)
if (c == '.')
{
- if (base == 16 && pedantic && !flag_isoc99)
- pedwarn ("floating constant may not be in radix 16");
- else if (floatflag == AFTER_POINT)
+ if (floatflag == AFTER_POINT)
ERROR ("too many decimal points in floating constant");
else if (floatflag == AFTER_EXPON)
ERROR ("decimal point in exponent - impossible!");
@@ -1190,6 +1188,9 @@ lex_number (str, len)
struct pf_args args;
char *copy;
+ if (base == 16 && pedantic && !flag_isoc99)
+ pedwarn ("floating constant may not be in radix 16");
+
if (base == 16 && floatflag != AFTER_EXPON)
ERROR ("hexadecimal floating constant has no exponent");