Commit 3cc8f587 by Giovanni Bajo

re PR c++/14246 (Problems with templates, ice in write_template_arg_literal)

	PR c++/14246
	* mangle.c (write_template_arg_literal): Don't rely on identity for
	boolean constants.

From-SVN: r78478
parent fecf735c
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> 2004-02-24 Jason Merrill <jason@redhat.com>
* tree.c (build_exception_variant): Use check_qualified_type. * tree.c (build_exception_variant): Use check_qualified_type.
......
...@@ -2121,9 +2121,9 @@ write_template_arg_literal (const tree value) ...@@ -2121,9 +2121,9 @@ write_template_arg_literal (const tree value)
{ {
if (same_type_p (type, boolean_type_node)) if (same_type_p (type, boolean_type_node))
{ {
if (value == boolean_false_node || integer_zerop (value)) if (integer_zerop (value))
write_unsigned_number (0); write_unsigned_number (0);
else if (value == boolean_true_node) else if (integer_onep (value))
write_unsigned_number (1); write_unsigned_number (1);
else else
abort (); abort ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment