Re: [Cython] toolchain integration (was Re: preprocessor integration)
Robert Bradshaw [robertwb@...] wrote:
>I second the fact that Pyrex should never generate invalid C code.
:)
>If there are errors, it probably won't be fixed by changing the pyx
>file, rather the compiler itself needs fixing.
My concern was again more about warnings from things in user-level pyx code
that do not necessarily constitute "invalid code", but *could* constitute it.
You know, cases end users are better judges of, ultimately, which usually is
close to tantamount to a "good warning use case".
Examples I'm thinking of are things like expressions "always being true due
to the range of an unsigned type" (or for other reasons), or "using variables
before they're initialized", and that sort of thing. { I've actually found
a few bugs in my own code this way, though only with mucking about in the
generated code or doing a "cython-demangle" in my brain, but such things are
less friendly to more casual users. }
>(but I'm still not convinced that it should be on by default).
Yes, for tracking down bugs in Cython you probably don't want #file/#line, but
the typical user (hopefully!) isn't in that business. Like Linus defaulting
drivers in Linux to what he likes, you surely have the discretionary power to
pick what Cython debuggers particularly want/use most of the time. :) More
seriously, it might make sense at this stage of Cython to default to not
emitting #line and at a later stage to default to emitting it. The choice
also interacts with meta-programs that could generate bogus C, too. It would
probably be best to just import Cython compiler flags from a $CYTHON_FLAGS,
(Continue reading)