[svn:parrot] r44849 - in trunk/config: auto init/hints

darbelo at svn.parrot.org darbelo at svn.parrot.org
Wed Mar 10 05:32:45 UTC 2010


Author: darbelo
Date: Wed Mar 10 05:32:44 2010
New Revision: 44849
URL: https://trac.parrot.org/parrot/changeset/44849

Log:
Probe for icc warning flags and place them into @cc_warn@ when icc is detected. They were being hardcoded into @ccflags@ by the linux hints file.

Modified:
   trunk/config/auto/warnings.pm
   trunk/config/init/hints/linux.pm

Modified: trunk/config/auto/warnings.pm
==============================================================================
--- trunk/config/auto/warnings.pm	Wed Mar 10 05:03:53 2010	(r44848)
+++ trunk/config/auto/warnings.pm	Wed Mar 10 05:32:44 2010	(r44849)
@@ -97,6 +97,7 @@
     # begin gcc/g++
     my $gcc = {};
     my $gpp = {};
+    my $icc = {};
 
     my @gcc_or_gpp = qw(
         -falign-functions=16
@@ -217,8 +218,38 @@
         ],
     };
 
+    $icc->{'basic'} = [ qw(
+        -wd269
+        -wd1572
+        -wd1599
+        -wd181
+        -wd869
+        -wd981
+        -wd1419
+        -wd117
+        -wd810
+        -wd177
+        -wd1296
+        -Wall
+        -Wcheck
+        -w2
+        -Wabi
+        -Wcomment
+        -Wdeprecated
+        -Wmain
+        -Wmissing-prototypes
+        -Wpointer-arith
+        -Wreturn-type
+        -Wstrict-prototypes
+        -Wuninitialized
+        -Wunknown-pragmas
+        -Wunused-function
+        -Wunused-variable
+    )];
+
     $data->{'warnings'}{'gcc'} = $gcc;
     $data->{'warnings'}{'g++'} = $gpp;
+    $data->{'warnings'}{'icc'} = $icc;
 
     ## end gcc/g++
 
@@ -235,6 +266,9 @@
     if ( defined $conf->data->get('gccversion') ) {
         $compiler = $conf->data->get('g++') ? 'g++' : 'gcc';
     }
+    elsif ( $conf->option_or_data('cc') =~ /icc/ ) {
+        $compiler = 'icc';
+    }
 
     if ($compiler eq '') {
         print "We do not (yet) probe for warnings for your compiler\n"

Modified: trunk/config/init/hints/linux.pm
==============================================================================
--- trunk/config/init/hints/linux.pm	Wed Mar 10 05:03:53 2010	(r44848)
+++ trunk/config/init/hints/linux.pm	Wed Mar 10 05:32:44 2010	(r44849)
@@ -98,66 +98,6 @@
 sub _handle_icc_ccflags {
     my ($ccflags, $verbose) = @_;
 
-    # suppress sprintf warnings that don't apply
-    $ccflags .= ' -wd269';
-
-    # suppress remarks about floating point comparisons
-    $ccflags .= ' -wd1572';
-
-    # suppress remarks about hiding of parameter declarations
-    $ccflags .= ' -wd1599';
-
-    # suppress remarks about "argument is incompatible with corresponding
-    # format string conversion"
-    $ccflags .= ' -wd181';
-
-    # gcc is currently not looking for unused variables, so should icc
-    # for the time being (this will reduce the noise somewhat)
-    $ccflags .= ' -wd869';
-
-    # ignore "operands are evaluated in unspecified order" warning
-    $ccflags .= ' -wd981';
-
-    # ignore "external declaration in primary source file"
-    # (only done temporarily to reduce noise)
-    $ccflags .= ' -wd1419';
-
-    # ignore "function 'xxx' was declared but never referenced"
-    # (only done temporarily to reduce noise)
-    $ccflags .= ' -wd117';
-
-    # ignore "conversion from "" to "" may lose significant bits"
-    # warnings (only done temporarily to reduce noise)
-    $ccflags .= ' -wd810';
-
-    # ignore "function "" was declared but never referenced"
-    # warnings (only done temporarily to reduce noise)
-    $ccflags .= ' -wd177';
-
-    # ignore warnings springing from problems with computed goto
-    # statements.  If someone can find out how to make icc play nicely
-    # in these situations, that would be good.
-    $ccflags .= ' -wd1296';
-
-    $ccflags .= ' -Wall -Wcheck -w2';
-
-    $ccflags .= ' -Wabi';
-    $ccflags .= ' -Wcomment';
-    $ccflags .= ' -Wdeprecated';
-    $ccflags .= ' -Wmain';
-    $ccflags .= ' -Wmissing-prototypes';
-
-    #$ccflags .= ' -Wp64';
-    $ccflags .= ' -Wpointer-arith';
-    $ccflags .= ' -Wreturn-type';
-    $ccflags .= ' -Wstrict-prototypes';
-
-    #$ccflags .= ' -Wtrigraphs';
-    $ccflags .= ' -Wuninitialized';
-    $ccflags .= ' -Wunknown-pragmas';
-    $ccflags .= ' -Wunused-function';
-    $ccflags .= ' -Wunused-variable';
-
     # enable correct floating point behavior
     # which is *not* the default behavior. ahem.
     $ccflags .= ' -we147';


More information about the parrot-commits mailing list