[Python-bugs-list] [ python-Bugs-606493 ] defining away __attribute__ is not good

noreply@sourceforge.net noreply@sourceforge.net
Sun, 15 Sep 2002 07:10:40 -0700


Bugs item #606493, was opened at 2002-09-08 22:47
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606493&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Steven Ellmore (stevenellmore)
Assigned to: Neil Schemenauer (nascheme)
Summary: defining away __attribute__ is not good

Initial Comment:
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))).


----------------------------------------------------------------------

>Comment By: Neil Schemenauer (nascheme)
Date: 2002-09-15 14:10

Message:
Logged In: YES 
user_id=35752

Fixed in pyport 2.54.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606493&group_id=5470