------- Comment #4 from pinskia at gcc dot gnu dot org  2007-11-25 03:10 -------
Confirmed, and here is a patch which really fixes the issue:
Index: ../../gcc/cp/cvt.c
===================================================================
--- ../../gcc/cp/cvt.c  (revision 130402)
+++ ../../gcc/cp/cvt.c  (working copy)
@@ -941,7 +941,8 @@ convert_to_void (tree expr, const char *
                 conversions.  Do not use STRIP_NOPs because it will
                 not strip conversions to "void", as that is not a
                 mode-preserving conversion.  */
-             while (TREE_CODE (e) == NOP_EXPR)
+             while (TREE_CODE (e) == NOP_EXPR
+                    || TREE_CODE (e) == NON_LVALUE_EXPR)
                e = TREE_OPERAND (e, 0);

              code = TREE_CODE (e);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
      Known to fail|                            |4.0.0 4.0.4 4.1.2 4.2.0
                   |                            |4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-25 03:10:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34212

Reply via email to