Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12898 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64572 invoked by uid 1010); 19 Sep 2004 05:34:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64546 invoked from network); 19 Sep 2004 05:34:36 -0000 Received: from unknown (HELO colo.lerdorf.com) (66.198.51.121) by pb1.pair.com with SMTP; 19 Sep 2004 05:34:36 -0000 Received: from [192.168.1.103] (c-24-6-200-247.client.comcast.net [24.6.200.247]) by colo.lerdorf.com (8.13.1/8.13.1/Debian-13) with ESMTP id i8J5YYcg022458 for ; Sat, 18 Sep 2004 22:34:35 -0700 Date: Sat, 18 Sep 2004 22:34:27 -0700 (PDT) To: internals@lists.php.net Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Intel icc compiler warnings From: rasmus@lerdorf.com (Rasmus Lerdorf) Out of curiosity I built HEAD with Intel's icc 8.1 compiler on my Debian laptop today. The full set of warnings (425k worth) are at: http://lerdorf.com/icc_warnings.txt There are some fun ones in there, like these: /home/rasmus/php-src/Zend/zend_alloc.c(252): warning #186: pointless comparison of unsigned integer with zero && offset >= 0) { ^ Zend/zend_execute.h(83): warning #1572: floating-point equality and inequality comparisons are unreliable result = (op->value.dval ? 1 : 0); ^ /home/rasmus/php-src/sapi/cli/php_cli.c(773): warning #25: quoted string should contain at least one character case '': /* generate indented source mode*/ ^ /home/rasmus/php-src/ext/session/mod_files.c(332): warning #266: function declared implicitly n = pread(data->fd, *val, sbuf.st_size, 0); ^ /home/rasmus/php-src/ext/session/mod_files.c(368): warning #266: function declared implicitly n = pwrite(data->fd, val, vallen, 0); ^ The invalid attribute and unsigned vs. signed warnings really clutter things up making it hard to find the more interesting warnings. The icc compiled libphp5.so was 9,816,098 bytes vs. 11,804,220 for gcc. Other things I compiled also consistently showed icc creating much smaller binaries. But that appears to just be due to a lot more symbol info. If I strip both I get: gcc libphp5.so 2,590,412 icc libphp5.so 2,793,780 Performance-wise it seems the icc binary is slower, but that is only from a very unscientific benchmark and I wonder if loading an icc php binary into a gcc Apache binary might not slow things down a bit. I haven't looked into the gcc compatibility libraries icc ships with to understand that well enough. But on first glance icc appears to generate a larger and slower libphp5.so. -Rasmus