bug-gnulib
[Top][All Lists]
Advanced

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

gcc/g++-warning.spec: remove -Wswitch-enum?


From: Reuben Thomas
Subject: gcc/g++-warning.spec: remove -Wswitch-enum?
Date: Sun, 27 May 2018 08:59:48 +0100

The default warnings set contains -Wswitch-default, which gives a warning if a switch lacks a default case. Therefore, -Wswitch is useless, because (assuming authors fix all warnings) there will already be a default label. In order to catch missing enumeration cases, -Wswitch-enum is needed.

(If on the other hand it's thought that warning when all enumeration cases are not covered is excessive, -Wswitch should be added to the .spec files to signal this intent, even thought currently it will have no effect.)

--
https://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]