public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48003] New: Regression in Template Constants from 4.5.2
@ 2011-03-06 12:07 swestrup at gmail dot com
  2011-03-06 12:29 ` [Bug c++/48003] " sefi@s-e-f-i.de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: swestrup at gmail dot com @ 2011-03-06 12:07 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-08  7:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-06 12:07 [Bug c++/48003] New: Regression in Template Constants from 4.5.2 swestrup at gmail dot com
2011-03-06 12:29 ` [Bug c++/48003] " sefi@s-e-f-i.de
2011-03-06 14:06 ` paolo.carlini at oracle dot com
2011-03-06 14:21 ` redi at gcc dot gnu.org
2011-03-07 10:30 ` [Bug c++/48003] [4.6 Regression] " rguenth at gcc dot gnu.org
2011-03-07 10:42 ` rguenth at gcc dot gnu.org
2011-03-07 13:42 ` redi at gcc dot gnu.org
2011-03-07 14:11 ` rguenth at gcc dot gnu.org
2011-03-08  5:28 ` jason at gcc dot gnu.org
2011-03-08  7:31 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).