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 vstinner
Recipients larry, skrah, vstinner
Date 2013-12-13.16:11:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386951102.95.0.266878013424.issue19976@psf.upfronthosting.co.za>
In-reply-to
Content
> We could call the macro PY_UNUSED or something.

I would prefer Py_UNUSED name. This sounds like a nice addition to Include/pymacros.h.

In C++, you can omit the parameter name, so the macro should take the parameter name: Py_UNUSED(name). Example:

   int foo(int Py_UNUSED(bar)) { return 1 }

In Visual Studio, you can use:

#define Py_UNUSED(NAME) __pragma(warning(suppress:4100)) NAME

For Clang, you can try:

#define Py_UNUSED(NAME) _Pragma(diagnostic ignored "-Wunused") NAME
History
Date User Action Args
2013-12-13 16:11:42vstinnersetrecipients: + vstinner, larry, skrah
2013-12-13 16:11:42vstinnersetmessageid: <1386951102.95.0.266878013424.issue19976@psf.upfronthosting.co.za>
2013-12-13 16:11:42vstinnerlinkissue19976 messages
2013-12-13 16:11:42vstinnercreate