Patch posted by Jarkko Hietaniemi on parrot-porters. I'll be looking at this patch in conjunction with other fixes to this class and its tests.
kid51
--- config/auto/warnings.pm.dist 2008-01-08 05:51:42.000000000 +0200 +++ config/auto/warnings.pm 2008-01-08 06:01:23.000000000 +0200 @@ -132,17 +132,22 @@ $verbose = $conf->options->get('verbose'); print "\n" if $verbose; - # add on some extra warnings if requested - push @potential_warnings, @cage_warnings - if $conf->options->get('cage'); - - push @potential_warnings, '-Wlarger-than-4096' - if $conf->options->get('maintainer'); - - # now try out our warnings - for my $maybe_warning (@potential_warnings) { - $self->try_warning( $conf, $maybe_warning ); + my $gcc = $conf->options->get('gccversion'); + + if (defined $gcc) { + # add on some extra warnings if requested + push @potential_warnings, @cage_warnings + if $conf->options->get('cage'); + + push @potential_warnings, '-Wlarger-than-4096' + if $conf->options->get('maintainer'); + + # now try out our warnings + for my $maybe_warning (@potential_warnings) { + $self->try_warning( $conf, $maybe_warning ); + } } + return 1; }