------- Comment #19 from pinskia at gcc dot gnu dot org 2007-03-14 00:42
-------
I have a patch which fixes after my patch for PR 30132. The way I fixed it is
an all front-end fix:
Index: typeck.c
===================================================================
--- typeck.c (revision 122880)
+++ typeck.c (working copy)
@@ -4060,6 +4060,14 @@ build_address (tree t)
if (error_operand_p (t) || !cxx_mark_addressable (t))
return error_mark_node;
+ if (TREE_CODE (t) == COND_EXPR)
+ {
+ tree ptrtype = build_pointer_type (TREE_TYPE (t));
+ return build3 (COND_EXPR, ptrtype, TREE_OPERAND (t, 0),
+ build_address (TREE_OPERAND (t, 1)),
+ build_address (TREE_OPERAND (t, 2)));
+ }
+
addr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (t)), t);
return addr;
Create a new COND_EXPR for when we want to create an address of a COND_EXPR, by
this point, we should have errored out.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20280