This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC's -Wswitch-default flag


For what its worth,

GCC is getting a -Wswitch-default flag (warn if a switch doesn't have a 
default case).  I checked GDB (actually a few weeks ago) and building 
one target identified 70 cases (not had given ~1000 switches).

Anyway, this new flag can be tossed onto the end of the list of possible 
-Werror flags that GDB may one day consider adding.

enjoy,
Andrew

PS: If GCC fixes its -Wswitch, there is also a -Wswitch-enum (warn 
missing enum case).  Just need -Wswitch-break (warn fallthrough) :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]