Subject: | [patch] capture warnings and errors from Intel C/C++ |
The attached patch captures warnings and compiler errors from the Intel
C/C++ compiler.
Subject: | test-smoke-icc-capture.diff |
Index: t/logs/icc102.log
===================================================================
--- t/logs/icc102.log (revision 0)
+++ t/logs/icc102.log (revision 0)
@@ -0,0 +1,39 @@
+`sh cflags "optimize='-O3'" mg.o` mg.c
+ CCCMD = icc -DPERL_CORE -c -we147 -mp -no-gcc -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3
+mg.c(628): warning #1011: missing return statement at end of non-void function "Perl_magic_regdatum_set"
+ }
+ ^
+
+mg.c(675): warning #191: type qualifier is meaningless on cast type
+ i = CALLREG_NUMBUF_LENGTH((REGEXP * const)rx, sv, paren);
+ ^
+
+mg.c(675): warning #191: type qualifier is meaningless on cast type
+ i = CALLREG_NUMBUF_LENGTH((REGEXP * const)rx, sv, paren);
+ ^
+
+mg.c(2314): warning #191: type qualifier is meaningless on cast type
+ CALLREG_NUMBUF_STORE((REGEXP * const)rx,paren,sv);
+ ^
+
+mg.c(2314): warning #191: type qualifier is meaningless on cast type
+ CALLREG_NUMBUF_STORE((REGEXP * const)rx,paren,sv);
+ ^
+
+mg.c(2454): (col. 7) remark: LOOP WAS VECTORIZED.
+`sh cflags "optimize='-O3'" pp_sys.o` pp_sys.c
+ CCCMD = icc -DPERL_CORE -c -we147 -mp -no-gcc -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3
+pp_sys.c(4412): warning #188: enumerated type mixed with another type
+ SETi( getpriority(which, who) );
+ ^
+
+pp_sys.c(4428): warning #188: enumerated type mixed with another type
+ SETi( setpriority(which, who, niceval) >= 0 );
+ ^
+
+pp_sys.c(5704): error: expected an identifier
+
+pp_sys.c(5704): error: expected a ";"
+
+compilation aborted for pp_sys.c (code 2)
+make: *** [pp_sys.o] Error 2
Index: t/grepccmsg.t
===================================================================
--- t/grepccmsg.t (revision 1257)
+++ t/grepccmsg.t (working copy)
@@ -26,6 +26,10 @@
wcnt => 2, ecnt => 0, lcnt => 2 },
{ file => 'mingw.log', type => 'gcc',
wcnt => 1, ecnt => 0, lcnt => 32 },
+ { file => 'icc102.log', type => 'icc',
+ wcnt => 5, ecnt => 2, lcnt => 7 },
+ { file => 'icc102.log', type => 'icpc',
+ wcnt => 5, ecnt => 2, lcnt => 7 },
);
plan tests => 1 + 5 * @logs + 1;
Index: lib/Test/Smoke/Util.pm
===================================================================
--- lib/Test/Smoke/Util.pm (revision 1257)
+++ lib/Test/Smoke/Util.pm (working copy)
@@ -460,6 +460,14 @@
# Warning Wnnn filename line: warning description
# Error Ennn:: error description
'(^(?:(?:Warning W)|(?:Error E))\d+ .+? \d+: .+?$)',
+
+ 'icc' => # Intel C on Linux
+ # pp_sys.c(4412): warning #num: text
+ # SETi( getpriority(which, who) );
+ # ^
+ '(^.*?\([0-9]+\): (?:warning #[0-9]+|error): .+$)',
+ 'icpc' => # Intel C++
+ '(^.*?\([0-9]+\): (?:warning #[0-9]+|error): .+$)',
);
exists $OS2PAT{ lc $cc } or $cc = 'gcc';
my $pat = $OS2PAT{ lc $cc };