[issue39615] cpython/abstract.h not compatible with C90

2020-03-24 Thread Peter Eisentraut


Peter Eisentraut  added the comment:

3.9.0a5 fixes my original issue.  Thanks.

--

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think we should distinguish minimal supported C standard for compiling 
CPython itself and for compiling extensions. We can use all C99 features 
supported by main compilers in the code of CPython, but C99 is not even 
compatible with C++, and it may be not compatible with extensions written in 
other languages (D, Rust, Go, etc), so I think we should use more restricted 
version in headers.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

C99 is not disallowed in headers.

--
nosy: +benjamin.peterson
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'd suggest mentioning this on python-dev, if you want to change the policy.

--

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


Peter Eisentraut  added the comment:

That's fair for code internal to CPython itself, but these are header files 
included by third-party code that is embedding Python, so a bit more 
flexibility and adaptability would be welcome there.

--

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

PEP 7 says that this is allowed:

Python versions greater than or equal to 3.6 use C89 with several select C99 
features:
...
- intermingled declarations

So I don't think these changes should be accepted.

--
nosy: +eric.smith

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


Change by Peter Eisentraut :


--
keywords: +patch
pull_requests: +17851
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18481

___
Python tracker 

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



[issue39615] cpython/abstract.h not compatible with C90

2020-02-12 Thread Peter Eisentraut


New submission from Peter Eisentraut :

Some inline functions use mixed declarations and code.  These end up visible in 
third-party code that includes Python.h, which might not be using a C99 
compiler.

Example:

In file included from 
/Users/peter/python-builds/3.9/include/python3.9/abstract.h:843,
 from 
/Users/peter/python-builds/3.9/include/python3.9/Python.h:147,
 from plpython.h:59,
 from plpy_typeio.h:10,
 from plpy_cursorobject.h:8,
 from plpy_cursorobject.c:14:
/Users/peter/python-builds/3.9/include/python3.9/cpython/abstract.h:74:5: 
warning: ISO C90 forbids mixed declarations and code 
[-Wdeclaration-after-statement]
   74 | Py_ssize_t offset = tp->tp_vectorcall_offset;
  | ^~

--
components: Interpreter Core
messages: 361880
nosy: petere
priority: normal
severity: normal
status: open
title: cpython/abstract.h not compatible with C90
versions: Python 3.9

___
Python tracker 

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