diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-06 16:40:24 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-06 16:40:24 +0000 |
| commit | 8db255bf83a718d2ab29f77c5778ffbb3c14cf9d (patch) | |
| tree | b49db583b9bec036fd781f2a8168ce2668bd4ac6 | |
| parent | 0b9c481603d0b069b80145499758b1b6ab4deab0 (diff) | |
| download | ppe42-gcc-8db255bf83a718d2ab29f77c5778ffbb3c14cf9d.tar.gz ppe42-gcc-8db255bf83a718d2ab29f77c5778ffbb3c14cf9d.zip | |
/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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198636 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/decl.c | 1 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/auto38.C | 8 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e71b4f20253..387f44aacf6 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 d92d334e1f5..12703d583da 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)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1062a4ee2e5..fb06bb16429 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-05-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/57183 + * g++.dg/cpp0x/auto38.C: New. + 2013-05-06 Richard Biener <rguenther@suse.de> PR tree-optimization/57185 diff --git a/gcc/testsuite/g++.dg/cpp0x/auto38.C b/gcc/testsuite/g++.dg/cpp0x/auto38.C new file mode 100644 index 00000000000..070a39b9e3e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto38.C @@ -0,0 +1,8 @@ +// PR c++/57183 +// { dg-do compile { target c++11 } } +// { dg-options "-Wunused-variable" } + +constexpr float PI_0 = 3.1415926F; +constexpr auto PI_1 = 3.1415926F; +const float PI_2 = 3.1415926F; +const auto PI_3 = 3.1415926F; |

