This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年12月14日 21:16 by skip.montanaro, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg77828 - (view) | Author: Skip Montanaro (skip.montanaro) * (Python triager) | Date: 2008年12月14日 21:16 | |
I don't know if the Python source is supposed to be compilable with a C++ compiler or not, but I'm having trouble finding a C compiler on the Solaris10/SPARC machines at work. I decided to give a C++ compiler a whirl: /opt/gnu/bin/c++ -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I../Include -DPy_BUILD_CORE -o Parser/tokenizer.o ../Parser/tokenizer.c ../Parser/tokenizer.c: In function `char * PyTokenizer_RestoreEncoding(tok_state *, int, int *)': ../Parser/tokenizer.c:1614: ANSI C++ forbids implicit conversion from `void *' in assignment Now this turns out to be a very old compiler: % /opt/gnu/bin/c++ --version 2.95.3 Should Python be able to compile with this ancient GNU C++ compiler? Thx, Skip |
|||
| msg77829 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年12月14日 21:20 | |
Python should be compile-able with a C++ compiler. I'll test it on my system in a couple of minutes. |
|||
| msg77833 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年12月14日 21:29 | |
The trunk contains lots of implicit casts from void pointers that make the code incompatible with C++. |
|||
| msg77835 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2008年12月14日 21:31 | |
I disagree. It's not a requirement that the Python source code is compilable as C++. Only the header files should be thus compilable. |
|||
| msg77836 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年12月14日 21:36 | |
Ah, I was under the impression that Python must be compatible both C++ and C89 compilers. Do we have any means to test the C++ compatibility of the header files? Full C++ compatibility is one way to make sure the header files are compatible, too. *wink* I don't see harm in sprinkling explicit type casts over the C code, too. |
|||
| msg77838 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2008年12月14日 21:48 | |
> Do we have any means to test the C++ compatibility of the header files? No, we fix it when users report bugs (which typically happens very quickly after we made some). > Full C++ compatibility is one way to make sure the header files are > compatible, too. *wink* I don't see harm in sprinkling explicit type > casts over the C code, too. That requires discussion, I'm opposed to such a change: it adds unnecessary complication. In any case, such discussion would belong to python-dev. |
|||
| msg77874 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2008年12月15日 16:27 | |
Closing as "won't fix" for now. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:42 | admin | set | github: 48915 |
| 2008年12月15日 16:27:33 | loewis | set | status: open -> closed resolution: wont fix messages: + msg77874 |
| 2008年12月14日 21:48:47 | loewis | set | messages: + msg77838 |
| 2008年12月14日 21:36:33 | christian.heimes | set | messages: + msg77836 |
| 2008年12月14日 21:31:36 | loewis | set | nosy:
+ loewis messages: + msg77835 |
| 2008年12月14日 21:29:56 | christian.heimes | set | messages: + msg77833 |
| 2008年12月14日 21:20:48 | christian.heimes | set | nosy:
+ christian.heimes messages: + msg77829 |
| 2008年12月14日 21:16:32 | skip.montanaro | create | |