------- Comment #2 from pinskia at gcc dot gnu dot org  2007-11-24 12:15 -------
A quick untested patch which I have not even tested on this testcase:
Index: stmt.c
===================================================================
--- stmt.c      (revision 130381)
+++ stmt.c      (working copy)
@@ -1408,6 +1408,9 @@ warn_if_unused_value (const_tree exp, lo
   if (EXPR_HAS_LOCATION (exp))
     locus = EXPR_LOCATION (exp);

+  while (TREE_CODE (exp) == NON_LVALUE_EXPR)
+    exp = TREE_OPERAND (exp, 0);
+
   switch (TREE_CODE (exp))
     {
     case PREINCREMENT_EXPR:


-- 


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

Reply via email to