[Python-Dev] Does trunk still support any compilers that *don't* allow declaring variables after code?

Curt Hagenlocher curt at hagenlocher.org
Wed May 2 16:13:24 CEST 2012


On Wed, May 2, 2012 at 6:56 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:

> I'm not sure if MSVC and MSVC++ are the same thing, but I surely remember
> reports by MSVC users only a few years ago that Cython generated C code
> contained a declaration after an executed code at some point, and that
> failed to compile for them. So, assuming that MSVC++ "added this extension
> in the early 90s" and didn't remove it in the meantime, they must be two
> different things.


I believe you need to tell MSVC that it's a C++ source file by using "/Tp"
in order to make this work. And of course, there would be other
ramifications for doing that.

-Curt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120502/4907602d/attachment.html>


More information about the Python-Dev mailing list