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.

Author tim.peters
Recipients
Date 2005-02-02.02:03:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=31435

rjk1002:  it's idiotic complaints about unambigous (in reality) 
if/else structures that are unique to gcc.  Not all compilers 
optimize away the "do {...} while(0)" cruft in debug builds; 
the most important examples for Python are the Microsoft 
compilers.  Because the incref and decref macros are used a 
*lot*, it's unattractive to burden all platforms with this just 
to shut up one compiler.  I don't care about Py_CLEAR() 
(etc), because they're so lightly used.  The incref/decref 
macros are ubiquitous.

I would much rather see SWIG change to insert curlies.  That 
is, generating "if (newref) {Py_DECREF(obj);}" should be just 
as effective at shutting up this gcc nag.  Has anyone asked 
the SWIG project to do this?
History
Date User Action Args
2007-08-23 14:29:16adminlinkissue1113244 messages
2007-08-23 14:29:16admincreate