Re: Werror

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

 



On 10/02/2016 05:11, manojmaybe wrote:

> I am using gcc 4.8.5 in centos 7. I compile c program with flag Werror and
> gcc generate an error
> 
>  variable ‘test’ set but not used [-Werror=unused-but-set-variable]
>      obj* test;
>                 ^
> cc1: all warnings being treated as errors
> 
> But the variable test is used.

You need to provide a small test case exhibiting the problem.

> The same program without any modification and compile with Werror flag in
> centos 6 (gcc 4.4.7) is successfully compiled without any warning and error.
> 
> What is the reason for different behavior of the gcc in two version.

The unused-but-set-variable variable didn't exist in gcc 4.4

Regards.




[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