]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix an UBSAN error in cp/parse.c (PR c++/86653).
authorMartin Liska <mliska@suse.cz>
Tue, 31 Jul 2018 10:32:13 +0000 (12:32 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 31 Jul 2018 10:32:13 +0000 (10:32 +0000)
2018-07-31  Martin Liska  <mliska@suse.cz>

        PR c++/86653
* parser.c (cp_parser_condition): Initialize non_constant_p
        to false.

From-SVN: r263110

gcc/cp/ChangeLog
gcc/cp/parser.c

index d3b3cc2be6c26d963f3de8598d334ef78630952f..128360794e8b403d43451c1e3ac282b834737fdd 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-31  Martin Liska  <mliska@suse.cz>
+
+        PR c++/86653
+       * parser.c (cp_parser_condition): Initialize non_constant_p
+        to false.
+
 2018-07-28  David Malcolm  <dmalcolm@redhat.com>
 
        * error.c (cp_printer): In the leading comment, move "%H" and "%I"
index d44a6b8802885d1a17fa3ae7c29af58ca678e214..93c812f80d737882e2d4b7be103c4c79878fa8fb 100644 (file)
@@ -11721,7 +11721,7 @@ cp_parser_condition (cp_parser* parser)
       if (cp_parser_parse_definitely (parser))
        {
          tree pushed_scope;
-         bool non_constant_p;
+         bool non_constant_p = false;
          int flags = LOOKUP_ONLYCONVERTING;
 
          if (!cp_parser_check_condition_declarator (parser, declarator, loc))