On 09/01/2008, chromatic <[EMAIL PROTECTED]> wrote:
> On Monday 07 January 2008 20:09:26 Jarkko Hietaniemi wrote:
>
> > --- 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;
> > }
>
> I think you're right, however I'd like to hear how the identity-confused ICC
> handles this patch before we apply it. Paul, how does it look?
Unfortunately I haven't been able to test the patch, however, icc
*should* handle -W flags exactly the same as gcc. And if it doesn't,
then there is an issue there we (or Intel) should deal with. So, I
would update the patch to ask if we have gcc or icc. I agree that -W
doesn't apply to some other compilers, so it's a good idea to restrict
the warnings checks to those compilers for which it is meaningful.
Paul
>
> -- c
>