Hi
What option needs to be given to compiler to generate warning over this code
switch (case_enum) { case 1: // missing break case 2: break; };
Thanks
I don't know about Clang v6.15, but there might be a Lint/MISRA option for this.
-Wimplicit-fallthrough
https://stackoverflow.com/questions/8809154/how-to-make-gcc-clang-warn-about-missing-breaks-in-switch-statements
If intentional then:
switch (case_enum) { case 1: [[clang::fallthrough]]; case 2: break; };
I naively thought it might be in document:error_and_warnings_reference_guide_100074_6.18_00_en.pdfhttps://developer.arm.com/documentation/100074/0618/?lang=enNo idea where this kind of stuff is documented. Maybe it is unofficial.