Skip to content

Commit 136973d

Browse files
committed
build: Allow comments to suppress case fallthrough warnings
By default -Wextra turns on warnings for case fallthoughs, VPR includes some of these which are intentional and commented. This allows GCC to suppress warnings in cases where the comment makes it clear it is intentional.
1 parent 6a181e0 commit 136973d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ else()
141141
"-Winit-self" #Warn about self-initialization
142142
"-Wcatch-value=3" #Warn when catch statements don't catch by reference
143143
"-Wextra-semi" #Warn about redudnant semicolons
144+
"-Wimplicit-fallthrough=3" #Warn about case fallthroughs, but allow 'fallthrough' comments to suppress warnings
144145
#GCC-like optional
145146
#"-Wsuggest-final-types" #Suggest where 'final' would help if specified on a type methods
146147
#"-Wsuggest-final-methods" #Suggest where 'final' would help if specified on methods

0 commit comments

Comments
 (0)