pbiggar / phc

A compiler for PHP
132 stars 37 forks source link

lvalue required as left operand of assignment #133

Closed pbiggar closed 9 years ago

pbiggar commented 9 years ago
Hello. Here is the problem:

1. install php like
cd php-5.3.2
CFLAGS="-O3 -g" ./configure --enable-embed --with-pgsql
--prefix=/home/dmitry/phpc/php
make
make install

2. install phc like
cd phc3303
./configure --with-php=/home/dmitry/phpc/php --prefix=/home/dmitry/phpc/phc3303
make
make install

3. write simple test.php
<code>
<?php
$time=microtime(true);
?>
</code>
or other simple examples with php functions or your examples where classes
or function are used.
BTW: simple example like <? print 'hello world' ?> is worked

4. trying to compile test.php
cd /home/dmitry/phpc/phc3303/bin
./phc -c test.php
<stdin>: In function ‘zif___MAIN__’:
<stdin>:1843: error: lvalue required as left operand of assignment
Error: gcc exited with error 256 (executed via 'gcc
-I/home/dmitry/phpc/php/include/php
-I/home/dmitry/phpc/php/include/php/main
-I/home/dmitry/phpc/php/include/php/TSRM
-I/home/dmitry/phpc/php/include/php/Zend -L/home/dmitry/phpc/php/lib
-Wl,-R/home/dmitry/phpc/php/lib -lphp5 -xc - -ggdb3 -O0 ')

Where is my mistake?

Original issue reported on code.google.com by ludiqely on 2010-04-20 09:13:49

pbiggar commented 9 years ago
This is a bug with the php 5.3 support. Getting rid of the compile error is easy enough,
but it seems like the behaviour of zend_call_function changed in 5.3, which needs a
further change to support the example.

Original issue reported on code.google.com by cubathy on 2010-06-14 18:55:43

pbiggar commented 9 years ago
Fixed in r3304. The behaviour of refcount and fcall_info changed in PHP 5.3.

Original issue reported on code.google.com by cubathy on 2010-06-15 22:22:52