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.

classification
Title: defining away __attribute__ is not good
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nascheme Nosy List: nascheme, stevenellmore
Priority: normal Keywords:

Created on 2002-09-08 22:47 by stevenellmore, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg12315 - (view) Author: Steven Ellmore (stevenellmore) Date: 2002-09-08 22:47
In pyport.h, __attribute__ is defined away on compilers 
that aren't known to support it.

In a situation where python is being embedded, this is 
not very friendly behavior.

Some compilers e.g. CodeWarrior support __attribute__, 
but not with the options that Python uses "(format(printf, 
m, n))".

A better solution would be to define a macro e.g. 
PyAttribute and to use that in the python code base 
wherever __attribute__ is currently used.

On compilers that support __attribute__((format(printf, 
m, n))), PyAttribute could be defined, and on compilers 
that don't, it could define to nothing.

That way compilers that partially support __attribute__ 
would not get it silently defined away - which can be 
critical especially if you rely upon __attribute__((aligned
(n))).
msg12316 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002-09-15 14:10
Logged In: YES 
user_id=35752

Fixed in pyport 2.54.
History
Date User Action Args
2022-04-10 16:05:40adminsetgithub: 37154
2002-09-08 22:47:46stevenellmorecreate