This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/48003] New: Regression in Template Constants from 4.5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48003

           Summary: Regression in Template Constants from 4.5.2
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: swestrup@gmail.com


The following code compiles cleanly under g++ 4.5.2, but fails to compile under
g++ 4.6.0:

#include <climits>
#include <boost/mpl/int.hpp>
boost::mpl::int_<INT_MIN> foo;

It produces the errors:

/usr/local/include/boost/mpl/aux_/integral_wrapper.hpp: In
instantiation of âmpl_::int_<-0x00000000080000000>â:
test_test.cpp:8:27:   instantiated from here
/usr/local/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: error:
â2147483647â is not a valid template argument for type âintâ because
it is a non-constant expression
/usr/local/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: error:
overflow in constant expression [-fpermissive]

I tested this using Boost 1.46 on a Debian AMD_64 SID system running with a
2.6.36 kernel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]