aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog8
-rw-r--r--libcpp/expr.c2
-rw-r--r--libcpp/include/cpplib.h2
-rw-r--r--libcpp/init.c8
4 files changed, 14 insertions, 6 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index cf6f924..3696c76 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,11 @@
+2017-09-15 Jakub Jelinek <jakub@redhat.com>
+
+ * include/cpplib.h (enum c_lang): Rename CLK_GNUCXX1Z
+ to CLK_GNUCXX17 and CLK_CXX1Z to CLK_CXX17.
+ * init.c (lang_defaults, cpp_init_builtins): Likewise.
+ * expr.c (cpp_classify_number): Use C++17 instead of C++1z
+ in diagnostics.
+
2017-07-07 David Malcolm <dmalcolm@redhat.com>
PR c++/79300
diff --git a/libcpp/expr.c b/libcpp/expr.c
index 3eac376..04675d8 100644
--- a/libcpp/expr.c
+++ b/libcpp/expr.c
@@ -636,7 +636,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token *token,
{
if (CPP_OPTION (pfile, cplusplus))
cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0,
- "use of C++1z hexadecimal floating constant");
+ "use of C++17 hexadecimal floating constant");
else
cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0,
"use of C99 hexadecimal floating constant");
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 66ef4d6..8c81f9d 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -171,7 +171,7 @@ enum cpp_ttype
enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11,
CLK_STDC89, CLK_STDC94, CLK_STDC99, CLK_STDC11,
CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
- CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX1Z, CLK_CXX1Z, CLK_ASM};
+ CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17, CLK_ASM};
/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
struct GTY(()) cpp_string {
diff --git a/libcpp/init.c b/libcpp/init.c
index 1477673..0148586 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -108,8 +108,8 @@ static const struct lang_flags lang_defaults[] =
/* CXX11 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0 },
/* GNUCXX14 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0 },
/* CXX14 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
- /* GNUCXX1Z */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1 },
- /* CXX1Z */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
+ /* GNUCXX17 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1 },
+ /* CXX17 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
/* ASM */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
@@ -497,8 +497,8 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
if (CPP_OPTION (pfile, cplusplus))
{
- if (CPP_OPTION (pfile, lang) == CLK_CXX1Z
- || CPP_OPTION (pfile, lang) == CLK_GNUCXX1Z)
+ if (CPP_OPTION (pfile, lang) == CLK_CXX17
+ || CPP_OPTION (pfile, lang) == CLK_GNUCXX17)
_cpp_define_builtin (pfile, "__cplusplus 201703L");
else if (CPP_OPTION (pfile, lang) == CLK_CXX14
|| CPP_OPTION (pfile, lang) == CLK_GNUCXX14)