Lisandro Dalcin, 28.04.2010 17:57: > Stefan, as you know I'm always fighting against GCC warnigns. > Suddenly, this one started to show up: > > compile_time_unraisable_T370.c:365: warning: > '__pyx_f_28compile_time_unraisable_T370_raiseit' defined but not used > > $ cat tests/errors/compile_time_unraisable_T370.pyx > > cdef int raiseit(): > raise IndexError > if False: raiseit() > > _ERRORS = u""" > FIXME: provide a good error message here. > """ > > Inspecting the generated C code, the "if False: raiseit()" is skipped. > > Is this an intended side effect of your recent work on constant folding?
I wouldn't call it a "side" effect, it's rather the intended behaviour. Code inside of unreachable conditional blocks no longer emits C code. I already fixed a couple of tests, and this one needs fixing, too. It actually needs fixing in two ways - it also lacks an error message that is tested for. IIRC, we agreed to emit a compiler warning for this, right? I don't think there's a way to test for warnings yet, and it looks like the "unraisable" runtime message passes the doctest output catcher. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
