On Sun, Jun 16, 2013 at 9:15 AM, Andy Gibbs <[email protected]> wrote:
> On Friday, June 14, 2013 11:05 PM, Richard Smith wrote: > >> Author: rsmith >> Date: Fri Jun 14 16:05:24 2013 >> New Revision: 184005 >> >> URL: >> http://llvm.org/viewvc/llvm-**project?rev=184005&view=rev<http://llvm.org/viewvc/llvm-project?rev=184005&view=rev> >> Log: >> Suppress the c++11 -Wdeprecated warning for 'register' if it is expanded >> from a >> macro defined in a system header. glibc uses it in macros, apparently. >> > > Not just glibc, I'm afraid. Here's the output from using python headers: > > In file included from /usr/include/python2.7/Python.**h:94: > /usr/include/python2.7/**stringobject.h:173:5: warning: 'register' > storage class specifier is deprecated [-Wdeprecated] > register PyObject *obj, /* string or Unicode object */ > ^~~~~~~~~ > /usr/include/python2.7/**stringobject.h:174:5: warning: 'register' > storage class specifier is deprecated [-Wdeprecated] > register char **s, /* pointer to buffer variable */ > ^~~~~~~~~ > /usr/include/python2.7/**stringobject.h:175:5: warning: 'register' > storage class specifier is deprecated [-Wdeprecated] > register Py_ssize_t *len /* pointer to length variable or NULL > ^~~~~~~~~ > > I expect it is unreasonable to ask for all "system" headers to be exempt No, it's perfectly reasonable; in fact, we already suppress warnings pointing into system headers unless you specify -Wsystem-headers. That said, if your command line has something like "-I/usr/include/python2.7", we don't recognize it as a system header. You can use "-isystem /usr/include/python2.7" to make clang treat the Python headers as system headers. -Eli
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
