This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: cc1.exe: warnings being treated as errors


Andrew Haley <aph@redhat.com> writes:

> On 09/19/2011 06:59 PM, Jon Grant wrote:
>
>> 
>> I noticed that when compiling C files with GCC and using the -Werror
>> option, I see this additional output:
>> 
>> cc1.exe: warnings being treated as errors
>> ./src/main.c: In function 'main':
>> ./src/main.c:41:15: error: unused variable 'hello'
>> 
>> Is the "cc1" line output needed?
>
> Oh, sure.  It's really helpful to see an explanation as to why the
> compilation stopped on an apparently legal C program.

In the past, definitely, but today I'm going to argue that now that
-fdiagnostics-show-option is the default, we can reasonably remove that
line.  Consider:

foo.c: In function âfooâ:
foo.c:1:18: error: unused variable âhelloâ [-Werror=unused-variable]
cc1: all warnings being treated as errors

The -Werror= tag output by -fdiagnostics-show-option provides all the
required information.

Ian


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