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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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 Mar 29 09:01:28 2024 UTC