1 2012-11-19 Jason Merrill <jason@redhat.com>
4 * class.c (add_implicitly_declared_members): Use
5 lookup_fnfields_slot to get the base constructors.
7 2012-11-19 Jakub Jelinek <jakub@redhat.com>
10 * class.c (fixed_type_or_null_ref_ht): New variable.
11 (fixed_type_or_null): Use it instead of local static ht.
13 2012-11-17 Diego Novillo <dnovillo@google.com>
15 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
17 * Make-lang.in: Remove dependencies on vecir.h and vecprim.h everywhere.
18 * call.c: Use new vec API in vec.h.
20 * cp-gimplify.c: Likewise.
21 * cp-tree.h: Likewise.
30 * name-lookup.c: Likewise.
31 * name-lookup.h: Likewise.
38 * semantics.c: Likewise.
41 * typeck2.c: Likewise.
43 2012-11-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
45 * semantics.c (finish_id_expression): Tidy diagnostic message.
47 2012-11-16 Dodji Seketeli <dodji@redhat.com>
50 * pt.c (lookup_template_class_1): Look at the type of the
51 potential member enum of class template to determine if we are
52 actually substituting into a member enum of class template.
54 2012-11-16 Jakub Jelinek <jakub@redhat.com>
57 * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Use SIZEOF_EXPR_TYPE_P
60 2012-11-14 Jason Merrill <jason@redhat.com>
63 * decl2.c (mark_used): Don't complain about auto in templates.
66 * decl.c (decls_match): Remove #ifdef around earlier fix.
68 2012-11-13 Jason Merrill <jason@redhat.com>
70 * class.c (finish_struct_1): Check virtual functions
74 * pt.c (maybe_process_partial_specialization): Update
75 DECL_SOURCE_LOCATION for new specializations.
77 2012-11-14 Paolo Carlini <paolo.carlini@oracle.com>
80 * init.c (emit_mem_initializers): Skip arguments == error_mark_node.
82 2012-11-14 Fabien ChĂȘne <fabien@gcc.gnu.org>
85 * call.c (build_new_method_call_1): Check that the instance type
86 and the function context are the same before setting the flag
89 2012-11-13 Sriraman Tallam <tmsriram@google.com>
91 * class.c (mark_versions_used): Remove.
92 (resolve_address_of_overloaded_function): Call target hook
93 for versioned functions. Refactor to call
94 get_function_versions_dispatcher.
95 * decl.c (duplicate_decls): Add comments.
96 * cp/call.c (get_function_version_dispatcher): Expose function.
97 (mark_versions_used): Expose function.
98 * cp/cp-tree.h (mark_versions_used): New declaration.
99 (get_function_version_dispatcher): Ditto.
101 2012-11-13 Dodji Seketeli <dodji@redhat.com>
104 * pt.c (lookup_template_class_1): TYPE_STUB_DECL should be
105 accessed on the main variant of the type.
107 2012-11-12 Ed Smith-Rowland <3dw4rd@verizon.net>
109 * parser.c (cp_parser_objc_class_ivars):
110 Index declspecs.locations by ds_typedef rather than ds_thread.
112 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
115 * decl.c (grokfndecl): Adjust calls to interpret_x_suffix.
117 2012-11-09 Jason Merrill <jason@redhat.com>
120 * pt.c (check_instantiated_arg): Don't complain about dependent args.
122 * tree.c (cxx_attribute_table): Add abi_tag attribute.
123 (check_abi_tag_redeclaration, handle_abi_tag_attribute): New.
124 * class.c (find_abi_tags_r, check_abi_tags): New.
125 (check_bases, check_field_decl): Call check_abi_tags.
126 * decl.c (redeclaration_error_message): Call
127 check_abi_tag_redeclaration.
128 * mangle.c (tree_string_cmp, write_abi_tags): New.
129 (write_unqualified_name): Call write_abi_tags.
131 2012-11-07 Paolo Carlini <paolo.carlini@oracle.com>
135 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
138 * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
141 2012-11-07 Florian Weimer <fweimer@redhat.com>
143 * init.c (build_new_1): Do not check for arithmetic overflow if
144 inner array size is 1.
146 2012-11-05 Sriraman Tallam <tmsriram@google.com>
148 * class.c (add_method): Change assembler names of function versions.
149 (mark_versions_used): New static function.
150 (resolve_address_of_overloaded_function): Create dispatcher decl and
151 return address of dispatcher instead.
152 * decl.c (decls_match): Make decls unmatched for versioned
154 (duplicate_decls): Remove ambiguity for versioned functions.
155 Delete versioned function data for merged decls.
156 * decl2.c (check_classfn): Check attributes of versioned functions
158 * call.c (get_function_version_dispatcher): New function.
159 (mark_versions_used): New static function.
160 (build_over_call): Make calls to multiversioned functions
161 to call the dispatcher.
162 (joust): For calls to multi-versioned functions, make the most
163 specialized function version win.
165 2012-10-31 Lawrence Crowl <crowl@google.com>
167 * decl2.c (var_finalized_p): Rename varpool_node to
168 varpool_node_for_decl.
169 (maybe_emit_vtables): Likewise.
171 2012-10-31 Paolo Carlini <paolo.carlini@oracle.com>
174 * tree.c (build_cplus_array_type): Set TREE_NO_WARNING on the
177 2012-10-31 Dodji Seketeli <dodji@redhat.com>
180 * parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
181 'Alignas' keyword as the beginning of a c++11 attribute specifier.
182 Update the comment of the function.
183 (cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
186 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
189 * typeck.c (maybe_warn_about_returning_address_of_local): Use
190 OPT_Wreturn_local_addr.
192 2012-10-26 Jakub Jelinek <jakub@redhat.com>
195 * typeck2.c (store_init_value): Call fold_non_dependent_expr
196 and maybe_constant_init even for C++98.
198 2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
201 * init.c (build_new): Don't turn a null *init into a pointer to
202 empty vector orig_init.
204 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
207 * class.c (finish_struct_1): Reject aggregates decorated with
208 __transparent_union__ which cannot be made transparent because
209 the type of the first field has a different ABI from the class
212 2012-10-25 Jason Merrill <jason@redhat.com>
215 * call.c (joust): An implicitly deleted move function is
216 worse than any non-deleted function.
217 * method.c (process_subob_fn): No special rules for move.
218 (synthesized_method_walk, implicitly_declare_fn): Likewise.
219 Warn about virtual base with non-trivial move assignment.
220 * cp-tree.h (struct lang_decl_fn): Remove suppress_implicit_decl.
221 (FNDECL_SUPPRESS_IMPLICIT_DECL): Remove.
223 * semantics.c (finish_omp_threadprivate): Call complete_type.
225 * class.c (one_inherited_ctor): Warn about variadic inherited ctor.
227 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
230 * typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
231 * call.c (build_conditional_expr_1): Likewise.
233 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
236 * parser.c (cp_parser_template_parameter): When
237 cp_parser_parameter_declaration parsed a default argument don't
238 see if *is_parameter_pack needs setting.
240 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
243 * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
246 2012-10-23 Jakub Jelinek <jakub@redhat.com>
249 * pt.c (tsubst_copy, tsubst_copy_and_build) <case SIZEOF_EXPR>: Use
250 tsubst instead of tsubst_copy* on types.
253 * decl2.c (cplus_decl_attributes): Don't return early
254 if attributes is NULL.
256 2012-10-18 Paolo Carlini <paolo.carlini@oracle.com>
259 * decl.c (reshape_init_array_1): Avoid infinite loops.
261 2012-10-15 Alexandre Oliva <aoliva@redhat.com>
262 Paolo Carlini <paolo.carlini@oracle.com>
265 * call.c (build_new_op_1): Filter out operator functions that don't
266 satisfy enum-conversion match requirements.
268 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
271 * parser.c (cp_parser_optional_template_keyword): When -pedantic
272 and C++98 mode restore pre-Core/468 behavior.
274 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
277 * parser.c (cp_parser_optional_template_keyword): Implement
278 Core/468, allow outside template.
280 2012-10-14 Jason Merrill <jason@redhat.com>
281 Ville Voutilainen <ville.voutilainen@gmail.com>
283 Implement C++11 inheriting constructors.
284 * cp-tree.h (cpp0x_warn_str): Add CPP0X_INHERITING_CTORS.
285 (DECL_INHERITED_CTOR_BASE, SET_DECL_INHERITED_CTOR_BASE): New.
286 (special_function_kind): Add sfk_inheriting_constructor.
287 * class.c (add_method): An inheriting ctor is hidden by a
289 (one_inheriting_sig, one_inherited_ctor): New.
290 (add_implicitly_declared_members): Handle inheriting ctors.
291 * error.c (maybe_warn_cpp0x): Handle CPP0X_INHERITING_CTORS.
292 * init.c (emit_mem_initializers): Don't set LOOKUP_DEFAULTED
293 for an inheriting constructor.
294 * method.c (type_has_trivial_fn): Handle sfk_inheriting_constructor.
295 (type_set_nontrivial_flag): Likewise.
296 (add_one_base_init): Split out from...
297 (do_build_copy_constructor): ...here. Handle inheriting constructors.
298 (locate_fn_flags): Handle a list of arg types.
299 (synthesized_method_walk): Handle inheriting constructors.
300 (maybe_explain_implicit_delete): Likewise.
301 (deduce_inheriting_ctor): New.
302 (implicitly_declare_fn): Handle inheriting constructors.
303 * name-lookup.c (push_class_level_binding_1): An inheriting constructor
304 does not declare the base's name.
305 (do_class_using_decl): Allow inheriting constructors.
306 * pt.c (template_parms_to_args): Split from current_template_args.
307 (add_inherited_template_parms): New.
308 (tsubst_decl): Handle inheriting constructors.
309 * tree.c (special_function_p): Handle inheriting constructors.
311 2012-10-12 Jakub Jelinek <jakub@redhat.com>
314 * semantics.c (finish_call_expr): Pass array of 3 sizeof_arg
315 trees and locs (corresponding to first 3 arguments) to
316 sizeof_pointer_memaccess_warning.
318 2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>
321 * decl.c (grokfndecl): When checking for ::main declarations
322 use PROCESSING_REAL_TEMPLATE_DECL_P().
324 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
327 * call.c (build_new_op_1): Pass RO_ARROW_STAR to cp_build_indirect_ref.
328 * typeck.c (cp_build_indirect_ref): Handle RO_ARROW_STAR.
330 2012-10-11 Jason Merrill <jason@redhat.com>
332 * cp-tree.h (DECL_THUNKS): NULL_TREE for non-virtual functions.
333 (SET_DECL_THUNKS): New.
334 * decl.c (duplicate_decls): Adjust.
335 * method.c (make_thunk): Adjust.
337 * decl.c (grokdeclarator): Set DECL_GNU_TLS_P for static data
340 2012-10-09 Dodji Seketeli <dodji@redhat.com>
342 PR c++/53540 - using fails to be equivalent to typedef
343 * cp-tree.h (TYPE_TEMPLATE_INFO): For an alias that is not an
344 instance of alias template, don't look for its TEMPLATE_INFO in
346 (alias_template_specialization_p): Take const_tree.
347 * pt.c (alias_template_specialization_p): Take a const_tree.
348 Don't call primary_template_instantiation_p.
349 (primary_template_instantiation_p): Call
350 alias_template_specialization_p.
352 2012-10-10 Dodji Seketeli <dodji@redhat.com>
354 * parser (cp_parser_statement): Parse c++11 attributes
356 (cp_parser_std_attribute_spec_seq): Do not warn too early about
357 using c++11 attributes in non c++11 mode.
359 2012-10-10 Dehao Chen <dehao@google.com>
361 * cp-gimplify.c (cp_genericize_r): Set location for TRY expr.
363 2012-10-09 Lawrence Crowl <crowl@google.com>
365 * Make-lang.in (class.o): Add dependence on hash-table.h.
367 (semantics.o): Likewise.
368 * class.c (fixed_type_or_null): Change to new type-safe hash table.
369 * tree.c (verify_stmt_tree): Likewise.
370 (verify_stmt_tree_r): Likewise.
371 * semantics.c (struct nrv_data): Likewise.
373 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
376 * typeck.c (build_x_binary_op): Update warn_about_parentheses call.
377 * parser.c (cp_parser_binary_expression): Use SET_EXPR_LOCATION
380 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
383 * typeck.c (cp_build_binary_op): Handle mixed scalar-vector
385 [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise.
387 2012-10-08 Jakub Jelinek <jakub@redhat.com>
390 * tree.c (cp_tree_equal): Handle FIELD_DECL.
392 2012-10-08 Jason Merrill <jason@redhat.com>
394 Allow dynamic initialization of thread_locals.
395 * decl.c: Define tls_aggregates.
396 (expand_static_init): Remove sorry. Add to tls_aggregates.
397 * cp-tree.h: Declare tls_aggregates.
398 * call.c (set_up_extended_ref_temp): Add to tls_aggregates.
399 * decl2.c (var_needs_tls_wrapper): New.
400 (var_defined_without_dynamic_init): New.
401 (get_tls_init_fn, get_tls_wrapper_fn): New.
402 (generate_tls_wrapper, handle_tls_init): New.
403 (cp_write_global_declarations): Call handle_tls_init and
405 * mangle.c (write_guarded_var_name): Split out from..
406 (mangle_guard_variable): ...here.
407 (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it.
408 (decl_tls_wrapper_p): New.
409 * semantics.c (finish_id_expression): Replace use of thread_local
410 variable with a call to its wrapper.
412 * decl.c (get_thread_atexit_node): New.
413 (register_dtor_fn): Use it for TLS.
415 Partial implementation of C++11 thread_local.
416 * decl.c (cp_finish_decl): Remove errors about non-trivial
417 initialization and destruction of TLS variables.
418 (register_dtor_fn): Add sorry about TLS variables.
419 (expand_static_init): Add sorry about non-local TLS variables,
420 or error with __thread.
421 Don't emit thread-safety guards for local TLS variables.
422 (grokdeclarator): thread_local in a function implies static.
423 * decl.h: Adjust prototype.
424 * decl2.c (get_guard): Copy DECL_TLS_MODEL.
425 * parser.c (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
426 (set_and_check_decl_spec_loc): Take the token rather than the location.
427 Distinguish between __thread and thread_local.
428 (cp_parser_set_storage_class): Don't complain about thread_local before
430 (token_is__thread): New.
431 * call.c (make_temporary_var_for_ref_to_temp): Handle TLS.
432 * cp-tree.h (DECL_GNU_TLS_P): New.
433 (cp_decl_specifier_seq): Add gnu_thread_keyword_p.
435 2012-10-08 Dodji Seketeli <dodji@redhat.com>
437 PR c++/53528 C++11 attribute support
438 * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
439 (enum cp_decl_spec::ds_std_attribute): New enumerator.
440 (struct cp_decl_specifier_seq::std_attributes): New field.
441 (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
443 (check_tag_decl): Take an extra parameter for explicit
445 * decl.c (warn_misplaced_attr_for_class_type): Extract from ...
446 (check_tag_decl): ... here. Add check for c++11 attributes being
447 applied to an explicit instantiation. Take an extra parameter for
448 explicit instantiations.
449 (grokdeclarator): Make sure a c++11 attribute after an array
450 declarator appertains to the array, an attribute after a function
451 declarator appertains to the function type, an attribute after a
452 declarator-id appertains to the entity being declared, and an
453 attribute after a pointer declarator appertain to the pointer.
454 * decl2.c (is_late_template_attribute): Use get_attribute_name.
455 * error.c (maybe_warn_cpp0x): Support
456 CPP0X_GENERALIZED_ATTRIBUTES.
457 * parser.c (cp_next_tokens_can_be_attribute_p)
458 (cp_next_tokens_can_be_gnu_attribute_p)
459 (cp_next_tokens_can_be_std_attribute_p)
460 (cp_nth_tokens_can_be_attribute_p)
461 (cp_nth_tokens_can_be_gnu_attribute_p)
462 (cp_nth_tokens_can_be_std_attribute_p)
463 (cp_parser_gnu_attribute_list, cp_parser_std_attribute)
464 (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
465 (cp_parser_attributes_opt, cp_parser_std_attribute_list): New
467 (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
468 (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
469 (cp_parser_postfix_expression): Disallow "[[" tokens here.
470 (cp_parser_label_for_labeled_statement): Use take an extra
471 parameter for attributes.
472 (cp_parser_block_declaration): Use
473 cp_nth_tokens_can_be_std_attribute_p here.
474 (cp_parser_decl_specifier_seq): Likewise. Store C++11 attributes
475 that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
476 declaration. Emit proper warning about misplaced c++11 attributes
478 (cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
479 (cp_parser_init_declarator): Parsing attributes here is no more a
480 GNU extension in c++-11.
481 (cp_parser_type_specifier_seq): Use
482 cp_next_tokens_can_be_attribute_p.
483 (cp_parser_direct_declarator): Likewise. Hang c++11 attributes
484 following the declarator to its syntactic construct. It'll later
485 be applied to the proper appertaining entity by grokdeclarator.
486 (cp_parser_ptr_operator): Likewise.
487 (make_declarator): Initialize cp_declarator::std_attribute.
488 (make_pointer_declarator, make_reference_declarator)
489 (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
490 attributes that appertain to the pointer/reference in argument.
491 (cp_parser_ptr_operator): Take an out parameter for c++11
492 attributes. Update comments.
493 (cp_parser_new_declarator_opt)
494 (cp_parser_conversion_declarator_opt): Adjust.
495 (cp_parser_declarator): Likewise. Handle C++11 attributes.
496 Rename attributes to gnu_attribute for better legibility.
497 (cp_parser_simple_declaration): Update comment.
498 (cp_parser_class_specifier_1): Parse GNU attributes specifically
499 (cp_parser_enum_specifier): Accept only gnu attributes after the
501 (cp_parser_member_declaration): Don't clear attributes -- intended
502 for the entity being declared -- too early because check_tag_decl
504 (cp_parser_statement): Update comment. Parse optional c++11
505 attributes at the beginning of the relevant kind of statements and
506 ignore them, for now, unless when calling
507 cp_parser_label_for_labeled_statement.
508 (cp_parser_label_for_labeled_statement): Take c++11 attributes
510 * semantics.c (potential_constant_expression_1): Likewise.
511 * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
514 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
516 * pt.c (fold_non_dependent_expr_sfinae): Remove static specifier.
517 (tsubst_copy_and_build): Use get_target_expr_sfinae.
518 * call.c (build_conditional_expr_1, convert_like_real): Likewise.
519 * cvt.c (build_up_reference): Likewise.
520 (ocp_convert): Use abstract_virtuals_error_sfinae.
521 (build_up_reference): Propagate complain to cp_build_addr_expr.
522 * decl.c (compute_array_index_type): Use fold_non_dependent_expr_sfinae.
523 * cp-tree.h: Update declarations.
525 * cvt.c (build_expr_type_conversion): Tidy.
527 * tree.c (stabilize_aggr_init): Change to static.
529 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
532 * semantics.c (is_normal_capture_proxy): Return true for
533 error_mark_node as DECL_VALUE_EXPR.
535 2012-10-05 Jakub Jelinek <jakub@redhat.com>
537 * cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
538 * tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
540 * mangle.c (write_expression): Likewise.
541 * cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
542 * error.c (dump_expr): Likewise.
543 * parser.c (cp_parser_unary_expression): For sizeof call
544 cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
545 return SIZEOF_EXPR with the operand.
546 * pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
547 call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
548 return SIZEOF_EXPR with tsubsted operand.
549 (value_dependent_expression_p): Handle SIZEOF_EXPR with
551 (instantiation_dependent_r): Likewise.
552 * call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
553 * semantics.c (finish_call_expr): Call
554 sizeof_pointer_memaccess_warning if needed.
555 (cxx_eval_constant_expression): Handle SIZEOF_EXPR.
556 (potential_constant_expression_1): Remove early exit for
557 C++98. Handle PROPERTY_REF.
558 * decl.c (duplicate_decls): When redeclaring a builtin function,
559 keep the merged decl builtin also if newdecl is a gnu_inline
561 (fold_sizeof_expr_r): New function.
562 (compute_array_index_type): Fold SIZEOF_EXPRs in itype.
563 * cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
564 * typeck.c (cp_build_binary_op): For warn_for_sign_compare
565 try harder using maybe_constant_value to get INTEGER_CSTs.
567 * decl.c (stabilize_vla_size): Call pointer_set_destroy
570 2012-10-04 Arnaud Charlet <charlet@adacore.com>
572 * decl2.c (cp_write_global_declarations): Fix handling of
575 2012-10-03 Jakub Jelinek <jakub@redhat.com>
578 * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
579 not ignoring the second operand, pass the original second operand
580 and not one with stripped nops to cxx_eval_constant_expression.
582 2012-10-01 Jason Merrill <jason@redhat.com>
584 * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
585 for a constructor call.
586 (decl_jump_unsafe): So don't bother checking
587 type_has_nontrivial_default_init.
588 * call.c (set_up_extended_ref_temp): Set
589 DECL_NONTRIVIALLY_INITIALIZED_P.
591 * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
592 (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
593 (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
594 * name-lookup.c (hidden_name_p): Use it.
596 * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
597 * decl.c (cp_make_fname_decl): Adjust.
599 2012-09-30 Sharad Singhai <singhai@google.com>
601 * decl2.c (cp_write_global_declarations): Use a different method
602 to determine if the dump has ben initialized.
604 2012-09-29 Paolo Carlini <paolo.carlini@oracle.com>
607 * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
609 * pt.c (tsubst_copy_and_build): Adjust.
610 * parser.c (cp_parser_postfix_expression): Likewise.
611 * cp-tree.h: Adjust declaration.
613 2012-09-28 Dodji Seketeli <dodji@redhat.com>
615 PR c++/54372 - unused attribute inactive on dependant entities
616 * decl2.c (is_late_template_attribute): "unused" attribute is to
617 be applied at compile time.
619 2012-09-25 Dodji Seketeli <dodji@redhat.com>
621 PR c++/29028 - Missed unused warning on using declaration
622 * decl.c (poplevel<warn_unused*>): Do not forget that some local
623 bindings are represented by a TREE_LIST.
625 2012-09-25 Dodji Seketeli <dodji@redhat.com>
627 PR c++/53551 - -Wunused-local-typedefs misses uses
628 * decl.c (make_typename_type): Record the use of typedefs.
630 2012-09-27 Jakub Jelinek <jakub@redhat.com>
632 * init.c (build_new_1): Don't test TREE_CONSTANT
635 2012-09-25 Paolo Carlini <paolo.carlini@oracle.com>
638 * parser.c (cp_parser_template_id): In C++11 mode simply accept
641 2012-09-25 Zhenqiang Chen <zhenqiang.chen@linaro.org>
644 * typeck.c (cp_build_binary_op): Check side effects before generating
645 pfn and delta related expressions.
647 2012-09-24 Lawrence Crowl <crowl@google.com>
649 * init.c (build_new_1): Change to new double_int API.
650 * decl.c (build_enumerator): Likewise.
651 * typeck2.c (process_init_constructor_array): Likewise.
652 * mangle.c (write_array_type): Likewise.
654 2012-09-24 Paolo Carlini <paolo.carlini@oracle.com>
657 * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
660 2012-09-24 Jason Merrill <jason@redhat.com>
662 * decl.c (get_atexit_node): Remove dead code.
664 * Make-lang.in (cp/parser.o): Depend on decl.h.
666 2012-09-20 Paolo Carlini <paolo.carlini@oracle.com>
669 * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
670 argument don't call unqualified_name_lookup_error.
672 2012-09-19 Marc Glisse <marc.glisse@inria.fr>
675 * semantics.c (finish_decltype_type): Make vectors not opaque.
677 2012-09-17 Jason Merrill <jason@redhat.com>
680 * pt.c (instantiate_alias_template): New.
682 (push_access_scope): Allow TYPE_DECL.
684 2012-09-14 Jason Merrill <jason@redhat.com>
687 * typeck2.c (check_narrowing): Avoid false positives on conversion
690 2012-09-14 Marc Glisse <marc.glisse@inria.fr>
693 * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
694 NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
696 2012-09-14 Paolo Carlini <paolo.carlini@oracle.com>
698 * decl.c (make_typename_type): Only error out if tf_error is set
701 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
702 Manuel López-Ibåñez <manu@gcc.gnu.org>
705 * init.c (perform_member_init): Use OPT_Winit_self instead of
708 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
710 * typeck.c (build_indirect_ref, build_function_call,
711 build_function_call_vec, build_binary_op, build_unary_op,
712 build_compound_expr, build_c_cast, build_modify_expr): Remove
713 uses of ATTRIBUTE_UNUSED on the parameters.
714 * class.c (set_linkage_according_to_type, resort_type_method_vec,
715 dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
717 * decl.c (local_variable_p_walkfn): Likewise.
718 * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
719 * error.c (find_typenames_r): Likewise.
720 * tree.c (verify_stmt_tree_r, bot_replace,
721 handle_java_interface_attribute, handle_com_interface_attribute,
722 handle_init_priority_attribute, c_register_addr_space): Likewise.
723 * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
724 * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
725 * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
727 * semantics.c (dfs_calculate_bases_pre): Likewise.
728 * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
730 * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
731 cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
732 cp_parser_omp_clause_untied): Likewise.
733 * mangle.c (write_unnamed_type_name,
734 discriminator_for_string_literal): Likewise.
735 * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
736 * lex.c (handle_pragma_vtable, handle_pragma_unit,
737 handle_pragma_interface, handle_pragma_implementation,
738 handle_pragma_java_exceptions): Likewise.
740 2012-09-13 Jason Merrill <jason@redhat.com>
743 * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
744 address, make sure the value is constant.
747 * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
750 * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
753 2012-09-10 Paolo Carlini <paolo.carlini@oracle.com>
757 * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
758 require_complete_type_sfinae.
759 (build_op_delete_call, build_over_call): Adjust.
760 * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
762 (cp_build_function_call_vec): Adjust.
763 * init.c (build_new_1): Likewise.
764 * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
766 * optimize.c (build_delete_destructor_body): Likewise.
767 * cp-tree.h: Adjust declarations.
769 * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
771 2012-09-10 Jason Merrill <jason@redhat.com>
775 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
776 for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
779 * decl.c (move_signature_fn_p): Split out from move_fn_p.
780 * method.c (process_subob_fn): Use it.
781 * cp-tree.h: Declare it.
783 2012-09-07 Jason Merrill <jason@redhat.com>
785 * semantics.c (sort_constexpr_mem_initializers): Tweak.
787 2012-09-09 Mark Kettenis <kettenis@openbsd.org>
789 * decl.c (reshape_init_class): Avoid dereferencing a
790 past-the-end pointer.
792 2012-09-07 Paolo Carlini <paolo.carlini@oracle.com>
794 * pt.c (num_template_headers_for_class): Rework per the code
795 inline in cp_parser_check_declarator_template_parameters.
796 * parser.c (cp_parser_check_declarator_template_parameters):
797 Use num_template_headers_for_class.
799 2012-09-06 Jason Merrill <jason@redhat.com>
803 * semantics.c (sort_constexpr_mem_initializers): New.
804 (build_constexpr_constructor_member_initializers): Use it.
805 (cx_check_missing_mem_inits): Skip artificial fields.
806 * init.c (expand_aggr_init_1): Don't zero out a class
809 2012-09-05 Paolo Carlini <paolo.carlini@oracle.com>
812 * search.c (lookup_base): Add tsubst_flags_t parameter.
813 (adjust_result_of_qualified_name_lookup, check_final_overrider):
815 * name-lookup.c (do_class_using_decl): Adjust.
816 * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
818 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
819 build_up_reference): Likewise.
820 * rtti.c (build_dynamic_cast_1): Likewise.
821 * tree.c (maybe_dummy_object): Likewise.
822 * call.c (build_conditional_expr_1, build_over_call): Likewise.
823 * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
825 (enum base_access_flags, ba_quiet): Remove.
826 (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
827 * except.c (can_convert_eh): Adjust.
828 * decl.c (grokdeclarator): Likewise.
829 * typeck.c (comp_except_types, build_class_member_access_expr,
830 finish_class_member_access_expr, get_member_function_from_ptrfunc,
831 build_static_cast_1, get_delta_difference_1): Likewise.
832 * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
833 warn_about_ambiguous_bases): Likewise.
834 (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
836 2012-09-04 Jason Merrill <jason@redhat.com>
839 * decl.c (reshape_init_class): Handle invalid initializer for
840 0-length array member.
842 * error.c (dump_type_suffix): Correct handling of 0-length arrays.
845 * cp-tree.h (LAMBDANAME_P): Remove.
846 (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
847 * cp-lang.c (cxx_dwarf_name): Likewise.
848 * error.c (dump_aggr_type): Likewise.
849 * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
852 * decl.c (check_default_argument): Set cp_unevaluated_operand
853 around call to perform_implicit_conversion_flags.
857 * pt.c (fn_type_unification): Call coerce_template_parms before
858 entering substitution context.
860 2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
861 Jason Merrill <jason@redhat.com>
864 * pt.c (check_template_variable): New.
865 (num_template_headers_for_class): Split out...
866 * decl.c (grokdeclarator): ...from here.
867 (start_decl): Remove redundant diagnostic.
868 * cp-tree.h: Declare them
869 * parser.c (cp_parser_single_declaration): Call check_template_variable.
871 2012-08-31 Ollie Wild <aaw@google.com>
874 * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
876 2012-08-30 Jason Merrill <jason@redhat.com>
880 * pt.c (instantiation_dependent_r): New.
881 (instantiation_dependent_expression_p): New.
882 (value_dependent_expression_p): Use it. SCOPE_REF is always dependent.
883 * semantics.c (finish_decltype_type): Use it.
884 * cp-tree.h: Declare it.
886 * semantics.c (finish_qualified_id_expr): Handle building up a
887 non-dependent SCOPE_REF here.
888 (finish_id_expression): Not here.
889 * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
891 * friend.c (make_friend_class): Handle template template parameters.
892 * parser.c (cp_parser_template_declaration_after_export): Likewise.
893 * pt.c (tsubst_friend_class): Likewise.
894 (instantiate_class_template_1): Likewise
895 * decl.c (check_elaborated_type_specifier): Likewise.
896 (lookup_and_check_tag): Likewise.
898 * pt.c (get_class_bindings): Call coerce_template_parms. Add
900 (more_specialized_class): Add main_tmpl parameter.
901 (most_specialized_class): Adjust calls.
903 * decl.c (cp_finish_decl): Check for invalid multiple initializers
904 even if the initializer is dependent.
906 * pt.c (instantiate_template_1): Keep processing_template_decl set
907 if there are dependent args.
909 2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
912 * decl2.c (mark_used): Consistently return false after errors
913 about uses before deduction of auto.
914 * semantics.c (finish_id_expression): Check mark_used return
915 value and return error_mark_node in case of failure.
917 2012-08-24 Jason Merrill <jason@redhat.com>
920 * pt.c (deduction_tsubst_fntype): Remove.
921 (fn_type_unification): Check deduction depth and call
922 instantiate_template here. Handle default argument access checks.
923 (determine_specialization): Suppress access control.
924 (tsubst_decl): Check for excessive deduction depth.
925 (recheck_decl_substitution): Make sure access control is on.
926 (type_unification_real): Don't mess with access deferring here.
927 (get_bindings): Adjust for fn_type_unification return type.
928 * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
929 (template_instantiation_rejection): Remove.
930 (struct rejection_reason): Change targs to num_targs.
931 (template_unification_rejection, print_z_candidate): Adjust.
932 (add_template_candidate_real): Adjust for fn_type_unification change.
933 * class.c (resolve_address_of_overloaded_function): Likewise.
934 * cp-tree.h: Adjust declaration.
936 * pt.c (tsubst_default_argument): Indicate where the default
937 argument is being instantiated for.
938 (tsubst_expr): Restore previous location.
939 (tsubst_copy_and_build): Set and restore location.
940 * call.c (build_new_method_call_1): Remember location of call.
941 * semantics.c (finish_call_expr): Here too.
942 * parser.c (cp_parser_omp_for_loop): Remember the location of the
943 increment expression.
945 * pt.c (resolve_overloaded_unification): Use coerce_template_parms
946 instead of get_bindings.
947 (resolve_nondeduced_context): Likewise.
949 * pt.c (register_specialization): Correct argument to
950 check_specialization_namespace.
951 (determine_specialization): Don't consider members of
954 2012-08-23 Jason Merrill <jason@redhat.com>
956 * decl.c (compute_array_index_type): Use type_dependent_expression_p.
958 2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
961 * name-lookup.c (supplement_binding_1): Handle specially enums
962 only in class templates.
963 (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
964 using declarations at function scope.
966 2012-08-21 Richard Guenther <rguenther@suse.de>
968 * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
969 (ATTR_IS_DEPENDENT): Likewise.
970 (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
971 TREE_LANG_FLAG_0 on TREE_VECs.
973 2012-08-20 Florian Weimer <fweimer@redhat.com>
976 * call.c (build_operator_new_call): Add size_check argument and
978 * cp-tree.h (build_operator_new_call): Adjust declaration.
979 * init.c (build_new_1): Compute array size check and apply it.
981 2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
984 * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
985 Wunused_variable too.
987 2012-08-20 Diego Novillo <dnovillo@google.com>
989 * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
991 2012-08-20 Richard Guenther <rguenther@suse.de>
993 * name-lookup.c (store_binding_p): New predicate, split out from ...
994 (store_binding): ... here. Always store binding and require
995 target vector with enough space.
996 (store_bindings): Collect to store bindings and reserve space
997 for them, then store them.
998 (store_class_bindings): Likewise.
1000 2012-08-19 Mikael Morin <mikael@gcc.gnu.org>
1002 * Make-lang.in: Fix typo.
1004 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1006 * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
1008 2012-08-14 Diego Novillo <dnovillo@google.com>
1010 Merge from cxx-conversion branch. Re-write VEC in C++.
1012 * call.c (add_function_candidate): Remove const qualifier
1013 from call to VEC_index.
1015 2012-08-10 Richard Guenther <rguenther@suse.de>
1017 * error.c (dump_expr): Handle anonymous SSA names.
1019 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
1021 * error.c (print_instantiation_context): Pretty-print a newline before
1022 diagnostic_flush_buffer.
1023 * cxx-pretty-print.c (pp_cxx_function_definition): Use
1024 pp_newline_and_flush instead of separate pp_newline and pp_flush.
1026 2012-08-06 Dodji Seketeli <dodji@redhat.com>
1028 Avoid crashing on erroneous static_assert usage
1029 * semantics.c (finish_static_assert): Don't crash on erroneous
1030 message or condition.
1032 2012-08-06 Marc Glisse <marc.glisse@inria.fr>
1033 Paolo Carlini <paolo.carlini@oracle.com>
1036 * typeck.c (build_static_cast_1): Move the conversion to void case
1037 before the perform_direct_initialization_if_possible call.
1039 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
1041 * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
1042 * cp-tree.h (scalarish_type_p): Declare.
1043 * tree.c (scalarish_type_p): Make non-static.
1045 2012-08-02 Jason Merrill <jason@redhat.com>
1046 Paolo Carlini <paolo.carlini@oracle.com>
1048 PR c++/51213 (again)
1049 * pt.c (type_unification_real): Call push_deferring_access_checks /
1050 pop_deferring_access_checks around the substitution of default
1052 (instantiate_template_1): When the specialization returned by
1053 retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
1054 are in a SFINAE context, simply return error_mark_node.
1055 * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
1057 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1059 * pt.c (check_default_tmpl_args): Change is_primary and is_partial
1060 parameters to bool type, adjust.
1061 (push_template_decl_real): Tidy.
1062 * parser.c (cp_parser_init_declarator): Adjust.
1063 * decl.c (redeclaration_error_message): Likewise.
1064 * cp-tree.h (check_default_tmpl_args): Update prototype.
1066 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1069 * pt.c (check_default_tmpl_args): Don't check local types.
1071 2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
1072 Paul Brook <paul@codesourcery.com>
1075 * decl.c (finish_function): Check targetm.warn_func_return.
1077 2012-07-25 Jason Merrill <jason@redhat.com>
1080 * decl.c (grokdeclarator): Allow const and constexpr together.
1083 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
1084 maybe_constant_value.
1086 * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
1087 * call.c (standard_conversion): Don't set it.
1088 * class.c (resolve_address_of_overloaded_function): Don't check it.
1089 * decl.c (check_default_argument): Call
1090 perform_implicit_conversion_flags.
1092 * pt.c (print_candidates_1): Use inform instead of error.
1094 2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1096 * pt.c (convert_template_argument, tsubst): Simplify fourth argument
1097 to make_typename_type (complain & tf_error -> complain).
1099 2012-07-24 Steven Bosscher <steven@gcc.gnu.org>
1101 * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
1102 n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
1103 n_inner_fields_searched): Always define.
1104 (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
1105 (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1106 * tree.c (depth_reached): Always define global.
1107 (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1108 * pt.c (depth_reached): Always define.
1109 (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
1110 * search.c (n_fields_searched, n_calls_lookup_field,
1111 n_calls_lookup_field_1, n_calls_lookup_fnfields,
1112 n_calls_lookup_fnfields_1, n_calls_get_base_type,
1113 n_outer_fields_searched, n_contexts_saved): Always define.
1114 (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
1115 (lookup_member): Likewise.
1116 (lookup_fnfields_idx_nolazy): Likewise.
1117 (print_search_statistics): Likewise.
1118 (reinit_search_statistics): Unconditionally re-set counters.
1119 * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
1121 (cxx_dup_lang_specific_decl): Likewise.
1122 (copy_lang_type): Likewise.
1123 (cxx_make_type): Likewise.
1125 2012-07-20 Jason Merrill <jason@redhat.com>
1128 * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
1129 canonical array type rather than mess with its TYPE_*_VARIANT.
1131 2012-07-19 Jason Merrill <jason@redhat.com>
1134 * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
1137 * call.c (build_cxx_call): Set optimize when folding
1138 __builtin_constant_p in a constexpr function.
1140 2012-07-18 Jason Merrill <jason@redhat.com>
1142 * pt.c (instantiate_decl): Don't recheck substitutions.
1144 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
1145 Jason Merrill <jason@redhat.com>
1149 * semantics.c (perform_access_checks): Add complain parm, return bool.
1150 (perform_deferred_access_checks): Likewise.
1151 (perform_or_defer_access_check): Likewise.
1152 (speculative_access_check): Remove.
1153 * call.c (enforce_access): Add complain parm, return bool.
1154 * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
1155 * search.c: Adjust callers.
1156 * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
1157 (FNDECL_RECHECK_ACCESS_P): New macro.
1158 * method.c (synthesized_method_walk): Stop deferring access checks.
1159 * pt.c (recheck_decl_substitution): New.
1160 (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
1162 2012-07-18 Jason Merrill <jason@redhat.com>
1164 * method.c (process_subob_fn): Make sure no_implicit_p is non-null
1165 before trying to store through it.
1167 2012-07-17 Jason Merrill <jason@redhat.com>
1170 * decl.c (finish_enum_value_list): Only call
1171 insert_late_enum_def_into_classtype_sorted_fields in class scope.
1174 * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
1175 to the list of variants.
1177 * decl.c (xref_basetypes): Complain about incomplete template base.
1178 * class.c (finish_struct): Adjust variants in templates, too.
1181 * parser.c (cp_parser_class_head): Call xref_basetypes here.
1182 (cp_parser_class_specifier_1): Not here.
1183 * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
1184 as well as DECL_DEPENDENT_P.
1186 2012-07-16 Jason Merrill <jason@redhat.com>
1188 * cp-tree.h (struct deferred_access_check): Add location.
1189 * semantics.c (perform_access_checks): Use it.
1190 (perform_or_defer_access_check): Store it.
1192 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1194 * dump.c (dump_stmt): Moved here from c-dump.c.
1195 * optimize.c: Include dumpfile.h instead of tree-dump.h.
1196 * class.c: Likewise.
1197 * decl2.c: Likewise.
1198 * Make-lang.in: Fix dependencies.
1200 2012-07-13 Jason Merrill <jason@redhat.com>
1203 * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
1205 2012-07-12 Jason Merrill <jason@redhat.com>
1207 * pt.c (instantiate_decl): Check typedefs access here.
1208 (instantiate_template_1): Not here.
1210 * pt.c (deduction_tsubst_fntype): Just suppress access checking.
1211 (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
1212 (push_deduction_access_scope, pop_deduction_access_scope): Remove.
1214 2012-07-11 Jason Merrill <jason@redhat.com>
1217 * method.c (synthesized_method_walk): Replace uses of msg with diag.
1218 Correct handling of virtual bases with move operations.
1219 (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
1221 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1223 * method.c: Do not include tree-pass.h.
1225 2012-07-10 Jason Merrill <jason@redhat.com>
1229 * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
1230 (struct lang_decl_fn): Add suppress_implicit_decl field.
1231 * method.c (implicitly_declare_fn): Check it.
1232 (process_subob_fn): Add no_implicit_p parm.
1233 (walk_field_subobs, synthesized_method_walk): Likewise.
1234 (maybe_explain_implicit_delete): Adjust.
1235 (explain_implicit_non_constexpr): Adjust.
1237 * method.c (synthesized_method_walk): Avoid changing
1238 EH spec based on cleanups in other places, too.
1240 2012-07-09 Sterling Augustine <saugustine@google.com>
1242 * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
1244 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1246 * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
1248 2012-07-06 Jason Merrill <jason@redhat.com>
1251 * pt.c (tsubst_arg_types): Add "end" parameter.
1252 (check_undeduced_parms): Use it.
1254 * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
1257 * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
1259 2012-07-05 Jason Merrill <jason@redhat.com>
1262 * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
1265 * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
1266 (struct template_parm_index_s): Remove num_siblings.
1267 * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
1268 (fixup_template_type_parm_type): Remove.
1269 (build_template_parm_index): Remove num_siblings parm.
1270 (process_template_parm): Likewise.
1271 * parser.c (cp_parser_template_parameter_list): Adjust.
1272 * tree.c (cp_tree_equal): Don't compare num_siblings.
1273 * typeck.c (comp_template_parms_position): Likewise.
1277 * tree.c (strip_typedefs_expr): New.
1278 * cp-tree.h: Declare it.
1279 * pt.c (convert_template_argument, unify): Use it.
1280 * parser.c (cp_parser_template_declaration_after_export): Don't call
1281 fixup_template_parms.
1283 2012-07-04 Jason Merrill <jason@redhat.com>
1287 * decl.c (build_enumerator): Don't use build_lang_decl_loc.
1289 2012-07-03 Jakub Jelinek <jakub@redhat.com>
1292 * semantics.c (finish_goto_stmt): Surround computed goto argument
1293 with CLEANUP_POINT_EXPR if needed.
1295 2012-07-02 Jason Merrill <jason@redhat.com>
1298 * pt.c (in_template_function): New.
1299 * cp-tree.h: Declare it.
1300 * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
1303 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
1304 for LAMBDA_EXPR_EXTRA_SCOPE.
1307 * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
1310 * class.c (resolves_to_fixed_type_p): Check uses_template_parms
1311 (current_function_decl) instead of processing_template_decl.
1314 * semantics.c (maybe_add_lambda_conv_op): Don't set
1315 DECL_INTERFACE_KNOWN.
1318 * call.c (build_conditional_expr_1): Don't warn about comparison of
1319 two enumerators before their enumeration is complete.
1320 (build_new_op_1): Call decay_conversion before warn_logical_operator.
1321 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
1323 * decl2.c (mark_used): Call used_types_insert for enums.
1324 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
1325 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
1326 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
1327 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
1328 (build_class_member_access_expr): Look through unscoped enums.
1329 * search.c (context_for_name_lookup): Look through unscoped enums.
1330 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
1331 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
1332 * tree.c (decl_linkage): Likewise.
1333 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
1335 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1337 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
1339 2012-06-27 Jason Merrill <jason@redhat.com>
1341 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
1342 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
1343 (cp_parser_elaborated_type_specifier): Adjust.
1344 * decl.c (duplicate_decls): Return error_mark_node on template
1348 * parser.c (cp_parser_template_id): Add tag_type parm.
1349 (cp_parser_template_name): Likewise.
1350 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
1351 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
1352 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
1353 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
1355 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1358 * semantics.c (constexpr_call): Fix typo in comment.
1359 (cxx_eval_vec_perm_expr): New.
1360 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
1362 2012-06-26 Richard Guenther <rguenther@suse.de>
1365 * mangle.c (write_array_type): Truncate the number-of-elements
1368 2012-06-25 Jason Merrill <jason@redhat.com>
1372 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
1373 if cp_unevaluated_operand is set.
1374 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
1377 * typeck.c (decay_conversion): Don't discard side-effects from
1378 expressions of nullptr_t.
1380 2012-06-25 Florian Weimer <fweimer@redhat.com>
1382 * init.c (build_new_1): Warn about (T[N]) for variable N, and
1385 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
1386 expressions. Handled now in build_new_1.
1388 2012-06-25 Jason Merrill <jason@redhat.com>
1391 * semantics.c (build_data_member_initialization): Always keep
1392 initializer for empty base.
1393 (cxx_eval_bare_aggregate): Discard it here.
1396 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
1397 (tsubst_expr) [OMP_FOR]: Here, too.
1399 2012-06-25 Jakub Jelinek <jakub@redhat.com>
1402 * class.c (check_bases_and_members): Avoid -Wuninitialized
1403 diagnostics for non-static const members or references if they
1406 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
1408 * parser.c (cp_parser_direct_declarator): Move virt-specifier
1409 parsing after late-specified return type parsing.
1411 2012-06-14 Jason Merrill <jason@redhat.com>
1414 * name-lookup.c (constructor_name_p): Don't try to look at the
1415 name of a DECLTYPE_TYPE.
1417 2012-06-18 Lawrence Crowl <crowl@google.com>
1419 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
1420 to TV_PHASE_OPT_GEN.
1422 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
1424 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
1426 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
1429 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
1430 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
1431 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
1433 2012-06-09 Jason Merrill <jason@redhat.com>
1435 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
1436 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
1437 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
1440 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
1441 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
1442 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
1443 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
1444 Don't return the decl.
1446 2012-06-11 Richard Guenther <rguenther@suse.de>
1449 * mangle.c (write_array_type): Use double-ints for array domain
1452 2012-06-07 Fabien ChĂȘne <fabien@gcc.gnu.org>
1455 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
1457 * class.c (insert_into_classtype_sorted_fields): New.
1458 (add_enum_fields_to_record_type): New.
1459 (count_fields): Adjust the comment.
1460 (add_fields_to_record_type): Likewise.
1461 (finish_struct_1): Move the code that inserts the fields for the
1462 sorted case, into insert_into_classtype_sorted_fields, and call
1464 (insert_late_enum_def_into_classtype_sorted_fields): Define.
1465 * decl.c (finish_enum_value_list): Call
1466 insert_late_enum_def_into_classtype_sorted_fields if a late enum
1467 definition is encountered.
1469 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1472 * typeck.c (cp_perform_integral_promotions): New, like
1473 perform_integral_promotions but also takes a tsubst_flags_t parameter.
1474 (pointer_diff): Add tsubst_flags_t parameter.
1475 (decay_conversion, cp_default_conversion, cp_build_array_ref,
1476 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
1477 build_reinterpret_cast_1, cp_build_modify_expr,
1478 convert_for_assignment): Adjust.
1479 * optimize.c (build_delete_destructor_body): Adjust.
1480 * init.c (expand_virtual_init, expand_default_init, build_new_1,
1481 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
1482 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
1483 * class.c (build_base_path): Adjust.
1484 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
1485 * method.c (synthesized_method_walk): Adjust flag and complain.
1486 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
1487 (build_typeid, build_dynamic_cast_1): Adjust.
1488 * except.c (initialize_handler_parm): Likewise.
1489 * typeck2.c (process_init_constructor_record): Likewise.
1490 * pt.c (tsubst_friend_class): Don't change flags.
1491 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
1492 finish_static_assert): Likewise.
1493 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
1495 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
1496 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
1498 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
1499 (implicit_conversion): Mask out tf_error with a FIXME.
1500 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
1501 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
1502 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1503 build_up_reference, convert_to_reference, cp_convert,
1504 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
1506 (convert_to_reference, ocp_convert): Use complain & tf_error instead
1507 of flags & LOOKUP_COMPLAIN.
1508 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
1509 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
1510 lookup_name_real, lookup_function_nonclass, lookup_name,
1511 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
1512 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
1514 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
1516 * decl.c: Do not include output.h.
1517 (start_decl): Remove code for flag_conserve_space.
1519 2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
1522 * parser.c (cp_parser_alias_declaration): Return earlier
1523 if an error occured.
1525 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1528 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
1529 to control enumeral mismatch in conditional expression too.
1531 2012-06-04 Sterling Augustine <saugustine@google.com>
1533 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
1534 * cp-lang.c (cxx_dwarf_name): Call them.
1536 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
1538 * semantics.c: Do not include output.h.
1539 * decl2.c: Likewise.
1540 * friend.c: Likewise.
1541 * typeck.c: Likewise.
1542 * typeck2.c: Likewise.
1543 * Make-lang.in: Fix dependencies.
1545 2012-06-01 Jason Merrill <jason@redhat.com>
1548 * parser.c (cp_parser_class_head): Apply attributes here.
1549 * semantics.c (begin_class_definition): Not here.
1550 * cp-tree.h: Adjust.
1553 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
1554 tentatively and the LHS has a parse error.
1557 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
1558 (instantiate_decl): Don't push_to_top_level for local class methods.
1559 (instantiate_class_template_1): Or for local classes.
1562 * pt.c (do_auto_deduction): Don't try to deduce from a
1563 type-dependent initializer.
1565 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
1568 * name-lookup.c (push_namespace): When error recovery is
1569 impossible just error out in duplicate_decls.
1571 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1573 * call.c: Do not include output.h.
1574 * class.c: Likewise.
1575 * except.c: Likewise.
1576 * friend.c: Likewise.
1579 * method.c: Likewise.
1580 * parser.c: Likewise.
1583 * search.c: Likewise.
1585 2012-05-30 Jason Merrill <jason@redhat.com>
1588 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1589 representing a bitwise copy of a glvalue.
1591 * tree.c (stabilize_expr): Tweak logic.
1594 * tree.c (stabilize_init): Side effects make the init unstable.
1596 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
1599 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1601 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
1604 * tree.c (stabilize_expr): Handle exp of void type.
1606 2012-05-26 Jason Merrill <jason@redhat.com>
1609 * call.c (convert_like_real) [ck_list]: Take array address directly.
1610 * typeck.c (decay_conversion): Reject decay of an array compound
1613 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
1616 * parser.c (cp_parser_member_declaration): A storage class is not
1617 allowed in a declaration of an anonymous aggregate in a class scope.
1619 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
1622 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1623 before calling constructor_name_p.
1625 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
1628 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1629 cp_parser_function_body): Add a bool parameter, true when parsing
1630 a function-try-block.
1631 (cp_parser_function_try_block): Pass true to the above.
1632 (cp_parser_function_definition_after_declarator,
1633 cp_parser_function_transaction): Adjust.
1635 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
1638 * decl2.c (delete_sanity): Extend 'deleting array' warning to
1641 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1644 * decl.c (grokdeclarator): Diagnose functions returning abstract
1645 class types as TYPENAME.
1646 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1647 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1648 * pt.c (tsubst): Likewise.
1649 * semantics.c (trait_expr_value): Likewise.
1651 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1654 * parser.c (cp_parser_attributes_opt): Enforce error checking of
1655 unbalanced parentheses in the presence of tentative parsing.
1657 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1660 * parser.c (cp_parser_new_type_id): Early return error_mark_node
1661 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1662 error_mark_node; tidy.
1663 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1664 avoid uninitialized warnings.
1665 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1666 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1667 returns error_mark_node.
1669 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1672 * except.c (is_admissible_throw_operand): Rename to
1673 is_admissible_throw_operand_or_catch_parameter and handle
1674 catch parameter too.
1675 (expand_start_catch_block): Use it.
1676 (build_throw): Adjust.
1678 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1681 * typeck.c (build_x_array_ref, build_x_conditional_expr,
1682 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1683 (finish_class_member_access_expr, build_x_indirect_ref,
1684 build_x_binary_op, build_x_compound_expr_from_list,
1685 build_x_compound_expr_from_vec): Adjust callers.
1686 * tree.c (build_min_nt_loc): New.
1687 (build_min_nt): Remove.
1688 * typeck2.c (build_x_arrow): Adjust callers.
1689 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1690 tsubst_copy_and_build): Likewise.
1691 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1692 finish_omp_atomic): Likewise.
1693 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1694 * parser.c (cp_parser_question_colon_clause,
1695 cp_parser_assignment_expression, cp_parser_expression,
1696 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1697 * cp-tree.h: Update.
1699 2012-05-16 Dodji Seketeli <dodji@redhat.com>
1701 PR preprocessor/7263
1702 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1703 the possible declarator specifiers so far.
1704 (struct cp_decl_specifier_seq::locations): Declare new member.
1705 (cp_decl_specifier_seq::{specs, type_location}): Remove.
1706 (decl_spec_seq_has_spec_p): Declare new function.
1707 * parser.c (cp_parser_check_decl_spec): Remove.
1708 (set_and_check_decl_spec_loc): Define new static function.
1709 (decl_spec_seq_has_spec_p): Define new public function.
1710 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1711 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1712 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1713 (cp_parser_alias_declaration): Set the locations for each
1714 declspec, using set_and_check_decl_spec_loc.
1715 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1716 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1717 new declspec location for specifiers. Use the new
1718 decl_spec_seq_has_spec_p.
1719 (cp_parser_type_specifier_seq): Use the new
1720 set_and_check_decl_spec_loc. Stop using
1721 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
1722 (, cp_parser_init_declarator): Use the new
1723 set_and_check_decl_spec_loc.
1724 (cp_parser_single_declaration, cp_parser_friend_p)
1725 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1726 Use the new decl_spec_seq_has_spec_p.
1727 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
1728 the more precise ds_redefined_builtin_type_spec location for
1729 diagnostics about re-declaring C++ built-in types.
1730 (start_decl, grokvardecl, grokdeclarator): Use the new
1731 decl_spec_seq_has_spec_p.
1733 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1736 * pt.c (tsubst_copy_and_build): Increase / decrease
1737 c_inhibit_evaluation_warnings around build_x_binary_op call.
1739 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1741 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1742 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1743 (TYPE_PTR_OR_PTRMEM_P): Add.
1744 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1745 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1746 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1747 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1748 casts_away_constness_r, casts_away_constness): Adjust.
1749 * init.c (build_zero_init_1): Adjust.
1750 * class.c (check_field_decls): Likewise.
1751 * decl.c (check_default_argument): Likewise.
1752 * rtti.c (target_incomplete_p): Likewise.
1753 * tree.c (zero_init_p): Likewise.
1754 * cxx-pretty-print.c (pp_cxx_ptr_operator,
1755 pp_cxx_abstract_declarator): Likewise.
1756 * typeck2.c (build_m_component_ref): Likewise.
1757 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1758 dependent_type_p_r): Likewise.
1759 * call.c (null_member_pointer_value_p, standard_conversion,
1760 add_builtin_candidate, build_conditional_expr_1, compare_ics):
1762 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1763 * cvt.c (cp_convert_to_pointer, ocp_convert,
1764 perform_qualification_conversions): Likewise.
1765 * mangle.c (write_type): Likewise.
1766 * name-lookup.c (arg_assoc_type): Likewise.
1768 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1770 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1772 (cp_parser_binary_expression): Rework to always update at the same
1773 time tree_type and loc.
1774 * call.c (print_z_candidate): Add location_t parameter.
1775 (print_z_candidates, convert_like_real, joust): Adjust.
1777 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
1780 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1782 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1785 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1786 tsubst_decl returns NULL_TREE.
1787 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1788 BOUND_TEMPLATE_TEMPLATE_PARM.
1790 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1793 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1794 * typeck.c (decay_conversion): Use error_at.
1795 * call.c (build_integral_nontype_arg_conv, convert_like_real,
1796 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1797 initialize_reference): Likewise.
1798 * cvt.c (warn_ref_binding): Add location_t parameter.
1799 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1800 convert_to_void, ): Use error_at and warning_at.
1802 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1805 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1806 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1808 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1811 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1813 (build_conditional_expr_1): Adjust.
1814 * typeck.c (build_x_indirect_ref, build_x_binary_op,
1815 build_x_unary_op): Add location_t parameter.
1816 (rationalize_conditional_expr, build_x_array_ref,
1817 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1819 * typeck2.c (build_x_arrow): Add location_t parameter.
1820 * semantics.c (finish_unary_op_expr): Likewise.
1821 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1822 * decl2.c (grok_array_decl): Add location_t parameter.
1823 * parser.c (cp_parser_postfix_open_square_expression,
1824 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1825 cp_parser_binary_expression, cp_parser_builtin_offsetof,
1826 do_range_for_auto_deduction, cp_convert_range_for,
1827 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1829 * pt.c (tsubst_copy_and_build): Adjust.
1830 * tree.c (maybe_dummy_object): Likewise.
1831 * cp-tree.h: Update declarations.
1833 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1835 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1837 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1840 * pt.c (instantiate_class_template_1): Increase / decrease
1841 c_inhibit_evaluation_warnings around the tsubst_expr call
1842 for STATIC_ASSERT_CONDITION.
1843 (tsubst_expr, case STATIC_ASSERT): Likewise.
1844 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1845 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1847 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1850 * call.c (build_over_call): Handle final member functions
1852 (build_new_method_call_1): Do not handle here.
1854 2012-05-02 Richard Guenther <rguenther@suse.de>
1856 * decl.c (grokdeclarator): Properly check for sizes that
1857 cover more than half of the address-space.
1859 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
1862 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1863 * decl2.c (grok_array_decl): Likewise.
1866 * parser.c (cp_parser_sizeof_operand): Require parentheses for
1869 2012-04-30 Dodji Seketeli <dodji@redhat.com>
1871 Fix location for static class members
1872 * decl.c (grokdeclarator): Use the location carried by the
1873 declarator for the DECL of the static class member.
1875 Fix va_arg type location
1876 * cp-tree.h (build_x_va_arg): Take an additional location
1878 * call.c (build_x_va_arg): Take a loc parameter for the location
1879 of the type of the va_arg expression.
1880 * parser.c (cp_parser_primary_expression): Pass the type of the
1881 type in the va_arg expression to build_x_va_arg.
1882 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1884 Make conversion warnings work on NULL with -ftrack-macro-expansion
1885 * call.c (conversion_null_warnings): Use the new
1886 expansion_point_location_if_in_system_header.
1887 * cvt.c (build_expr_type_conversion): Likewise.
1888 * typeck.c (cp_build_binary_op): Likewise.
1890 2012-04-30 Manuel López-Ibåñez <manu@gcc.gnu.org>
1892 * typeck.c (convert_for_assignment): Replace
1893 Wmissing-format-attribute with Wsuggest-attribute=format.
1894 * call.c (convert_for_arg_passing): Likewise.
1896 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
1899 * class.c (check_bases_and_members): Implement core/1333, do not
1900 disallow defaulted in the class body non-const ref special members.
1902 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1905 * call.c (tourney, perform_overload_resolution,
1906 build_operator_new_call, build_user_type_conversion_1,
1907 build_user_type_conversion, perform_overload_resolution,
1908 add_template_candidate, add_template_candidate_real,
1909 add_template_conv_candidate, add_builtin_candidates,
1910 add_builtin_candidate, build_builtin_candidate,
1911 add_conv_candidate, add_function_candidate, implicit_conversion,
1912 reference_binding, build_list_conv, conditional_conversion,
1913 add_candidates, can_convert_array, build_aggr_conv,
1914 build_array_conv, build_complex_conv, conditional_conversion):
1915 Add tsubst_flags_t parameter.
1916 (joust): Likewise, use it to handle SFINAE as if pedantic.
1917 (add_list_candidates, build_integral_nontype_arg_conv,
1918 perform_overload_resolution, build_new_function_call,
1919 build_operator_new_call, build_op_call_1,
1920 build_conditional_expr_1, build_new_op_1, convert_like_real,
1921 convert_arg_to_ellipsis, convert_default_arg,
1922 convert_for_arg_passing, build_over_call,
1923 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1924 perform_implicit_conversion_flags,
1925 perform_direct_initialization_if_possible,
1926 initialize_reference): Adjust.
1927 * typeck.c (casts_away_constness, casts_away_constness_r):
1928 Add tsubst_flags_t parameter.
1929 (convert_arguments, check_for_casting_away_constness,
1930 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1932 * decl.c (reshape_init_r, check_default_argument): Likewise.
1933 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1934 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1936 * init.c (build_new_1): Likewise.
1937 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1938 build_expr_type_conversion, ): Likewise.
1939 * search.c (check_final_overrider): Likewise.
1940 * cp-tree.h (build_user_type_conversion,
1941 build_operator_new_call, can_convert, can_convert_arg,
1942 can_convert_arg_bad, convert_default_arg,
1943 convert_arg_to_ellipsis, convert_for_arg_passing):
1946 2012-04-22 Jan Hubicka <jh@suse.cz>
1948 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1951 2012-04-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1954 * typeck.c (composite_pointer_type): Likewise.
1955 (cxx_sizeof_or_alignof_type): Likewise.
1956 (cp_build_array_ref): Likewise.
1957 (cp_build_function_call_vec): Likewise.
1958 (cp_build_addr_expr_1): Likewise.
1959 (convert_member_func_to_ptr): Likewise.
1960 * decl.c (check_tag_decl): Likewise.
1961 (check_static_variable_definition): Likewise.
1962 (compute_array_index_type): Likewise.
1963 (create_array_type_for_decl): Likewise.
1964 (grokdeclarator): Likewise.
1965 (grok_op_properties): Likewise.
1966 * error.c (maybe_warn_cpp0x): Likewise.
1967 * pt.c (maybe_process_partial_specialization): Likewise.
1968 (convert_template_argument): Likewise.
1969 (do_decl_instantiation): Likewise.
1970 (do_type_instantiation): Likewise.
1971 * parser.c (cp_parser_primary_expression): Likewise.
1972 (cp_parser_postfix_expression): Likewise.
1973 (cp_parser_unary_expression): Likewise.
1974 (cp_parser_question_colon_clause): Likewise.
1975 (cp_parser_lambda_introducer): Likewise.
1976 (cp_parser_lambda_declarator_opt): Likewise.
1977 (cp_parser_compound_statement): Likewise.
1978 (cp_parser_jump_statement): Likewise.
1979 (cp_parser_declaration_seq_opt): Likewise.
1980 (cp_parser_enum_specifier): Likewise.
1981 (cp_parser_enumerator_list): Likewise.
1982 (cp_parser_initializer_list): Likewise.
1983 (cp_parser_member_declaration): Likewise.
1984 * call.c (build_conditional_expr_1): Likewise.
1985 * friend.c (make_friend_class): Likewise.
1986 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1988 2012-04-21 Jan Hubicka <jh@suse.cz>
1990 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1991 * decl2.c (mark_needed): Likewise.
1992 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1994 * decl2.c (cxx_callgraph_analyze_expr): Remove.
1995 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1996 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1998 2012-04-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
2001 * typeck.c (cp_build_function_call_vec): Do not pretty-print
2002 expressions when caret is enabled.
2004 2012-04-20 Jan Hubicka <jh@suse.cz>
2007 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
2008 list when target has no support for it.
2010 2012-04-20 Michael Matz <matz@suse.de>
2012 * error.c (pedwarn_cxx98): Move va_end call after user
2015 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
2018 * cp-tree.h (build_addr_func, decay_conversion,
2019 get_member_function_from_ptrfunc,
2020 build_m_component_ref, convert_member_func_to_ptr):
2021 Add tsubst_flags_t parameter.
2022 * typeck.c (cp_default_conversion): Add.
2023 (decay_conversion, default_conversion,
2024 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
2025 Add tsubst_flags_t parameter and use it throughout.
2026 (cp_build_indirect_ref, cp_build_array_ref,
2027 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
2028 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
2029 build_const_cast_1, expand_ptrmemfunc_cst,
2030 convert_for_initialization): Adjust.
2031 * init.c (build_vec_init): Adjust.
2032 * decl.c (grok_reference_init, get_atexit_node): Likewise.
2033 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
2034 * except.c (build_throw): Likewise.
2035 * typeck2.c (build_x_arrow): Likewise.
2036 (build_m_component_ref): Add tsubst_flags_t parameter and
2038 * pt.c (convert_nontype_argument): Adjust.
2039 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
2040 * decl2.c (build_offset_ref_call_from_tree): Likewise.
2041 * call.c (build_addr_func): Add tsubst_flags_t parameter and
2043 (build_call_a, build_conditional_expr_1, build_new_op_1,
2044 convert_like_real, convert_arg_to_ellipsis, build_over_call,
2045 build_special_member_call): Adjust.
2046 * cvt.c (cp_convert_to_pointer, force_rvalue,
2047 build_expr_type_conversion): Likewise.
2049 2012-04-17 Tom de Vries <tom@codesourcery.com>
2051 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
2052 location argument to create_artificial_label.
2053 (finish_bc_block): Change return type to void. Remove body_seq
2054 parameter, and add block parameter. Append label to STMT_LIST and
2056 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
2057 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
2058 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
2059 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
2060 (genericize_break_stmt, genericize_omp_for_stmt): New function.
2061 (cp_gimplify_omp_for): Remove bc_continue processing.
2062 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
2063 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
2064 CONTINUE_STMT, and BREAK_STMT as unreachable.
2065 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
2066 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
2067 (cp_genericize_tree): New function, factored out of ...
2068 (cp_genericize): ... this function.
2070 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
2073 * semantics.c (build_constexpr_constructor_member_initializers):
2074 Check for function-try-block as function-body.
2076 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
2079 * parser.c (cp_parser_member_declaration): Check that
2080 initializer_token_start is non null before dereferencing it.
2082 2012-04-16 Jason Merrill <jason@redhat.com>
2085 * pt.c (determine_specialization): Instead of comparing the number
2086 of parms, check that tsubst gives the right answer.
2089 * pt.c (process_partial_specialization): Complain about a partial
2090 specialization with fewer args than primary template parms.
2093 * pt.c (convert_template_argument): Handle template template
2097 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
2098 template parameters.
2100 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2103 * call.c (op_error): Print types; when flag_diagnostics_show_caret
2104 is false print expressions too.
2105 (op_error_string): Add.
2107 2012-04-16 Jason Merrill <jason@redhat.com>
2110 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
2112 2012-04-16 Jan Hubicka <jh@suse.cz>
2114 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
2115 walkers to walk cgraph and varpool.
2117 2012-04-15 Jason Merrill <jason@redhat.com>
2120 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
2124 * pt.c (coerce_template_parms): Even if we aren't converting we
2125 want to expand argument packs.
2128 * mangle.c (write_type): nullptr_t is a builtin type.
2130 2012-04-14 Jan Hubicka <jh@suse.cz>
2132 * tree.c: Update field referenced for new cgraph/varpool layout.
2133 * decl2.c: Likewise.
2135 2012-04-13 Jason Merrill <jason@redhat.com>
2138 * pt.c (any_pack_expanson_args_p): New.
2139 (coerce_template_parms): Use it.
2142 * call.c (joust): Handle comparing list and non-list ctors.
2145 * decl2.c (finish_anon_union): Use cp_finish_decl.
2146 * error.c (dump_function_name): Avoid showing anonymous "name".
2148 2012-04-11 Fabien ChĂȘne <fabien@gcc.gnu.org>
2151 * parser.c (cp_parser_class_name): Call strip_using_decl and
2152 return the target decl.
2153 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
2154 to be stripped is NULL_TREE.
2155 (qualify_lookup): Call strip_using_decl and perform some checks on
2158 2012-04-11 Jason Merrill <jason@redhat.com>
2161 * decl.c (grokdeclarator): Strip the injected-class-name typedef
2162 if we are building a declaration or compound type.
2165 * decl.c (check_tag_decl): Don't complain about attributes if we
2166 don't even have a type.
2168 2012-04-10 Manuel López-Ibåñez <manu@gcc.gnu.org>
2170 * cvt.c (convert_to_void): Update comment.
2172 2012-04-05 Jason Merrill <jason@redhat.com>
2175 * semantics.c (finish_non_static_data_member): In templates, pass
2176 the decl to build_qualified_name.
2177 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
2179 2012-04-04 Jason Merrill <jason@redhat.com>
2182 * decl.c (finish_function): Update fntype after deducing return type.
2184 2012-04-03 Jason Merrill <jason@redhat.com>
2187 * pt.c (tsubst_initializer_list): A pack expansion with no elements
2188 means value-initialization.
2190 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2193 * class.c (deduce_noexcept_on_destructor,
2194 deduce_noexcept_on_destructors): New.
2195 (check_bases_and_members): Call the latter.
2196 * decl.c (grokfndecl): Call the former.
2197 * method.c (implicitly_declare_fn): Not static.
2198 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
2201 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2204 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
2205 warn for a zero as null pointer constant default argument.
2207 2012-03-29 Jason Merrill <jason@redhat.com>
2210 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
2212 2012-03-29 Jakub Jelinek <jakub@redhat.com>
2215 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
2216 if processing_template_decl.
2218 2012-03-29 Jason Merrill <jason@redhat.com>
2221 * call.c (compare_ics): Handle ck_aggr like ck_list.
2223 2012-03-28 Jason Merrill <jason@redhat.com>
2226 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
2227 we didn't get an explicit scope.
2228 * pt.c (tsubst_baselink): Likewise.
2230 2012-03-28 Richard Guenther <rguenther@suse.de>
2232 * typeck2.c (process_init_constructor_array): Use the proper
2233 type for computing the array length.
2235 2012-03-27 Meador Inge <meadori@codesourcery.com>
2238 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
2239 stripped child trees that are not pointer types.
2241 2012-03-21 Jason Merrill <jason@redhat.com>
2243 Implement return type deduction for normal functions with -std=c++1y.
2244 * cp-tree.h (FNDECL_USED_AUTO): New macro.
2245 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
2246 (dependent_lambda_return_type_node): Remove.
2247 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
2248 (struct language_function): Add x_auto_return_pattern field.
2249 (current_function_auto_return_pattern): New.
2250 (enum tsubst_flags): Add tf_partial.
2251 * decl.c (decls_match): Handle auto return comparison.
2252 (duplicate_decls): Adjust error message for auto return.
2253 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
2254 (cp_finish_decl): Don't do auto deduction for functions.
2255 (grokdeclarator): Allow auto return without trailing return type in
2257 (check_function_type): Defer checking of deduced return type.
2258 (start_preparsed_function): Set current_function_auto_return_pattern.
2259 (finish_function): Set deduced return type to void if not previously
2261 * decl2.c (change_return_type): Handle error_mark_node.
2262 (mark_used): Always instantiate functions with deduced return type.
2263 Complain about use if deduction isn't done.
2264 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
2265 initial return type.
2266 (cp_parser_lambda_body): Don't deduce return type in a template.
2267 (cp_parser_conversion_type_id): Allow auto in C++1y.
2268 * pt.c (instantiate_class_template_1): Don't mess with
2269 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
2270 (tsubst_copy_and_build): Likewise.
2271 (fn_type_unification, tsubst): Don't reduce the template parm level
2272 of 'auto' during deduction.
2273 (unify): Compare 'auto' specially.
2274 (get_bindings): Change test.
2275 (always_instantiate_p): Always instantiate functions with deduced
2277 (do_auto_deduction): Handle error_mark_node and lambda context.
2278 Don't check for use in initializer.
2279 (contains_auto_r): Remove.
2280 * search.c (lookup_conversions_r): Handle auto conversion function.
2281 * semantics.c (lambda_return_type): Handle null return. Don't mess
2282 with dependent_lambda_return_type_node.
2283 (apply_deduced_return_type): Rename from apply_lambda_return_type.
2284 * typeck.c (merge_types): Handle auto.
2285 (check_return_expr): Do auto deduction.
2286 * typeck2.c (add_exception_specifier): Fix complain check.
2288 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
2291 * class.c (check_field_decls): Call literal_type_p only
2294 2012-03-22 Jakub Jelinek <jakub@redhat.com>
2297 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
2298 on CLASS_TYPE_P types.
2300 2012-03-20 Jason Merrill <jason@redhat.com>
2302 * lex.c (init_reswords): Use >= for cxx_dialect test.
2303 * parser.c (cp_parser_exception_specification_opt): Likewise.
2305 * mangle.c (write_type): Handle 'auto'.
2306 * init.c (build_new): Don't do auto deduction where it might
2307 affect template mangling.
2310 * decl.c (reshape_init_class): Handle repeated reshaping.
2311 * search.c (lookup_field_1): Add sanity check.
2313 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2316 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
2317 * tree.c (xvalue_p): Define.
2318 * typeck.c (maybe_warn_about_useless_cast): Define.
2319 (build_reinterpret_cast, build_const_cast,
2320 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
2321 * rtti.c (build_dynamic_cast): Likewise.
2322 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
2323 c_inhibit_evaluation_warnings before/after the build_* calls.
2325 2012-03-15 Jason Merrill <jason@redhat.com>
2328 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
2330 2012-03-15 Manuel López-Ibåñez <manu@gcc.gnu.org>
2333 * error.c (print_instantiation_partial_context): Use
2334 template_backtrace_limit.
2336 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2338 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
2340 2012-03-14 Jakub Jelinek <jakub@redhat.com>
2343 * parser.c (lookup_literal_operator): Return fn only if
2344 processed all arguments from args vector and argtypes is
2347 2012-01-30 Dodji Seketeli <dodji@redhat.com>
2350 * cp-tree.h (template_type_parameter_p): Declare new function.
2351 (parameter_of_template_p): Remove.
2352 * pt.c (template_type_parameter_p): Define new function.
2353 (parameter_of_template_p): Remove.
2354 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
2355 on parameter_of_template_p anymore. Compare the level of the
2356 template parameter to the depth of the template.
2358 2011-12-15 Dodji Seketeli <dodji@redhat.com>
2360 * call.c (standard_conversion, build_integral_nontype_arg_conv)
2361 (build_new_op_1, convert_like_real, is_subseq)
2362 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
2363 (joust): Use next_conversion instead of accessing fields of struct
2364 conversion directly.
2366 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2369 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
2370 division by zero warnings.
2372 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
2374 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
2375 build_ptrmemfunc): Consistently forward the tsubst_flags_t
2377 * call.c (resolve_args): Likewise.
2379 2012-03-07 Jason Merrill <jason@redhat.com>
2382 * mangle.c (write_literal_operator_name): The length comes after the
2385 2012-03-05 Jakub Jelinek <jakub@redhat.com>
2387 * pt.c (local_specializations): Change from htab_t into
2388 struct pointer_map_t *.
2389 (retrieve_local_specializations, register_local_specialization,
2390 tsubst_pack_expansion, instantiate_decl): Adjust users.
2391 (eq_local_specializations, hash_local_specialization): Remove.
2393 2012-03-05 Jason Merrill <jason@redhat.com>
2396 * decl2.c (determine_visibility): Correct calculation of class
2398 * decl.c (check_tag_decl): Adjust warning.
2400 * method.c (synthesized_method_walk): Cleanups don't affect the EH
2403 2012-03-03 Jason Merrill <jason@redhat.com>
2405 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
2408 * call.c (build_aggr_conv): Call reshape_init.
2409 (convert_like_real): Likewise.
2410 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
2413 * mangle.c (write_nested_name): Use decl_mangling_context.
2414 (write_prefix, write_template_prefix): Likewise.
2417 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
2419 * class.c (add_method): Always build an OVERLOAD for using-decls.
2420 * search.c (lookup_member): Handle getting an OVERLOAD for a
2423 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2426 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
2428 * cp-tree.h (build_x_arrow): Adjust prototype.
2429 * pt.c (tsubst_copy_and_build): Adjust call.
2430 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
2432 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2434 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
2436 2012-02-29 Jason Merrill <jason@redhat.com>
2439 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
2440 (shadow_tag): From here.
2441 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
2443 2012-02-21 Jakub Jelinek <jakub@redhat.com>
2446 * typeck.c (check_literal_operator_args): Initialize *long_double_p
2447 and *long_long_unsigned_p even if processing_template_decl.
2449 2012-02-16 Jason Merrill <jason@redhat.com>
2452 * decl.c (define_label): Use timevar_cond_start/stop.
2454 2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
2457 * decl.c (xref_basetypes): call dependent_scope_p instead of
2460 2012-02-16 Jason Merrill <jason@redhat.com>
2463 * error.c (dump_expr): Handle lambda closures specifically.
2465 2012-02-14 Jason Merrill <jason@redhat.com>
2467 * parser.c (cp_parser_explicit_instantiation): Give a warning
2468 for ignored attributes on explicit class instantiation.
2470 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2473 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
2474 lookup_label on label's name and set TREE_USED.
2476 2012-02-14 Jason Merrill <jason@redhat.com>
2479 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
2481 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2484 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
2485 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
2487 2012-02-07 Jason Merrill <jason@redhat.com>
2490 * semantics.c (cx_check_missing_mem_inits): Handle unions.
2491 Fix constexpr default constructor logic.
2494 * pt.c (tsubst): Strip uninstantiated typedef.
2496 2012-02-06 Jason Merrill <jason@redhat.com>
2499 * cvt.c (build_expr_type_conversion): Check for template conversion.
2501 2012-01-31 Jason Merrill <jason@redhat.com>
2504 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
2505 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
2506 (tsubst_pack_expansion): Check it.
2508 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2511 * class.c (explain_non_literal_class): Correctly handle implicitly
2512 deleted constructors.
2514 2012-01-27 Jakub Jelinek <jakub@redhat.com>
2517 * pt.c (tsubst_pack_expansion): Delete and restore
2518 local_specialization whenever need_local_specialization, not just
2519 when saved_local_specializations is non-NULL.
2521 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
2524 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
2525 as TREE_OPERAND (t, 1).
2527 2012-01-24 Jason Merrill <jason@redhat.com>
2530 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
2533 * tree.c (called_fns_equal): Check template args.
2534 (cp_tree_equal): Call it.
2536 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
2537 Patrick Marlier <patrick.marlier@gmail.com>
2540 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
2541 thunk for set_one_vmethod_tm_attributes.
2543 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2546 * call.c (build_over_call): Check for error_mark_node as
2547 TREE_VALUE when default arguments are processed.
2549 2012-01-23 Jason Merrill <jason@redhat.com>
2552 * decl2.c (determine_visibility): Check for visibility attribute
2553 on template specialization.
2555 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2558 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
2560 2012-01-23 Jason Merrill <jason@redhat.com>
2563 * class.c (add_method): Set OVL_USED for using-decls.
2564 * tree.c (ovl_scope): New.
2565 * cp-tree.h: Declare it.
2566 * parser.c (cp_parser_template_name): Use it.
2567 * semantics.c (baselink_for_fns): Likewise.
2568 * name-lookup.c (set_inherited_value_binding_p): Likewise.
2570 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2573 * pt.c (lookup_template_class_1): Check context returned by
2574 tsubst for error_mark_node.
2576 2012-01-19 Kai Tietz <ktietz@redhat.com>
2579 * decl2.c (save_template_attributes): Use merge_attributes
2580 instead of chaining up via TREE_CHAIN.
2582 2012-01-19 Jason Merrill <jason@redhat.com>
2585 * class.c (finish_struct): Call add_method here for function usings.
2586 * semantics.c (finish_member_declaration): Not here.
2588 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
2591 * typeck2.c (store_init_value): Within a template guard
2592 cxx_constant_value with require_potential_constant_expression.
2593 * pt.c (convert_nontype_argument): Likewise.
2595 2012-01-16 Jakub Jelinek <jakub@redhat.com>
2598 * mangle.c (write_template_arg_literal): Handle complex.
2600 2012-01-16 Jason Merrill <jason@redhat.com>
2603 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2606 * typeck.c (build_static_cast_1): Handle bit-fields properly.
2608 2012-01-13 Ian Lance Taylor <iant@google.com>
2611 * typeck.c (enum_cast_to_int): New static function.
2612 (cp_build_binary_op): When handling warn_sign_compare, don't test
2613 for TREE_NO_WARNING. Do call enum_cast_to_int.
2614 * call.c (avoid_sign_compare_warnings): Remove static function.
2615 (build_new_op_1): Don't call avoid_sign_compare_warnings.
2617 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
2619 * decl2.c: Do not include tree-mudflap.h
2620 * semantics.c: Likewise.
2622 2012-01-13 Jason Merrill <jason@redhat.com>
2625 * semantics.c (finish_break_stmt): Avoid adding an unreachable
2629 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2630 when reducing the visibility.
2633 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2635 2012-01-12 Jason Merrill <jason@redhat.com>
2638 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2641 2012-01-13 Dodji Seketeli <dodji@redhat.com>
2644 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2645 Set the pointer to the last block of the constructor to the
2647 (build_constexpr_constructor_member_initializers): Get
2648 build_data_member_initialization a chance to deal with more
2649 statements before we choke.
2651 2012-01-12 Jason Merrill <jason@redhat.com>
2654 * mangle.c (write_expression): Mangle BASELINK scope if
2655 BASELINK_QUALIFIED_P.
2656 * search.c (adjust_result_of_qualified_name_lookup): Set
2657 BASELINK_QUALIFIED_P.
2658 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2659 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2660 adjust_result_of_qualified_name_lookup for non-qualified names.
2663 * pt.c (unify): Handle error_mark_node.
2665 2012-01-11 Jason Merrill <jason@redhat.com>
2668 * call.c (standard_conversion): For ptrmemfuncs, compare the
2672 * mangle.c (find_substitution): A type is only a substitution
2673 match if we're looking for a type.
2674 (write_nested_name): Use decl_mangling_context.
2676 * decl.c (decls_match): Assert that the arguments are decls.
2679 * pt.c (resolve_overloaded_unification): Compare types with
2680 same_type_p, not decls_match.
2682 2012-01-10 Jason Merrill <jason@redhat.com>
2685 * class.c (build_base_path): Diagnose ambiguous base.
2688 * semantics.c (cxx_eval_call_expression): Always retry previously
2689 non-constant expressions.
2691 2012-01-06 Jason Merrill <jason@redhat.com>
2695 * parser.c (cp_parser_new_expression): Set
2696 type_definition_forbidden_message.
2702 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2703 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
2705 (write_template_arg): Fix mangling of class-scope functions and
2707 (mangle_decl): Update suggested -fabi-version argument.
2708 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2709 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2710 * tree.c (dependent_name): No longer static.
2711 * cp-tree.h: Declare it.
2712 * pt.c (unify): Defer handling of unconverted functions.
2714 * mangle.c (mangle_decl): Don't generate mangling aliases
2715 for maybe-in-charge [cd]tors.
2717 * error.c (dump_expr): Print type of CONSTRUCTOR.
2719 2012-01-05 Dodji Seketeli <dodji@redhat.com>
2722 * parser.c (cp_parser_alias_declaration): Get out early upon
2723 errors in the identifier or the attributes.
2725 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
2728 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2729 the tree returned by build_x_binary_op.
2731 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2734 * parser.c (cp_parser_postfix_open_square_expression): Handle
2735 postfix-expression [ braced-init-list ].
2737 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2740 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2741 call decay_conversion on v.
2743 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2746 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2747 declaration followed by specialization.
2749 2012-01-03 Jakub Jelinek <jakub@redhat.com>
2752 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2753 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2755 2012-01-02 Jason Merrill <jason@redhat.com>
2759 * method.c (walk_field_subobs): Don't check for uninitialized
2761 (synthesized_method_walk): Check here.
2765 * parser.c (cp_parser_cache_defarg): Split out...
2766 (cp_parser_parameter_declaration): ...from here.
2767 (cp_parser_save_nsdmi): Use it.
2768 (cp_parser_cache_group): Remove CPP_COMMA support.
2770 2012-01-02 Dodji Seketeli <dodji@redhat.com>
2773 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2776 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
2779 * typeck2.c (digest_init_r): Use copy_init when initializing
2782 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2785 * decl.c (build_enumerator): Don't call perform_integral_promotions
2788 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2791 * typeck.c (build_reinterpret_cast_1): Implement resolution of
2794 2012-01-01 Fabien ChĂȘne <fabien@gcc.gnu.org>
2796 * parser.c (cp_parser_using_declaration): Add a warning about
2797 deprecated access declarations when no errors were encountered
2798 while parsing the access declaration. Save the first token in
2799 order to emit the warning at the right place.
2801 Copyright (C) 2012 Free Software Foundation, Inc.
2803 Copying and distribution of this file, with or without modification,
2804 are permitted in any medium without royalty provided the copyright
2805 notice and this notice are preserved.