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

Bug#616634: gcc-4.6: errors from -pedantic -Werror say "[-Werror=edantic]"



Package: gcc-4.6
Version: 4.6-20110227-1
Severity: minor
Justification: cosmetic
Tags: upstream

Using -Werror with -pedantic to catch constructs the standard does not
permit:

$ ./test.c;	# case (1)
./test.c:6:7: warning: ISO C90 does not support flexible array members [-pedantic]
$ ./test.c -Werror;	# case (2)
./test.c:6:7: error: ISO C90 does not support flexible array members [-Werror=edantic]
cc1: all warnings being treated as errors

$ ./test.c -pedantic-errors;	# case (3)
./test.c:6:7: error: ISO C90 does not support flexible array members [-pedantic]
$
$ cat test.c
#if 0
exec gcc -c -std=c89 -pedantic "$0" "$@"
#else
struct foo {
	int dummy;
	char flex[];
};
#endif

In case (2), I would expect something like "[-pedantic-errors]" or
"[-Werror=pedantic]".  In general, I love these machine-parseable warnings.



Reply to: