1 2010-06-16 Jason Merrill <jason@redhat.com>
3 * except.c (check_noexcept_r): Return the problematic function.
4 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
5 * pt.c (tsubst_copy_and_build): Pass it.
6 * parser.c (cp_parser_unary_expression): Likewise.
7 * cp-tree.h: Adjust prototype.
9 * method.c (defaulted_late_check): Give the defaulted method
10 the same exception specification as the implicit declaration.
12 2010-06-15 Jason Merrill <jason@redhat.com>
14 * class.c (add_implicitly_declared_members): Implicit assignment
15 operators can also be virtual overriders.
16 * method.c (lazily_declare_fn): Likewise.
18 * call.c (convert_like_real): Give "initializing argument of"
19 information for ambiguous conversion. Give source position
22 * call.c (print_z_candidates): Do print viable deleted candidates.
23 (joust): Don't choose a deleted function just because its worst
24 conversion is better than another candidate's worst.
26 * call.c (convert_like_real): Don't complain about
27 list-value-initialization from an explicit constructor.
29 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
30 DECL_SOURCE_LOCATION directly.
32 * class.c (type_has_user_provided_default_constructor): Use
35 * call.c (is_subseq): Handle ck_aggr, ck_list.
36 (compare_ics): Treat an aggregate or ambiguous conversion to the
37 same type as involving the same function.
39 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
41 * typeck.c (convert_for_assignment): Fix comment. Change message
42 format from %d to %qP.
43 (convert_for_initialization): Fix comment.
45 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
47 * cp-tree.h (expr_list_kind): New type.
48 (impl_conv_rhs): New type.
49 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
51 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
52 diagnostics for easy translation. Change caller.
53 (convert_for_initialization): Use impl_conv_rhs and change caller.
54 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
55 diagnostics for easy translation. Change caller.
56 * decl.c (bad_spec_place): New enum.
57 (bad_specifiers): Use it and emit the diagnostics for easy
58 translation. Change caller.
59 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
61 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
63 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
65 * decl2.c (cp_write_global_declarations): Adjust for new type of
67 * name-lookup.c (current_decl_namespace): Likewise.
68 (push_decl_namespace): Likewise.
69 (pop_decl_namespace): Likewise.
71 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
73 * call.c (build_java_interface_fn_ref): Call build_function_type_list
74 instead of build_function_type.
75 * decl.c (cxx_init_decl_processing): Likewise.
76 (declare_global_var): Likewise.
77 (get_atexit_node): Likewise.
78 (expand_static_init): Likewise.
79 * decl2.c (start_objects): Likewise.
80 (start_static_storage_duration_function): Likewise.
81 * except.c (init_exception_processing): Likewise.
82 (build_exc_ptr): Likewise.
83 (build_throw): Likewise.
84 * rtti.c (throw_bad_cast): Likewise.
85 (throw_bad_typeid): Likewise.
86 (build_dynamic_cast_1): Likewise.
88 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
90 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
91 (build_op_delete_call): Likewise.
92 (build_over_call): Likewise.
93 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
94 * pt.c (process_partial_specialization): Likewise.
95 (tsubst_template_args): Likewise.
96 * semantics.c (finish_asm_stmt): Likewise.
98 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
100 * decl.c (record_key_method_defined): New, broken out of ...
101 (finish_function): ... here. Call it.
102 (start_decl): Treat aliases as definitions.
104 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
106 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
108 * pt.c (maybe_process_partial_specialization): Likewise.
109 (register_specialization): Likewise.
110 (add_pending_template): Likewise.
111 (lookup_template_class): Likewise.
112 (push_tinst_level): Likewise.
114 * parser.c (cp_lexer_new_main): Likewise.
115 (cp_lexer_new_from_tokens): Likewise.
116 (cp_token_cache_new): Likewise.
117 (cp_parser_context_new): Likewise.
118 (cp_parser_new): Likewise.
119 (cp_parser_nested_name_specifier_opt): Likewise.
120 (cp_parser_template_id): Likewise.
122 * name-lookup.c (binding_entry_make): Likewise.
123 (binding_table_construct): Likewise.
124 (binding_table_new): Likewise.
125 (cxx_binding_make): Likewise.
126 (pushdecl_maybe_friend): Likewise.
127 (begin_scope): Likewise.
128 (push_to_top_level): Likewise.
130 * lex.c (init_reswords): Likewise.
131 (retrofit_lang_decl): Likewise.
132 (cxx_dup_lang_specific_decl): Likewise.
133 (copy_lang_type): Likewise.
134 (cxx_make_type): Likewise.
136 * decl.c (make_label_decl): Likewise.
137 (check_goto): Likewise.
138 (start_preparsed_function): Likewise.
139 (save_function_data): Likewise.
141 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
143 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
145 * class.c (finish_struct_1): Likewise.
147 * cp-tree.h (struct lang_type): Add variable_size GTY option.
148 (struct lang_decl): Likewise.
150 * parser.c (cp_parser_new): Update comment to not reference
153 2010-06-07 Jason Merrill <jason@redhat.com>
156 * error.c (dump_parameters): Mask out TFF_SCOPE.
157 (dump_simple_decl): Don't print the scope of a PARM_DECL.
158 (dump_scope): Remove no-op mask.
161 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
163 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
164 * init.c (build_offset_ref): Use it.
165 * pt.c (maybe_process_partial_specialization): Use it.
166 (instantiate_class_template): Use it.
167 * search.c (lookup_base): Use it.
169 2010-06-07 Jakub Jelinek <jakub@redhat.com>
172 * expr.c (mark_exp_read): Handle INDIRECT_REF.
173 * cvt.c (convert_to_void): Handle INDIRECT_REF like
177 * decl.c (initialize_local_var): If TREE_USED is set on the type,
178 set also DECL_READ_P on the decl.
180 2010-05-25 Dodji Seketeli <dodji@redhat.com>
183 * cp-tree.h (typedef_variant_p): Move this declaration to
185 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
186 * decl.c (grokdeclarator): Do not rename debug info of an
187 anonymous tagged type named by a typedef.
189 2010-06-05 Fabien ChĂȘne <fabien@gcc.gnu.org>
192 * class.c (check_field_decls): Move the call to
193 check_bitfield_decl before trying to set the
194 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
196 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
198 * typeck.c: Update include path for moved files.
201 * cp-gimplify.c: Likewise.
202 * cp-lang.c: Likewise.
204 * semantics.c: Likewise.
205 * cxx-pretty-print.h: Likewise.
207 * parser.c: Likewise.
208 * cp-objcp-common.c: Likewise.
209 * cp-tree.h: Likewise.
210 * name-lookup.c: Likewise.
212 * name-lookup.h: Likewise.
213 * config-lang.in: Update paths in gtfiles for files in c-family/.
214 * Make-lang.in: Likewise.
216 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
218 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
219 * typeck.c (build_ptrmemfunc): Likewise.
221 2010-06-04 Jason Merrill <jason@redhat.com>
223 * typeck2.c (merge_exception_specifiers): Adjust merging of
224 throw() and noexcept(true).
226 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
227 using an uninitialized variable.
229 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
230 (pp_cxx_expression): Likewise.
232 Implement noexcept-specification (15.4)
233 * parser.c (cp_parser_exception_specification_opt): Parse it.
234 Give -Wdeprecated warning about throw() specs.
235 * pt.c (tsubst_exception_specification): Handle it.
236 * error.c (dump_exception_spec): Handle it.
237 (dump_expr): Handle NOEXCEPT_EXPR.
238 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
239 * typeck.c (comp_except_specs): Handle compatibility rules.
240 Change exact parm to take an enum.
241 * typeck2.c (merge_exception_specifiers): Handle noexcept.
242 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
243 (type_throw_all_p, build_noexcept_spec): New fns.
244 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
245 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
246 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
247 (noexcept_true_spec, noexcept_false_spec): New macros.
248 * name-lookup.c (pushdecl_maybe_friend): Adjust.
249 * search.c (check_final_overrider): Adjust.
250 * decl.c (check_redeclaration_exception_specification): Adjust.
251 (use_eh_spec_block): Use type_throw_all_p.
252 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
253 Give operator new a noexcept-specification in C++0x mode.
254 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
255 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
257 Implement noexcept operator (5.3.7)
258 * cp-tree.def (NOEXCEPT_EXPR): New.
259 * except.c (check_noexcept_r, finish_noexcept_expr): New.
260 * cp-tree.h: Declare finish_noexcept_expr.
261 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
262 * pt.c (tsubst_copy_and_build): And tsubst it.
263 (type_dependent_expression_p): Handle it.
264 (value_dependent_expression_p): Handle it.
266 * call.c (build_conditional_expr): Never fold in unevaluated context.
267 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
268 * semantics.c (simplify_aggr_init_expr): Likewise.
269 * typeck.c (merge_types): Call merge_exception_specifiers.
270 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
271 DECL_ANTICIPATED for preferring new type.
273 2010-06-04 Joseph Myers <joseph@codesourcery.com>
275 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
278 2010-06-04 Jakub Jelinek <jakub@redhat.com>
281 * typeck.c (build_class_member_access_expr): Call mark_exp_read
282 on object for static data members.
284 2010-06-04 Jakub Jelinek <jakub@redhat.com>
285 Jason Merrill <jason@redhat.com>
288 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
289 with the same type, call mark_lvalue_use on both.
291 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
293 * class.c (struct vtbl_init_data_s): Remove last_init field.
294 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
296 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
298 (build_vtt): Likewise.
299 (initialize_vtable): Take a VEC instead of a tree.
300 (build_vtt_inits): Change return type to void. Take a VEC **
301 instead of a tree *; accumulate results into said VEC.
302 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
303 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
304 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
306 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
307 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
309 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
310 rather than tree_cons.
311 (build_vbase_offset_vtbl_entries): Likewise.
312 (add_vcall_offset): Likewise.
313 (build_rtti_vtbl_entries): Likewise.
314 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
315 * decl.c (initialize_artificial_var): Use build_constructor instead
316 of build_constructor_from_list.
318 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
321 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
324 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
326 * parser.c (cp_parser_mem_initializer_list): Change error text.
328 2010-06-02 Jakub Jelinek <jakub@redhat.com>
330 * cp-objcp-common.c (shadowed_var_for_decl): Change into
331 tree_decl_map hashtab from tree_map.
332 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
333 (init_shadowed_var_for_decl): Adjust initialization.
336 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
337 instead of calling mark_exp_read only when not an assignment.
340 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
341 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
342 Set DECL_VALUE_EXPR on var.
344 2010-06-02 Jason Merrill <jason@redhat.com>
346 * error.c (dump_type): Improve typedef handling.
351 * name-lookup.c (same_entity_p): New.
352 (ambiguous_decl): Multiple declarations of the same entity
355 2010-06-01 Jason Merrill <jason@redhat.com>
358 * call.c (add_list_candidates): Prefer the default constructor.
359 (build_aggr_conv): Treat missing initializers like { }.
360 * typeck2.c (process_init_constructor_record): Likewise.
361 * init.c (expand_default_init): Use digest_init for
362 direct aggregate initialization, too.
364 * call.c (add_list_candidates): Split out...
365 (build_user_type_conversion_1): ...from here.
366 (build_new_method_call): And here.
367 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
370 * call.c (build_list_conv): Set list-initialization flags properly.
372 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
374 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
376 2010-06-01 Arnaud Charlet <charlet@adacore.com>
377 Matthew Gingell <gingell@adacore.com>
379 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
380 * decl2.c: Include langhooks.h and c-ada-spec.h.
381 (cpp_check, collect_source_refs, collect_ada_namespace,
382 collect_all_refs): New functions.
383 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
384 * lang-specs.h: Ditto.
386 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
388 * cp-tree.h (cp_build_function_call_nary): Declare.
389 * typeck.c (cp_build_function_call_nary): Define.
390 * decl.c (register_dtor_fn): Use it instead of
391 cp_build_function_call.
392 (cxx_maybe_build_cleanup): Likewise.
393 * decl2.c (generate_ctor_or_dtor_function): Likewise.
394 * except.c (do_get_exception_ptr): Likewise.
395 (do_begin_catch): Likewise.
396 (do_allocate_exception): Likewise.
397 (do_free_exception): Likewise.
398 (build_throw): Likewise. Use cp_build_function_call_vec instead
399 of cp_build_function_call.
400 (do_end_catch): Likewise.
402 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
404 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
405 (struct cp_declarator): Move id_loc field up.
407 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
409 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
410 this file is included before c-common.h. Define GCC_DIAG_STYLE
411 before including diagnostic-core.h and toplev.h.
412 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
413 * pt.c: Include cp-tree.h before c-common.h.
415 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
417 * tree.c (c_register_addr_space): Add stub.
419 2010-05-28 Joseph Myers <joseph@codesourcery.com>
421 * g++spec.c (lang_specific_driver): Use fatal_error instead of
424 2010-05-28 Dodji Seketeli <dodji@redhat.com>
426 Revert fix of PR c++/44188
427 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
429 * tree.c (typedef_variant_p): Revert moving this definition to
431 * decl.c (grokdeclarator): Revert naming typedef handling.
433 2010-05-27 Joseph Myers <joseph@codesourcery.com>
435 * call.c: Include diagnostic-core.h instead of diagnostic.h.
436 * cp-lang.c: Don't include diagnostic.h
437 * name-lookup.c: Include diagnostic-core.h instead of
439 (cp_emit_debug_info_for_using): Use seen_error.
440 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
441 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
442 * pt.c (iterative_hash_template_arg): Use seen_error.
443 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
444 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
445 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
446 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
449 2010-05-25 Dodji Seketeli <dodji@redhat.com>
452 * cp-tree.h (typedef_variant_p): Move this declaration to
454 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
455 * decl.c (grokdeclarator): Do not rename debug info of an
456 anonymous tagged type named by a typedef.
458 2010-05-27 Jason Merrill <jason@redhat.com>
461 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
464 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
467 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
468 * class.c (layout_class_type): Likewise.
469 * decl.c (finish_enum): Likewise.
470 * mangle.c (write_builitin_type): Likewise.
472 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
474 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
476 * decl.c (grokdeclarator): Handle __int128.
477 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
478 (cp_parser_simple_type_specifier): Likewise.
479 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
480 * typeck.c (cp_common_type): Handle __int128.
481 * mangle.c (integer_type_codes): Add itk_int128 and
484 2010-05-26 Jason Merrill <jason@redhat.com>
487 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
490 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
492 * cp-lang.c: Do not include expr.h.
494 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
496 * decl.c: Do not include rtl.h
497 * semantics.c: Likewise.
499 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
501 * cp-tree.h: Do not include splay-tree.h.
502 (struct prtmem_cst): Remove unused field and false comment.
503 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
504 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
505 * init.c: Do not include rtl.h and expr.h.
506 * class.c: Do not include rtl.h. Include splay-tree.h.
507 (build_clone): Use plain NULL instead of NULL_RTX.
508 * decl.c: Do not include expr.h. Explain why rtl.h has to be
509 included. Include splay-tree.h.
510 * method.c: Do not include rtl.h and expr.h.
511 (use_thunk): Use plain NULL instead of NULL_RTX.
512 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
513 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
514 and target.h. Include splay-tree.h.
515 * expr.c: Do not include rtl.h and expr.h.
516 * pt.c: Do not include obstack.h and rtl.h.
517 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
518 (tsubst_decl): Likewise.
519 (instantiate_decl): Likewise.
520 * semantics.c: Do not include exprt.h and debug.h. Explain why
521 rtl.h has to be included.
522 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
523 * call.c: Do not include rtl.h and expr.h.
524 * search.c: Do not include obstack.h and rtl.h.
525 * friend.c: Do not include rtl.h and expr.h.
526 * Make-lang.in: Update dependencies.
528 2010-05-25 Jakub Jelinek <jakub@redhat.com>
531 * parser.c (non_integral_constant): Add NIC_NONE.
532 (required_token): Add RT_NONE.
533 (cp_parser_unary_expression): Initialize non_constant_p
535 (cp_parser_asm_definition): Initialize missing to RT_NONE.
536 (cp_parser_primary_expression, cp_parser_postfix_expression,
537 cp_parser_cast_expression, cp_parser_binary_expression,
538 cp_parser_functional_cast): Fix formatting.
540 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
543 * parser.c: Remove inclusion of dyn-string.h.
544 (non_integral_constant): New enum.
545 (name_lookup_error): New enum.
546 (required_token): New enum.
547 (cp_parser_required_error): New function.
548 (cp_parser_require): Change the type of variable token_desc to
549 required_token and use cp_parser_required_error.
550 (cp_parser_require_keyword): Likewise.
551 (cp_parser_error): Use gmsgid as parameter.
552 (cp_parser_name_lookup_error): Change the type of variable desired to
553 name_lookup_error and put the diagnostic in the full sentences. Change
555 (cp_parser_non_integral_constant_expression): Change the type of the
556 variable thing to non_integral_constant and put the diagnostics in
557 full sentences. Change caller.
559 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
562 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
564 2010-05-24 Joseph Myers <joseph@codesourcery.com>
566 * error.c (cp_diagnostic_starter): Update call to
567 diagnostic_build_prefix.
568 (cp_print_error_function,
569 print_instantiation_partial_context_line): Check show_column flag
572 2010-05-24 Jason Merrill <jason@redhat.com>
575 * decl.c (check_initializer): Don't wrap an init-list in a
577 * init.c (build_aggr_init): Don't assume copy-initialization if
578 init has CONSTRUCTOR_IS_DIRECT_INIT.
579 * call.c (build_new_method_call): Sanity check.
581 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
583 * rtti.c (tinfo_base_init): Use build_constructor instead of
584 build_constructor_from_list. Don't cons a tree node for
586 (generic_initializer): Use build_constructor_single instead of
587 build_constructor_from_list.
588 (ptr_initializer): Use build_constructor instead of
589 build_constructor_from_list
590 (ptm_initializer): Likewise.
591 (class_initializer): Likewise. Take varargs instead of TRAIL.
592 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
593 build_constructor instead of build_constructor_from_list.
595 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
597 * semantics.c: Include bitmap.h.
598 * Make-lang.in: Update dependencies.
600 2010-05-22 Jan Hubicka <jh@suse.cz>
602 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
604 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
606 2010-05-21 Joseph Myers <joseph@codesourcery.com>
608 * cxx-pretty-print.c: Correct merge error.
610 2010-05-21 Joseph Myers <joseph@codesourcery.com>
612 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
613 (cp_print_error_function): Use diagnostic_abstract_origin macro.
614 (cp_printer): Handle %K here using percent_K_format.
615 * cxx-pretty-print.c: Include tree-pretty-print.h.
616 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
619 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
621 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
622 Clean up redundant includes.
624 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
627 * decl.c (xref_basetypes): Return false in case of ill-formed
630 2010-05-19 Jason Merrill <jason@redhat.com>
632 * call.c (reference_binding): Use cp_build_qualified_type_real
633 and cp_type_quals consistently.
634 (add_function_candidate): Likewise.
635 (build_conditional_expr): Likewise.
636 (convert_like_real): Likewise.
637 (type_passed_as): Likewise.
638 * class.c (add_method): Likewise.
639 (same_signature_p): Likewise.
640 (layout_class_type): Likewise.
641 * decl.c (cxx_init_decl_processing): Likewise.
642 (cp_fname_init): Likewise.
643 (grokdeclarator): Likewise.
644 * decl2.c (cp_reconstruct_complex_type): Likewise.
645 * init.c (build_new_1): Likewise.
646 * method.c (do_build_copy_constructor): Likewise.
647 (implicitly_declare_fn): Likewise.
648 * pt.c (tsubst_aggr_type): Likewise.
650 * rtti.c (init_rtti_processing): Likewise.
651 (build_headof): Likewise.
652 (build_dynamic_cast_1): Likewise.
653 (tinfo_base_init): Likewise.
654 (emit_support_tinfos): Likewise.
655 * semantics.c (capture_decltype): Likewise.
656 * tree.c (cv_unqualified): Likewise.
657 * typeck.c (composite_pointer_type): Likewise.
658 (string_conv_p): Likewise.
660 * mangle.c (write_CV_qualifiers_for_type): Tweak.
662 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
663 * decl.c (start_decl): Likewise.
664 * semantics.c (finish_compound_literal): Likewise.
665 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
666 (cp_type_readonly): Remove.
667 * cp-tree.h: Remove declaration.
669 * typeck.c (merge_types): Preserve memfn quals.
671 * decl.c (grokdeclarator): Don't check quals on fn type.
672 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
673 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
676 * typeck.c (type_memfn_quals): New fn.
677 (apply_memfn_quals): New fn.
678 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
679 (cp_type_readonly): Use cp_type_quals.
680 * cp-tree.h: Add declarations.
681 * tree.c (cp_build_qualified_type_real): Don't set, but do
682 preserve, quals on FUNCTION_TYPE.
683 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
684 * decl.c (build_ptrmem_type): Likewise.
685 (grokdeclarator): Likewise.
686 (static_fn_type): Likewise.
687 * decl2.c (change_return_type): Likewise.
688 (cp_reconstruct_complex_type): Likewise.
689 * pt.c (tsubst_function_type): Likewise.
691 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
693 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
695 * tree.c (build_min_non_dep_call_vec): Update comment.
697 2010-05-17 Jason Merrill <jason@redhat.com>
699 * call.c (struct z_candidate): Add explicit_targs field.
700 (add_template_candidate_real): Set it.
701 (build_over_call): Use it to control init-list warning.
704 * call.c (build_over_call): Limit init-list deduction warning to
705 cases where the argument is actually an init-list.
708 * call.c (build_over_call): Don't do bitwise copy for move ctor.
710 2010-05-17 Dodji Seketeli <dodji@redhat.com>
711 Jason Merrill <jason@redhat.com>
714 * decl.c (compute_array_index_type): Call mark_rvalue_use.
716 2010-05-15 Jason Merrill <jason@redhat.com>
718 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
719 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
721 (finish_eh_spec_block): Adjust.
723 2010-05-15 Jakub Jelinek <jakub@redhat.com>
726 * pt.c (tsubst): Unshare template argument.
728 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
730 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
731 * Make-lang.in: Fix dependencies accordingly.
733 2010-05-14 Jason Merrill <jason@redhat.com>
736 * except.c (build_throw): Simplify, adjust for DR 475.
739 * except.c (dtor_nothrow): Return nonzero for type with
743 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
744 gimple_build_eh_must_not_throw.
746 2010-05-14 Martin Jambor <mjambor@suse.cz>
748 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
751 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
753 * call.c (build_new_method_call): Change warning text.
754 * typeck2.c (build_functional_cast): Change error text.
756 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
759 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
760 shadowing the outer parameter or variables by the declaration of
761 nested function in nested structure or class. Warn the shadowing by
762 the declaration of nested lambda expression.
764 2010-05-13 Jason Merrill <jason@redhat.com>
766 * typeck.c (cp_build_array_ref): Factor out from...
767 (build_array_ref): ...here. Drop complain parm.
768 (build_new_op): Adjust.
769 * class.c (build_vtbl_ref_1): Adjust.
770 * decl2.c (grok_array_decl): Adjust.
771 * cp-tree.h: Adjust prototypes.
773 2010-05-13 Jan Hubicka <jh@suse.cz>
775 * decl.c (cp_finish_decl): Do not worry about used attribute.
777 2010-05-12 Jason Merrill <jason@redhat.com>
779 * typeck.c (build_array_ref): Take complain parm.
780 * cp-tree.h: Add it to prototype.
781 * call.c (build_new_op): Pass it.
782 * class.c (build_vtbl_ref): Pass it.
783 * decl2.c (grok_array_decl): Pass it.
787 * cp-tree.def (NULLPTR_TYPE): Remove.
788 * cp-tree.h (NULLPTR_TYPE_P): New.
789 (SCALAR_TYPE_P): Use it.
790 (nullptr_type_node): New.
791 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
792 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
794 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
795 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
796 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
797 * mangle.c (write_type): Likewise.
798 * name-lookup.c (arg_assoc_type): Likewise.
799 * typeck.c (build_reinterpret_cast_1): Likewise.
800 * rtti.c (typeinfo_in_lib_p): Likewise.
801 (emit_support_tinfos): Remove local nullptr_type_node.
803 * cp-tree.h (UNKNOWN_TYPE): Remove.
804 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
805 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
806 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
807 * class.c (instantiate_type): Check unknown_type_node rather than
809 * name-lookup.c (maybe_push_decl): Likewise.
810 * rtti.c (get_tinfo_decl_dynamic): Likewise.
811 (get_typeid): Likewise.
812 * semantics.c (finish_offsetof): Likewise.
815 * call.c (add_template_candidate_real): If deduction fails, still
816 add the template as a non-viable candidate.
817 (equal_functions): Handle template candidates.
818 (print_z_candidate): Likewise.
819 (print_z_candidates): Likewise.
820 (build_new_function_call): Likewise.
822 * cp-tree.h (LOOKUP_LIST_ONLY): New.
823 * call.c (add_candidates): Enforce it.
824 (build_new_method_call): Try non-list ctor if no viable list ctor.
825 (build_user_type_conversion_1): Likewise.
827 * call.c (add_candidates): Distinguish between type(x) and
829 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
830 (build_new_method_call): Give better error for conversion op.
832 * call.c (add_candidates): Add first_arg and return_type parms.
833 Add special constructor/conversion op handling.
834 (convert_class_to_reference): Use it.
835 (build_user_type_conversion_1): Likewise.
836 (build_op_call): Likewise.
837 (build_new_method_call): Likewise.
838 (build_new_op): Adjust.
839 (perform_overload_resolution): Adjust.
841 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
846 * pt.c (process_partial_specialization): Return error_mark_node
847 in case of unused template parameters in partial specialization.
849 2010-05-11 Jakub Jelinek <jakub@redhat.com>
852 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
853 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
854 look at its second operand.
856 2010-05-10 Jason Merrill <jason@redhat.com>
859 * semantics.c (baselink_for_fns): Revert earlier change.
862 * typeck.c (cp_build_modify_expr): Complain about assignment to
863 array from init list.
865 2010-05-10 Fabien ChĂȘne <fabien.chene@gmail.com>
868 * decl.c (check_initializer): strip array type before checking for
869 uninitialized const or ref members.
871 2010-05-07 Fabien ChĂȘne <fabien.chene@gmail.com>
874 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
875 error count. Emit errors only if compain is true.
876 (build_new_1): Do not return error_mark_node if
877 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
878 errors. Delay the check for user-provided constructor.
879 (perform_member_init): Adjust.
880 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
883 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
884 Jason Merrill <jason@redhat.com>
886 Add support for C++0x nullptr.
887 * cp-tree.def: Add NULLPTR_TYPE.
888 * cp-tree.h: Add nullptr_node.
889 (cp_tree_index): Add CPTI_NULLPTR.
890 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
891 * call.c (null_ptr_cst_p): Handle nullptr.
892 (standard_conversion): Likewise.
893 (convert_arg_to_ellipsis): Likewise.
894 * mangle.c (write_type): Likewise.
895 * name-lookup.c (arg_assoc_type): Likewise.
896 * parser.c (cp_parser_primary_expression): Likewise.
897 * typeck.c (cp_build_binary_op): Likewise.
898 (build_reinterpret_cast_1): Likewise.
899 * error.c (dump_type): Likewise.
900 (dump_type_prefix, dump_type_suffix): Likewise.
901 * decl.c (cxx_init_decl_processing): Likewise.
902 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
903 * cvt.c (ocp_convert): Likewise.
904 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
905 nullptr_t tinfo in libsupc++.
907 2010-05-06 Jason Merrill <jason@redhat.com>
909 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
911 2010-04-22 Jakub Jelinek <jakub@redhat.com>
912 Dodji Seketeli <dodji@redhat.com>
915 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
917 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
918 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
919 (decay_conversion, perform_integral_promotions): Call rvalue_use.
920 (cp_build_unary_op): Call lvalue_use.
921 * decl.c (unused_but_set_errorcount): New variable.
922 (poplevel): Issue -Wunused-but-set-variable diagnostics.
923 (duplicate_decls): Merge DECL_READ_P flags.
924 (start_cleanup_fn): Set DECL_READ_P flag.
925 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
926 * tree.c (rvalue): Call rvalue_use.
927 * pt.c (convert_nontype_argument): Likewise.
928 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
929 finish_decltype_type): Likewise.
930 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
931 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
932 or rvalue_use depending on the expr.
933 * init.c (build_new, build_delete): Likewise.
934 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
936 2010-05-05 Jason Merrill <jason@redhat.com>
939 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
940 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
942 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
945 * pt.c (unify): Check each elt for error_mark_node.
947 2010-05-04 Jason Merrill <jason@redhat.com>
950 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
952 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
955 * call.c (build_new_method_call): Return error_mark_node if fns is
958 2010-05-03 Dodji Seketeli <dodji@redhat.com>
961 * pt.c (most_specialized_class): Pretend we are processing
962 a template decl during the call to coerce_template_parms.
964 2010-05-03 Jason Merrill <jason@redhat.com>
968 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
969 from the selected underlying type unless -fstrict-enums. Set
970 ENUM_UNDERLYING_TYPE to have the restricted range.
971 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
972 * class.c (check_bitfield_decl): Likewise.
974 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
977 * init.c (build_new_1): Revert the accidental checkin in
980 2010-04-30 Jason Merrill <jason@redhat.com>
983 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
984 (pp_cxx_type_specifier_seq): ...here.
986 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
988 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
989 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
991 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
994 * typeck.c (warn_args_num): New function.
995 (convert_arguments): Use warn_args_num to print the diagnostic
998 2010-04-29 Fabien ChĂȘne <fabien.chene@gmail.com>
1001 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1002 user-provided constructor while recursing.
1004 2010-04-28 Manuel López-Ibåñez <manu@gcc.gnu.org>
1007 * error.c (print_instantiation_partial_context_line): Handle
1008 recursive instantiation.
1009 (print_instantiation_partial_context): Likewise.
1011 2010-04-27 Jason Merrill <jason@redhat.com>
1013 * init.c (perform_member_init): Check CLASS_TYPE_P.
1015 2010-04-27 Fabien ChĂȘne <fabien.chene@gmail.com>
1018 * init.c (perform_member_init): check for uninitialized const or
1019 reference members, including array types.
1021 2010-04-24 Jason Merrill <jason@redhat.com>
1023 * tree.c (get_fns): Split out from get_first_fn.
1024 * cp-tree.h: Declare it.
1025 * search.c (shared_member_p): Use it.
1026 * semantics.c (finish_qualified_id_expr): Simplify.
1027 (finish_id_expression): Simplify.
1029 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1030 whenever object is NULL_TREE. Don't do 'this' capture here.
1031 (finish_qualified_id_expr): Pass NULL_TREE.
1032 (finish_id_expression): Likewise.
1033 (lambda_expr_this_capture): Likewise.
1035 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1036 rather than checking current_class_ref directly.
1037 (finish_call_expr): Likewise.
1040 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1041 * class.c (current_nonlambda_class_type): New fn.
1042 * semantics.c (nonlambda_method_basetype): New.
1043 * cp-tree.h: Declare them.
1044 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1046 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1049 * semantics.c (lambda_return_type): Complain about
1053 * tree.c (cv_unqualified): Handle error_mark_node.
1056 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1057 if we don't want errors.
1060 * class.c (convert_to_base): Add complain parameter. Pass
1061 ba_quiet to lookup_base if we don't want errors.
1062 (build_vfield_ref): Pass complain to convert_to_base.
1063 * call.c (convert_like_real): Likewise.
1064 (initialize_reference): Likewise.
1065 (perform_direct_initialization_if_possible): Pass complain to
1067 * cp-tree.h: Adjust.
1069 2010-04-27 Fabien ChĂȘne <fabien.chene@gmail.com>
1070 Jason Merrill <jason@redhat.com>
1073 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1075 (check_initializer): Call it for classes that need constructing, too.
1076 * class.c (in_class_defaulted_default_constructor): New.
1077 * cp-tree.h: Declare it.
1079 2010-04-20 Jason Merrill <jason@redhat.com>
1082 * init.c (constant_value_1): Treat error_mark_node as a constant
1083 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1084 * cvt.c (ocp_convert): Handle getting error_mark_node from
1085 integral_constant_value.
1086 * decl.c (compute_array_index_type): Likewise.
1088 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1092 * typeck.c (incompatible_dependent_types_p): If one of the
1093 compared types if not a typedef then honour their main variant
1096 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1098 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1100 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1103 * typeck.c (structural_comptypes): Test dependent typedefs
1104 incompatibility before testing for their main variant based
1107 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1109 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1110 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1112 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1114 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1115 build_common_tree_nodes.
1117 2010-04-14 Jason Merrill <jason@redhat.com>
1120 * parser.c (cp_parser_parenthesized_expression_list): Change
1121 is_attribute_list parm to int to indicate whether or not to
1122 handle initial identifier specially.
1123 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1125 2010-04-13 Jason Merrill <jason@redhat.com>
1127 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1129 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1130 unevaluated context.
1131 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1133 2010-04-12 Jason Merrill <jason@redhat.com>
1136 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1137 return value directly.
1139 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1141 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1144 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1145 * init.c (build_new_1): Check for uninitialized const members and
1146 uninitialized reference members, when using new without
1147 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1148 (diagnose_uninitialized_cst_or_ref_member): Define, call
1149 diagnose_uninitialized_cst_or_ref_member_1.
1150 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1152 2010-04-12 Richard Guenther <rguenther@suse.de>
1155 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1156 template inline functions.
1158 2010-04-09 Manuel López-Ibåñez <manu@gcc.gnu.org>
1161 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1164 2010-04-07 Jason Merrill <jason@redhat.com>
1167 * decl.c (start_preparsed_function): Do defer nested functions.
1169 PR c++/11094, DR 408
1170 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1171 * decl2.c (finish_static_data_member_decl): Set it.
1172 * decl.c (duplicate_decls): Propagate it.
1173 * pt.c (tsubst_decl): Don't substitute the domain of an array
1174 VAR_DECL if it's set.
1175 (regenerate_decl_from_template): Substitute it here.
1176 (type_dependent_expression_p): Return true if it's set.
1177 * semantics.c (finish_decltype_type): Instantiate such a variable.
1178 * typeck.c (cxx_sizeof_expr): Likewise.
1179 (strip_array_domain): New.
1182 * name-lookup.c (current_decl_namespace): Non-static.
1183 (pop_nested_namespace): Sanity check.
1184 * cp-tree.h: Declare current_decl_namespace.
1185 * decl.c (grokvardecl): Use it instead of current_namespace.
1186 (grokfndecl): Likewise.
1189 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1192 * pt.c (print_template_statistics): New.
1193 * cp-tree.h: Declare it.
1194 * tree.c (cxx_print_statistics): Call it.
1197 * decl.c (grokvardecl): Tweak warning message.
1198 (grokfndecl): Likewise.
1200 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1203 *pt.c (tsubst_decl): Get the arguments of a specialization from
1204 the specialization template, not from the most general template.
1206 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1209 * typeck2.c (process_init_constructor_record):
1210 value-initialize members that are are not explicitely
1213 2010-04-07 Jie Zhang <jie@codesourcery.com>
1216 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1217 when all of its elements are non-constant and have been split out.
1219 2010-04-06 Taras Glek <taras@mozilla.com>
1220 Jason Merrill <jason@redhat.com>
1222 * parser.c (cp_parser_class_specifier): Set class location to that
1223 of IDENTIFIER_NODE instead of '{' when possible.
1224 * semantics.c (begin_class_definition): Do not overide locations
1225 with less precise ones.
1227 2010-04-06 Jason Merrill <jason@redhat.com>
1230 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1233 * pt.c (maybe_update_decl_type): Check the return value from
1236 2010-04-01 Jason Merrill <jason@redhat.com>
1238 * decl.c (next_initializable_field): No longer static.
1239 * cp-tree.h: Declare it.
1240 * call.c (build_aggr_conv): Fail if there are more initializers
1241 than initializable fields.
1243 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1244 instead of void_zero_node.
1246 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1249 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1250 * pt.c (end_template_parm_list): Store sibling template parms of
1251 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1252 (push_template_decl_real): Don't store the containing template decl
1253 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1254 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1255 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1258 2010-03-30 Jason Merrill <jason@redhat.com>
1261 * pt.c (push_template_decl_real): Deal better with running out of
1262 scopes before running out of template parms.
1266 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1267 function parameter context. Don't print an error if parsing
1271 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1274 2010-03-26 Jason Merrill <jason@redhat.com>
1277 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1278 c++0x mode, but not other type-names.
1280 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1283 * pt.c (add_to_template_args): Support NULL ARGS;
1284 (most_specialized_class): call coerce_template_parms on
1285 template arguments passed to get_class_bindings. Use
1286 add_to_template_args.
1287 (unify): Handle VAR_DECLs.
1289 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1291 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1293 * pt.c (get_template_parms_at_level): Adjust.
1295 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1298 * cp-tree.h (get_template_parms_at_level): Declare ...
1299 * pt.c (get_template_parms_at_level): ... new function.
1300 * typeck.c (get_template_parms_of_dependent_type): If a template
1301 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1302 current_template_parms. Use get_template_parms_at_level. Remove
1304 (incompatible_dependent_types_p): If we get empty parms from just one
1305 of the template type parms we are comparing then the template parms are
1308 2010-03-24 Jason Merrill <jason@redhat.com>
1311 * parser.c (make_declarator): Initialize id_loc.
1312 (cp_parser_lambda_declarator_opt): And set it.
1314 2010-03-23 Jason Merrill <jason@redhat.com>
1316 Make lambda conversion op and op() non-static.
1317 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1318 Also add the thunk function returned by the conversion op.
1319 Mark the conversion deleted if the op() is variadic.
1320 * decl2.c (mark_used): Give helpful message about deleted conversion.
1321 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1322 * semantics.c (finish_this_expr): Adjust.
1323 * mangle.c (write_closure_type_name): Adjust.
1324 * decl.c (grok_op_properties): Don't allow it.
1325 * call.c (build_user_type_conversion_1): No static conversion ops.
1326 (build_op_call): Or op().
1328 * decl2.c (change_return_type): Fix 'this' quals.
1330 2010-03-22 Jason Merrill <jason@redhat.com>
1333 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1336 * pt.c (contains_auto_r): New fn.
1337 (do_auto_deduction): Use it.
1338 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1340 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1343 * decl2.c (grokfield): Handle invalid initializers for member
1346 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1349 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1351 * decl2.c (vague_linkage_p): Likewise.
1353 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1356 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1357 false, in the cp_parser_expression_statement call.
1359 2010-03-05 Jason Merrill <jason@redhat.com>
1361 * mangle.c (mangle_decl): Give name collision error even without
1364 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1366 * pt.c (process_partial_specialization): Use error_n instead of
1369 2010-03-03 Jason Merrill <jason@redhat.com>
1372 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1374 2010-03-03 Jason Merrill <jason@redhat.com>
1377 * mangle.c: Include cgraph.h.
1378 (mangle_decl): If the mangled name will change in a later
1379 ABI version, make the later mangled name an alias.
1380 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1381 * Make-lang.in (mangle.o): Depend on cgraph.h.
1382 * method.c (make_alias_for): Handle VAR_DECL, too.
1383 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1384 * tree.c (no_linkage_check): Adjust.
1385 * decl.c (maybe_commonize_var): Adjust.
1386 * cp-tree.h: Adjust.
1388 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1390 * pt.c (redeclare_class_template): Use error_n and inform_n.
1392 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1395 * cp-tree.h (push_tinst_level): Declare.
1396 (pop_tinst_level): Likewise.
1397 * pt.c (push_tinst_level): Give it external linkage.
1398 (pop_tinst_level): Likewise.
1399 * mangle.c (mangle_decl_string): Set the source location to that
1400 of the decl while mangling.
1402 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1405 * pt.c (redeclare_class_template): Return false if there are erroneous
1406 template parameters.
1408 2010-02-24 Manuel López-Ibåñez <manu@gcc.gnu.org>
1410 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1413 2010-02-24 Jason Merrill <jason@redhat.com>
1416 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1418 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1419 in a previous ABI version.
1421 2010-02-23 Jason Merrill <jason@redhat.com>
1424 * typeck2.c (digest_init_r): Accept value init of array.
1426 2010-02-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1429 * typeck.c (convert_arguments): Update error message.
1431 2010-02-22 Mike Stump <mikestump@comcast.net>
1434 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1436 2010-02-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
1439 * error.c (print_instantiation_partial_context_line): New.
1440 (print_instantiation_partial_context): Print at most 12 contexts,
1441 skip the rest with a message.
1443 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1446 * pt.c (lookup_template_class): Better support of specialization
1447 of member of class template implicit instantiation.
1449 2010-02-20 Manuel López-Ibåñez <manu@gcc.gnu.org>
1452 * call.c (conversion_null_warnings): Replace -Wconversion with
1454 * cvt.c (build_expr_type_conversion): Likewise.
1456 2010-02-18 Jason Merrill <jason@redhat.com>
1459 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1462 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1464 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1465 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1468 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1472 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1473 (maybe_update_decl_type): New fn.
1474 * parser.c (cp_parser_init_declarator): Use it.
1477 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1479 2010-02-17 Jason Merrill <jason@redhat.com>
1482 * call.c (build_over_call): Don't create zero-sized assignments.
1483 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1484 * cp-objcp-common.c (cp_expr_size): Remove.
1485 * cp-tree.h: Remove prototype.
1488 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1489 decl we looked up doesn't match.
1492 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1493 have an INIT_EXPR anymore.
1496 * pt.c (convert_nontype_argument): Change assert to test.
1498 2010-02-16 Jason Merrill <jason@redhat.com>
1500 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1503 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1504 VIEW_CONVERT_EXPR for conversions between structural equality types
1505 that the back end can't tell are the same.
1508 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1509 cv-quals from element here.
1510 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1512 2010-02-14 Jason Merrill <jason@redhat.com>
1515 * semantics.c (finish_compound_literal): Use
1516 cp_apply_type_quals_to_decl when creating a static variable.
1518 2010-02-12 Jason Merrill <jason@redhat.com>
1521 * name-lookup.h (current_binding_level): Check for null
1524 2010-02-12 Jason Merrill <jason@redhat.com>
1527 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1529 2010-02-12 Jakub Jelinek <jakub@redhat.com>
1532 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1535 2010-02-10 Jason Merrill <jason@redhat.com>
1538 * semantics.c (outer_lambda_capture_p): Revert.
1539 (add_capture): Only finish_member_declaration if
1540 we're in the lambda class.
1541 (register_capture_members): New.
1542 * cp-tree.h: Declare it.
1543 * parser.c (cp_parser_lambda_expression): Call it.
1545 2010-02-10 Jason Merrill <jason@redhat.com>
1548 * semantics.c (outer_lambda_capture_p): Use current_function_decl
1549 instead of current_class_type.
1551 2010-02-10 Jason Merrill <jason@redhat.com>
1553 PR c++/42983, core issue 906
1554 * method.c (defaultable_fn_check): Check virtualness.
1556 2010-02-10 Jason Merrill <jason@redhat.com>
1559 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1561 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
1563 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1564 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1566 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1567 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1568 (cp_parser_parameter_declaration)
1569 (cp_parser_exception_specification_opt)
1570 (cp_parser_exception_declaration): Likewise.
1571 * pt.c (check_default_tmpl_args): Likewise.
1572 * search.c (lookup_field_r): Likewise.
1574 2010-02-09 Jason Merrill <jason@redhat.com>
1577 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1579 2010-02-09 Jason Merrill <jason@redhat.com>
1582 * decl2.c (change_return_type): New fn.
1583 * semantics.c (apply_lambda_return_type): Use it.
1584 * cp-tree.h: Declare it.
1586 2010-02-05 Richard Guenther <rguenther@suse.de>
1588 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1589 * cp-lang.c: Include gt-cp-cp-lang.h.
1590 * config-lang.in (gtfiles): Add cp/cp-lang.c.
1592 2010-02-05 Dodji Seketeli <dodji@redhat.com>
1595 * typeck.c (get_template_parms_of_dependent_type): Try getting
1596 the template parameters fromt the type itself first.
1598 2010-02-03 Jason Merrill <jason@redhat.com>
1602 * mangle.c (write_unqualified_id): Split out from write_expression.
1603 (write_unqualified_name): Call it.
1604 (write_member_name): Likewise.
1605 (write_expression): Support TEMPLATE_ID_EXPR.
1606 Disambiguate operator names.
1609 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1612 2010-02-02 Jason Merrill <jason@redhat.com>
1615 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1616 * optimize.c (clone_body): Remap their initializers when making base
1618 (maybe_clone_body): Complain if multiple clones aren't safe.
1620 2010-01-29 Dodji Seketeli <dodji@redhat.com>
1627 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1628 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1629 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1630 * pt.c (coerce_template_parms, type_unification_real,
1631 expand_template_argument_pack, coerce_template_parameter_pack):
1632 Set the non default template args count.
1633 (current_template_args): Always set non defaulted
1634 template args count when compiled with --enable-checking
1635 (tsubst_template_args, type_unification_real): Propagate the non
1636 defaulted template args count.
1637 * error.c (get_non_default_template_args_count): Renamed
1638 count_non_default_template_args into this. Don't calculate the
1639 non default template argument count anymore. Use the new
1640 accessor macros above to get it.
1641 (dump_template_argument_list, dump_type, dump_decl,
1642 dump_template_parms): Adjust.
1643 * parser.c (cp_parser_template_argument_list): Always set defaulted
1644 template args count when compiled with --enable-checking.
1646 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
1648 * decl.c (redeclaration_error_message): Wrap the return messages into
1649 G_() for easy translation.
1651 2010-01-28 Jason Merrill <jason@redhat.com>
1654 * semantics.c (begin_class_definition): Don't use type_as_string.
1656 2010-01-28 Dodji Seketeli <dodji@redhat.com>
1660 * typeck.c (get_template_parms_of_dependent_type): Factorized
1661 this out of incompatible_template_type_parms_p
1662 (incompatible_dependent_types_p): Renamed
1663 incompatible_template_type_parms_p into this. Make it detect
1664 two incompatible dependent typedefs too.
1665 (structural_comptypes): Use incompatible_dependent_types_p.
1666 * pt.c (get_template_info):
1667 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
1669 2010-01-20 Janis Johnson <janis187@us.ibm.com>
1670 Jason Merrill <jason@redhat.com>
1672 * mangle.c (write_type): Mangle transparent record as member type.
1673 * semantics.c (begin_class_definition): Recognize decimal classes
1674 and set TYPE_TRANSPARENT_AGGR.
1676 2010-01-20 Jason Merrill <jason@redhat.com>
1679 * mangle.c (write_expression): Handle tree codes that have extra
1680 arguments in the middle-end.
1682 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1685 * except.c (expand_start_catch_block): Deal correctly with
1686 do_begin_catch returning error_mark_node.
1688 2010-01-20 Jason Merrill <jason@redhat.com>
1691 * class.c (layout_class_type): Set packed_maybe_necessary for packed
1695 * semantics.c (build_lambda_object): Call mark_used on captured
1699 * decl.c (grokdeclarator): Clear type_quals for a member function
1700 declared using a typedef. Don't complain about adding cv-quals
1701 to a function typedef in C++0x mode.
1703 2010-01-20 Jakub Jelinek <jakub@redhat.com>
1705 * decl.c (create_array_type_for_decl): Remove set but not used
1706 variable error_msg. Remove break stmts after return stmts.
1708 2010-01-19 Dodji Seketeli <dodji@redhat.com>
1710 * error.c (dump_template_parms, count_non_default_template_args):
1711 Revert fix of PR c++/42634.
1713 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1716 * error.c (dump_template_parms): Use innermost template
1717 arguments before calling count_non_default_template_args.
1718 (count_non_default_template_args): We are being called with
1719 template innermost arguments now. There is no need to ensure
1722 2010-01-18 Dodji Seketeli <dodji@redhat.com>
1725 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
1727 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1730 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
1732 2010-01-17 Dodji Seketeli <dodji@redhat.com>
1735 *pt.c (tsubst_decl): Get the arguments of a specialization from
1736 the specialization template, not from the most general template.
1738 2010-01-16 Jason Merrill <jason@redhat.com>
1741 * semantics.c (finish_decltype_type): Within a template, treat
1742 unresolved CALL_EXPR as dependent.
1744 2010-01-15 Dodji Seketeli <dodji@redhat.com>
1746 * error.c (dump_template_parms,count_non_default_template_args):
1747 Revert changes of PR c++/42634.
1749 2010-01-14 Jakub Jelinek <jakub@redhat.com>
1752 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
1753 functions with noreturn attribute.
1755 2010-01-14 Jason Merrill <jason@redhat.com>
1758 * call.c (build_new_method_call): Don't free the vec here.
1761 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
1763 2010-01-13 Dodji Seketeli <dodji@redhat.com>
1766 * error.c (dump_template_parms): Use innermost template
1767 arguments before calling count_non_default_template_args.
1768 (count_non_default_template_args): We are being called with
1769 template innermost arguments now. There is no need to ensure
1772 2010-01-07 Dodji Seketeli <dodji@redhat.com>
1775 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
1776 arguments that were previously deduced.
1778 2010-01-05 Jason Merrill <jason@redhat.com>
1780 * pt.c (unify_pack_expansion): Handle deduction from init-list.
1781 * call.c (build_over_call): Don't complain about it.
1783 2010-01-04 Jason Merrill <jason@redhat.com>
1786 * pt.c (tsubst_decl): Don't apply type attributes in place.
1789 * semantics.c (describable_type): Remove decltype comment and
1794 Copyright (C) 2010 Free Software Foundation, Inc.
1796 Copying and distribution of this file, with or without modification,
1797 are permitted in any medium without royalty provided the copyright
1798 notice and this notice are preserved.