re PR c++/53821 ([c++11] multiple definitions of lambda)
[gcc.git] / gcc / cp / ChangeLog
1 2012-07-02 Jason Merrill <jason@redhat.com>
2
3 PR c++/53821
4 * semantics.c (maybe_add_lambda_conv_op): Don't set
5 DECL_INTERFACE_KNOWN.
6
7 PR c++/53524
8 * call.c (build_conditional_expr_1): Don't warn about comparison of
9 two enumerators before their enumeration is complete.
10 (build_new_op_1): Call decay_conversion before warn_logical_operator.
11 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
12 its enumeration.
13 * decl2.c (mark_used): Call used_types_insert for enums.
14 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
15 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
16 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
17 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
18 (build_class_member_access_expr): Look through unscoped enums.
19 * search.c (context_for_name_lookup): Look through unscoped enums.
20 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
21 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
22 * tree.c (decl_linkage): Likewise.
23 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
24
25 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
26
27 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
28
29 2012-06-27 Jason Merrill <jason@redhat.com>
30
31 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
32 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
33 (cp_parser_elaborated_type_specifier): Adjust.
34 * decl.c (duplicate_decls): Return error_mark_node on template
35 mismatch.
36
37 PR c++/53563
38 * parser.c (cp_parser_template_id): Add tag_type parm.
39 (cp_parser_template_name): Likewise.
40 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
41 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
42 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
43 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
44
45 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
46
47 PR C++/51033
48 * semantics.c (constexpr_call): Fix typo in comment.
49 (cxx_eval_vec_perm_expr): New.
50 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
51
52 2012-06-26 Richard Guenther <rguenther@suse.de>
53
54 PR c++/53752
55 * mangle.c (write_array_type): Truncate the number-of-elements
56 result.
57
58 2012-06-25 Jason Merrill <jason@redhat.com>
59
60 PR c++/53498
61 PR c++/53305
62 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
63 if cp_unevaluated_operand is set.
64 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
65
66 PR c++/52988
67 * typeck.c (decay_conversion): Don't discard side-effects from
68 expressions of nullptr_t.
69
70 2012-06-25 Florian Weimer <fweimer@redhat.com>
71
72 * init.c (build_new_1): Warn about (T[N]) for variable N, and
73 reject T[M][N].
74
75 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
76 expressions. Handled now in build_new_1.
77
78 2012-06-25 Jason Merrill <jason@redhat.com>
79
80 PR c++/53202
81 * semantics.c (build_data_member_initialization): Always keep
82 initializer for empty base.
83 (cxx_eval_bare_aggregate): Discard it here.
84
85 PR c++/53565
86 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
87 (tsubst_expr) [OMP_FOR]: Here, too.
88
89 2012-06-25 Jakub Jelinek <jakub@redhat.com>
90
91 PR c++/53594
92 * class.c (check_bases_and_members): Avoid -Wuninitialized
93 diagnostics for non-static const members or references if they
94 use NSDMI.
95
96 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
97
98 * parser.c (cp_parser_direct_declarator): Move virt-specifier
99 parsing after late-specified return type parsing.
100
101 2012-06-14 Jason Merrill <jason@redhat.com>
102
103 PR c++/53651
104 * name-lookup.c (constructor_name_p): Don't try to look at the
105 name of a DECLTYPE_TYPE.
106
107 2012-06-18 Lawrence Crowl <crowl@google.com>
108
109 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
110 to TV_PHASE_OPT_GEN.
111
112 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
113
114 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
115
116 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
117
118 PR c++/51033
119 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
120 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
121 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
122
123 2012-06-09 Jason Merrill <jason@redhat.com>
124
125 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
126 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
127 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
128
129 PR c++/53599
130 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
131 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
132 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
133 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
134 Don't return the decl.
135
136 2012-06-11 Richard Guenther <rguenther@suse.de>
137
138 PR c++/53605
139 * mangle.c (write_array_type): Use double-ints for array domain
140 arithmetic.
141
142 2012-06-07 Fabien Chêne <fabien@gcc.gnu.org>
143
144 PR c++/51214
145 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
146 Declare.
147 * class.c (insert_into_classtype_sorted_fields): New.
148 (add_enum_fields_to_record_type): New.
149 (count_fields): Adjust the comment.
150 (add_fields_to_record_type): Likewise.
151 (finish_struct_1): Move the code that inserts the fields for the
152 sorted case, into insert_into_classtype_sorted_fields, and call
153 it.
154 (insert_late_enum_def_into_classtype_sorted_fields): Define.
155 * decl.c (finish_enum_value_list): Call
156 insert_late_enum_def_into_classtype_sorted_fields if a late enum
157 definition is encountered.
158
159 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
160
161 PR c++/53567
162 * typeck.c (cp_perform_integral_promotions): New, like
163 perform_integral_promotions but also takes a tsubst_flags_t parameter.
164 (pointer_diff): Add tsubst_flags_t parameter.
165 (decay_conversion, cp_default_conversion, cp_build_array_ref,
166 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
167 build_reinterpret_cast_1, cp_build_modify_expr,
168 convert_for_assignment): Adjust.
169 * optimize.c (build_delete_destructor_body): Adjust.
170 * init.c (expand_virtual_init, expand_default_init, build_new_1,
171 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
172 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
173 * class.c (build_base_path): Adjust.
174 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
175 * method.c (synthesized_method_walk): Adjust flag and complain.
176 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
177 (build_typeid, build_dynamic_cast_1): Adjust.
178 * except.c (initialize_handler_parm): Likewise.
179 * typeck2.c (process_init_constructor_record): Likewise.
180 * pt.c (tsubst_friend_class): Don't change flags.
181 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
182 finish_static_assert): Likewise.
183 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
184 lookup_name_real.
185 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
186 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
187 Adjust.
188 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
189 (implicit_conversion): Mask out tf_error with a FIXME.
190 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
191 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
192 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
193 build_up_reference, convert_to_reference, cp_convert,
194 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
195 parameter.
196 (convert_to_reference, ocp_convert): Use complain & tf_error instead
197 of flags & LOOKUP_COMPLAIN.
198 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
199 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
200 lookup_name_real, lookup_function_nonclass, lookup_name,
201 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
202 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
203
204 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
205
206 * decl.c: Do not include output.h.
207 (start_decl): Remove code for flag_conserve_space.
208
209 2012-06-06 Fabien Chêne <fabien@gcc.gnu.org>
210
211 PR c++/52841
212 * parser.c (cp_parser_alias_declaration): Return earlier
213 if an error occured.
214
215 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
216
217 PR c++/53524
218 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
219 to control enumeral mismatch in conditional expression too.
220
221 2012-06-04 Sterling Augustine <saugustine@google.com>
222
223 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
224 * cp-lang.c (cxx_dwarf_name): Call them.
225
226 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
227
228 * semantics.c: Do not include output.h.
229 * decl2.c: Likewise.
230 * friend.c: Likewise.
231 * typeck.c: Likewise.
232 * typeck2.c: Likewise.
233 * Make-lang.in: Fix dependencies.
234
235 2012-06-01 Jason Merrill <jason@redhat.com>
236
237 PR c++/52973
238 * parser.c (cp_parser_class_head): Apply attributes here.
239 * semantics.c (begin_class_definition): Not here.
240 * cp-tree.h: Adjust.
241
242 PR c++/52725
243 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
244 tentatively and the LHS has a parse error.
245
246 PR c++/53137
247 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
248 (instantiate_decl): Don't push_to_top_level for local class methods.
249 (instantiate_class_template_1): Or for local classes.
250
251 PR c++/53484
252 * pt.c (do_auto_deduction): Don't try to deduce from a
253 type-dependent initializer.
254
255 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
256
257 PR c++/26155
258 * name-lookup.c (push_namespace): When error recovery is
259 impossible just error out in duplicate_decls.
260
261 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
262
263 * call.c: Do not include output.h.
264 * class.c: Likewise.
265 * except.c: Likewise.
266 * friend.c: Likewise.
267 * init.c: Likewise.
268 * lex.c: Likewise.
269 * method.c: Likewise.
270 * parser.c: Likewise.
271 * pt.c: Likewise.
272 * rtti.c: Likewise.
273 * search.c: Likewise.
274
275 2012-05-30 Jason Merrill <jason@redhat.com>
276
277 PR c++/53356
278 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
279 representing a bitwise copy of a glvalue.
280
281 * tree.c (stabilize_expr): Tweak logic.
282
283 PR c++/53356
284 * tree.c (stabilize_init): Side effects make the init unstable.
285
286 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
287
288 PR c++/53503
289 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
290
291 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
292
293 PR c++/53491
294 * tree.c (stabilize_expr): Handle exp of void type.
295
296 2012-05-26 Jason Merrill <jason@redhat.com>
297
298 PR c++/53220
299 * call.c (convert_like_real) [ck_list]: Take array address directly.
300 * typeck.c (decay_conversion): Reject decay of an array compound
301 literal.
302
303 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
304
305 PR c++/32054
306 * parser.c (cp_parser_member_declaration): A storage class is not
307 allowed in a declaration of an anonymous aggregate in a class scope.
308
309 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
310
311 PR obj-c++/53441
312 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
313 before calling constructor_name_p.
314
315 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
316
317 PR c++/32080
318 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
319 cp_parser_function_body): Add a bool parameter, true when parsing
320 a function-try-block.
321 (cp_parser_function_try_block): Pass true to the above.
322 (cp_parser_function_definition_after_declarator,
323 cp_parser_function_transaction): Adjust.
324
325 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
326
327 PR c++/29185
328 * decl2.c (delete_sanity): Extend 'deleting array' warning to
329 any array type.
330
331 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
332
333 PR c++/51184
334 * decl.c (grokdeclarator): Diagnose functions returning abstract
335 class types as TYPENAME.
336 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
337 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
338 * pt.c (tsubst): Likewise.
339 * semantics.c (trait_expr_value): Likewise.
340
341 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
342
343 PR c++/40821
344 * parser.c (cp_parser_attributes_opt): Enforce error checking of
345 unbalanced parentheses in the presence of tentative parsing.
346
347 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
348
349 PR c++/39681
350 * parser.c (cp_parser_new_type_id): Early return error_mark_node
351 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
352 error_mark_node; tidy.
353 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
354 avoid uninitialized warnings.
355 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
356 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
357 returns error_mark_node.
358
359 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
360
361 PR c++/53371
362 * except.c (is_admissible_throw_operand): Rename to
363 is_admissible_throw_operand_or_catch_parameter and handle
364 catch parameter too.
365 (expand_start_catch_block): Use it.
366 (build_throw): Adjust.
367
368 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
369
370 PR c++/44516
371 * typeck.c (build_x_array_ref, build_x_conditional_expr,
372 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
373 (finish_class_member_access_expr, build_x_indirect_ref,
374 build_x_binary_op, build_x_compound_expr_from_list,
375 build_x_compound_expr_from_vec): Adjust callers.
376 * tree.c (build_min_nt_loc): New.
377 (build_min_nt): Remove.
378 * typeck2.c (build_x_arrow): Adjust callers.
379 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
380 tsubst_copy_and_build): Likewise.
381 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
382 finish_omp_atomic): Likewise.
383 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
384 * parser.c (cp_parser_question_colon_clause,
385 cp_parser_assignment_expression, cp_parser_expression,
386 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
387 * cp-tree.h: Update.
388
389 2012-05-16 Dodji Seketeli <dodji@redhat.com>
390
391 PR preprocessor/7263
392 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
393 the possible declarator specifiers so far.
394 (struct cp_decl_specifier_seq::locations): Declare new member.
395 (cp_decl_specifier_seq::{specs, type_location}): Remove.
396 (decl_spec_seq_has_spec_p): Declare new function.
397 * parser.c (cp_parser_check_decl_spec): Remove.
398 (set_and_check_decl_spec_loc): Define new static function.
399 (decl_spec_seq_has_spec_p): Define new public function.
400 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
401 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
402 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
403 (cp_parser_alias_declaration): Set the locations for each
404 declspec, using set_and_check_decl_spec_loc.
405 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
406 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
407 new declspec location for specifiers. Use the new
408 decl_spec_seq_has_spec_p.
409 (cp_parser_type_specifier_seq): Use the new
410 set_and_check_decl_spec_loc. Stop using
411 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
412 (, cp_parser_init_declarator): Use the new
413 set_and_check_decl_spec_loc.
414 (cp_parser_single_declaration, cp_parser_friend_p)
415 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
416 Use the new decl_spec_seq_has_spec_p.
417 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
418 the more precise ds_redefined_builtin_type_spec location for
419 diagnostics about re-declaring C++ built-in types.
420 (start_decl, grokvardecl, grokdeclarator): Use the new
421 decl_spec_seq_has_spec_p.
422
423 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
424
425 PR c++/11856
426 * pt.c (tsubst_copy_and_build): Increase / decrease
427 c_inhibit_evaluation_warnings around build_x_binary_op call.
428
429 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
430
431 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
432 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
433 (TYPE_PTR_OR_PTRMEM_P): Add.
434 * typeck.c (composite_pointer_type_r, composite_pointer_type,
435 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
436 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
437 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
438 casts_away_constness_r, casts_away_constness): Adjust.
439 * init.c (build_zero_init_1): Adjust.
440 * class.c (check_field_decls): Likewise.
441 * decl.c (check_default_argument): Likewise.
442 * rtti.c (target_incomplete_p): Likewise.
443 * tree.c (zero_init_p): Likewise.
444 * cxx-pretty-print.c (pp_cxx_ptr_operator,
445 pp_cxx_abstract_declarator): Likewise.
446 * typeck2.c (build_m_component_ref): Likewise.
447 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
448 dependent_type_p_r): Likewise.
449 * call.c (null_member_pointer_value_p, standard_conversion,
450 add_builtin_candidate, build_conditional_expr_1, compare_ics):
451 Likewise.
452 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
453 * cvt.c (cp_convert_to_pointer, ocp_convert,
454 perform_qualification_conversions): Likewise.
455 * mangle.c (write_type): Likewise.
456 * name-lookup.c (arg_assoc_type): Likewise.
457
458 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
459
460 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
461 field.
462 (cp_parser_binary_expression): Rework to always update at the same
463 time tree_type and loc.
464 * call.c (print_z_candidate): Add location_t parameter.
465 (print_z_candidates, convert_like_real, joust): Adjust.
466
467 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
468
469 PR c++/53209
470 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
471
472 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
473
474 PR c++/53305
475 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
476 tsubst_decl returns NULL_TREE.
477 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
478 BOUND_TEMPLATE_TEMPLATE_PARM.
479
480 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
481
482 PR c++/53158
483 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
484 * typeck.c (decay_conversion): Use error_at.
485 * call.c (build_integral_nontype_arg_conv, convert_like_real,
486 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
487 initialize_reference): Likewise.
488 * cvt.c (warn_ref_binding): Add location_t parameter.
489 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
490 convert_to_void, ): Use error_at and warning_at.
491
492 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
493
494 PR c++/53301
495 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
496 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
497
498 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
499
500 PR c++/53152
501 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
502 parameter.
503 (build_conditional_expr_1): Adjust.
504 * typeck.c (build_x_indirect_ref, build_x_binary_op,
505 build_x_unary_op): Add location_t parameter.
506 (rationalize_conditional_expr, build_x_array_ref,
507 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
508 Adjust.
509 * typeck2.c (build_x_arrow): Add location_t parameter.
510 * semantics.c (finish_unary_op_expr): Likewise.
511 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
512 * decl2.c (grok_array_decl): Add location_t parameter.
513 * parser.c (cp_parser_postfix_open_square_expression,
514 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
515 cp_parser_binary_expression, cp_parser_builtin_offsetof,
516 do_range_for_auto_deduction, cp_convert_range_for,
517 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
518 location, adjust.
519 * pt.c (tsubst_copy_and_build): Adjust.
520 * tree.c (maybe_dummy_object): Likewise.
521 * cp-tree.h: Update declarations.
522
523 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
524
525 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
526
527 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
528
529 PR c++/53166
530 * pt.c (instantiate_class_template_1): Increase / decrease
531 c_inhibit_evaluation_warnings around the tsubst_expr call
532 for STATIC_ASSERT_CONDITION.
533 (tsubst_expr, case STATIC_ASSERT): Likewise.
534 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
535 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
536
537 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
538
539 PR c++/53186
540 * call.c (build_over_call): Handle final member functions
541 and class types.
542 (build_new_method_call_1): Do not handle here.
543
544 2012-05-02 Richard Guenther <rguenther@suse.de>
545
546 * decl.c (grokdeclarator): Properly check for sizes that
547 cover more than half of the address-space.
548
549 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
550
551 PR c++/51033
552 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
553 * decl2.c (grok_array_decl): Likewise.
554
555 PR c++/51314
556 * parser.c (cp_parser_sizeof_operand): Require parentheses for
557 sizeof...
558
559 2012-04-30 Dodji Seketeli <dodji@redhat.com>
560
561 Fix location for static class members
562 * decl.c (grokdeclarator): Use the location carried by the
563 declarator for the DECL of the static class member.
564
565 Fix va_arg type location
566 * cp-tree.h (build_x_va_arg): Take an additional location
567 parameter.
568 * call.c (build_x_va_arg): Take a loc parameter for the location
569 of the type of the va_arg expression.
570 * parser.c (cp_parser_primary_expression): Pass the type of the
571 type in the va_arg expression to build_x_va_arg.
572 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
573
574 Make conversion warnings work on NULL with -ftrack-macro-expansion
575 * call.c (conversion_null_warnings): Use the new
576 expansion_point_location_if_in_system_header.
577 * cvt.c (build_expr_type_conversion): Likewise.
578 * typeck.c (cp_build_binary_op): Likewise.
579
580 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
581
582 * typeck.c (convert_for_assignment): Replace
583 Wmissing-format-attribute with Wsuggest-attribute=format.
584 * call.c (convert_for_arg_passing): Likewise.
585
586 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
587
588 PR c++/53096
589 * class.c (check_bases_and_members): Implement core/1333, do not
590 disallow defaulted in the class body non-const ref special members.
591
592 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
593
594 PR c++/52363
595 * call.c (tourney, perform_overload_resolution,
596 build_operator_new_call, build_user_type_conversion_1,
597 build_user_type_conversion, perform_overload_resolution,
598 add_template_candidate, add_template_candidate_real,
599 add_template_conv_candidate, add_builtin_candidates,
600 add_builtin_candidate, build_builtin_candidate,
601 add_conv_candidate, add_function_candidate, implicit_conversion,
602 reference_binding, build_list_conv, conditional_conversion,
603 add_candidates, can_convert_array, build_aggr_conv,
604 build_array_conv, build_complex_conv, conditional_conversion):
605 Add tsubst_flags_t parameter.
606 (joust): Likewise, use it to handle SFINAE as if pedantic.
607 (add_list_candidates, build_integral_nontype_arg_conv,
608 perform_overload_resolution, build_new_function_call,
609 build_operator_new_call, build_op_call_1,
610 build_conditional_expr_1, build_new_op_1, convert_like_real,
611 convert_arg_to_ellipsis, convert_default_arg,
612 convert_for_arg_passing, build_over_call,
613 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
614 perform_implicit_conversion_flags,
615 perform_direct_initialization_if_possible,
616 initialize_reference): Adjust.
617 * typeck.c (casts_away_constness, casts_away_constness_r):
618 Add tsubst_flags_t parameter.
619 (convert_arguments, check_for_casting_away_constness,
620 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
621 Adjust.
622 * decl.c (reshape_init_r, check_default_argument): Likewise.
623 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
624 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
625 Likewise.
626 * init.c (build_new_1): Likewise.
627 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
628 build_expr_type_conversion, ): Likewise.
629 * search.c (check_final_overrider): Likewise.
630 * cp-tree.h (build_user_type_conversion,
631 build_operator_new_call, can_convert, can_convert_arg,
632 can_convert_arg_bad, convert_default_arg,
633 convert_arg_to_ellipsis, convert_for_arg_passing):
634 Adjust declaration.
635
636 2012-04-22 Jan Hubicka <jh@suse.cz>
637
638 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
639 gets finalized.
640
641 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
642
643 PR c/44774
644 * typeck.c (composite_pointer_type): Likewise.
645 (cxx_sizeof_or_alignof_type): Likewise.
646 (cp_build_array_ref): Likewise.
647 (cp_build_function_call_vec): Likewise.
648 (cp_build_addr_expr_1): Likewise.
649 (convert_member_func_to_ptr): Likewise.
650 * decl.c (check_tag_decl): Likewise.
651 (check_static_variable_definition): Likewise.
652 (compute_array_index_type): Likewise.
653 (create_array_type_for_decl): Likewise.
654 (grokdeclarator): Likewise.
655 (grok_op_properties): Likewise.
656 * error.c (maybe_warn_cpp0x): Likewise.
657 * pt.c (maybe_process_partial_specialization): Likewise.
658 (convert_template_argument): Likewise.
659 (do_decl_instantiation): Likewise.
660 (do_type_instantiation): Likewise.
661 * parser.c (cp_parser_primary_expression): Likewise.
662 (cp_parser_postfix_expression): Likewise.
663 (cp_parser_unary_expression): Likewise.
664 (cp_parser_question_colon_clause): Likewise.
665 (cp_parser_lambda_introducer): Likewise.
666 (cp_parser_lambda_declarator_opt): Likewise.
667 (cp_parser_compound_statement): Likewise.
668 (cp_parser_jump_statement): Likewise.
669 (cp_parser_declaration_seq_opt): Likewise.
670 (cp_parser_enum_specifier): Likewise.
671 (cp_parser_enumerator_list): Likewise.
672 (cp_parser_initializer_list): Likewise.
673 (cp_parser_member_declaration): Likewise.
674 * call.c (build_conditional_expr_1): Likewise.
675 * friend.c (make_friend_class): Likewise.
676 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
677
678 2012-04-21 Jan Hubicka <jh@suse.cz>
679
680 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
681 * decl2.c (mark_needed): Likewise.
682 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
683
684 * decl2.c (cxx_callgraph_analyze_expr): Remove.
685 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
686 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
687
688 2012-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
689
690 PR 35441
691 * typeck.c (cp_build_function_call_vec): Do not pretty-print
692 expressions when caret is enabled.
693
694 2012-04-20 Jan Hubicka <jh@suse.cz>
695
696 PR target/53042
697 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
698 list when target has no support for it.
699
700 2012-04-20 Michael Matz <matz@suse.de>
701
702 * error.c (pedwarn_cxx98): Move va_end call after user
703 of the va_list.
704
705 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
706
707 PR c++/52422
708 * cp-tree.h (build_addr_func, decay_conversion,
709 get_member_function_from_ptrfunc,
710 build_m_component_ref, convert_member_func_to_ptr):
711 Add tsubst_flags_t parameter.
712 * typeck.c (cp_default_conversion): Add.
713 (decay_conversion, default_conversion,
714 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
715 Add tsubst_flags_t parameter and use it throughout.
716 (cp_build_indirect_ref, cp_build_array_ref,
717 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
718 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
719 build_const_cast_1, expand_ptrmemfunc_cst,
720 convert_for_initialization): Adjust.
721 * init.c (build_vec_init): Adjust.
722 * decl.c (grok_reference_init, get_atexit_node): Likewise.
723 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
724 * except.c (build_throw): Likewise.
725 * typeck2.c (build_x_arrow): Likewise.
726 (build_m_component_ref): Add tsubst_flags_t parameter and
727 use it throughout.
728 * pt.c (convert_nontype_argument): Adjust.
729 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
730 * decl2.c (build_offset_ref_call_from_tree): Likewise.
731 * call.c (build_addr_func): Add tsubst_flags_t parameter and
732 use it throughout.
733 (build_call_a, build_conditional_expr_1, build_new_op_1,
734 convert_like_real, convert_arg_to_ellipsis, build_over_call,
735 build_special_member_call): Adjust.
736 * cvt.c (cp_convert_to_pointer, force_rvalue,
737 build_expr_type_conversion): Likewise.
738
739 2012-04-17 Tom de Vries <tom@codesourcery.com>
740
741 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
742 location argument to create_artificial_label.
743 (finish_bc_block): Change return type to void. Remove body_seq
744 parameter, and add block parameter. Append label to STMT_LIST and
745 return in block.
746 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
747 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
748 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
749 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
750 (genericize_break_stmt, genericize_omp_for_stmt): New function.
751 (cp_gimplify_omp_for): Remove bc_continue processing.
752 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
753 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
754 CONTINUE_STMT, and BREAK_STMT as unreachable.
755 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
756 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
757 (cp_genericize_tree): New function, factored out of ...
758 (cp_genericize): ... this function.
759
760 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
761
762 PR c++/52599
763 * semantics.c (build_constexpr_constructor_member_initializers):
764 Check for function-try-block as function-body.
765
766 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
767
768 PR c++/53003
769 * parser.c (cp_parser_member_declaration): Check that
770 initializer_token_start is non null before dereferencing it.
771
772 2012-04-16 Jason Merrill <jason@redhat.com>
773
774 PR c++/38543
775 * pt.c (determine_specialization): Instead of comparing the number
776 of parms, check that tsubst gives the right answer.
777
778 PR c++/52008
779 * pt.c (process_partial_specialization): Complain about a partial
780 specialization with fewer args than primary template parms.
781
782 PR c++/50830
783 * pt.c (convert_template_argument): Handle template template
784 argument packs.
785
786 PR c++/50303
787 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
788 template parameters.
789
790 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
791
792 PR c++/49152
793 * call.c (op_error): Print types; when flag_diagnostics_show_caret
794 is false print expressions too.
795 (op_error_string): Add.
796
797 2012-04-16 Jason Merrill <jason@redhat.com>
798
799 PR c++/51148
800 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
801
802 2012-04-16 Jan Hubicka <jh@suse.cz>
803
804 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
805 walkers to walk cgraph and varpool.
806
807 2012-04-15 Jason Merrill <jason@redhat.com>
808
809 PR c++/47220
810 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
811
812 PR c++/52292
813 PR c++/52380
814 * pt.c (coerce_template_parms): Even if we aren't converting we
815 want to expand argument packs.
816
817 PR c++/52706
818 * mangle.c (write_type): nullptr_t is a builtin type.
819
820 2012-04-14 Jan Hubicka <jh@suse.cz>
821
822 * tree.c: Update field referenced for new cgraph/varpool layout.
823 * decl2.c: Likewise.
824
825 2012-04-13 Jason Merrill <jason@redhat.com>
826
827 PR c++/52824
828 * pt.c (any_pack_expanson_args_p): New.
829 (coerce_template_parms): Use it.
830
831 PR c++/52905
832 * call.c (joust): Handle comparing list and non-list ctors.
833
834 PR c++/52915
835 * decl2.c (finish_anon_union): Use cp_finish_decl.
836 * error.c (dump_function_name): Avoid showing anonymous "name".
837
838 2012-04-11 Fabien Chêne <fabien@gcc.gnu.org>
839
840 PR c++/52465
841 * parser.c (cp_parser_class_name): Call strip_using_decl and
842 return the target decl.
843 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
844 to be stripped is NULL_TREE.
845 (qualify_lookup): Call strip_using_decl and perform some checks on
846 the target decl.
847
848 2012-04-11 Jason Merrill <jason@redhat.com>
849
850 PR debug/45088
851 * decl.c (grokdeclarator): Strip the injected-class-name typedef
852 if we are building a declaration or compound type.
853
854 PR c++/52906
855 * decl.c (check_tag_decl): Don't complain about attributes if we
856 don't even have a type.
857
858 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
859
860 * cvt.c (convert_to_void): Update comment.
861
862 2012-04-05 Jason Merrill <jason@redhat.com>
863
864 PR c++/52596
865 * semantics.c (finish_non_static_data_member): In templates, pass
866 the decl to build_qualified_name.
867 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
868
869 2012-04-04 Jason Merrill <jason@redhat.com>
870
871 PR c++/52845
872 * decl.c (finish_function): Update fntype after deducing return type.
873
874 2012-04-03 Jason Merrill <jason@redhat.com>
875
876 PR c++/52796
877 * pt.c (tsubst_initializer_list): A pack expansion with no elements
878 means value-initialization.
879
880 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
881
882 PR c++/50043
883 * class.c (deduce_noexcept_on_destructor,
884 deduce_noexcept_on_destructors): New.
885 (check_bases_and_members): Call the latter.
886 * decl.c (grokfndecl): Call the former.
887 * method.c (implicitly_declare_fn): Not static.
888 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
889 Declare
890
891 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
892
893 PR c++/52718
894 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
895 warn for a zero as null pointer constant default argument.
896
897 2012-03-29 Jason Merrill <jason@redhat.com>
898
899 PR c++/52685
900 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
901
902 2012-03-29 Jakub Jelinek <jakub@redhat.com>
903
904 PR c++/52759
905 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
906 if processing_template_decl.
907
908 2012-03-29 Jason Merrill <jason@redhat.com>
909
910 PR c++/52743
911 * call.c (compare_ics): Handle ck_aggr like ck_list.
912
913 2012-03-28 Jason Merrill <jason@redhat.com>
914
915 PR c++/52746
916 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
917 we didn't get an explicit scope.
918 * pt.c (tsubst_baselink): Likewise.
919
920 2012-03-28 Richard Guenther <rguenther@suse.de>
921
922 * typeck2.c (process_init_constructor_array): Use the proper
923 type for computing the array length.
924
925 2012-03-27 Meador Inge <meadori@codesourcery.com>
926
927 PR c++/52672
928 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
929 stripped child trees that are not pointer types.
930
931 2012-03-21 Jason Merrill <jason@redhat.com>
932
933 Implement return type deduction for normal functions with -std=c++1y.
934 * cp-tree.h (FNDECL_USED_AUTO): New macro.
935 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
936 (dependent_lambda_return_type_node): Remove.
937 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
938 (struct language_function): Add x_auto_return_pattern field.
939 (current_function_auto_return_pattern): New.
940 (enum tsubst_flags): Add tf_partial.
941 * decl.c (decls_match): Handle auto return comparison.
942 (duplicate_decls): Adjust error message for auto return.
943 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
944 (cp_finish_decl): Don't do auto deduction for functions.
945 (grokdeclarator): Allow auto return without trailing return type in
946 C++1y mode.
947 (check_function_type): Defer checking of deduced return type.
948 (start_preparsed_function): Set current_function_auto_return_pattern.
949 (finish_function): Set deduced return type to void if not previously
950 deduced.
951 * decl2.c (change_return_type): Handle error_mark_node.
952 (mark_used): Always instantiate functions with deduced return type.
953 Complain about use if deduction isn't done.
954 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
955 initial return type.
956 (cp_parser_lambda_body): Don't deduce return type in a template.
957 (cp_parser_conversion_type_id): Allow auto in C++1y.
958 * pt.c (instantiate_class_template_1): Don't mess with
959 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
960 (tsubst_copy_and_build): Likewise.
961 (fn_type_unification, tsubst): Don't reduce the template parm level
962 of 'auto' during deduction.
963 (unify): Compare 'auto' specially.
964 (get_bindings): Change test.
965 (always_instantiate_p): Always instantiate functions with deduced
966 return type.
967 (do_auto_deduction): Handle error_mark_node and lambda context.
968 Don't check for use in initializer.
969 (contains_auto_r): Remove.
970 * search.c (lookup_conversions_r): Handle auto conversion function.
971 * semantics.c (lambda_return_type): Handle null return. Don't mess
972 with dependent_lambda_return_type_node.
973 (apply_deduced_return_type): Rename from apply_lambda_return_type.
974 * typeck.c (merge_types): Handle auto.
975 (check_return_expr): Do auto deduction.
976 * typeck2.c (add_exception_specifier): Fix complain check.
977
978 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
979
980 PR c++/52487
981 * class.c (check_field_decls): Call literal_type_p only
982 on complete types.
983
984 2012-03-22 Jakub Jelinek <jakub@redhat.com>
985
986 PR c++/52671
987 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
988 on CLASS_TYPE_P types.
989
990 2012-03-20 Jason Merrill <jason@redhat.com>
991
992 * lex.c (init_reswords): Use >= for cxx_dialect test.
993 * parser.c (cp_parser_exception_specification_opt): Likewise.
994
995 * mangle.c (write_type): Handle 'auto'.
996 * init.c (build_new): Don't do auto deduction where it might
997 affect template mangling.
998
999 PR c++/52510
1000 * decl.c (reshape_init_class): Handle repeated reshaping.
1001 * search.c (lookup_field_1): Add sanity check.
1002
1003 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1004
1005 PR c++/14710
1006 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1007 * tree.c (xvalue_p): Define.
1008 * typeck.c (maybe_warn_about_useless_cast): Define.
1009 (build_reinterpret_cast, build_const_cast,
1010 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1011 * rtti.c (build_dynamic_cast): Likewise.
1012 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1013 c_inhibit_evaluation_warnings before/after the build_* calls.
1014
1015 2012-03-15 Jason Merrill <jason@redhat.com>
1016
1017 PR c++/52582
1018 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1019
1020 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
1021
1022 PR c++/44783
1023 * error.c (print_instantiation_partial_context): Use
1024 template_backtrace_limit.
1025
1026 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1027
1028 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1029
1030 2012-03-14 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR c++/52521
1033 * parser.c (lookup_literal_operator): Return fn only if
1034 processed all arguments from args vector and argtypes is
1035 void_list_node.
1036
1037 2012-01-30 Dodji Seketeli <dodji@redhat.com>
1038
1039 PR c++/51641
1040 * cp-tree.h (template_type_parameter_p): Declare new function.
1041 (parameter_of_template_p): Remove.
1042 * pt.c (template_type_parameter_p): Define new function.
1043 (parameter_of_template_p): Remove.
1044 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1045 on parameter_of_template_p anymore. Compare the level of the
1046 template parameter to the depth of the template.
1047
1048 2011-12-15 Dodji Seketeli <dodji@redhat.com>
1049
1050 * call.c (standard_conversion, build_integral_nontype_arg_conv)
1051 (build_new_op_1, convert_like_real, is_subseq)
1052 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1053 (joust): Use next_conversion instead of accessing fields of struct
1054 conversion directly.
1055
1056 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1057
1058 PR c++/52299
1059 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1060 division by zero warnings.
1061
1062 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
1063
1064 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1065 build_ptrmemfunc): Consistently forward the tsubst_flags_t
1066 parameter.
1067 * call.c (resolve_args): Likewise.
1068
1069 2012-03-07 Jason Merrill <jason@redhat.com>
1070
1071 PR c++/52521
1072 * mangle.c (write_literal_operator_name): The length comes after the
1073 operator prefix.
1074
1075 2012-03-05 Jakub Jelinek <jakub@redhat.com>
1076
1077 * pt.c (local_specializations): Change from htab_t into
1078 struct pointer_map_t *.
1079 (retrieve_local_specializations, register_local_specialization,
1080 tsubst_pack_expansion, instantiate_decl): Adjust users.
1081 (eq_local_specializations, hash_local_specialization): Remove.
1082
1083 2012-03-05 Jason Merrill <jason@redhat.com>
1084
1085 PR c++/51930
1086 * decl2.c (determine_visibility): Correct calculation of class
1087 args depth.
1088 * decl.c (check_tag_decl): Adjust warning.
1089
1090 * method.c (synthesized_method_walk): Cleanups don't affect the EH
1091 spec either.
1092
1093 2012-03-03 Jason Merrill <jason@redhat.com>
1094
1095 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1096
1097 Core 1270
1098 * call.c (build_aggr_conv): Call reshape_init.
1099 (convert_like_real): Likewise.
1100 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1101 not all constant.
1102
1103 * mangle.c (write_nested_name): Use decl_mangling_context.
1104 (write_prefix, write_template_prefix): Likewise.
1105
1106 PR c++/36797
1107 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1108
1109 * class.c (add_method): Always build an OVERLOAD for using-decls.
1110 * search.c (lookup_member): Handle getting an OVERLOAD for a
1111 single function.
1112
1113 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1114
1115 PR c++/51989
1116 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1117 propagate it.
1118 * cp-tree.h (build_x_arrow): Adjust prototype.
1119 * pt.c (tsubst_copy_and_build): Adjust call.
1120 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1121
1122 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1123
1124 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1125
1126 2012-02-29 Jason Merrill <jason@redhat.com>
1127
1128 PR c++/51930
1129 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1130 (shadow_tag): From here.
1131 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1132
1133 2012-02-21 Jakub Jelinek <jakub@redhat.com>
1134
1135 PR c++/52312
1136 * typeck.c (check_literal_operator_args): Initialize *long_double_p
1137 and *long_long_unsigned_p even if processing_template_decl.
1138
1139 2012-02-16 Jason Merrill <jason@redhat.com>
1140
1141 PR c++/52248
1142 * decl.c (define_label): Use timevar_cond_start/stop.
1143
1144 2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
1145
1146 PR c++/52126
1147 * decl.c (xref_basetypes): call dependent_scope_p instead of
1148 dependent_type_p.
1149
1150 2012-02-16 Jason Merrill <jason@redhat.com>
1151
1152 PR c++/51415
1153 * error.c (dump_expr): Handle lambda closures specifically.
1154
1155 2012-02-14 Jason Merrill <jason@redhat.com>
1156
1157 * parser.c (cp_parser_explicit_instantiation): Give a warning
1158 for ignored attributes on explicit class instantiation.
1159
1160 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c++/52247
1163 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1164 lookup_label on label's name and set TREE_USED.
1165
1166 2012-02-14 Jason Merrill <jason@redhat.com>
1167
1168 PR c++/39055
1169 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1170
1171 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/52181
1174 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1175 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1176
1177 2012-02-07 Jason Merrill <jason@redhat.com>
1178
1179 PR c++/51675
1180 * semantics.c (cx_check_missing_mem_inits): Handle unions.
1181 Fix constexpr default constructor logic.
1182
1183 PR c++/52035
1184 * pt.c (tsubst): Strip uninstantiated typedef.
1185
1186 2012-02-06 Jason Merrill <jason@redhat.com>
1187
1188 PR c++/52088
1189 * cvt.c (build_expr_type_conversion): Check for template conversion.
1190
1191 2012-01-31 Jason Merrill <jason@redhat.com>
1192
1193 PR c++/52043
1194 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1195 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1196 (tsubst_pack_expansion): Check it.
1197
1198 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1199
1200 PR c++/51327
1201 * class.c (explain_non_literal_class): Correctly handle implicitly
1202 deleted constructors.
1203
1204 2012-01-27 Jakub Jelinek <jakub@redhat.com>
1205
1206 PR c++/51852
1207 * pt.c (tsubst_pack_expansion): Delete and restore
1208 local_specialization whenever need_local_specialization, not just
1209 when saved_local_specializations is non-NULL.
1210
1211 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
1212
1213 PR c++/51370
1214 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1215 as TREE_OPERAND (t, 1).
1216
1217 2012-01-24 Jason Merrill <jason@redhat.com>
1218
1219 PR c++/51917
1220 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1221
1222 PR c++/51973
1223 * tree.c (called_fns_equal): Check template args.
1224 (cp_tree_equal): Call it.
1225
1226 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
1227 Patrick Marlier <patrick.marlier@gmail.com>
1228
1229 PR c++/51928
1230 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1231 thunk for set_one_vmethod_tm_attributes.
1232
1233 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1234
1235 PR c++/51223
1236 * call.c (build_over_call): Check for error_mark_node as
1237 TREE_VALUE when default arguments are processed.
1238
1239 2012-01-23 Jason Merrill <jason@redhat.com>
1240
1241 PR c++/51930
1242 * decl2.c (determine_visibility): Check for visibility attribute
1243 on template specialization.
1244
1245 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1246
1247 PR c++/51398
1248 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1249
1250 2012-01-23 Jason Merrill <jason@redhat.com>
1251
1252 PR c++/51925
1253 * class.c (add_method): Set OVL_USED for using-decls.
1254 * tree.c (ovl_scope): New.
1255 * cp-tree.h: Declare it.
1256 * parser.c (cp_parser_template_name): Use it.
1257 * semantics.c (baselink_for_fns): Likewise.
1258 * name-lookup.c (set_inherited_value_binding_p): Likewise.
1259
1260 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1261
1262 PR c++/51402
1263 * pt.c (lookup_template_class_1): Check context returned by
1264 tsubst for error_mark_node.
1265
1266 2012-01-19 Kai Tietz <ktietz@redhat.com>
1267
1268 PR c++/51344
1269 * decl2.c (save_template_attributes): Use merge_attributes
1270 instead of chaining up via TREE_CHAIN.
1271
1272 2012-01-19 Jason Merrill <jason@redhat.com>
1273
1274 PR c++/51889
1275 * class.c (finish_struct): Call add_method here for function usings.
1276 * semantics.c (finish_member_declaration): Not here.
1277
1278 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
1279
1280 PR c++/51225
1281 * typeck2.c (store_init_value): Within a template guard
1282 cxx_constant_value with require_potential_constant_expression.
1283 * pt.c (convert_nontype_argument): Likewise.
1284
1285 2012-01-16 Jakub Jelinek <jakub@redhat.com>
1286
1287 PR c++/51854
1288 * mangle.c (write_template_arg_literal): Handle complex.
1289
1290 2012-01-16 Jason Merrill <jason@redhat.com>
1291
1292 PR c++/51827
1293 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1294
1295 PR c++/51868
1296 * typeck.c (build_static_cast_1): Handle bit-fields properly.
1297
1298 2012-01-13 Ian Lance Taylor <iant@google.com>
1299
1300 PR c++/50012
1301 * typeck.c (enum_cast_to_int): New static function.
1302 (cp_build_binary_op): When handling warn_sign_compare, don't test
1303 for TREE_NO_WARNING. Do call enum_cast_to_int.
1304 * call.c (avoid_sign_compare_warnings): Remove static function.
1305 (build_new_op_1): Don't call avoid_sign_compare_warnings.
1306
1307 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
1308
1309 * decl2.c: Do not include tree-mudflap.h
1310 * semantics.c: Likewise.
1311
1312 2012-01-13 Jason Merrill <jason@redhat.com>
1313
1314 PR c++/20681
1315 * semantics.c (finish_break_stmt): Avoid adding an unreachable
1316 BREAK_STMT.
1317
1318 PR c++/51813
1319 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1320 when reducing the visibility.
1321
1322 PR c++/51620
1323 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1324
1325 2012-01-12 Jason Merrill <jason@redhat.com>
1326
1327 PR c++/51714
1328 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1329 value-dependent.
1330
1331 2012-01-13 Dodji Seketeli <dodji@redhat.com>
1332
1333 PR c++/51633
1334 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1335 Set the pointer to the last block of the constructor to the
1336 current statement.
1337 (build_constexpr_constructor_member_initializers): Get
1338 build_data_member_initialization a chance to deal with more
1339 statements before we choke.
1340
1341 2012-01-12 Jason Merrill <jason@redhat.com>
1342
1343 PR c++/48051
1344 * mangle.c (write_expression): Mangle BASELINK scope if
1345 BASELINK_QUALIFIED_P.
1346 * search.c (adjust_result_of_qualified_name_lookup): Set
1347 BASELINK_QUALIFIED_P.
1348 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1349 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1350 adjust_result_of_qualified_name_lookup for non-qualified names.
1351
1352 PR c++/51403
1353 * pt.c (unify): Handle error_mark_node.
1354
1355 2012-01-11 Jason Merrill <jason@redhat.com>
1356
1357 PR c++/51565
1358 * call.c (standard_conversion): For ptrmemfuncs, compare the
1359 static_fn_types.
1360
1361 PR c++/51818
1362 * mangle.c (find_substitution): A type is only a substitution
1363 match if we're looking for a type.
1364 (write_nested_name): Use decl_mangling_context.
1365
1366 * decl.c (decls_match): Assert that the arguments are decls.
1367
1368 PR c++/51613
1369 * pt.c (resolve_overloaded_unification): Compare types with
1370 same_type_p, not decls_match.
1371
1372 2012-01-10 Jason Merrill <jason@redhat.com>
1373
1374 PR c++/51614
1375 * class.c (build_base_path): Diagnose ambiguous base.
1376
1377 PR c++/51433
1378 * semantics.c (cxx_eval_call_expression): Always retry previously
1379 non-constant expressions.
1380
1381 2012-01-06 Jason Merrill <jason@redhat.com>
1382
1383 DR 686
1384 PR c++/47450
1385 * parser.c (cp_parser_new_expression): Set
1386 type_definition_forbidden_message.
1387
1388 PR c++/6057
1389 PR c++/48051
1390 PR c++/50855
1391 PR c++/51322
1392 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1393 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
1394 PREDECREMENT_EXPR.
1395 (write_template_arg): Fix mangling of class-scope functions and
1396 argument packs.
1397 (mangle_decl): Update suggested -fabi-version argument.
1398 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1399 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1400 * tree.c (dependent_name): No longer static.
1401 * cp-tree.h: Declare it.
1402 * pt.c (unify): Defer handling of unconverted functions.
1403
1404 * mangle.c (mangle_decl): Don't generate mangling aliases
1405 for maybe-in-charge [cd]tors.
1406
1407 * error.c (dump_expr): Print type of CONSTRUCTOR.
1408
1409 2012-01-05 Dodji Seketeli <dodji@redhat.com>
1410
1411 PR c++/51541
1412 * parser.c (cp_parser_alias_declaration): Get out early upon
1413 errors in the identifier or the attributes.
1414
1415 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1416
1417 PR c++/51064
1418 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1419 the tree returned by build_x_binary_op.
1420
1421 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1422
1423 PR c++/51738
1424 * parser.c (cp_parser_postfix_open_square_expression): Handle
1425 postfix-expression [ braced-init-list ].
1426
1427 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1428
1429 PR c++/29273
1430 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1431 call decay_conversion on v.
1432
1433 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1434
1435 PR c++/15867
1436 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1437 declaration followed by specialization.
1438
1439 2012-01-03 Jakub Jelinek <jakub@redhat.com>
1440
1441 PR c++/51669
1442 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1443 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1444
1445 2012-01-02 Jason Merrill <jason@redhat.com>
1446
1447 DR 1359
1448 PR c++/51675
1449 * method.c (walk_field_subobs): Don't check for uninitialized
1450 fields in a union.
1451 (synthesized_method_walk): Check here.
1452
1453 DR 325
1454 PR c++/51666
1455 * parser.c (cp_parser_cache_defarg): Split out...
1456 (cp_parser_parameter_declaration): ...from here.
1457 (cp_parser_save_nsdmi): Use it.
1458 (cp_parser_cache_group): Remove CPP_COMMA support.
1459
1460 2012-01-02 Dodji Seketeli <dodji@redhat.com>
1461
1462 PR c++/51462
1463 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1464 of error.
1465
1466 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
1467
1468 PR c++/20140
1469 * typeck2.c (digest_init_r): Use copy_init when initializing
1470 an array of chars.
1471
1472 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1473
1474 PR c++/16603
1475 * decl.c (build_enumerator): Don't call perform_integral_promotions
1476 on the value.
1477
1478 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1479
1480 PR c++/51379
1481 * typeck.c (build_reinterpret_cast_1): Implement resolution of
1482 DR 799.
1483
1484 2012-01-01 Fabien Chêne <fabien@gcc.gnu.org>
1485
1486 * parser.c (cp_parser_using_declaration): Add a warning about
1487 deprecated access declarations when no errors were encountered
1488 while parsing the access declaration. Save the first token in
1489 order to emit the warning at the right place.
1490 \f
1491 Copyright (C) 2012 Free Software Foundation, Inc.
1492
1493 Copying and distribution of this file, with or without modification,
1494 are permitted in any medium without royalty provided the copyright
1495 notice and this notice are preserved.