This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Turn on -Werror by default


On Sun, Jan 15, 2006 at 09:04:01PM +0100, Mark Kettenis wrote:
> > This patch is a policy statement that the GDB developers agree with you
> > on the importance of warning-free code, which will inconvenience you
> > not at all, and me a great deal.  Can you see where I'm coming from?
> 
> Yes.  But warning-free code used to be the policy back in the GCC 3
> days.  I'm not aware that we dropped that policy; MAINTAINERS still
> lists -Werror in the "Target ISA" section.

When we started committing incomplete patches to address bits of GCC 4
warnings without regards for GCC 3 builds, we dropped this policy in
practice.

> > I maintain that the correct way to turn on -Werror is to first fix the
> > warnings.  As the developer who thinks -Werror is an important step
> > forward, the burden is on you to make GDB warning-free on a reasonable
> > set of platforms - I think we both agree on that already.  I'm
> > disputing your reasonable set of platforms, however.
> 
> Since we also seem to agree that the "warn for pointer argument
> passing or assignment with different signedness" warning from GCC 4 is
> mostly pedantry, how about the attached patch, which adds
> -Wno-pointer-sign" to the mix.
> 
> I can add that bit first, and then when we've fixed the few remaining
> warnings, we can enable -Werror.

I think we do need to fix the pointer sign warnings eventually, as a
code cleanliness issue, so perhaps this is a good time to do it. 
You've needled me enough this week that I'm actually rolling now :-)
Give me a few days.

BTW, if we were to go with your patch, wouldn't we would need to
conditionalize the warning on an appropriate version of GCC?  Or is
there pre-existing magic for this in $build_warnings?

I'd gotten it into my head that there was no way to turn these off.
Nice to be wrong about that.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]