A double semi-colon will cause the misleading-indentation warning to miss that a second indented statement is not part by the condiational block. #include <stdio.h> int main(void) { if (1) printf("%s", "true);; return 0; return 1; Removing the extranious semi-colon from the printf() call will correct the problem and gcc will emit a warning as expected. I've tested with 11.3.1 and 12.1.0, and with clang 14, which has the same behavior. This was noticed through a macro that adds a semi-colon in the macro definition, and then has a semi-colon following the call to the macro.