ID:               50771
 Updated by:       [email protected]
 Reported By:      alex dot belonosov at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         *Compile Issues
 Operating System: Linux GCC3.4
 PHP Version:      5.3.1


Previous Comments:
------------------------------------------------------------------------

[2010-01-15 18:27:24] [email protected]

I don't think we want to change the ZEND_GCC_VERSION macro.  We do 
actually want 3004 for GCC 3.4 and not 3400.  The bug is the check for

3400 there.  If we switched to 3400 then how do we handle the check for

GCC 2.96?  That wouldn't work.  Right now we check for 2096.  I have 
changed the 3400 to 3004 in zend.h.

------------------------------------------------------------------------

[2010-01-15 18:26:54] [email protected]

Automatic comment from SVN on behalf of rasmus
Revision: http://svn.php.net/viewvc/?view=revision&revision=293590
Log: Fix gcc version check - bug #50771

------------------------------------------------------------------------

[2010-01-15 17:53:48] alex dot belonosov at gmail dot com

Description:
------------
The definition of ZEND_GCC_VERSION is incorrect in zend.h or further
checks for version 3400 is incorrect.

It's defined as ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
But __GNUC_MINOR__ is usually one digit e.g. __GNUC_MINOR__ is 4 for
GCC3.4. This causes problems with php extensions compatibility built
with GCC3.4 with another PHP built with GCC4+ The reason is difference
in ZEND_FASTCALL definitions under different GCCs. 

I suppose you guys meant 3004 instead of 3400 in ZEND_GCC_VERSION
conditions within zend.h as I think nobody can expect GCC with the minor
version number=400 to make the condition for ZEND_FASTCALL true for
GCC3. See zend.h:169 and below

Or ZEND_GCC_VERSION definition should be changed to ZEND_GCC_VERSION
(__GNUC__ * 1000 + __GNUC_MINOR__ * 100) but you will also need to
correct other ZEND_GCC_VERSION conditions.

Please correct the above in any way as the current code is inconsistent
with all GCC3 since v3.4

Thanks



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50771&edit=1

Reply via email to