On-topic: alternate Python implementations
Ulrich Eckhardt
ulrich.eckhardt at dominolaser.com
Wed Aug 8 04:29:11 EDT 2012
Am 04.08.2012 15:53, schrieb Stefan Behnel:
> So, if a C++ compiler takes a .c file and compiles it with C language
> semantics, it doesn't qualify as a C compiler? That implies a rather weird
> definition of a C compiler, I'd say.
I'd say that even a brainfuck compiler compiling a .py file with C
language semantics can shamelessly call itself a C compiler. :P
If a C++ compiler is given C code, it may or may not produce equivalent
executables. In most non-trivial cases it will just barf on the valid C
/ invalid C++ code and refuse to compile it. In few rare cases, it will
compile the code and produce different behaviour at runtime (e.g. for
"sizeof 'a'").
Uli
More information about the Python-list
mailing list