Re: [Zend PATCH] zend_modules.h invalid C vs GCC 4

From: Date: Thu, 17 Feb 2005 19:34:47 +0000
Subject: Re: [Zend PATCH] zend_modules.h invalid C vs GCC 4
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-15054@lists.php.net to get a copy of this message
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


« previous php.internals (#15054) next »