[cfe-commits] patch: add flag to warn_redecl_library_builtin

Dmitri Gribenko gribozavr at gmail.com
Sat Dec 22 16:34:39 PST 2012


Hi Nick,

On Fri, Dec 21, 2012 at 11:01 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> The attached patch adds a flag to control warn_redecl_library_builtin,
> -Wlibrary-redeclaration. I also update Misc/warning-flags.c. Please review!

Seems like the point of this review is to bikeshed on the warninig
group name, so, here goes.

-Wlibrary-redeclaration seems to suggest that we will warn on any
redecl of a library function, like "it'd be better to use #include
<foo.h> instead of declaring foo() directly".  I'd suggest
-Wincompatible-library-redeclaration or -Wbad-library-redeclaration.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list