php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44288 Sloppy declaration placement causes Window compilation error
Submitted: 2008-02-29 05:58 UTC Modified: 2008-02-29 09:27 UTC
From: ezyang@php.net Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.3CVS-2008-02-29 (CVS) OS: Windows Vista
Private report: No CVE-ID: None
 [2008-02-29 05:58 UTC] 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).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-29 08:35 UTC] tony2001@php.net
Assigned to the author of the code.
 [2008-02-29 09:27 UTC] colder@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC