]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/14246 (Problems with templates, ice in write_template_arg_literal)
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Thu, 26 Feb 2004 02:17:26 +0000 (02:17 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Thu, 26 Feb 2004 02:17:26 +0000 (02:17 +0000)
PR c++/14246
* mangle.c (write_template_arg_literal): Don't rely on identity for
boolean constants.

From-SVN: r78478

gcc/cp/ChangeLog
gcc/cp/mangle.c

index 44add64734aefa1e327f3f284e1d50fc606a2190..85ee089dbd562f4454280a928d35d31c2dc15513 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/14246
+       * mangle.c (write_template_arg_literal): Don't rely on identity for
+       boolean constants.
+
 2004-02-24  Jason Merrill  <jason@redhat.com>
 
        * tree.c (build_exception_variant): Use check_qualified_type.
index a41c14108f3b2dcc7f8195036cfdffdbadd9c1e0..2580d39866faacd1a590ce75fb6c6f28711ab922 100644 (file)
@@ -2121,9 +2121,9 @@ write_template_arg_literal (const tree value)
     {
       if (same_type_p (type, boolean_type_node))
        {
-         if (value == boolean_false_node || integer_zerop (value))
+         if (integer_zerop (value))
            write_unsigned_number (0);
-         else if (value == boolean_true_node)
+         else if (integer_onep (value))
            write_unsigned_number (1);
          else 
            abort ();