MOZ_FALLTHROUGH does not avoid -Wimplicit-fallthrough warning with GCC 7

RESOLVED DUPLICATE of bug 1355692

Status

()

RESOLVED DUPLICATE of bug 1355692
a year ago
a year ago

People

(Reporter: botond, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
When compiling m-c with GCC 7, I see warnings like this:

 0:17.55 In file included from /home/botond/dev/projects/mozilla/central/obj-x86_64-pc-linux-gnu/gfx/layers/Unified_cpp_gfx_layers2.cpp:56:0:
 0:17.55 /home/botond/dev/projects/mozilla/central/gfx/layers/apz/src/GestureEventListener.cpp: In member function ‘void mozilla::layers::GestureEventListener::HandleInputTimeoutLongTap()’:
 0:17.55 /home/botond/dev/projects/mozilla/central/gfx/layers/apz/src/GestureEventListener.cpp:530:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
 0:17.55      CancelMaxTapTimeoutTask();
 0:17.55      ~~~~~~~~~~~~~~~~~~~~~~~^~
 0:17.55 /home/botond/dev/projects/mozilla/central/gfx/layers/apz/src/GestureEventListener.cpp:532:3: note: here
 0:17.55    case GESTURE_FIRST_SINGLE_TOUCH_MAX_TAP_DOWN: {
 0:17.55    ^~~~

The affected code *does* have a MOZ_FALLTHROUGH annotation, but that macro expands to nothing when compiling with GCC.

It appears the thing it should expand to is [[gnu::fallthrough]].
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1355692
You need to log in before you can comment on or make changes to this bug.