disable call argument order alignment, issue warning instead
authorStefan Behnel <scoder@users.berlios.de>
Sat, 19 Mar 2011 10:07:48 +0000 (11:07 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 19 Mar 2011 10:07:48 +0000 (11:07 +0100)
Cython/Compiler/ExprNodes.py
tests/bugs.txt

index 1fe85384318c802822279342798c20a412688869..d90b4b17fe4bf65cba3fe99203fb6a895f9f2875 100755 (executable)
@@ -3054,7 +3054,11 @@ class SimpleCallNode(CallNode):
                     # nogil anyway)
                     pass
                 else:
-                    self.args[i] = arg.coerce_to_temp(env)
+                    #self.args[i] = arg.coerce_to_temp(env)
+                    # instead: issue a warning
+                    if i > 0 or i == 1 and self.self is not None: # skip first arg
+                        warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0)
+                        break
         # Calc result type and code fragment
         if isinstance(self.function, NewExprNode):
             self.type = PyrexTypes.CPtrType(self.function.class_type)
index b11f292980eba0a5b64952ff496394d5494fbc9f..a5cebffc18125f01e9b968bd90f6ac4fa45ce58f 100644 (file)
@@ -18,6 +18,7 @@ pure_mode_cmethod_inheritance_T583
 genexpr_iterable_lookup_T600
 for_from_pyvar_loop_T601
 decorators_T593
+temp_sideeffects_T654
 
 # CPython regression tests that don't current work:
 pyregr.test_threadsignals