diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-11 15:45:08 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-11 15:45:08 +0000 |
commit | db1ae94f252a869aaadda3f5a13139b9ed2ec327 (patch) | |
tree | a7f47c02064f13ba211155bec11f1c616d004ee1 /gcc/cp/constexpr.c | |
parent | 469dc5a6f11066e43299098d55332133caeea689 (diff) | |
download | gcc-db1ae94f252a869aaadda3f5a13139b9ed2ec327.tar.gz |
PR c++/66445
* constexpr.c (potential_constant_expression_1): Handle a
DECL_EXPR of TYPE_DECL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224382 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r-- | gcc/cp/constexpr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index af6b39ecaf5..5dc59a47a88 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4462,6 +4462,11 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, } return false; + case TYPE_DECL: + case TAG_DEFN: + /* We can see these in statement-expressions. */ + return true; + default: if (objc_is_property_ref (t)) return false; |