Re: Warning usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Daniel Walter-2 wrote:
> 
> I have recently upgraded to a newer GCC compiler and have received a lot
> of 
> new warnings. Many of these warnings are great and have found bugs that
> went 
> undetected in my software for many years. Thank you GCC developers. 
> Unfortunately some of these new warnings seem to be coding style dependent 
> or not reasonably usable with the code base that I have.  This has caused
> me 
> to turn off some warning options that in the past have been very helpful.
> 
> On other compilers, I generally start by setting the warning level at the 
> highest value and making all warnings errors. From there I either fix the 
> code as possible or pragma off warnings based on the responses from the 
> compiler. I have tried using this strategy with GCC and I have run into
> two 
> problems.
> 1. The GCC warning messages do not tell me which warning options I need to 
> turn off either with compiler switches or pragmas.
> 
> 2. When I find a compiler switch to turn off a warning, it generally seems 
> to turn off a group of related warnings rather than one very specific 
> warning. I am concerned this means that I am losing a lot of very useful 
> warning information.
> 
> Is there an alternate strategy to making the most of warning information
> in 
> GCC?  Any ideas on a way to find which warning options I need to turn off 
> based on the warning messages would also be useful.
> 
> Daniel Walter
> 
> 

Compile with -fdiagnostics-show-option.  This will show with each warning
what option controls generation of that warning.

John Boncek
-- 
View this message in context: http://old.nabble.com/Warning-usage-tp30022570p30023119.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux