|
@@ -3821,6 +3821,17 @@ sub process {
|
|
|
WARN("DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON",
|
|
|
"do {} while (0) macros should not be semicolon terminated\n" . "$herectx");
|
|
|
}
|
|
|
+ } elsif ($dstat =~ /^\+\s*#\s*define\s+$Ident.*;\s*$/) {
|
|
|
+ $ctx =~ s/\n*$//;
|
|
|
+ my $cnt = statement_rawlines($ctx);
|
|
|
+ my $herectx = $here . "\n";
|
|
|
+
|
|
|
+ for (my $n = 0; $n < $cnt; $n++) {
|
|
|
+ $herectx .= raw_line($linenr, $n) . "\n";
|
|
|
+ }
|
|
|
+
|
|
|
+ WARN("TRAILING_SEMICOLON",
|
|
|
+ "macros should not use a trailing semicolon\n" . "$herectx");
|
|
|
}
|
|
|
}
|
|
|
|