Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15050 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57082 invoked by uid 1010); 17 Feb 2005 16:36:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57067 invoked from network); 17 Feb 2005 16:36:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Feb 2005 16:36:11 -0000 X-Host-Fingerprint: 66.187.233.31 mx1.redhat.com Linux 2.4/2.6 Received: from ([66.187.233.31:53305] helo=mx1.redhat.com) by pb1.pair.com (ecelerity 1.2 (r4437)) with SMTP id B3/95-33104-AF7C4124 for ; Thu, 17 Feb 2005 11:36:10 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j1HGa82c000534 for ; Thu, 17 Feb 2005 11:36:08 -0500 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j1HGa7O22147 for ; Thu, 17 Feb 2005 11:36:07 -0500 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.13.1/8.12.7) with ESMTP id j1HGa6GW006712 for ; Thu, 17 Feb 2005 16:36:06 GMT Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.1/8.12.10/Submit) id j1HGa6Vk006711 for internals@lists.php.net; Thu, 17 Feb 2005 16:36:06 GMT Date: Thu, 17 Feb 2005 16:36:06 +0000 To: internals@lists.php.net Message-ID: <20050217163606.GE2051@redhat.com> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [Zend PATCH] zend_modules.h invalid C vs GCC 4 From: jorton@redhat.com (Joe Orton) 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