[cfe-dev] RFC: default to -Werror=format-security

Craig, Ben via cfe-dev cfe-dev at lists.llvm.org
Tue Feb 16 12:22:09 PST 2016


On 2/16/2016 1:18 PM, Nico Weber via cfe-dev wrote:
>
> Won't this line of reasoning lead to all useful warnings being in 
> -Werror eventually? Say, forgetting a return statement in a function 
> is also "just" a warning...

Not all of them :)

Visual Studio groups warnings into big warning level buckets.  Level 1 
has the most important / severe (obvious use of uninitialized value), 
level 4 has fairly minor warnings (unused parameter), and /Weverything 
will tell you about really useless stuff (warning! you just used 
__declspec(align)! ).  I could imagine a world where the "Level 1", and 
maybe "Level 2" warnings were errors by default.

We should make it harder to compile broken code, and easier to write 
correct code.  We can't change it all at once without angering the world 
though :)

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project




More information about the cfe-dev mailing list