mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
0b953becc0
commit
6555abe0ef
|
|
@ -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>
|
2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* pt.c (convert_nontype_argument): Add missing whitespace in
|
* pt.c (convert_nontype_argument): Add missing whitespace in
|
||||||
|
|
|
||||||
|
|
@ -6147,6 +6147,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
|
||||||
auto_node);
|
auto_node);
|
||||||
if (type == error_mark_node)
|
if (type == error_mark_node)
|
||||||
return;
|
return;
|
||||||
|
cp_apply_type_quals_to_decl (cp_type_quals (type), decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ensure_literal_type_for_constexpr_object (decl))
|
if (!ensure_literal_type_for_constexpr_object (decl))
|
||||||
|
|
|
||||||
|
|
@ -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>
|
2013-05-06 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/57185
|
PR tree-optimization/57185
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
Loading…
Reference in New Issue