From 3bcd988251e21dbc5bc6617b1c67aad6cf24a465 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 22 Nov 2018 10:26:29 +0100 Subject: [PATCH] re PR c++/87386 (Error message for static_assert show wrong range) PR c++/87386 * parser.c (cp_parser_operator): Use str.get_value () instead of just str in USERDEF_LITERAL_VALUE and USERDEF_LITERAL_SUFFIX_ID arguments. From-SVN: r266369 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/parser.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ad061f204c4..e870205541b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2018-11-22 Jakub Jelinek + + PR c++/87386 + * parser.c (cp_parser_operator): Use str.get_value () instead of just + str in USERDEF_LITERAL_VALUE and USERDEF_LITERAL_SUFFIX_ID arguments. + 2018-11-21 Jakub Jelinek PR c++/88122 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e3569b2ecef..3a98ed900cd 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -15306,8 +15306,8 @@ cp_parser_operator (cp_parser* parser, location_t start_loc) return error_mark_node; else if (TREE_CODE (str) == USERDEF_LITERAL) { - string_tree = USERDEF_LITERAL_VALUE (str); - id = USERDEF_LITERAL_SUFFIX_ID (str); + string_tree = USERDEF_LITERAL_VALUE (str.get_value ()); + id = USERDEF_LITERAL_SUFFIX_ID (str.get_value ()); end_loc = str.get_location (); } else -- 2.30.2