#44288 [Opn->Asn]: Sloppy declaration placement causes Window compilation error
| From: | tony2001@php.net | Date: | Fri, 29 Feb 2008 08:35:50 +0000 |
| Subject: | #44288 [Opn->Asn]: Sloppy declaration placement causes Window compilation error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122793@lists.php.net to get a copy of this message | ||
ID: 44288
Updated by: tony2001@php.net
Reported By: ezyang@php.net
-Status: Open
+Status: Assigned
Bug Type: SPL related
Operating System: Windows Vista
PHP Version: 5.3CVS-2008-02-29 (CVS)
-Assigned To:
+Assigned To: colder
New Comment:
Assigned to the author of the code.
Previous Comments:
------------------------------------------------------------------------
[2008-02-29 05:58:37] ezyang@php.net
Description:
------------
In some implementations of C, declarations (possibly with initializers)
must occur before any 'regular' code (this is as opposed to C++, which
lets you make declarations wherever you want). Microsoft Visual C++ 2005
Express is one such compiler, and accordingly barfs on some misplaced
declarations in spl_heap.c with error C2275 (cannot use type as
expression). This patch fixes the issue:
http://www.thewritingpot.com/patches/spl-move-declarations.patch
It also fixes the broken Windows builds for PHP 5.3. It also probably
needs to be ported to HEAD (which should be simple, as the two appear to
be in sync).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44288&edit=1