[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Sander Vrijders

New submission from Sander Vrijders:

I am writing C90 compliant code and am wrapping my C headers with SWIG, which 
includes python3.6m/pyport.h. I've told my compiler to report all warnings as 
errors. Compilation fails with the following error:

```
/usr/include/python3.6m/pyport.h:40:1: error: C++ style comments are not 
allowed in ISO C90
 // long long is required. Ensure HAVE_LONG_LONG is defined for compatibility.
```

I believe the comment was added by the patch of a previous bug (see 
https://hg.python.org/cpython/rev/4745d801cae2). The solution would be to 
change this comment to a C90 comment.

--
messages: 285045
nosy: Sander Vrijders
priority: normal
severity: normal
status: open
title: pyport.h uses non C90-style comment
type: compile error
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue29215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29215] pyport.h uses non C90-style comment

2017-01-09 Thread Sander Vrijders

Sander Vrijders added the comment:

Okay, a bit conflicted about the following though. The changelog refers to 
PEP7. This document indeed states that Python versions greater than or equal to 
3.6 use C89 with several select C99 features, such as C++-style line comments. 
But then below that it has a rule that says never use C++ style // one-line 
comments. That seems contradictory.

FYI, I mean not complaining about stdint.h, gcc (and clang) also support those 
with the C90 switch turned on. 

Or should I just assume that all headers are henceforth C99 and any wrapping 
code should also be C99? Though it seems a bit overkill to kill all 
compatibility for a single comment line. If I use a C89 comment on my system 
the build works perfectly.

--

___
Python tracker 
<http://bugs.python.org/issue29215>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com