← Return to PHP Web Museum

/dev/null

a forum for people who would rather be compiling something

You are not logged in.

#1 2005-12-02 21:10:05

s_h
New member
From: Toronto
Registered: 2005-02-27
Posts: 6

gcc 4.0: invalid lvalue in assignment

Building an old release of a tool from source and gcc 4.0 stops with:

Code:

parse.c:212: error: invalid lvalue in assignment

The line is ((char *)p) += len; and it builds fine with 3.4. What changed?


registered linux user #398112

Offline

 

#2 2005-12-02 21:34:50

retupmoc
New member
From: Portland, OR
Registered: 2004-06-19
Posts: 9

Re: gcc 4.0: invalid lvalue in assignment

Cast-as-lvalue was a GNU extension and it was removed in 4.0. Write it as p = (char *)p + len; or build that one package with gcc-3.4.


(setq inhibit-startup-message t)

Offline

 

#3 2005-12-02 22:02:16

s_h
New member
From: Toronto
Registered: 2005-02-27
Posts: 6

Re: gcc 4.0: invalid lvalue in assignment

That did it, thanks. Two more of those further down, same fix.


registered linux user #398112

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson