https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82448
Bug ID: 82448 Summary: GCC web guide contains wrong information about Werror Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: web Assignee: unassigned at gcc dot gnu.org Reporter: alexander.samoylov at gmail dot com Target Milestone: --- The documentation guide https://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Warning-Options.html is wrong. The chapter "3.8 Options to Request or Suppress Warnings" tells that the option -Werror= makes the specified warning into an error, but it is not so. Look at the simple test: ~> gcc --version gcc (Debian 4.3.2-1.1) 4.3.2 ~> gcc -Wsequence-point -c -o test.o test.c test.c: In function 'main': test.c:24: warning: operation on 'Y1_Ptr' may be undefined ~> gcc -Werror=sequence-point -c -o test.o test.c test.c: In function 'main': test.c:24: warning: operation on 'Y1_Ptr' may be undefined It means that -Werror= still does not turn any warning to an error, but the guide for 4.3.2 tells that is does. -Werror=<warning> started to work at some later GCC version. I don't know which, but at least on GCC 4.8.4 it works for me: $ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 $ gcc -Werror=sequence-point -c -o test.o test.c test1.c: In function ‘main’: test1.c:24:16: error: operation on ‘Y1_Ptr’ may be undefined [-Werror=sequence-point] *Y1_Ptr++ = *(Y1_Ptr - 1); ^ cc1: some warnings being treated as errors Please, update each guide https://gcc.gnu.org/onlinedocs/gcc-?.?.?/gcc/Warning-Options.html so that the information about -Werror= is added only for the versions where it works. If there are versions where is works partially (not for all warnings), please refer to exact list of warnings with which it really works. P.S.: I wanted to use the references https://gcc.gnu.org/onlinedocs/gcc-?.?.?/gcc/Warning-Options.html to compare information about warnings between different versions and to find out from which version -Werror=<warning> started to work. With the current wrong content the guide is unusable for that. I can install different GCC versions on the host to determine from which one the option started to work, but it is a lot of work to do this way. -- Best Regards, Alexander.