GCC gained a new warning, -Wimplicit-fallthrough, which warns about
implicitly falling through a case statement. The regular expressions
used at the default level (-Wimplicit-fallthrough=3) don't match with
a colon at the end. The comment also needs to be followed (after
optional whitespace and other comments) by a 'case' or 'default'
keyword, i.e. it will not be recognized with a '}' between the comment
and the keyword.
case BASE_TYPE_VECTOR:
if (vectorelem)
return DestinationType(type.VectorType(), vectorelem);
- // else fall thru:
+ // else fall thru
default: return type;
}
}
case BASE_TYPE_VECTOR:
if (vectorelem)
return DestinationMask(type.VectorType(), vectorelem);
- // else fall thru:
+ // else fall thru
default: return "";
}
}
offset = fbb.CreateVector(elements).o;
break;
}
- // FALL-THRU:
}
+ // FALL-THRU
default: { // Scalars and structs.
auto element_size = GetTypeSize(element_base_type);
if (elemobjectdef && elemobjectdef->is_struct())
subobjectdef.bytesize());
break;
}
- // else: FALL-THRU:
}
+ // ELSE FALL-THRU
case reflection::Union:
case reflection::String:
case reflection::Vector: