diff options
Diffstat (limited to 'libcpp/expr.c')
-rw-r--r-- | libcpp/expr.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libcpp/expr.c b/libcpp/expr.c index 07f1b2fb419..519bb878b6f 100644 --- a/libcpp/expr.c +++ b/libcpp/expr.c @@ -540,9 +540,16 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token, SYNTAX_ERROR_AT (virtual_location, "no digits in hexadecimal floating constant"); - if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) - cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, - "use of C99 hexadecimal floating constant"); + if (radix == 16 && CPP_PEDANTIC (pfile) + && !CPP_OPTION (pfile, extended_numbers)) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, + "use of C++11 hexadecimal floating constant"); + else + cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, + "use of C99 hexadecimal floating constant"); + } if (float_flag == AFTER_EXPON) { |