mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
build: Make GCC ignore fallthrough comments
From the GCC manpage: > Wimplicit-fallthrough=5 doesn't recognize any comments as > fallthrough comments, only attributes disable > the warning. So, check for the =5 version after checking for the simple version. This way we get -Wfallhrough with clang and -Wfallthrough -Wfallthrough=5 with GCC, which works.
This commit is contained in:
parent
d9d2eb978d
commit
7194196100
@ -298,7 +298,8 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
||||
'array-bounds',
|
||||
'empty-body',
|
||||
'implicit',
|
||||
'implicit-fallthrough',
|
||||
'implicit-fallthrough', # For non-gcc
|
||||
'implicit-fallthrough=5', # For GCC, only recognize the attribute and no comments
|
||||
'init-self',
|
||||
'int-to-pointer-cast',
|
||||
'main',
|
||||
|
Loading…
Reference in New Issue
Block a user