Package: gcc-4.6
Version: 4.6-20110216-1

Hi,

Turning on -Werror so the warnings don't scroll by.

 $ cat test.c
#include <stdio.h>

int main(void)
{
        int x;
        x = printf("hello, world\n");
        return 0;
}
 $
 $ gcc-4.6 -Wall -Werror test.c; echo $?
test.c: In function ‘main’:
test.c:5:6: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
0
 $ gcc-4.6 -Wunused-but-set-variable -Werror test.c; echo $?
test.c: In function ‘main’:
test.c:5:6: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
0
 $ gcc-4.6 -Werror=unused-but-set-variable test.c; echo $?
test.c: In function ‘main’:
test.c:5:6: error: variable ‘x’ set but not used 
[-Werror=unused-but-set-variable]
cc1: some warnings being treated as errors

1

I would have expected all three to error out.

Known problem?
Jonathan 



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to