php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78276 Weakref does not compile on newer GCC
Submitted: 2019-07-11 21:07 UTC Modified: 2019-07-13 10:22 UTC
From: hellvis69 at gmail dot com Assigned: colder (profile)
Status: Assigned Package: Weakref (PECL)
PHP Version: 7.3.7 OS: Alpine Linux 3.9+, Debian 9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-07-11 21:07 UTC] hellvis69 at gmail dot com
Description:
------------
weakef-0.3.3

/tmp/pear/temp/Weakref/wr_weakref.c: In function 'wr_weakref_ref_acquire':
/tmp/pear/temp/Weakref/wr_weakref.c:47:30: error: lvalue required as increment operand
    GC_REFCOUNT(wref->ref_obj)++;
                              ^~
Makefile:197: recipe for target 'wr_weakref.lo' failed
make: *** [wr_weakref.lo] Error 1
ERROR: `make' failed


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-13 10:22 UTC] cmb@php.net
-Assigned To: +Assigned To: colder
 [2019-07-13 10:22 UTC] cmb@php.net
I don't think it makes much sense to fix the compile error, since
the extension can't work with PHP 7.3+ anyway[1].  As of PHP
7.4.0, there is a built-in WeakReference class[2] which partially
can serve as replacement.

Anyhow, assigning to maintainer.

[1] <https://wiki.php.net/rfc/weakrefs#introduction>
[2] <https://www.php.net/manual/en/class.weakreference.php>
 [2019-07-15 07:13 UTC] hellvis69 at gmail dot com
Ah, thanks for the info.. didn't notice these changes.

I was upgrading a legacy project using PHP 7.0 and we rely on WeakRef heavily.

I will stick to PHP 7.2 for the moment until.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Aug 23 11:01:26 2019 UTC