Skip to content
Commit 680f401e authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Anas Nashif
Browse files

compiler: gcc: Add warning option to spot poblematic switches



Option -Wimplicit-fallthrough as the name suggests raises a warning when
there is an implicit fallthrough in a switch clause. This warning does
not happen when the last statement is a return or a call to a function
declared with noreturn attribute.

This flag helps to enforce two MISRA-C rules (not completely), 16.1 and
16.3

Signed-off-by: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent 86b2cbc5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment