Don't use -Werror
blog.schmorp.de
Don't use -Werror
1–10 of 74 posts
Re: Don't use -Werror
#2Enable -Werror in debug builds, disable it in production builds (in publicly released builds).
Reason: -Werror is helpful for you, useless for a 3rd party.
Re: Don't use -Werror
#3Re: Don't use -Werror
#4Go has the equivalent of -Werror on all the time. How does it address the issue of "your compiler might emit a warning that my compiler didn't?"
Re: Don't use -Werror
#5Go has the equivalent of -Werror on all the time. How does it address the issue of "your compiler might emit a warning that my compiler didn't?"
Re: Don't use -Werror
#6Re: Don't use -Werror
#7One thing is for the compiler to warn about something like implicit conversion of one type to another.
Another, very different, if warning for things that are correct but might be in error (like 'for' without brackets, etc)
Re: Don't use -Werror
#8The problem with GCC, at least at the time I was using it several years ago, is that there seemed to be no way to disable individual warnings. Is that still true (or was it ever?)
Re: Don't use -Werror
#9I use -W4 and -WX with MSVC to enable the highest warning level and flag all warnings as errors. Then I disable a couple of the more pointless warnings (unreferenced formal parameter, unreferenced local function, unreachable code...) that would otherwise keep me from being able to use -W4 without jumping through arbitrary hoops. The problem with GCC, at least at the time I was using it several years ago, is that ther…
Re: Don't use -Werror
#10Summary: Enable -Werror in debug builds, disable it in production builds (in publicly released builds). Reason: -Werror is helpful for you, useless for a 3rd party.