senjuhashirama / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

pugixml-1.4 cannot be compiled with coming gcc-4.9 (rev. 208241) #227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use gcc-4.9.0 alpha to compile it

What is the expected output? What do you see instead?
Compiles fine as with gcc-4.8.2.

make[2]: Entering directory 
'/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4_build'
/usr/bin/cmake -E cmake_progress_report 
/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4_build/CMakeFiles 1
[100%] Building CXX object 
CMakeFiles/pugixml.dir/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/src
/pugixml.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++  -Dpugixml_EXPORTS  -DNDEBUG -O2 -ggdb 
-pipe -march=native -mtune=native -mno-3dnow -mno-sse4.2 -mno-avx  -fPIC   -o 
CMakeFiles/pugixml.dir/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/src
/pugixml.cpp.o -c 
/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/src/pugixml.cpp
/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/src/pugixml.cpp: In 
static member function 'static typename Traits::value_type 
pugi::impl::{anonymous}::utf_decoder<Traits, opt_swap>::decode_utf8_block(const 
uint8_t*, size_t, typename Traits::value_type)':
/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/src/pugixml.cpp:892:90: 
error: a cast to a type other than an integral or enumeration type cannot 
appear in a constant-expression
 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x8080808
                                                                     ^
CMakeFiles/pugixml.dir/build.make:57: recipe for target 
'CMakeFiles/pugixml.dir/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/sr
c/pugixml.cpp.o' failed
make[2]: *** 
[CMakeFiles/pugixml.dir/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4/sr
c/pugixml.cpp.o] Error 1
make[2]: Leaving directory 
'/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4_build'
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/pugixml.dir/all' failed
make[1]: *** [CMakeFiles/pugixml.dir/all] Error 2
make[1]: Leaving directory 
'/var/tmp/portage/dev-libs/pugixml-1.4/work/pugixml-1.4_build'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2 

Which version of pugixml are you using? On what operating system/compiler?
1.4
Gentoo gcc-4.9.0 vanilla rev. 208241.

Please provide any additional information below.

Original issue reported on code.google.com by nheghath...@gmail.com on 5 Mar 2014 at 9:30

Attachments:

GoogleCodeExporter commented 9 years ago
Gentoo bug is https://bugs.gentoo.org/show_bug.cgi?id=503484 .

Original comment by nheghath...@gmail.com on 5 Mar 2014 at 9:32

GoogleCodeExporter commented 9 years ago
Wow. I'm, uh, pretty sure it's a gcc bug. If this makes it into gcc 4.9.0 
release it'll be unfortunate. I'll take a look.

Original comment by arseny.k...@gmail.com on 5 Mar 2014 at 4:02

GoogleCodeExporter commented 9 years ago
Thank you.
Please let me know when you will need a case in GCC Bugzilla to be created.
I will open it if you will like it and link this bug report with your findings 
to it.

I will build current trunk now and test compilation with it.

Best regards, David.

Original comment by nheghath...@gmail.com on 5 Mar 2014 at 4:37

GoogleCodeExporter commented 9 years ago
I tried building gcc from svn trunk and could not reproduce the problem:

zeux@zeux-laptop ~/gcc-svn $ svn info | grep Revision
Revision: 208347
zeux@zeux-laptop ~/gcc-svn $ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wr
apper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --disable-multilib
Thread model: posix
gcc version 4.9.0 20140305 (experimental) (GCC) 
zeux@zeux-laptop ~/gcc-svn $ g++  -Dpugixml_EXPORTS  -DNDEBUG -O2 -ggdb -pipe 
-march=native -mtune=native -mno-3dnow -mno-sse4.2 -mno-avx  -fPIC  -c 
/home/zeux/pugixml/src/pugixml.cpp zeux@zeux-laptop ~/gcc-svn $ 

Can you confirm that latest gcc from trunk builds pugixml fine?

Original comment by arseny.k...@gmail.com on 5 Mar 2014 at 5:48

GoogleCodeExporter commented 9 years ago
I am building it now. Will confirm in the evening (CET). Thank you.

Original comment by nheghath...@gmail.com on 5 Mar 2014 at 5:51

GoogleCodeExporter commented 9 years ago
Ah!
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60379

This was fixed in gcc r208247 :)

Original comment by arseny.k...@gmail.com on 5 Mar 2014 at 5:52

GoogleCodeExporter commented 9 years ago
Blupf! :D

I even not tried to check GCC Bugzila before opening this report here.
I am sorry.

Thank you.

Original comment by nheghath...@gmail.com on 5 Mar 2014 at 5:54

GoogleCodeExporter commented 9 years ago
I tried to look for the specific error message in bugzilla but I picked 'open' 
bugs by accident I think.

Thank you for the report, it's good to know everything is fixed in gcc already.

Original comment by arseny.k...@gmail.com on 5 Mar 2014 at 5:56