http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60379
Bug ID: 60379 Summary: [4.9 Regression] pugixml build failure caused by r207001 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org CC: jason at gcc dot gnu.org /usr/bin/g++ -flto=4 -march=native -O2 -Dpugixml_EXPORTS -DNDEBUG -march=native -O2 -pipe -fPIC -o CMakeFiles/pugixml.dir/var/tmp/portage/dev-libs/pugixml-1.4/work/pugix ml-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<Tra its, 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 while (size >= 4 && (*static_cast<const uint32_t*>(static_cast<const void*>(data)) & 0x80808080) == 0) markus@x4 tmp % cat test.ii template <int> struct A { void m_fn1(int p1) { int *a; while (p1 && *static_cast<int *>(static_cast<void *>(a))) ; } }; markus@x4 tmp % g++ -c test.ii test.ii: In member function ‘void A<<anonymous> >::m_fn1(int)’: test.ii:4:15: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression while (p1 && *static_cast<int *>(static_cast<void *>(a))) ^ Started with r207001.