|  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: 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.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2008-02-29 05:58 UTC]
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:

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).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-29 08:35 UTC]
Assigned to the author of the code.
 [2008-02-29 09:27 UTC]
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
Thank you for the report, and for helping us make PHP better.

Thanks for the patch.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 10:03:36 2021 UTC