diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-16 22:36:32 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-16 22:36:32 +0000 |
commit | 084cb9d4b849089ab31ef7900b04749b01b5e55f (patch) | |
tree | 7dc323a49ae46cc57046d24153a6434a68d19682 /gcc/cp/init.c | |
parent | 815e12a49cecd7326dce20e4e85bb53e5d7c0495 (diff) | |
download | gcc-084cb9d4b849089ab31ef7900b04749b01b5e55f.tar.gz |
PR c++/38877
* tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
* init.c (build_new): Don't call describable_type unless we
have an auto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 1285f160f00..f2b79f18899 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2334,11 +2334,10 @@ build_new (tree placement, tree type, tree nelts, tree init, orig_nelts = nelts; orig_init = init; - if (nelts == NULL_TREE && init != void_zero_node && list_length (init) == 1 - && describable_type (TREE_VALUE (init))) + if (nelts == NULL_TREE && init != void_zero_node && list_length (init) == 1) { tree auto_node = type_uses_auto (type); - if (auto_node) + if (auto_node && describable_type (TREE_VALUE (init))) type = do_auto_deduction (type, TREE_VALUE (init), auto_node); } |