re PR c++/87386 (Error message for static_assert show wrong range)
authorJakub Jelinek <jakub@redhat.com>
Thu, 22 Nov 2018 09:26:29 +0000 (10:26 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 22 Nov 2018 09:26:29 +0000 (10:26 +0100)
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
gcc/cp/parser.c

index ad061f2..e870205 100644 (file)
@@ -1,3 +1,9 @@
+2018-11-22  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <jakub@redhat.com>
 
        PR c++/88122
index e3569b2..3a98ed9 100644 (file)
@@ -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