Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15054 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46124 invoked by uid 1010); 17 Feb 2005 19:34:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 46103 invoked from network); 17 Feb 2005 19:34:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2005 19:34:55 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:44122] helo=mail.zend.com) by pb1.pair.com (ecelerity 1.2 (r4437)) with SMTP id 13/10-39535-DD1F4124 for ; Thu, 17 Feb 2005 14:34:54 -0500 Received: (qmail 21735 invoked from network); 17 Feb 2005 19:34:49 -0000 Received: from localhost (HELO DORON-LAPTOP.zend.com) (127.0.0.1) by localhost with SMTP; 17 Feb 2005 19:34:49 -0000 Message-ID: <5.1.0.14.2.20050217113348.01eb30b0@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 17 Feb 2005 11:34:47 -0800 To: Joe Orton ,internals@lists.php.net In-Reply-To: <20050217163606.GE2051@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] [Zend PATCH] zend_modules.h invalid C vs GCC 4 From: andi@zend.com (Andi Gutmans) References: <20050217163606.GE2051@redhat.com> Will take a look at that struct thingy. As far as the warnings, a lot of the are bogus and I wouldn't want to hide them with explicit casting. This might hide bugs which exist. It will definitely be good to go through them though and see if/what needs fixing. Thanks, Andi At 04:36 PM 2/17/2005 +0000, Joe Orton wrote: >If struct _zend_arg_info is an incomplete type, the declarations in >zend_modules.h like: > >extern struct _zend_arg_info first_arg_force_ref[2]; > >are not valid C code (it doesn't make sense to declare an array if the >compiler does not know what size each element is, so this is not hard to >understand). > >I guess this is what the Netware guys already found and why they added >the conditional include of zend_compile.h to declare the zend_arg_info >struct. GCC 4 will also reject this code. Any reason why this include >cannot be done unconditionally? > >FYI, there are about 3000 lines of warnings in HEAD with a current GCC 4 >snapshot compiled at -Wall: > >http://www.apache.org/~jorton/gcc4.php-Wall.log > >--- Zend/zend_modules.h 30 Oct 2004 19:27:42 -0000 1.62 >+++ Zend/zend_modules.h 17 Feb 2005 16:31:21 -0000 >@@ -23,10 +23,8 @@ > #define MODULES_H > > #include "zend.h" >- >-#ifdef NETWARE > #include "zend_compile.h" >-#endif >+ > #define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC > #define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC > #define SHUTDOWN_FUNC_ARGS int type, int module_number TSRMLS_DC > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php