trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: May 2011

Re: [trinity-devel] kdewebdev - kafkacommon.cpp:745:56: error: using temporary as lvalue [-fpermissive]

From: /dev/ammo42 <mickeytintincolle@...>
Date: Mon, 16 May 2011 08:51:14 +0200
Le Sun, 15 May 2011 18:01:31 -0500,
"David C. Rankin" <drankinatty@...> a �crit :

> On 05/15/2011 06:13 AM, /dev/ammo42 wrote:
> > Le Sat, 14 May 2011 22:11:41 -0500,
> > "David C. Rankin"<drankinatty@...>  a �crit :
> >
> >> Tim, all,
> >>
> >>     kdevelop build fine, but I ran into a lvalue problem in
> >> kdewebdev. I'm building with:
> >>
> >>     msg "Starting cmake..."
> >>     cmake ${srcdir}/${_svnmod} \
> >>       -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \
> >>       -DCMAKE_VERBOSE_MAKEFILE=ON \
> >>       -DQT_VERSION=3 \
> >>       -DCMAKE_CXX_FLAGS="-fpermissive" \
> >>       -DWITH_T1LIB=ON \
> >>       -DWITH_LIBPAPER=ON \
> >>       -DWITH_TIFF=ON \
> >>       -DWITH_OPENEXR=ON \
> >>       -DWITH_PAM=ON \
> >>       -DBUILD_ALL=ON
> >>     make
> >>
> >>     The error is:
> >>
> >> [ 77%] Building CXX object
> >> quanta/parts/kafka/CMakeFiles/kafkalibrary-static.dir/kafkacommon.cpp.o
> >> cd /build/src/build/quanta/parts/kafka&&  /usr/bin/c++
> >> -DHAVE_CONFIG_H -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL
> >> -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT
> >> -march=x86-64 -mtune=generic -O2 -pipe  -include tqt.h
> >> -I/build/src/build/quanta/parts/kafka -I/build/src/kdewebdev/lib
> >> -I/build/src/kdewebdev/quanta/src
> >> -I/build/src/kdewebdev/quanta/project
> >> -I/build/src/kdewebdev/quanta/parsers
> >> -I/build/src/kdewebdev/quanta/utility
> >> -I/build/src/kdewebdev/quanta/treeviews -I/opt/trinity/include
> >> -I/opt/qt/include -I/opt/qt/include/tqt   -include tqt.h -fPIC -o
> >> CMakeFiles/kafkalibrary-static.dir/kafkacommon.cpp.o
> >> -c /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:
> >> In static member function 'static void
> >> kafkaCommon::fitsNodesPosition(Node*, int, int, int,
> >> int)': /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:745:56:
> >> error: using temporary as lvalue
> >> [-fpermissive] /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:746:55:
> >> error: using temporary as lvalue
> >> [-fpermissive] /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:747:57:
> >> error: using temporary as lvalue
> >> [-fpermissive] /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:748:56:
> >> error: using temporary as lvalue
> >> [-fpermissive] /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:752:56:
> >> error: using temporary as lvalue
> >> [-fpermissive] /build/src/kdewebdev/quanta/parts/kafka/kafkacommon.cpp:753:57:
> >> error: using temporary as lvalue [-fpermissive] make[2]: ***
> >> [quanta/parts/kafka/CMakeFiles/kafkalibrary-static.dir/kafkacommon.cpp.o]
> >> Error 1 make[2]: Leaving directory `/build/src/build' make[1]: ***
> >> [quanta/parts/kafka/CMakeFiles/kafkalibrary-static.dir/all] Error 2
> >> make[1]: Leaving directory `/build/src/build' make: *** [all]
> >> Error 2 ==>  ERROR: A failure occurred in build(). Aborting...
> >>
> >>     I'm not that swift at debugging, but I know enough to know an
> >> lvalue problem -- ain't in my build script :p
> > The code is obviously wrong, I even wonder why older gcc allowed
> > such code.
> > Does this kludge^Wpatch help (the patch is attached)?
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > trinity-devel-unsubscribe@... For additional
> > commands, e-mail: trinity-devel-help@...
> > Read list messsages on the Web archive:
> > http://trinity-devel.pearsoncomputing.net/ Please remember not to
> > top-post:
> > http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
> 
> Patch applied, but it looks like it got worse :)
Oops, bad programming on my side, my C-formatted mind told me that attrs
+ index == &attrs[index] :D
Does this patch help better [still an attached one] ?
> 
> [ 10%] Building CXX object 
> quanta/utility/CMakeFiles/utility-static.dir/quantacommon.cpp.o
> cd /build/src/build/quanta/utility && /usr/bin/c++   -DHAVE_CONFIG_H 
> -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT 
> -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -march=x86-64 
> -mtune=generic -O2 -pipe  -include tqt.h
> -I/build/src/build/quanta/utility -I/build/src/kdewebdev/lib
> -I/build/src/kdewebdev/quanta/parsers
> -I/build/src/kdewebdev/quanta/src
> -I/build/src/kdewebdev/quanta/dialogs/tagdialogs
> -I/build/src/kdewebdev/quanta/utility
> -I/build/src/kdewebdev/quanta/messages
> -I/build/src/kdewebdev/quanta/parts/kafka
> -I/build/src/kdewebdev/quanta/project -I/opt/trinity/include
> -I/opt/qt/include -I/opt/qt/include/tqt   -include tqt.h -fPIC -o
> CMakeFiles/utility-static.dir/quantacommon.cpp.o
> -c /build/src/kdewebdev/quanta/utility/quantacommon.cpp In file
> included from /build/src/kdewebdev/quanta/parsers/parser.h:28:0,
> from /build/src/kdewebdev/quanta/utility/quantacommon.h:23,
> from /build/src/kdewebdev/quanta/utility/quantacommon.cpp:57: /build/src/kdewebdev/quanta/parsers/tag.h:
> [...]

Attachments: