[Bug c++/70275] -w disables all -Werror flags

2016-03-25 Thread kevin-tucker at cox dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70275

Kevin Tucker  changed:

   What|Removed |Added

 CC||kevin-tucker at cox dot net

--- Comment #1 from Kevin Tucker  ---
Tried example on 5.3.0 on Cygwin and got reported results.  
Found similar results for unused variable warnings with following source:
int main()
{
  int i;
  return 0;
}

Compiled with:
gcc -w -Werror=unused-variable -Wunused-variable unused.cpp

Gives no error

Also tried w/v6.0 (updated and built from r234482 of
svn://gcc.gnu.org/svn/gcc/trunk) and got same results.

However, I would think that if "-w" is given, then there are no warnings to
promote to errors, since warnings are disabled.

[Bug c++/70275] -w disables all -Werror flags

2016-03-26 Thread kevin-tucker at cox dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70275

--- Comment #3 from Kevin Tucker  ---
(In reply to Manuel López-Ibáñez from comment #2)
> I'm not sure if this is desired, but changing it is not a huge amount of
> work: One just needs to move the check for
> 
>   /* Give preference to being able to inhibit warnings, before they
>  get reclassified to something else.  */
>   if ((diagnostic->kind == DK_WARNING || diagnostic->kind == DK_PEDWARN)
>   && !diagnostic_report_warnings_p (context, location))
> return false;
> 
> after they get reclassified within diagnostic.c:
> 
> diagnostic_report_diagnostic (diagnostic_context *context,
>   diagnostic_info *diagnostic)
> 
> 
> See
> https://gcc.gnu.org/wiki/GettingStarted#Basics:
> _Contributing_to_GCC_in_10_easy_steps

I'm new to this.  How is is determined if this is a desired change or not?