diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-05-06 16:40:24 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-05-06 16:40:24 +0000 |
commit | 6555abe0ef5f9e917f99874c37adcb9063873ca6 (patch) | |
tree | b49db583b9bec036fd781f2a8168ce2668bd4ac6 /gcc/cp | |
parent | 0b953becc031a007bdb5d9069f206dde20c01a8f (diff) | |
download | gcc-6555abe0ef5f9e917f99874c37adcb9063873ca6.zip gcc-6555abe0ef5f9e917f99874c37adcb9063873ca6.tar.gz gcc-6555abe0ef5f9e917f99874c37adcb9063873ca6.tar.bz2 |
re PR c++/57183 ([C++11] auto and -Wunused-variable)
/cp
2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57183
* decl.c (cp_finish_decl): After do_auto_deduction copy the
qualifers with cp_apply_type_quals_to_decl.
/testsuite
2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57183
* g++.dg/cpp0x/auto38.C: New.
From-SVN: r198636
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e71b4f2..387f44a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-05-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/57183 + * decl.c (cp_finish_decl): After do_auto_deduction copy the + qualifers with cp_apply_type_quals_to_decl. + 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com> * pt.c (convert_nontype_argument): Add missing whitespace in diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d92d334..12703d5 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6147,6 +6147,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, auto_node); if (type == error_mark_node) return; + cp_apply_type_quals_to_decl (cp_type_quals (type), decl); } if (!ensure_literal_type_for_constexpr_object (decl)) |