[pypy-svn] r71181 - pypy/trunk/pypy/translator/c
afa at codespeak.net
afa at codespeak.net
Tue Feb 9 17:57:57 CET 2010
Author: afa
Date: Tue Feb 9 17:57:56 2010
New Revision: 71181
Modified:
pypy/trunk/pypy/translator/c/funcgen.py
Log:
Suppress *many* compilation warnings on Windows,
where a uninitialized variable is used.
gcc seems to be smarter and notices that this appears after a call to abort()...
Modified: pypy/trunk/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/trunk/pypy/translator/c/funcgen.py (original)
+++ pypy/trunk/pypy/translator/c/funcgen.py Tue Feb 9 17:57:56 2010
@@ -778,7 +778,13 @@
return 'fprintf(stderr, "%%s\\n", %s); abort();' % msg
def OP_DEBUG_LLINTERPCALL(self, op):
- return 'abort(); /* debug_llinterpcall should be unreachable */'
+ result = 'abort(); /* debug_llinterpcall should be unreachable */'
+ TYPE = self.lltypemap(op.result)
+ if TYPE is not Void:
+ typename = self.db.gettype(TYPE)
+ result += '\n%s = (%s)0;' % (self.expr(op.result),
+ cdecl(typename, ''))
+ return result
def OP_INSTRUMENT_COUNT(self, op):
counter_label = op.args[1].value
More information about the Pypy-commit
mailing list