Hello ...
gcc 3.3 aborts with
i_rle.cc: In function `void _write_block(rle_out*)':
i_rle.cc:81: error: non-lvalue in unary `&'
make[2]: *** [i_rle.lo] Error 1
the gcc 3.3 seemed to have a prolem with the gentto patch of the
plotutils-2.4.1/libplot/i_rle.c file
---------------- ORIGNAL PATCH -----------
--- plotutils-2.4.1/libplot/i_rle.c~ Sun Jun 27 18:58:10 1999
+++ plotutils-2.4.1/libplot/i_rle.c Sun Jun 16 03:22:30 2002
@@ -78,7 +78,7 @@
else if (rle->outstream)
{
rle->outstream->put ((unsigned char)(rle->oblen));
- rle->outstream->write (&(rle->oblock[0]), rle->oblen);
+ rle->outstream->write (&(const char)(rle->oblock[0]), rle->oblen);
}
#endif
--------------------- MODIFIED PATCH ------------------------
--- plotutils-2.4.1/libplot/i_rle.c~ Sun Jun 27 18:58:10 1999
+++ plotutils-2.4.1/libplot/i_rle.c Sun Jun 16 03:22:30 2002
@@ -78,7 +78,7 @@
else if (rle->outstream)
{
rle->outstream->put ((unsigned char)(rle->oblen));
- rle->outstream->write (&(rle->oblock[0]), rle->oblen);
+ rle->outstream->write ((const char*)(&rle->oblock)), rle->oblen);
}
#endif
------------------------------------------------------------------------
Look on the rle_out definantion
{
....
unsigned char oblock[256];
...
}
&rle->oblock[0] are pointer of char -- gcc typeid Pc
&rle->oblock are pointer of an arry of chars -- gcc typeid PA256_c
both can be converted to conts char *
I don't know why &(const char)(rle->oblock[0]) don't compile it works on my
small testprogram
bye
bernd
---- ebuild info
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.3, glibc-2.3.2-r2)
=================================================================
System uname: 2.4.20-ck4 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="rsync://ftp.belnet.be/gentoo/
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg kde gnome libg++ mikmod
mmx mpeg ncurses nls pdfl
ib png quicktime spell truetype xml2 xmms xv zlib directfb gtkhtml alsa gdbm
berkdb slang readline arts
tetex aalib bonobo svga ggi tcltk java guile mysql X sdl gpm tcpd pam libwww
ssl perl python esd imlib
oggvorbis gtk qt motif opengl mozilla ldap cdr"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon-tbird -march=athlon-tbird -O3 -pipe"
CXXFLAGS="-mcpu=athlon-tbird -march=athlon-tbird -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache notitles"