diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-15 12:08:31 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-15 12:08:31 +0000 |
commit | 14c36b1402b82304739e865a27cb1aed0d87ec73 (patch) | |
tree | 5ca057b6eafdc0abc79daff46e0295d6744dbbfd /gcc/c-family/c-cppbuiltin.c | |
parent | 381c9de17f162d254e184389963319019c763408 (diff) | |
download | gcc-14c36b1402b82304739e865a27cb1aed0d87ec73.tar.gz |
* libcpp/expr.c (cpp_classify_number): Hex floats are new in C++1z.
* libcpp/init.c (lang_defaults): Likewise.
* gcc/c-family/c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.c')
-rw-r--r-- | gcc/c-family/c-cppbuiltin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index dc1f426c7a8..ee953ca44c8 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -818,6 +818,10 @@ c_cpp_builtins (cpp_reader *pfile) if (!pedantic || cxx_dialect > cxx11) cpp_define (pfile, "__cpp_binary_literals=201304"); + /* Similarly for hexadecimal floating point literals and C++17. */ + if (!pedantic || cpp_get_options (parse_in)->extended_numbers) + cpp_define (pfile, "__cpp_hex_float=201603"); + /* Arrays of runtime bound were removed from C++14, but we still support GNU VLAs. Let's define this macro to a low number (corresponding to the initial test release of GNU C++) if we won't |