On Wed, Aug 29, 2012 at 10:40 AM, Richard Smith <[email protected]> wrote: > On Wed, Aug 29, 2012 at 2:20 AM, Hans Wennborg <[email protected]> wrote: >> Thanks, Richard! Fixed in r162837. > > Thanks. > > I've looked into what's specified for C++11 constant expression semantics, > and it looks like this isn't the correct behavior there. C++11 thread_local > variables *can* be used in core constant expressions, but can't be part of > the eventual result of constant expression evaluation. It looks like the > check belongs in CheckLValueConstantExpression instead. > > For instance, this is valid under the C++11 rules: > > thread_local int n; > constexpr bool b = &n == &n;
I guess I'm out of my depth here, because I don't really know how these things work. Does the attached patch look like it's doing the right thing? Thanks for looking into this. - Hans
patch.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
