diff options
Diffstat (limited to 'bin/warnhist')
-rwxr-xr-x | bin/warnhist | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/warnhist b/bin/warnhist index 680a0e8..fc42209 100755 --- a/bin/warnhist +++ b/bin/warnhist @@ -227,6 +227,9 @@ while (<>) { # Skip variables with the word 'warning' in them next if $_ =~ /_warning_/; + # Skip AMD Optimizing Compiler (aocc) lines "<#> warning(s) generated." + next if $_ =~ / warnings? generated\./; + # "Hide" the C++ '::' symbol until we've parsed out the parts of the line while($_ =~ /\:\:/) { $_ =~ s/\:\:/@@@@/g; @@ -242,6 +245,18 @@ while (<>) { } elsif($_ =~ /^\s*[Ww]arning:.*/) { $name = $last_c_name; ($toss, $warning, $extra, $extra2) = split /\:/, $_; + # Check for file-scope gcc Fortran warning output + } elsif($_ =~ /f\d\d\d: Warning:/) { + # These are interspersed with the "compiling a file" output + # when compiling with `make -j` and thus difficult to tie to + # any particular file. They are due to things like inappropriate + # build options and don't have a line number. + # + # They start with f, as in f951 + $name = "(generic)"; + $line = int(rand(1000000)); # Hack to avoid counting as duplictates + + ($warning) = $_ =~ /\[(.*)\]/x; # Check for FORTRAN warning output } elsif($_ =~ /^Warning:.*/) { $name = $last_fort_name; |