re PR c++/56377 (<missing> template args in substitution-failure diagnostics)
[gcc.git] / gcc / cp / ChangeLog
1 2013-02-25 Jason Merrill <jason@redhat.com>
2
3 PR c++/56377
4 * pt.c (fn_type_unification): Wait to call push_tinst_level until
5 we know what args we're looking at.
6
7 PR c++/56438
8 * semantics.c (potential_constant_expression_1): In C++98, a cast
9 to non-integral type can't be a constant expression.
10
11 2013-02-24 Jakub Jelinek <jakub@redhat.com>
12
13 PR c++/56403
14 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
15 of CLASS_TYPE_P.
16
17 2013-02-22 Jason Merrill <jason@redhat.com>
18
19 PR c++/40405
20 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
21 if we got the wrong number of template parms.
22
23 PR c++/56377
24 * pt.c (fn_type_unification): Use explicit args in template
25 instantiation context.
26
27 PR c++/56359
28 * call.c (can_convert_arg): Discard access checks.
29
30 PR c++/56395
31 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
32 args.
33
34 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
35
36 PR c++/56373
37 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
38 * cvt.c (ocp_convert): Use the latter.
39 (cp_convert_to_pointer): Likewise.
40 * decl.c (check_default_argument): Likewise.
41 * typeck.c (cp_build_binary_op): Likewise.
42 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
43
44 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
45 Paolo Carlini <paolo.carlini@oracle.com>
46
47 PR c++/51242
48 * decl2.c (grokbitfield): Allow scoped enumeration types.
49
50 2013-02-15 Jason Merrill <jason@redhat.com>
51
52 PR c++/54276
53 * semantics.c (finish_id_expression): Also return the identifier
54 for an outer local static.
55
56 PR c++/56343
57 * class.c (check_bases_and_members): Deduce noexcept after
58 checking bases.
59
60 PR c++/52026
61 * semantics.c (finish_id_expression): In a template, return
62 the identifier for a constant variable.
63
64 2013-02-14 Jason Merrill <jason@redhat.com>
65
66 PR c++/54922
67 * semantics.c (build_anon_member_initialization): New.
68 (build_data_member_initialization): Use it.
69
70 PR c++/55003
71 * decl.c (cp_finish_decl): Force instantiation of an
72 auto static data member.
73
74 PR c++/55220
75 * pt.c (unify): A pack expansion that is not the last template
76 argument makes the entire template argument list non-deduced.
77
78 PR c++/56323
79 * name-lookup.c (do_class_using_decl): Handle typedefs with
80 inheriting constructors.
81 (push_class_level_binding_1): Allow inheriting from template
82 template parameter, too.
83 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
84
85 PR c++/55223
86 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
87 default argument scope.
88 * mangle.c (write_name): Likewise.
89
90 PR c++/55232
91 * error.c (find_typenames_r): Don't walk into a pack expansion.
92
93 2013-02-13 Jason Merrill <jason@redhat.com>
94
95 PR c++/55670
96 * parser.c (cp_parser_member_declaration): Check the declarator
97 form when detecting a function declaration via typedef.
98
99 PR c++/55680
100 * pt.c (maybe_process_partial_specialization): A lambda
101 isn't what's being specialized.
102
103 PR c++/55710
104 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
105 TREE_USED.
106
107 PR c++/55879
108 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
109
110 PR c++/55993
111 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
112 non-zero offsets, too.
113
114 PR c++/56155
115 * decl.c (build_enumerator): Always convert the value to a
116 fixed underlying type.
117
118 PR c++/56135
119 * pt.c (tsubst_copy_and_build): Don't forget any new
120 captures that arose from use of dependent names.
121
122 2013-02-13 Jakub Jelinek <jakub@redhat.com>
123
124 PR c++/56302
125 * semantics.c (finish_asm_stmt): If input constraints allow
126 neither register nor memory, try maybe_constant_value to get
127 a constant if possible.
128
129 2013-02-12 Jason Merrill <jason@redhat.com>
130
131 PR c++/56285
132 * method.c (add_one_base_init): Handle base constructor
133 taking rvalue reference parm.
134
135 PR c++/56291
136 * semantics.c (sort_constexpr_mem_initializers): Handle
137 vptr out of order.
138
139 2013-02-09 Jason Merrill <jason@redhat.com>
140
141 PR c++/56268
142 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
143 maybe_instantiate_noexcept.
144
145 PR c++/56247
146 * pt.c (eq_specializations): Set comparing_specializations.
147 * tree.c (cp_tree_equal): Check it.
148 * cp-tree.h: Declare it.
149
150 * decl.c (decls_match): Check versions later.
151
152 PR c++/56238
153 * pt.c (build_non_dependent_expr): Don't try to fold
154 instantiation-dependent expressions.
155 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
156 [BIND_EXPR]: Treat as dependent.
157
158 2013-02-07 Jakub Jelinek <jakub@redhat.com>
159
160 PR c++/56241
161 * init.c (build_vec_init): Don't append NULL values into new_vec.
162 (build_zero_init_1): Don't push anything into v if recursive call
163 returned NULL_TREE.
164 (build_value_init_noctor): Don't push anything into v if
165 build_value_init call returned NULL_TREE.
166
167 PR c++/56239
168 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
169 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
170 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
171 return true only if 2nd token isn't CPP_CLOSE_PAREN.
172 (cp_parser_cast_expression): Adjust caller.
173
174 PR c++/56237
175 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
176 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
177 DECL_LANG_SPECIFIC (t).
178
179 2013-02-07 Jason Merrill <jason@redhat.com>
180
181 PR c++/56235
182 * method.c (do_build_copy_constructor): Don't bother turning
183 scalars from lvalues to xvalues.
184 (do_build_copy_assign): Likewise.
185
186 2013-02-06 Jason Merrill <jason@redhat.com>
187
188 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
189
190 2013-02-05 Jason Merrill <jason@redhat.com>
191
192 PR c++/54122
193 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
194 METHOD_TYPE.
195
196 PR c++/56177
197 * decl.c (start_preparsed_function): Update restype if we change
198 decl1.
199
200 PR c++/56208
201 * pt.c (fn_type_unification): Discard any access checks from
202 substituting explicit args.
203
204 2013-01-31 Jason Merrill <jason@redhat.com>
205
206 PR c++/56162
207 PR c++/56104
208 * typeck.c (get_member_function_from_ptrfunc): Fix
209 ptrmemfunc_vbit_in_delta case.
210
211 2013-01-29 Jason Merrill <jason@redhat.com>
212
213 PR libstdc++/54314
214 * class.c (build_ctor_vtbl_group): Give construction vtables
215 hidden visibility.
216
217 2013-01-25 Jason Merrill <jason@redhat.com>
218
219 PR c++/56095
220 * pt.c (convert_nontype_argument_function): Handle invalid input.
221 (convert_nontype_argument): Likewise.
222
223 PR c++/56104
224 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
225 dynamic type has no virtual functions.
226
227 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
228
229 PR c++/55944
230 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
231 on TARGET_EXPR nodes.
232
233 2013-01-22 Jason Merrill <jason@redhat.com>
234
235 PR c++/56071
236 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
237
238 2013-01-22 Dodji Seketeli <dodji@redhat.com>
239
240 PR c++/53609
241 * pt.c (argument_pack_element_is_expansion_p)
242 (make_argument_pack_select, use_pack_expansion_extra_args_p)
243 (gen_elem_of_pack_expansion_instantiation): New static functions.
244 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
245 look through the possibly resulting pack expansion as well.
246 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
247 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
248 Use gen_elem_of_pack_expansion_instantiation to build the
249 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
250 as gen_elem_of_pack_expansion_instantiation and the change in
251 tsubst above generalize this particular case.
252 (arg_from_parm_pack_p): Remove this for it's not used by
253 tsubst_pack_expansion anymore.
254
255 2013-01-21 Jason Merrill <jason@redhat.com>
256
257 PR c++/56059
258 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
259 template args count.
260
261 2013-01-18 Jason Merrill <jason@redhat.com>
262
263 PR target/54908
264 * decl2.c (get_local_tls_init_fn): New.
265 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
266 with aliases for internal variables. Don't use weakrefs if
267 the variable needs destruction.
268 (generate_tls_wrapper): Mark the wrapper as const if no
269 initialization is needed.
270 (handle_tls_init): Don't require aliases.
271
272 2013-01-15 Dodji Seketeli <dodji@redhat.com>
273
274 PR c++/55663
275 * pt.c (coerce_innermost_template_parms): New static function.
276 (instantiate_alias_template): Use it here.
277
278 2013-01-09 Jason Merrill <jason@redhat.com>
279
280 PR c++/55878
281 * rtti.c (build_typeid, get_typeid): Add complain parm.
282 (get_tinfo_decl_dynamic): Likewise.
283 * cp-tree.h, parser.c, pt.c: Adjust.
284
285 PR c++/55893
286 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
287 needs destruction.
288
289 2013-01-09 Jakub Jelinek <jakub@redhat.com>
290
291 PR c/48418
292 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
293 call maybe_constant_value for the negative or too big shift
294 count warnings.
295
296 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
297
298 PR c++/55801
299 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
300 of the argument is true.
301
302 2013-01-08 Joel Brobecker <brobecker@adacore.com>
303
304 * parser.c (cp_parser_initializer_list): Move declaration
305 of variable non_const to start of lexical block.
306
307 2013-01-07 Jason Merrill <jason@redhat.com>
308
309 PR c++/55753
310 * tree.c (build_aggr_init_expr): Do nothing in a template.
311 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
312 a FUNCTION_DECL before tsubsting.
313
314 2013-01-04 Dodji Seketeli <dodji@redhat.com>
315
316 PR c++/52343
317 * pt.c (check_instantiated_arg): Allow type template arguments.
318
319 2013-01-04 Jason Merrill <jason@redhat.com>
320
321 PR c++/55877
322 * decl.c (reset_type_linkage, bt_reset_linkage): New.
323 (grokdeclarator): Use reset_type_linkage.
324 * name-lookup.c (binding_table_foreach): Handle null table.
325 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
326
327 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
328
329 PR c++/54526 (again)
330 * parser.c (cp_parser_template_id): Revert core of previous change
331 (keep adjusted inform message).
332
333 2013-01-03 Jason Merrill <jason@redhat.com>
334
335 PR c++/55419
336 PR c++/55753
337 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
338 TREE_CONSTANT.
339
340 PR c++/55842
341 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
342
343 PR c++/55856
344 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
345
346 PR c++/53650
347 * call.c (type_has_extended_temps): New.
348 * cp-tree.h: Declare it.
349 * decl.c (check_initializer): Use build_aggr_init for arrays
350 if it is false.
351 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
352
353 2013-01-02 Jason Merrill <jason@redhat.com>
354
355 PR c++/54325
356 * call.c (build_new_method_call_1): Don't use build_value_init for
357 user-provided default constructors.
358
359 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
360
361 PR c++/55032
362 PR c++/55245
363 * tree.c (build_cplus_array_type): Copy layout information
364 to main variant if necessary.
365 \f
366 Copyright (C) 2013 Free Software Foundation, Inc.
367
368 Copying and distribution of this file, with or without modification,
369 are permitted in any medium without royalty provided the copyright
370 notice and this notice are preserved.