PHP 4.0 Bug #5911: ANSI C violation: lvalues are not assignable

From: Date: Tue, 01 Aug 2000 21:20:28 +0000
Subject: PHP 4.0 Bug #5911: ANSI C violation: lvalues are not assignable
Groups: php.dev 
Request: Send a blank email to php-dev+get-27315@lists.php.net to get a copy of this message
From: emschwar@rmi.net Operating system: Solaris 2.7 PHP version: 4.0.1 PHP Bug Type: Compile Failure Bug description: ANSI C violation: lvalues are not assignable In java.c, in the latest PHP 4.01pl2 source, there are several lines of the form: (pval*)(long)result = object; One example is on line 349. This is a violation of the ANSI C standard, which explicitly states, in section A7.5 (Casts), "An expression with a cast is not an lvalue." This fails on Solaris 2.7, and my brother has reported seeing it on AIX as well (though I don't know the version). The fix is simple: cast object, not result: result = (jlong)object; This bug is on lines 349, 370 and 406.

« previous php.dev (#27315) next »