re PR preprocessor/47311 ([C++0x] ICE in tsubst @cp/pt.c:10502)
[gcc.git] / gcc / cp / ChangeLog
1 2011-01-29 Dodji Seketeli <dodji@redhat.com>
2
3 PR c++/47311
4 * cp-tree.h (fixup_template_parms): Declare.
5 * pt.c (end_template_parm_list): Do not fixup template parms here.
6 (fixup_template_parms): Remove static. Fix typo in the
7 comments. Remove useless code statement.
8 (fixup_template_parm): For a template template parameter, fixup
9 its attributes before fixing up its type.
10 * parser.c
11 (cp_parser_template_declaration_after_export): After parsing
12 template parameters fixup their types.
13
14 2011-01-26 Jakub Jelinek <jakub@redhat.com>
15
16 PR c++/47476
17 * semantics.c (potential_constant_expression_1): Handle
18 TRUTH_XOR_EXPR.
19
20 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
21
22 PR c++/43601
23 * semantics.c (expand_or_defer_fn_1): Handle it.
24 * decl2.c (decl_needed_p): Likewise.
25
26 2011-01-21 Jason Merrill <jason@redhat.com>
27
28 PR c++/47041
29 * semantics.c (build_constexpr_constructor_member_initializers):
30 Handle trivial copy.
31
32 2011-01-21 Jakub Jelinek <jakub@redhat.com>
33
34 PR c++/47388
35 * semantics.c (begin_for_stmt): If -fno-for-scope, don't
36 assume init must be NULL if scope is NULL.
37 (begin_range_for_stmt): Likewise.
38
39 2011-01-21 Jason Merrill <jason@redhat.com>
40
41 PR c++/46552
42 * semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.
43
44 PR c++/46977
45 * semantics.c (potential_constant_expression_1): Split out from
46 potential_constant_expression. Add want_rval parm. Handle
47 template expression forms. Don't enforce restriction on address
48 of automatic variable here. Add a couple of diagnostics that
49 had been missing.
50 (require_potential_constant_expression): New entry point.
51 (build_data_member_initialization, register_constexpr_fundef): Adjust.
52 (maybe_constant_value): Check potential_constant_expression.
53 * pt.c (fold_non_dependent_expr_sfinae): Likewise.
54 * tree.c (build_vec_init_expr): Adjust.
55
56 2011-01-19 Jakub Jelinek <jakub@redhat.com>
57
58 PR c++/47303
59 * decl2.c (finish_anon_union): Only call mangle_decl if TREE_STATIC
60 or DECL_EXTERNAL.
61
62 2011-01-17 Jason Merrill <jason@redhat.com>
63
64 PR c++/47067
65 * semantics.c (base_field_constructor_elt): New fn.
66 (cxx_eval_bare_aggregate): Use it.
67 (build_data_member_initialization): Leave COMPONENT_REF for
68 vfield inits.
69
70 2011-01-14 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
71
72 * parser.c (cp_parser_range_for): Remove the "unused variable" warning
73 workaround.
74
75 2011-01-15 Giovanni Funchal <gafunchal@gmail.com>
76 Jonathan Wakely <jwakely.gcc@gmail.com>
77
78 PR c++/33558
79 * decl.c (grokdeclarator): Reject mutable reference members.
80
81 2011-01-14 Jason Merrill <jason@redhat.com>
82
83 PR c++/47289
84 * pt.c (coerce_template_parms): Fix error recovery.
85
86 PR c++/46903
87 * typeck2.c (check_narrowing): Only check arithmetic types.
88
89 PR c++/46688
90 * tree.c (build_vec_init_expr): Handle flexible array
91 properly.
92
93 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
94
95 PR c++/47213
96 * cp-tree.h (CLASSTYPE_VISIBILITY): Use
97 TYPE_MAIN_DECL instead of TYPE_NAME.
98 (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise.
99 * decl2.c (determine_visibility): Add check
100 of CLASS_TYPE_P for underlying_type.
101
102 2011-01-12 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
103
104 * cp-tree.h (begin_for_scope): New prototype.
105 (begin_for_stmt): Update prototype.
106 (begin_range_for_stmt): Update prototype.
107 * init.c (build_vec_init): Update call to begin_for_stmt.
108 * parser.c (cp_parser_for): New.
109 (cp_parser_c_for): Add three new parameters.
110 (cp_parser_range_for): Likewise. Most parsing code removed.
111 (cp_parser_iteration_statement): Call cp_parser_for instead of
112 cp_parser_c_for and cp_parser_range_for.
113 (cp_parser_for_init_statement): Add new parameter and return type.
114 (cp_parser_block_declaration): Update call to
115 cp_parser_simple_declaration.
116 (cp_parser_simple_declaration): Add new parameter.
117 Update call to cp_parser_init_declarator.
118 (cp_parser_init_declarator): Add new parameter.
119 * pt.c (tsubst_expr): Update call to begin_for_stmt.
120 * semantics.c (begin_for_scope): New.
121 (begin_for_stmt): Add two new parameters.
122 (begin_range_for_stmt): Likewise.
123
124 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
125
126 * parser.c (cp_parser_objc_at_property_declaration): Improved
127 error message.
128
129 2011-01-11 Dodji Seketeli <dodji@redhat.com>
130
131 PR debug/46955
132 * cp-lang.c (get_template_innermost_arguments_folded)
133 (get_template_argument_pack_elems_folded)
134 (template_arg_needs_folding, fold_cplus_constants): New static
135 functions.
136 (LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
137 get_template_innermost_arguments_folded.
138 (LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
139 get_template_argument_pack_elems_folded.
140
141 2011-01-11 Jason Merrill <jason@redhat.com>
142
143 PR c++/46658
144 * init.c (build_new_1): Handle value-init in templates differently.
145
146 PR c++/45520
147 * tree.c (maybe_dummy_object): Check current_class_ref against
148 context, not current_class_type.
149
150 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
151
152 PR objc/47078
153 * parser.c (cp_parser_objc_typename): If the type is unknown, for
154 error recovery purposes behave as if it was not specified so that
155 the default type is used.
156
157 2011-01-07 Jakub Jelinek <jakub@redhat.com>
158
159 PR c++/47022
160 * pt.c (tsubst_copy_and_build): Use tsubst instead of tsubst_copy
161 for the second build_x_va_arg argument.
162
163 2011-01-05 Tom Tromey <tromey@redhat.com>
164
165 * typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
166 (lvalue_or_else): Likewise.
167
168 2011-01-01 Kai Tietz <kai.tietz@onevision.com>
169
170 PR target/38662
171 * tree.c (cxx_type_hash_eq):
172 Allow METHOD_TYPE, too.
173
174 \f
175 Copyright (C) 2011 Free Software Foundation, Inc.
176
177 Copying and distribution of this file, with or without modification,
178 are permitted in any medium without royalty provided the copyright
179 notice and this notice are preserved.