|
Boost : |
Subject: Re: [boost] [filesystem][spirit] problems with scoped enums with GCC 4.4 in C++0x mode
From: Beman Dawes (bdawes_at_[hidden])
Date: 2009-05-19 09:23:38
On Tue, May 19, 2009 at 6:03 AM, Richard Webb
<richard.webb_at_[hidden]> wrote:
>
> (forwarding from the Spirit list)
>
> As discussed in the thread @
> http://www.nabble.com/-Spirit2--Regression-test-failures-on-GCC-4.4-in-C%2B%2B0x-mode-td23584485.html#a23584485,
> the regression tests for Filesystem and Spirit 2 are pretty much all failing
> in GCC 4.4 in C++0x mode, due to problems with scoped enums and operator ==.
>
> Does anyone have any other ideas about the problem?
It's a bug in GCC 4.4.0. See GCC Bugzilla Bug 38064.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
This little test:
enum class color { red, green };
int foo(color c )
{
return c == color::red ? 5 : 10;
}
Compiles fine with Borland 6.10 (which also supports scoped enums) but
fails with GCC 4.4.0.
I've let one of the GCC developers know privately that this bug is
causing us problems.
I think the fix is to simply define BOOST_NO_SCOPED_ENUMS for GCC 4.4.
I'll change the config file in trunk accordingly.
Thanks for the heads up,
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk