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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ezyang@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 20:01:31 2025 UTC