parrot/parrot — Issue #709: config/auto/warnings.pm and t/steps/auto/warnings-01.t broken
Author: gerdr
Created: 2012-01-30 19:09:39+00:00
State: open

In response to [this mail](http://lists.parrot.org/pipermail/parrot-dev/2012-January/006576.html), I took a look at the first test failure when using clang - it turns out that both the configure script and the test are broken:

The configure script fails to detect clang; relevant [code snippet](https://github.com/parrot/parrot/blob/master/config/auto/warnings.pm#L282):

if ( defined $conf->data->get('gccversion') ) {
$compiler = $conf->data->get('g++') ? 'g++' : 'gcc';
}
# [...]
elsif ( $conf->option_or_data('cc') =~ /clang/ ) {
$compiler = 'clang';
}

As clang is supposed to be a drop-in replacement for gcc, it provides a `gccversion` and the `elsif` is never reached.

The test expects that `auto::warnings` is skipped if the compiler is not gcc; relevant [code snippet](https://github.com/parrot/parrot/blob/master/t/steps/auto/warnings-01.t#L43):

$conf->data->set( gccversion => undef );
# [...]
is($step->result(), q{skipped}, "Got expected result");

This is wrong for both clang and icc as `auto::warnings` is supposedly knows how to deal with these compilers.