]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/8615 (ICE in tree_low_cst, at tree.c:3484)
authorMark Mitchell <mark@codesourcery.com>
Tue, 3 Dec 2002 06:53:11 +0000 (06:53 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 3 Dec 2002 06:53:11 +0000 (06:53 +0000)
PR c++/8615
* error.c (dump_expr): Handle character constants with
TREE_OVERFLOW set.

PR c++/8615
* g++.dg/template/char1.C: New test.

From-SVN: r59760

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog

index 491d6e37b338f619af3cd04024da0da3697abf5f..bb4e220eb94a7407aa1359b56645037b1b616aab 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8615
+       * error.c (dump_expr): Handle character constants with
+       TREE_OVERFLOW set.
+
 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/5919
index 8a055582271b8d7e69e2f48b9a62598b0677e112..a945014a5736d8a24f22377ea21829fe44917879 100644 (file)
@@ -1473,7 +1473,10 @@ dump_expr (t, flags)
        else if (type == char_type_node)
          {
            output_add_character (scratch_buffer, '\'');
-           dump_char (tree_low_cst (t, 0));
+           if (host_integerp (t, TREE_UNSIGNED (type)))
+             dump_char (tree_low_cst (t, TREE_UNSIGNED (type)));
+           else
+             output_printf (scratch_buffer, "\\x%x", TREE_INT_CST_LOW (t));
            output_add_character (scratch_buffer, '\'');
          }
        else
index e5183a06b3e8272754a56b2fc04fa6c897d23072..bd154a8c7ac5f9f38defba2fbc596bf93200577f 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8615
+       * g++.dg/template/char1.C: New test.
+
 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/5919