1 2012-11-16 Dodji Seketeli <dodji@redhat.com>
4 * pt.c (lookup_template_class_1): Look at the type of the
5 potential member enum of class template to determine if we are
6 actually substituting into a member enum of class template.
8 2012-11-16 Jakub Jelinek <jakub@redhat.com>
11 * tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Use SIZEOF_EXPR_TYPE_P
14 2012-11-14 Jason Merrill <jason@redhat.com>
17 * decl2.c (mark_used): Don't complain about auto in templates.
20 * decl.c (decls_match): Remove #ifdef around earlier fix.
22 2012-11-13 Jason Merrill <jason@redhat.com>
24 * class.c (finish_struct_1): Check virtual functions
28 * pt.c (maybe_process_partial_specialization): Update
29 DECL_SOURCE_LOCATION for new specializations.
31 2012-11-14 Paolo Carlini <paolo.carlini@oracle.com>
34 * init.c (emit_mem_initializers): Skip arguments == error_mark_node.
36 2012-11-14 Fabien ChĂȘne <fabien@gcc.gnu.org>
39 * call.c (build_new_method_call_1): Check that the instance type
40 and the function context are the same before setting the flag
43 2012-11-13 Sriraman Tallam <tmsriram@google.com>
45 * class.c (mark_versions_used): Remove.
46 (resolve_address_of_overloaded_function): Call target hook
47 for versioned functions. Refactor to call
48 get_function_versions_dispatcher.
49 * decl.c (duplicate_decls): Add comments.
50 * cp/call.c (get_function_version_dispatcher): Expose function.
51 (mark_versions_used): Expose function.
52 * cp/cp-tree.h (mark_versions_used): New declaration.
53 (get_function_version_dispatcher): Ditto.
55 2012-11-13 Dodji Seketeli <dodji@redhat.com>
58 * pt.c (lookup_template_class_1): TYPE_STUB_DECL should be
59 accessed on the main variant of the type.
61 2012-11-12 Ed Smith-Rowland <3dw4rd@verizon.net>
63 * parser.c (cp_parser_objc_class_ivars):
64 Index declspecs.locations by ds_typedef rather than ds_thread.
66 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
69 * decl.c (grokfndecl): Adjust calls to interpret_x_suffix.
71 2012-11-09 Jason Merrill <jason@redhat.com>
74 * pt.c (check_instantiated_arg): Don't complain about dependent args.
76 * tree.c (cxx_attribute_table): Add abi_tag attribute.
77 (check_abi_tag_redeclaration, handle_abi_tag_attribute): New.
78 * class.c (find_abi_tags_r, check_abi_tags): New.
79 (check_bases, check_field_decl): Call check_abi_tags.
80 * decl.c (redeclaration_error_message): Call
81 check_abi_tag_redeclaration.
82 * mangle.c (tree_string_cmp, write_abi_tags): New.
83 (write_unqualified_name): Call write_abi_tags.
85 2012-11-07 Paolo Carlini <paolo.carlini@oracle.com>
89 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
92 * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
95 2012-11-07 Florian Weimer <fweimer@redhat.com>
97 * init.c (build_new_1): Do not check for arithmetic overflow if
98 inner array size is 1.
100 2012-11-05 Sriraman Tallam <tmsriram@google.com>
102 * class.c (add_method): Change assembler names of function versions.
103 (mark_versions_used): New static function.
104 (resolve_address_of_overloaded_function): Create dispatcher decl and
105 return address of dispatcher instead.
106 * decl.c (decls_match): Make decls unmatched for versioned
108 (duplicate_decls): Remove ambiguity for versioned functions.
109 Delete versioned function data for merged decls.
110 * decl2.c (check_classfn): Check attributes of versioned functions
112 * call.c (get_function_version_dispatcher): New function.
113 (mark_versions_used): New static function.
114 (build_over_call): Make calls to multiversioned functions
115 to call the dispatcher.
116 (joust): For calls to multi-versioned functions, make the most
117 specialized function version win.
119 2012-10-31 Lawrence Crowl <crowl@google.com>
121 * decl2.c (var_finalized_p): Rename varpool_node to
122 varpool_node_for_decl.
123 (maybe_emit_vtables): Likewise.
125 2012-10-31 Paolo Carlini <paolo.carlini@oracle.com>
128 * tree.c (build_cplus_array_type): Set TREE_NO_WARNING on the
131 2012-10-31 Dodji Seketeli <dodji@redhat.com>
134 * parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
135 'Alignas' keyword as the beginning of a c++11 attribute specifier.
136 Update the comment of the function.
137 (cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
140 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
143 * typeck.c (maybe_warn_about_returning_address_of_local): Use
144 OPT_Wreturn_local_addr.
146 2012-10-26 Jakub Jelinek <jakub@redhat.com>
149 * typeck2.c (store_init_value): Call fold_non_dependent_expr
150 and maybe_constant_init even for C++98.
152 2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
155 * init.c (build_new): Don't turn a null *init into a pointer to
156 empty vector orig_init.
158 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
161 * class.c (finish_struct_1): Reject aggregates decorated with
162 __transparent_union__ which cannot be made transparent because
163 the type of the first field has a different ABI from the class
166 2012-10-25 Jason Merrill <jason@redhat.com>
169 * call.c (joust): An implicitly deleted move function is
170 worse than any non-deleted function.
171 * method.c (process_subob_fn): No special rules for move.
172 (synthesized_method_walk, implicitly_declare_fn): Likewise.
173 Warn about virtual base with non-trivial move assignment.
174 * cp-tree.h (struct lang_decl_fn): Remove suppress_implicit_decl.
175 (FNDECL_SUPPRESS_IMPLICIT_DECL): Remove.
177 * semantics.c (finish_omp_threadprivate): Call complete_type.
179 * class.c (one_inherited_ctor): Warn about variadic inherited ctor.
181 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
184 * typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
185 * call.c (build_conditional_expr_1): Likewise.
187 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
190 * parser.c (cp_parser_template_parameter): When
191 cp_parser_parameter_declaration parsed a default argument don't
192 see if *is_parameter_pack needs setting.
194 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
197 * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
200 2012-10-23 Jakub Jelinek <jakub@redhat.com>
203 * pt.c (tsubst_copy, tsubst_copy_and_build) <case SIZEOF_EXPR>: Use
204 tsubst instead of tsubst_copy* on types.
207 * decl2.c (cplus_decl_attributes): Don't return early
208 if attributes is NULL.
210 2012-10-18 Paolo Carlini <paolo.carlini@oracle.com>
213 * decl.c (reshape_init_array_1): Avoid infinite loops.
215 2012-10-15 Alexandre Oliva <aoliva@redhat.com>
216 Paolo Carlini <paolo.carlini@oracle.com>
219 * call.c (build_new_op_1): Filter out operator functions that don't
220 satisfy enum-conversion match requirements.
222 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
225 * parser.c (cp_parser_optional_template_keyword): When -pedantic
226 and C++98 mode restore pre-Core/468 behavior.
228 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
231 * parser.c (cp_parser_optional_template_keyword): Implement
232 Core/468, allow outside template.
234 2012-10-14 Jason Merrill <jason@redhat.com>
235 Ville Voutilainen <ville.voutilainen@gmail.com>
237 Implement C++11 inheriting constructors.
238 * cp-tree.h (cpp0x_warn_str): Add CPP0X_INHERITING_CTORS.
239 (DECL_INHERITED_CTOR_BASE, SET_DECL_INHERITED_CTOR_BASE): New.
240 (special_function_kind): Add sfk_inheriting_constructor.
241 * class.c (add_method): An inheriting ctor is hidden by a
243 (one_inheriting_sig, one_inherited_ctor): New.
244 (add_implicitly_declared_members): Handle inheriting ctors.
245 * error.c (maybe_warn_cpp0x): Handle CPP0X_INHERITING_CTORS.
246 * init.c (emit_mem_initializers): Don't set LOOKUP_DEFAULTED
247 for an inheriting constructor.
248 * method.c (type_has_trivial_fn): Handle sfk_inheriting_constructor.
249 (type_set_nontrivial_flag): Likewise.
250 (add_one_base_init): Split out from...
251 (do_build_copy_constructor): ...here. Handle inheriting constructors.
252 (locate_fn_flags): Handle a list of arg types.
253 (synthesized_method_walk): Handle inheriting constructors.
254 (maybe_explain_implicit_delete): Likewise.
255 (deduce_inheriting_ctor): New.
256 (implicitly_declare_fn): Handle inheriting constructors.
257 * name-lookup.c (push_class_level_binding_1): An inheriting constructor
258 does not declare the base's name.
259 (do_class_using_decl): Allow inheriting constructors.
260 * pt.c (template_parms_to_args): Split from current_template_args.
261 (add_inherited_template_parms): New.
262 (tsubst_decl): Handle inheriting constructors.
263 * tree.c (special_function_p): Handle inheriting constructors.
265 2012-10-12 Jakub Jelinek <jakub@redhat.com>
268 * semantics.c (finish_call_expr): Pass array of 3 sizeof_arg
269 trees and locs (corresponding to first 3 arguments) to
270 sizeof_pointer_memaccess_warning.
272 2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>
275 * decl.c (grokfndecl): When checking for ::main declarations
276 use PROCESSING_REAL_TEMPLATE_DECL_P().
278 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
281 * call.c (build_new_op_1): Pass RO_ARROW_STAR to cp_build_indirect_ref.
282 * typeck.c (cp_build_indirect_ref): Handle RO_ARROW_STAR.
284 2012-10-11 Jason Merrill <jason@redhat.com>
286 * cp-tree.h (DECL_THUNKS): NULL_TREE for non-virtual functions.
287 (SET_DECL_THUNKS): New.
288 * decl.c (duplicate_decls): Adjust.
289 * method.c (make_thunk): Adjust.
291 * decl.c (grokdeclarator): Set DECL_GNU_TLS_P for static data
294 2012-10-09 Dodji Seketeli <dodji@redhat.com>
296 PR c++/53540 - using fails to be equivalent to typedef
297 * cp-tree.h (TYPE_TEMPLATE_INFO): For an alias that is not an
298 instance of alias template, don't look for its TEMPLATE_INFO in
300 (alias_template_specialization_p): Take const_tree.
301 * pt.c (alias_template_specialization_p): Take a const_tree.
302 Don't call primary_template_instantiation_p.
303 (primary_template_instantiation_p): Call
304 alias_template_specialization_p.
306 2012-10-10 Dodji Seketeli <dodji@redhat.com>
308 * parser (cp_parser_statement): Parse c++11 attributes
310 (cp_parser_std_attribute_spec_seq): Do not warn too early about
311 using c++11 attributes in non c++11 mode.
313 2012-10-10 Dehao Chen <dehao@google.com>
315 * cp-gimplify.c (cp_genericize_r): Set location for TRY expr.
317 2012-10-09 Lawrence Crowl <crowl@google.com>
319 * Make-lang.in (class.o): Add dependence on hash-table.h.
321 (semantics.o): Likewise.
322 * class.c (fixed_type_or_null): Change to new type-safe hash table.
323 * tree.c (verify_stmt_tree): Likewise.
324 (verify_stmt_tree_r): Likewise.
325 * semantics.c (struct nrv_data): Likewise.
327 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
330 * typeck.c (build_x_binary_op): Update warn_about_parentheses call.
331 * parser.c (cp_parser_binary_expression): Use SET_EXPR_LOCATION
334 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
337 * typeck.c (cp_build_binary_op): Handle mixed scalar-vector
339 [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise.
341 2012-10-08 Jakub Jelinek <jakub@redhat.com>
344 * tree.c (cp_tree_equal): Handle FIELD_DECL.
346 2012-10-08 Jason Merrill <jason@redhat.com>
348 Allow dynamic initialization of thread_locals.
349 * decl.c: Define tls_aggregates.
350 (expand_static_init): Remove sorry. Add to tls_aggregates.
351 * cp-tree.h: Declare tls_aggregates.
352 * call.c (set_up_extended_ref_temp): Add to tls_aggregates.
353 * decl2.c (var_needs_tls_wrapper): New.
354 (var_defined_without_dynamic_init): New.
355 (get_tls_init_fn, get_tls_wrapper_fn): New.
356 (generate_tls_wrapper, handle_tls_init): New.
357 (cp_write_global_declarations): Call handle_tls_init and
359 * mangle.c (write_guarded_var_name): Split out from..
360 (mangle_guard_variable): ...here.
361 (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it.
362 (decl_tls_wrapper_p): New.
363 * semantics.c (finish_id_expression): Replace use of thread_local
364 variable with a call to its wrapper.
366 * decl.c (get_thread_atexit_node): New.
367 (register_dtor_fn): Use it for TLS.
369 Partial implementation of C++11 thread_local.
370 * decl.c (cp_finish_decl): Remove errors about non-trivial
371 initialization and destruction of TLS variables.
372 (register_dtor_fn): Add sorry about TLS variables.
373 (expand_static_init): Add sorry about non-local TLS variables,
374 or error with __thread.
375 Don't emit thread-safety guards for local TLS variables.
376 (grokdeclarator): thread_local in a function implies static.
377 * decl.h: Adjust prototype.
378 * decl2.c (get_guard): Copy DECL_TLS_MODEL.
379 * parser.c (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
380 (set_and_check_decl_spec_loc): Take the token rather than the location.
381 Distinguish between __thread and thread_local.
382 (cp_parser_set_storage_class): Don't complain about thread_local before
384 (token_is__thread): New.
385 * call.c (make_temporary_var_for_ref_to_temp): Handle TLS.
386 * cp-tree.h (DECL_GNU_TLS_P): New.
387 (cp_decl_specifier_seq): Add gnu_thread_keyword_p.
389 2012-10-08 Dodji Seketeli <dodji@redhat.com>
391 PR c++/53528 C++11 attribute support
392 * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
393 (enum cp_decl_spec::ds_std_attribute): New enumerator.
394 (struct cp_decl_specifier_seq::std_attributes): New field.
395 (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
397 (check_tag_decl): Take an extra parameter for explicit
399 * decl.c (warn_misplaced_attr_for_class_type): Extract from ...
400 (check_tag_decl): ... here. Add check for c++11 attributes being
401 applied to an explicit instantiation. Take an extra parameter for
402 explicit instantiations.
403 (grokdeclarator): Make sure a c++11 attribute after an array
404 declarator appertains to the array, an attribute after a function
405 declarator appertains to the function type, an attribute after a
406 declarator-id appertains to the entity being declared, and an
407 attribute after a pointer declarator appertain to the pointer.
408 * decl2.c (is_late_template_attribute): Use get_attribute_name.
409 * error.c (maybe_warn_cpp0x): Support
410 CPP0X_GENERALIZED_ATTRIBUTES.
411 * parser.c (cp_next_tokens_can_be_attribute_p)
412 (cp_next_tokens_can_be_gnu_attribute_p)
413 (cp_next_tokens_can_be_std_attribute_p)
414 (cp_nth_tokens_can_be_attribute_p)
415 (cp_nth_tokens_can_be_gnu_attribute_p)
416 (cp_nth_tokens_can_be_std_attribute_p)
417 (cp_parser_gnu_attribute_list, cp_parser_std_attribute)
418 (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
419 (cp_parser_attributes_opt, cp_parser_std_attribute_list): New
421 (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
422 (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
423 (cp_parser_postfix_expression): Disallow "[[" tokens here.
424 (cp_parser_label_for_labeled_statement): Use take an extra
425 parameter for attributes.
426 (cp_parser_block_declaration): Use
427 cp_nth_tokens_can_be_std_attribute_p here.
428 (cp_parser_decl_specifier_seq): Likewise. Store C++11 attributes
429 that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
430 declaration. Emit proper warning about misplaced c++11 attributes
432 (cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
433 (cp_parser_init_declarator): Parsing attributes here is no more a
434 GNU extension in c++-11.
435 (cp_parser_type_specifier_seq): Use
436 cp_next_tokens_can_be_attribute_p.
437 (cp_parser_direct_declarator): Likewise. Hang c++11 attributes
438 following the declarator to its syntactic construct. It'll later
439 be applied to the proper appertaining entity by grokdeclarator.
440 (cp_parser_ptr_operator): Likewise.
441 (make_declarator): Initialize cp_declarator::std_attribute.
442 (make_pointer_declarator, make_reference_declarator)
443 (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
444 attributes that appertain to the pointer/reference in argument.
445 (cp_parser_ptr_operator): Take an out parameter for c++11
446 attributes. Update comments.
447 (cp_parser_new_declarator_opt)
448 (cp_parser_conversion_declarator_opt): Adjust.
449 (cp_parser_declarator): Likewise. Handle C++11 attributes.
450 Rename attributes to gnu_attribute for better legibility.
451 (cp_parser_simple_declaration): Update comment.
452 (cp_parser_class_specifier_1): Parse GNU attributes specifically
453 (cp_parser_enum_specifier): Accept only gnu attributes after the
455 (cp_parser_member_declaration): Don't clear attributes -- intended
456 for the entity being declared -- too early because check_tag_decl
458 (cp_parser_statement): Update comment. Parse optional c++11
459 attributes at the beginning of the relevant kind of statements and
460 ignore them, for now, unless when calling
461 cp_parser_label_for_labeled_statement.
462 (cp_parser_label_for_labeled_statement): Take c++11 attributes
464 * semantics.c (potential_constant_expression_1): Likewise.
465 * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
468 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
470 * pt.c (fold_non_dependent_expr_sfinae): Remove static specifier.
471 (tsubst_copy_and_build): Use get_target_expr_sfinae.
472 * call.c (build_conditional_expr_1, convert_like_real): Likewise.
473 * cvt.c (build_up_reference): Likewise.
474 (ocp_convert): Use abstract_virtuals_error_sfinae.
475 (build_up_reference): Propagate complain to cp_build_addr_expr.
476 * decl.c (compute_array_index_type): Use fold_non_dependent_expr_sfinae.
477 * cp-tree.h: Update declarations.
479 * cvt.c (build_expr_type_conversion): Tidy.
481 * tree.c (stabilize_aggr_init): Change to static.
483 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
486 * semantics.c (is_normal_capture_proxy): Return true for
487 error_mark_node as DECL_VALUE_EXPR.
489 2012-10-05 Jakub Jelinek <jakub@redhat.com>
491 * cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
492 * tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
494 * mangle.c (write_expression): Likewise.
495 * cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
496 * error.c (dump_expr): Likewise.
497 * parser.c (cp_parser_unary_expression): For sizeof call
498 cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
499 return SIZEOF_EXPR with the operand.
500 * pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
501 call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
502 return SIZEOF_EXPR with tsubsted operand.
503 (value_dependent_expression_p): Handle SIZEOF_EXPR with
505 (instantiation_dependent_r): Likewise.
506 * call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
507 * semantics.c (finish_call_expr): Call
508 sizeof_pointer_memaccess_warning if needed.
509 (cxx_eval_constant_expression): Handle SIZEOF_EXPR.
510 (potential_constant_expression_1): Remove early exit for
511 C++98. Handle PROPERTY_REF.
512 * decl.c (duplicate_decls): When redeclaring a builtin function,
513 keep the merged decl builtin also if newdecl is a gnu_inline
515 (fold_sizeof_expr_r): New function.
516 (compute_array_index_type): Fold SIZEOF_EXPRs in itype.
517 * cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
518 * typeck.c (cp_build_binary_op): For warn_for_sign_compare
519 try harder using maybe_constant_value to get INTEGER_CSTs.
521 * decl.c (stabilize_vla_size): Call pointer_set_destroy
524 2012-10-04 Arnaud Charlet <charlet@adacore.com>
526 * decl2.c (cp_write_global_declarations): Fix handling of
529 2012-10-03 Jakub Jelinek <jakub@redhat.com>
532 * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
533 not ignoring the second operand, pass the original second operand
534 and not one with stripped nops to cxx_eval_constant_expression.
536 2012-10-01 Jason Merrill <jason@redhat.com>
538 * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
539 for a constructor call.
540 (decl_jump_unsafe): So don't bother checking
541 type_has_nontrivial_default_init.
542 * call.c (set_up_extended_ref_temp): Set
543 DECL_NONTRIVIALLY_INITIALIZED_P.
545 * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
546 (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
547 (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
548 * name-lookup.c (hidden_name_p): Use it.
550 * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
551 * decl.c (cp_make_fname_decl): Adjust.
553 2012-09-30 Sharad Singhai <singhai@google.com>
555 * decl2.c (cp_write_global_declarations): Use a different method
556 to determine if the dump has ben initialized.
558 2012-09-29 Paolo Carlini <paolo.carlini@oracle.com>
561 * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
563 * pt.c (tsubst_copy_and_build): Adjust.
564 * parser.c (cp_parser_postfix_expression): Likewise.
565 * cp-tree.h: Adjust declaration.
567 2012-09-28 Dodji Seketeli <dodji@redhat.com>
569 PR c++/54372 - unused attribute inactive on dependant entities
570 * decl2.c (is_late_template_attribute): "unused" attribute is to
571 be applied at compile time.
573 2012-09-25 Dodji Seketeli <dodji@redhat.com>
575 PR c++/29028 - Missed unused warning on using declaration
576 * decl.c (poplevel<warn_unused*>): Do not forget that some local
577 bindings are represented by a TREE_LIST.
579 2012-09-25 Dodji Seketeli <dodji@redhat.com>
581 PR c++/53551 - -Wunused-local-typedefs misses uses
582 * decl.c (make_typename_type): Record the use of typedefs.
584 2012-09-27 Jakub Jelinek <jakub@redhat.com>
586 * init.c (build_new_1): Don't test TREE_CONSTANT
589 2012-09-25 Paolo Carlini <paolo.carlini@oracle.com>
592 * parser.c (cp_parser_template_id): In C++11 mode simply accept
595 2012-09-25 Zhenqiang Chen <zhenqiang.chen@linaro.org>
598 * typeck.c (cp_build_binary_op): Check side effects before generating
599 pfn and delta related expressions.
601 2012-09-24 Lawrence Crowl <crowl@google.com>
603 * init.c (build_new_1): Change to new double_int API.
604 * decl.c (build_enumerator): Likewise.
605 * typeck2.c (process_init_constructor_array): Likewise.
606 * mangle.c (write_array_type): Likewise.
608 2012-09-24 Paolo Carlini <paolo.carlini@oracle.com>
611 * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
614 2012-09-24 Jason Merrill <jason@redhat.com>
616 * decl.c (get_atexit_node): Remove dead code.
618 * Make-lang.in (cp/parser.o): Depend on decl.h.
620 2012-09-20 Paolo Carlini <paolo.carlini@oracle.com>
623 * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
624 argument don't call unqualified_name_lookup_error.
626 2012-09-19 Marc Glisse <marc.glisse@inria.fr>
629 * semantics.c (finish_decltype_type): Make vectors not opaque.
631 2012-09-17 Jason Merrill <jason@redhat.com>
634 * pt.c (instantiate_alias_template): New.
636 (push_access_scope): Allow TYPE_DECL.
638 2012-09-14 Jason Merrill <jason@redhat.com>
641 * typeck2.c (check_narrowing): Avoid false positives on conversion
644 2012-09-14 Marc Glisse <marc.glisse@inria.fr>
647 * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
648 NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
650 2012-09-14 Paolo Carlini <paolo.carlini@oracle.com>
652 * decl.c (make_typename_type): Only error out if tf_error is set
655 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
656 Manuel López-Ibåñez <manu@gcc.gnu.org>
659 * init.c (perform_member_init): Use OPT_Winit_self instead of
662 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
664 * typeck.c (build_indirect_ref, build_function_call,
665 build_function_call_vec, build_binary_op, build_unary_op,
666 build_compound_expr, build_c_cast, build_modify_expr): Remove
667 uses of ATTRIBUTE_UNUSED on the parameters.
668 * class.c (set_linkage_according_to_type, resort_type_method_vec,
669 dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
671 * decl.c (local_variable_p_walkfn): Likewise.
672 * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
673 * error.c (find_typenames_r): Likewise.
674 * tree.c (verify_stmt_tree_r, bot_replace,
675 handle_java_interface_attribute, handle_com_interface_attribute,
676 handle_init_priority_attribute, c_register_addr_space): Likewise.
677 * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
678 * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
679 * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
681 * semantics.c (dfs_calculate_bases_pre): Likewise.
682 * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
684 * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
685 cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
686 cp_parser_omp_clause_untied): Likewise.
687 * mangle.c (write_unnamed_type_name,
688 discriminator_for_string_literal): Likewise.
689 * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
690 * lex.c (handle_pragma_vtable, handle_pragma_unit,
691 handle_pragma_interface, handle_pragma_implementation,
692 handle_pragma_java_exceptions): Likewise.
694 2012-09-13 Jason Merrill <jason@redhat.com>
697 * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
698 address, make sure the value is constant.
701 * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
704 * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
707 2012-09-10 Paolo Carlini <paolo.carlini@oracle.com>
711 * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
712 require_complete_type_sfinae.
713 (build_op_delete_call, build_over_call): Adjust.
714 * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
716 (cp_build_function_call_vec): Adjust.
717 * init.c (build_new_1): Likewise.
718 * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
720 * optimize.c (build_delete_destructor_body): Likewise.
721 * cp-tree.h: Adjust declarations.
723 * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
725 2012-09-10 Jason Merrill <jason@redhat.com>
729 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
730 for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
733 * decl.c (move_signature_fn_p): Split out from move_fn_p.
734 * method.c (process_subob_fn): Use it.
735 * cp-tree.h: Declare it.
737 2012-09-07 Jason Merrill <jason@redhat.com>
739 * semantics.c (sort_constexpr_mem_initializers): Tweak.
741 2012-09-09 Mark Kettenis <kettenis@openbsd.org>
743 * decl.c (reshape_init_class): Avoid dereferencing a
744 past-the-end pointer.
746 2012-09-07 Paolo Carlini <paolo.carlini@oracle.com>
748 * pt.c (num_template_headers_for_class): Rework per the code
749 inline in cp_parser_check_declarator_template_parameters.
750 * parser.c (cp_parser_check_declarator_template_parameters):
751 Use num_template_headers_for_class.
753 2012-09-06 Jason Merrill <jason@redhat.com>
757 * semantics.c (sort_constexpr_mem_initializers): New.
758 (build_constexpr_constructor_member_initializers): Use it.
759 (cx_check_missing_mem_inits): Skip artificial fields.
760 * init.c (expand_aggr_init_1): Don't zero out a class
763 2012-09-05 Paolo Carlini <paolo.carlini@oracle.com>
766 * search.c (lookup_base): Add tsubst_flags_t parameter.
767 (adjust_result_of_qualified_name_lookup, check_final_overrider):
769 * name-lookup.c (do_class_using_decl): Adjust.
770 * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
772 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
773 build_up_reference): Likewise.
774 * rtti.c (build_dynamic_cast_1): Likewise.
775 * tree.c (maybe_dummy_object): Likewise.
776 * call.c (build_conditional_expr_1, build_over_call): Likewise.
777 * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
779 (enum base_access_flags, ba_quiet): Remove.
780 (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
781 * except.c (can_convert_eh): Adjust.
782 * decl.c (grokdeclarator): Likewise.
783 * typeck.c (comp_except_types, build_class_member_access_expr,
784 finish_class_member_access_expr, get_member_function_from_ptrfunc,
785 build_static_cast_1, get_delta_difference_1): Likewise.
786 * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
787 warn_about_ambiguous_bases): Likewise.
788 (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
790 2012-09-04 Jason Merrill <jason@redhat.com>
793 * decl.c (reshape_init_class): Handle invalid initializer for
794 0-length array member.
796 * error.c (dump_type_suffix): Correct handling of 0-length arrays.
799 * cp-tree.h (LAMBDANAME_P): Remove.
800 (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
801 * cp-lang.c (cxx_dwarf_name): Likewise.
802 * error.c (dump_aggr_type): Likewise.
803 * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
806 * decl.c (check_default_argument): Set cp_unevaluated_operand
807 around call to perform_implicit_conversion_flags.
811 * pt.c (fn_type_unification): Call coerce_template_parms before
812 entering substitution context.
814 2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
815 Jason Merrill <jason@redhat.com>
818 * pt.c (check_template_variable): New.
819 (num_template_headers_for_class): Split out...
820 * decl.c (grokdeclarator): ...from here.
821 (start_decl): Remove redundant diagnostic.
822 * cp-tree.h: Declare them
823 * parser.c (cp_parser_single_declaration): Call check_template_variable.
825 2012-08-31 Ollie Wild <aaw@google.com>
828 * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
830 2012-08-30 Jason Merrill <jason@redhat.com>
834 * pt.c (instantiation_dependent_r): New.
835 (instantiation_dependent_expression_p): New.
836 (value_dependent_expression_p): Use it. SCOPE_REF is always dependent.
837 * semantics.c (finish_decltype_type): Use it.
838 * cp-tree.h: Declare it.
840 * semantics.c (finish_qualified_id_expr): Handle building up a
841 non-dependent SCOPE_REF here.
842 (finish_id_expression): Not here.
843 * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
845 * friend.c (make_friend_class): Handle template template parameters.
846 * parser.c (cp_parser_template_declaration_after_export): Likewise.
847 * pt.c (tsubst_friend_class): Likewise.
848 (instantiate_class_template_1): Likewise
849 * decl.c (check_elaborated_type_specifier): Likewise.
850 (lookup_and_check_tag): Likewise.
852 * pt.c (get_class_bindings): Call coerce_template_parms. Add
854 (more_specialized_class): Add main_tmpl parameter.
855 (most_specialized_class): Adjust calls.
857 * decl.c (cp_finish_decl): Check for invalid multiple initializers
858 even if the initializer is dependent.
860 * pt.c (instantiate_template_1): Keep processing_template_decl set
861 if there are dependent args.
863 2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
866 * decl2.c (mark_used): Consistently return false after errors
867 about uses before deduction of auto.
868 * semantics.c (finish_id_expression): Check mark_used return
869 value and return error_mark_node in case of failure.
871 2012-08-24 Jason Merrill <jason@redhat.com>
874 * pt.c (deduction_tsubst_fntype): Remove.
875 (fn_type_unification): Check deduction depth and call
876 instantiate_template here. Handle default argument access checks.
877 (determine_specialization): Suppress access control.
878 (tsubst_decl): Check for excessive deduction depth.
879 (recheck_decl_substitution): Make sure access control is on.
880 (type_unification_real): Don't mess with access deferring here.
881 (get_bindings): Adjust for fn_type_unification return type.
882 * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
883 (template_instantiation_rejection): Remove.
884 (struct rejection_reason): Change targs to num_targs.
885 (template_unification_rejection, print_z_candidate): Adjust.
886 (add_template_candidate_real): Adjust for fn_type_unification change.
887 * class.c (resolve_address_of_overloaded_function): Likewise.
888 * cp-tree.h: Adjust declaration.
890 * pt.c (tsubst_default_argument): Indicate where the default
891 argument is being instantiated for.
892 (tsubst_expr): Restore previous location.
893 (tsubst_copy_and_build): Set and restore location.
894 * call.c (build_new_method_call_1): Remember location of call.
895 * semantics.c (finish_call_expr): Here too.
896 * parser.c (cp_parser_omp_for_loop): Remember the location of the
897 increment expression.
899 * pt.c (resolve_overloaded_unification): Use coerce_template_parms
900 instead of get_bindings.
901 (resolve_nondeduced_context): Likewise.
903 * pt.c (register_specialization): Correct argument to
904 check_specialization_namespace.
905 (determine_specialization): Don't consider members of
908 2012-08-23 Jason Merrill <jason@redhat.com>
910 * decl.c (compute_array_index_type): Use type_dependent_expression_p.
912 2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
915 * name-lookup.c (supplement_binding_1): Handle specially enums
916 only in class templates.
917 (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
918 using declarations at function scope.
920 2012-08-21 Richard Guenther <rguenther@suse.de>
922 * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
923 (ATTR_IS_DEPENDENT): Likewise.
924 (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
925 TREE_LANG_FLAG_0 on TREE_VECs.
927 2012-08-20 Florian Weimer <fweimer@redhat.com>
930 * call.c (build_operator_new_call): Add size_check argument and
932 * cp-tree.h (build_operator_new_call): Adjust declaration.
933 * init.c (build_new_1): Compute array size check and apply it.
935 2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
938 * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
939 Wunused_variable too.
941 2012-08-20 Diego Novillo <dnovillo@google.com>
943 * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
945 2012-08-20 Richard Guenther <rguenther@suse.de>
947 * name-lookup.c (store_binding_p): New predicate, split out from ...
948 (store_binding): ... here. Always store binding and require
949 target vector with enough space.
950 (store_bindings): Collect to store bindings and reserve space
951 for them, then store them.
952 (store_class_bindings): Likewise.
954 2012-08-19 Mikael Morin <mikael@gcc.gnu.org>
956 * Make-lang.in: Fix typo.
958 2012-08-17 Jakub Jelinek <jakub@redhat.com>
960 * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
962 2012-08-14 Diego Novillo <dnovillo@google.com>
964 Merge from cxx-conversion branch. Re-write VEC in C++.
966 * call.c (add_function_candidate): Remove const qualifier
967 from call to VEC_index.
969 2012-08-10 Richard Guenther <rguenther@suse.de>
971 * error.c (dump_expr): Handle anonymous SSA names.
973 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
975 * error.c (print_instantiation_context): Pretty-print a newline before
976 diagnostic_flush_buffer.
977 * cxx-pretty-print.c (pp_cxx_function_definition): Use
978 pp_newline_and_flush instead of separate pp_newline and pp_flush.
980 2012-08-06 Dodji Seketeli <dodji@redhat.com>
982 Avoid crashing on erroneous static_assert usage
983 * semantics.c (finish_static_assert): Don't crash on erroneous
984 message or condition.
986 2012-08-06 Marc Glisse <marc.glisse@inria.fr>
987 Paolo Carlini <paolo.carlini@oracle.com>
990 * typeck.c (build_static_cast_1): Move the conversion to void case
991 before the perform_direct_initialization_if_possible call.
993 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
995 * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
996 * cp-tree.h (scalarish_type_p): Declare.
997 * tree.c (scalarish_type_p): Make non-static.
999 2012-08-02 Jason Merrill <jason@redhat.com>
1000 Paolo Carlini <paolo.carlini@oracle.com>
1002 PR c++/51213 (again)
1003 * pt.c (type_unification_real): Call push_deferring_access_checks /
1004 pop_deferring_access_checks around the substitution of default
1006 (instantiate_template_1): When the specialization returned by
1007 retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
1008 are in a SFINAE context, simply return error_mark_node.
1009 * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
1011 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1013 * pt.c (check_default_tmpl_args): Change is_primary and is_partial
1014 parameters to bool type, adjust.
1015 (push_template_decl_real): Tidy.
1016 * parser.c (cp_parser_init_declarator): Adjust.
1017 * decl.c (redeclaration_error_message): Likewise.
1018 * cp-tree.h (check_default_tmpl_args): Update prototype.
1020 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1023 * pt.c (check_default_tmpl_args): Don't check local types.
1025 2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
1026 Paul Brook <paul@codesourcery.com>
1029 * decl.c (finish_function): Check targetm.warn_func_return.
1031 2012-07-25 Jason Merrill <jason@redhat.com>
1034 * decl.c (grokdeclarator): Allow const and constexpr together.
1037 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
1038 maybe_constant_value.
1040 * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
1041 * call.c (standard_conversion): Don't set it.
1042 * class.c (resolve_address_of_overloaded_function): Don't check it.
1043 * decl.c (check_default_argument): Call
1044 perform_implicit_conversion_flags.
1046 * pt.c (print_candidates_1): Use inform instead of error.
1048 2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1050 * pt.c (convert_template_argument, tsubst): Simplify fourth argument
1051 to make_typename_type (complain & tf_error -> complain).
1053 2012-07-24 Steven Bosscher <steven@gcc.gnu.org>
1055 * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
1056 n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
1057 n_inner_fields_searched): Always define.
1058 (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
1059 (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1060 * tree.c (depth_reached): Always define global.
1061 (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
1062 * pt.c (depth_reached): Always define.
1063 (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
1064 * search.c (n_fields_searched, n_calls_lookup_field,
1065 n_calls_lookup_field_1, n_calls_lookup_fnfields,
1066 n_calls_lookup_fnfields_1, n_calls_get_base_type,
1067 n_outer_fields_searched, n_contexts_saved): Always define.
1068 (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
1069 (lookup_member): Likewise.
1070 (lookup_fnfields_idx_nolazy): Likewise.
1071 (print_search_statistics): Likewise.
1072 (reinit_search_statistics): Unconditionally re-set counters.
1073 * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
1075 (cxx_dup_lang_specific_decl): Likewise.
1076 (copy_lang_type): Likewise.
1077 (cxx_make_type): Likewise.
1079 2012-07-20 Jason Merrill <jason@redhat.com>
1082 * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
1083 canonical array type rather than mess with its TYPE_*_VARIANT.
1085 2012-07-19 Jason Merrill <jason@redhat.com>
1088 * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
1091 * call.c (build_cxx_call): Set optimize when folding
1092 __builtin_constant_p in a constexpr function.
1094 2012-07-18 Jason Merrill <jason@redhat.com>
1096 * pt.c (instantiate_decl): Don't recheck substitutions.
1098 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
1099 Jason Merrill <jason@redhat.com>
1103 * semantics.c (perform_access_checks): Add complain parm, return bool.
1104 (perform_deferred_access_checks): Likewise.
1105 (perform_or_defer_access_check): Likewise.
1106 (speculative_access_check): Remove.
1107 * call.c (enforce_access): Add complain parm, return bool.
1108 * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
1109 * search.c: Adjust callers.
1110 * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
1111 (FNDECL_RECHECK_ACCESS_P): New macro.
1112 * method.c (synthesized_method_walk): Stop deferring access checks.
1113 * pt.c (recheck_decl_substitution): New.
1114 (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
1116 2012-07-18 Jason Merrill <jason@redhat.com>
1118 * method.c (process_subob_fn): Make sure no_implicit_p is non-null
1119 before trying to store through it.
1121 2012-07-17 Jason Merrill <jason@redhat.com>
1124 * decl.c (finish_enum_value_list): Only call
1125 insert_late_enum_def_into_classtype_sorted_fields in class scope.
1128 * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
1129 to the list of variants.
1131 * decl.c (xref_basetypes): Complain about incomplete template base.
1132 * class.c (finish_struct): Adjust variants in templates, too.
1135 * parser.c (cp_parser_class_head): Call xref_basetypes here.
1136 (cp_parser_class_specifier_1): Not here.
1137 * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
1138 as well as DECL_DEPENDENT_P.
1140 2012-07-16 Jason Merrill <jason@redhat.com>
1142 * cp-tree.h (struct deferred_access_check): Add location.
1143 * semantics.c (perform_access_checks): Use it.
1144 (perform_or_defer_access_check): Store it.
1146 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1148 * dump.c (dump_stmt): Moved here from c-dump.c.
1149 * optimize.c: Include dumpfile.h instead of tree-dump.h.
1150 * class.c: Likewise.
1151 * decl2.c: Likewise.
1152 * Make-lang.in: Fix dependencies.
1154 2012-07-13 Jason Merrill <jason@redhat.com>
1157 * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
1159 2012-07-12 Jason Merrill <jason@redhat.com>
1161 * pt.c (instantiate_decl): Check typedefs access here.
1162 (instantiate_template_1): Not here.
1164 * pt.c (deduction_tsubst_fntype): Just suppress access checking.
1165 (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
1166 (push_deduction_access_scope, pop_deduction_access_scope): Remove.
1168 2012-07-11 Jason Merrill <jason@redhat.com>
1171 * method.c (synthesized_method_walk): Replace uses of msg with diag.
1172 Correct handling of virtual bases with move operations.
1173 (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
1175 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1177 * method.c: Do not include tree-pass.h.
1179 2012-07-10 Jason Merrill <jason@redhat.com>
1183 * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
1184 (struct lang_decl_fn): Add suppress_implicit_decl field.
1185 * method.c (implicitly_declare_fn): Check it.
1186 (process_subob_fn): Add no_implicit_p parm.
1187 (walk_field_subobs, synthesized_method_walk): Likewise.
1188 (maybe_explain_implicit_delete): Adjust.
1189 (explain_implicit_non_constexpr): Adjust.
1191 * method.c (synthesized_method_walk): Avoid changing
1192 EH spec based on cleanups in other places, too.
1194 2012-07-09 Sterling Augustine <saugustine@google.com>
1196 * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
1198 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1200 * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
1202 2012-07-06 Jason Merrill <jason@redhat.com>
1205 * pt.c (tsubst_arg_types): Add "end" parameter.
1206 (check_undeduced_parms): Use it.
1208 * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
1211 * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
1213 2012-07-05 Jason Merrill <jason@redhat.com>
1216 * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
1219 * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
1220 (struct template_parm_index_s): Remove num_siblings.
1221 * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
1222 (fixup_template_type_parm_type): Remove.
1223 (build_template_parm_index): Remove num_siblings parm.
1224 (process_template_parm): Likewise.
1225 * parser.c (cp_parser_template_parameter_list): Adjust.
1226 * tree.c (cp_tree_equal): Don't compare num_siblings.
1227 * typeck.c (comp_template_parms_position): Likewise.
1231 * tree.c (strip_typedefs_expr): New.
1232 * cp-tree.h: Declare it.
1233 * pt.c (convert_template_argument, unify): Use it.
1234 * parser.c (cp_parser_template_declaration_after_export): Don't call
1235 fixup_template_parms.
1237 2012-07-04 Jason Merrill <jason@redhat.com>
1241 * decl.c (build_enumerator): Don't use build_lang_decl_loc.
1243 2012-07-03 Jakub Jelinek <jakub@redhat.com>
1246 * semantics.c (finish_goto_stmt): Surround computed goto argument
1247 with CLEANUP_POINT_EXPR if needed.
1249 2012-07-02 Jason Merrill <jason@redhat.com>
1252 * pt.c (in_template_function): New.
1253 * cp-tree.h: Declare it.
1254 * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
1257 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
1258 for LAMBDA_EXPR_EXTRA_SCOPE.
1261 * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
1264 * class.c (resolves_to_fixed_type_p): Check uses_template_parms
1265 (current_function_decl) instead of processing_template_decl.
1268 * semantics.c (maybe_add_lambda_conv_op): Don't set
1269 DECL_INTERFACE_KNOWN.
1272 * call.c (build_conditional_expr_1): Don't warn about comparison of
1273 two enumerators before their enumeration is complete.
1274 (build_new_op_1): Call decay_conversion before warn_logical_operator.
1275 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
1277 * decl2.c (mark_used): Call used_types_insert for enums.
1278 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
1279 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
1280 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
1281 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
1282 (build_class_member_access_expr): Look through unscoped enums.
1283 * search.c (context_for_name_lookup): Look through unscoped enums.
1284 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
1285 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
1286 * tree.c (decl_linkage): Likewise.
1287 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
1289 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1291 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
1293 2012-06-27 Jason Merrill <jason@redhat.com>
1295 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
1296 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
1297 (cp_parser_elaborated_type_specifier): Adjust.
1298 * decl.c (duplicate_decls): Return error_mark_node on template
1302 * parser.c (cp_parser_template_id): Add tag_type parm.
1303 (cp_parser_template_name): Likewise.
1304 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
1305 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
1306 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
1307 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
1309 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1312 * semantics.c (constexpr_call): Fix typo in comment.
1313 (cxx_eval_vec_perm_expr): New.
1314 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
1316 2012-06-26 Richard Guenther <rguenther@suse.de>
1319 * mangle.c (write_array_type): Truncate the number-of-elements
1322 2012-06-25 Jason Merrill <jason@redhat.com>
1326 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
1327 if cp_unevaluated_operand is set.
1328 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
1331 * typeck.c (decay_conversion): Don't discard side-effects from
1332 expressions of nullptr_t.
1334 2012-06-25 Florian Weimer <fweimer@redhat.com>
1336 * init.c (build_new_1): Warn about (T[N]) for variable N, and
1339 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
1340 expressions. Handled now in build_new_1.
1342 2012-06-25 Jason Merrill <jason@redhat.com>
1345 * semantics.c (build_data_member_initialization): Always keep
1346 initializer for empty base.
1347 (cxx_eval_bare_aggregate): Discard it here.
1350 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
1351 (tsubst_expr) [OMP_FOR]: Here, too.
1353 2012-06-25 Jakub Jelinek <jakub@redhat.com>
1356 * class.c (check_bases_and_members): Avoid -Wuninitialized
1357 diagnostics for non-static const members or references if they
1360 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
1362 * parser.c (cp_parser_direct_declarator): Move virt-specifier
1363 parsing after late-specified return type parsing.
1365 2012-06-14 Jason Merrill <jason@redhat.com>
1368 * name-lookup.c (constructor_name_p): Don't try to look at the
1369 name of a DECLTYPE_TYPE.
1371 2012-06-18 Lawrence Crowl <crowl@google.com>
1373 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
1374 to TV_PHASE_OPT_GEN.
1376 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
1378 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
1380 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
1383 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
1384 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
1385 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
1387 2012-06-09 Jason Merrill <jason@redhat.com>
1389 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
1390 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
1391 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
1394 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
1395 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
1396 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
1397 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
1398 Don't return the decl.
1400 2012-06-11 Richard Guenther <rguenther@suse.de>
1403 * mangle.c (write_array_type): Use double-ints for array domain
1406 2012-06-07 Fabien ChĂȘne <fabien@gcc.gnu.org>
1409 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
1411 * class.c (insert_into_classtype_sorted_fields): New.
1412 (add_enum_fields_to_record_type): New.
1413 (count_fields): Adjust the comment.
1414 (add_fields_to_record_type): Likewise.
1415 (finish_struct_1): Move the code that inserts the fields for the
1416 sorted case, into insert_into_classtype_sorted_fields, and call
1418 (insert_late_enum_def_into_classtype_sorted_fields): Define.
1419 * decl.c (finish_enum_value_list): Call
1420 insert_late_enum_def_into_classtype_sorted_fields if a late enum
1421 definition is encountered.
1423 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1426 * typeck.c (cp_perform_integral_promotions): New, like
1427 perform_integral_promotions but also takes a tsubst_flags_t parameter.
1428 (pointer_diff): Add tsubst_flags_t parameter.
1429 (decay_conversion, cp_default_conversion, cp_build_array_ref,
1430 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
1431 build_reinterpret_cast_1, cp_build_modify_expr,
1432 convert_for_assignment): Adjust.
1433 * optimize.c (build_delete_destructor_body): Adjust.
1434 * init.c (expand_virtual_init, expand_default_init, build_new_1,
1435 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
1436 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
1437 * class.c (build_base_path): Adjust.
1438 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
1439 * method.c (synthesized_method_walk): Adjust flag and complain.
1440 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
1441 (build_typeid, build_dynamic_cast_1): Adjust.
1442 * except.c (initialize_handler_parm): Likewise.
1443 * typeck2.c (process_init_constructor_record): Likewise.
1444 * pt.c (tsubst_friend_class): Don't change flags.
1445 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
1446 finish_static_assert): Likewise.
1447 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
1449 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
1450 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
1452 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
1453 (implicit_conversion): Mask out tf_error with a FIXME.
1454 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
1455 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
1456 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1457 build_up_reference, convert_to_reference, cp_convert,
1458 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
1460 (convert_to_reference, ocp_convert): Use complain & tf_error instead
1461 of flags & LOOKUP_COMPLAIN.
1462 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
1463 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
1464 lookup_name_real, lookup_function_nonclass, lookup_name,
1465 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
1466 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
1468 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
1470 * decl.c: Do not include output.h.
1471 (start_decl): Remove code for flag_conserve_space.
1473 2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
1476 * parser.c (cp_parser_alias_declaration): Return earlier
1477 if an error occured.
1479 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1482 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
1483 to control enumeral mismatch in conditional expression too.
1485 2012-06-04 Sterling Augustine <saugustine@google.com>
1487 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
1488 * cp-lang.c (cxx_dwarf_name): Call them.
1490 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
1492 * semantics.c: Do not include output.h.
1493 * decl2.c: Likewise.
1494 * friend.c: Likewise.
1495 * typeck.c: Likewise.
1496 * typeck2.c: Likewise.
1497 * Make-lang.in: Fix dependencies.
1499 2012-06-01 Jason Merrill <jason@redhat.com>
1502 * parser.c (cp_parser_class_head): Apply attributes here.
1503 * semantics.c (begin_class_definition): Not here.
1504 * cp-tree.h: Adjust.
1507 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
1508 tentatively and the LHS has a parse error.
1511 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
1512 (instantiate_decl): Don't push_to_top_level for local class methods.
1513 (instantiate_class_template_1): Or for local classes.
1516 * pt.c (do_auto_deduction): Don't try to deduce from a
1517 type-dependent initializer.
1519 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
1522 * name-lookup.c (push_namespace): When error recovery is
1523 impossible just error out in duplicate_decls.
1525 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1527 * call.c: Do not include output.h.
1528 * class.c: Likewise.
1529 * except.c: Likewise.
1530 * friend.c: Likewise.
1533 * method.c: Likewise.
1534 * parser.c: Likewise.
1537 * search.c: Likewise.
1539 2012-05-30 Jason Merrill <jason@redhat.com>
1542 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1543 representing a bitwise copy of a glvalue.
1545 * tree.c (stabilize_expr): Tweak logic.
1548 * tree.c (stabilize_init): Side effects make the init unstable.
1550 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
1553 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1555 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
1558 * tree.c (stabilize_expr): Handle exp of void type.
1560 2012-05-26 Jason Merrill <jason@redhat.com>
1563 * call.c (convert_like_real) [ck_list]: Take array address directly.
1564 * typeck.c (decay_conversion): Reject decay of an array compound
1567 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
1570 * parser.c (cp_parser_member_declaration): A storage class is not
1571 allowed in a declaration of an anonymous aggregate in a class scope.
1573 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
1576 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1577 before calling constructor_name_p.
1579 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
1582 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1583 cp_parser_function_body): Add a bool parameter, true when parsing
1584 a function-try-block.
1585 (cp_parser_function_try_block): Pass true to the above.
1586 (cp_parser_function_definition_after_declarator,
1587 cp_parser_function_transaction): Adjust.
1589 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
1592 * decl2.c (delete_sanity): Extend 'deleting array' warning to
1595 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1598 * decl.c (grokdeclarator): Diagnose functions returning abstract
1599 class types as TYPENAME.
1600 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1601 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1602 * pt.c (tsubst): Likewise.
1603 * semantics.c (trait_expr_value): Likewise.
1605 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1608 * parser.c (cp_parser_attributes_opt): Enforce error checking of
1609 unbalanced parentheses in the presence of tentative parsing.
1611 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1614 * parser.c (cp_parser_new_type_id): Early return error_mark_node
1615 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1616 error_mark_node; tidy.
1617 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1618 avoid uninitialized warnings.
1619 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1620 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1621 returns error_mark_node.
1623 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1626 * except.c (is_admissible_throw_operand): Rename to
1627 is_admissible_throw_operand_or_catch_parameter and handle
1628 catch parameter too.
1629 (expand_start_catch_block): Use it.
1630 (build_throw): Adjust.
1632 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1635 * typeck.c (build_x_array_ref, build_x_conditional_expr,
1636 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1637 (finish_class_member_access_expr, build_x_indirect_ref,
1638 build_x_binary_op, build_x_compound_expr_from_list,
1639 build_x_compound_expr_from_vec): Adjust callers.
1640 * tree.c (build_min_nt_loc): New.
1641 (build_min_nt): Remove.
1642 * typeck2.c (build_x_arrow): Adjust callers.
1643 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1644 tsubst_copy_and_build): Likewise.
1645 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1646 finish_omp_atomic): Likewise.
1647 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1648 * parser.c (cp_parser_question_colon_clause,
1649 cp_parser_assignment_expression, cp_parser_expression,
1650 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1651 * cp-tree.h: Update.
1653 2012-05-16 Dodji Seketeli <dodji@redhat.com>
1655 PR preprocessor/7263
1656 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1657 the possible declarator specifiers so far.
1658 (struct cp_decl_specifier_seq::locations): Declare new member.
1659 (cp_decl_specifier_seq::{specs, type_location}): Remove.
1660 (decl_spec_seq_has_spec_p): Declare new function.
1661 * parser.c (cp_parser_check_decl_spec): Remove.
1662 (set_and_check_decl_spec_loc): Define new static function.
1663 (decl_spec_seq_has_spec_p): Define new public function.
1664 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1665 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1666 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1667 (cp_parser_alias_declaration): Set the locations for each
1668 declspec, using set_and_check_decl_spec_loc.
1669 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1670 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1671 new declspec location for specifiers. Use the new
1672 decl_spec_seq_has_spec_p.
1673 (cp_parser_type_specifier_seq): Use the new
1674 set_and_check_decl_spec_loc. Stop using
1675 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
1676 (, cp_parser_init_declarator): Use the new
1677 set_and_check_decl_spec_loc.
1678 (cp_parser_single_declaration, cp_parser_friend_p)
1679 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1680 Use the new decl_spec_seq_has_spec_p.
1681 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
1682 the more precise ds_redefined_builtin_type_spec location for
1683 diagnostics about re-declaring C++ built-in types.
1684 (start_decl, grokvardecl, grokdeclarator): Use the new
1685 decl_spec_seq_has_spec_p.
1687 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1690 * pt.c (tsubst_copy_and_build): Increase / decrease
1691 c_inhibit_evaluation_warnings around build_x_binary_op call.
1693 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1695 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1696 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1697 (TYPE_PTR_OR_PTRMEM_P): Add.
1698 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1699 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1700 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1701 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1702 casts_away_constness_r, casts_away_constness): Adjust.
1703 * init.c (build_zero_init_1): Adjust.
1704 * class.c (check_field_decls): Likewise.
1705 * decl.c (check_default_argument): Likewise.
1706 * rtti.c (target_incomplete_p): Likewise.
1707 * tree.c (zero_init_p): Likewise.
1708 * cxx-pretty-print.c (pp_cxx_ptr_operator,
1709 pp_cxx_abstract_declarator): Likewise.
1710 * typeck2.c (build_m_component_ref): Likewise.
1711 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1712 dependent_type_p_r): Likewise.
1713 * call.c (null_member_pointer_value_p, standard_conversion,
1714 add_builtin_candidate, build_conditional_expr_1, compare_ics):
1716 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1717 * cvt.c (cp_convert_to_pointer, ocp_convert,
1718 perform_qualification_conversions): Likewise.
1719 * mangle.c (write_type): Likewise.
1720 * name-lookup.c (arg_assoc_type): Likewise.
1722 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1724 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1726 (cp_parser_binary_expression): Rework to always update at the same
1727 time tree_type and loc.
1728 * call.c (print_z_candidate): Add location_t parameter.
1729 (print_z_candidates, convert_like_real, joust): Adjust.
1731 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
1734 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1736 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1739 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1740 tsubst_decl returns NULL_TREE.
1741 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1742 BOUND_TEMPLATE_TEMPLATE_PARM.
1744 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1747 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1748 * typeck.c (decay_conversion): Use error_at.
1749 * call.c (build_integral_nontype_arg_conv, convert_like_real,
1750 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1751 initialize_reference): Likewise.
1752 * cvt.c (warn_ref_binding): Add location_t parameter.
1753 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1754 convert_to_void, ): Use error_at and warning_at.
1756 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1759 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1760 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1762 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1765 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1767 (build_conditional_expr_1): Adjust.
1768 * typeck.c (build_x_indirect_ref, build_x_binary_op,
1769 build_x_unary_op): Add location_t parameter.
1770 (rationalize_conditional_expr, build_x_array_ref,
1771 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1773 * typeck2.c (build_x_arrow): Add location_t parameter.
1774 * semantics.c (finish_unary_op_expr): Likewise.
1775 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1776 * decl2.c (grok_array_decl): Add location_t parameter.
1777 * parser.c (cp_parser_postfix_open_square_expression,
1778 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1779 cp_parser_binary_expression, cp_parser_builtin_offsetof,
1780 do_range_for_auto_deduction, cp_convert_range_for,
1781 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1783 * pt.c (tsubst_copy_and_build): Adjust.
1784 * tree.c (maybe_dummy_object): Likewise.
1785 * cp-tree.h: Update declarations.
1787 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1789 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1791 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1794 * pt.c (instantiate_class_template_1): Increase / decrease
1795 c_inhibit_evaluation_warnings around the tsubst_expr call
1796 for STATIC_ASSERT_CONDITION.
1797 (tsubst_expr, case STATIC_ASSERT): Likewise.
1798 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1799 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1801 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1804 * call.c (build_over_call): Handle final member functions
1806 (build_new_method_call_1): Do not handle here.
1808 2012-05-02 Richard Guenther <rguenther@suse.de>
1810 * decl.c (grokdeclarator): Properly check for sizes that
1811 cover more than half of the address-space.
1813 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
1816 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1817 * decl2.c (grok_array_decl): Likewise.
1820 * parser.c (cp_parser_sizeof_operand): Require parentheses for
1823 2012-04-30 Dodji Seketeli <dodji@redhat.com>
1825 Fix location for static class members
1826 * decl.c (grokdeclarator): Use the location carried by the
1827 declarator for the DECL of the static class member.
1829 Fix va_arg type location
1830 * cp-tree.h (build_x_va_arg): Take an additional location
1832 * call.c (build_x_va_arg): Take a loc parameter for the location
1833 of the type of the va_arg expression.
1834 * parser.c (cp_parser_primary_expression): Pass the type of the
1835 type in the va_arg expression to build_x_va_arg.
1836 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1838 Make conversion warnings work on NULL with -ftrack-macro-expansion
1839 * call.c (conversion_null_warnings): Use the new
1840 expansion_point_location_if_in_system_header.
1841 * cvt.c (build_expr_type_conversion): Likewise.
1842 * typeck.c (cp_build_binary_op): Likewise.
1844 2012-04-30 Manuel López-Ibåñez <manu@gcc.gnu.org>
1846 * typeck.c (convert_for_assignment): Replace
1847 Wmissing-format-attribute with Wsuggest-attribute=format.
1848 * call.c (convert_for_arg_passing): Likewise.
1850 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
1853 * class.c (check_bases_and_members): Implement core/1333, do not
1854 disallow defaulted in the class body non-const ref special members.
1856 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1859 * call.c (tourney, perform_overload_resolution,
1860 build_operator_new_call, build_user_type_conversion_1,
1861 build_user_type_conversion, perform_overload_resolution,
1862 add_template_candidate, add_template_candidate_real,
1863 add_template_conv_candidate, add_builtin_candidates,
1864 add_builtin_candidate, build_builtin_candidate,
1865 add_conv_candidate, add_function_candidate, implicit_conversion,
1866 reference_binding, build_list_conv, conditional_conversion,
1867 add_candidates, can_convert_array, build_aggr_conv,
1868 build_array_conv, build_complex_conv, conditional_conversion):
1869 Add tsubst_flags_t parameter.
1870 (joust): Likewise, use it to handle SFINAE as if pedantic.
1871 (add_list_candidates, build_integral_nontype_arg_conv,
1872 perform_overload_resolution, build_new_function_call,
1873 build_operator_new_call, build_op_call_1,
1874 build_conditional_expr_1, build_new_op_1, convert_like_real,
1875 convert_arg_to_ellipsis, convert_default_arg,
1876 convert_for_arg_passing, build_over_call,
1877 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1878 perform_implicit_conversion_flags,
1879 perform_direct_initialization_if_possible,
1880 initialize_reference): Adjust.
1881 * typeck.c (casts_away_constness, casts_away_constness_r):
1882 Add tsubst_flags_t parameter.
1883 (convert_arguments, check_for_casting_away_constness,
1884 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1886 * decl.c (reshape_init_r, check_default_argument): Likewise.
1887 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1888 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1890 * init.c (build_new_1): Likewise.
1891 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1892 build_expr_type_conversion, ): Likewise.
1893 * search.c (check_final_overrider): Likewise.
1894 * cp-tree.h (build_user_type_conversion,
1895 build_operator_new_call, can_convert, can_convert_arg,
1896 can_convert_arg_bad, convert_default_arg,
1897 convert_arg_to_ellipsis, convert_for_arg_passing):
1900 2012-04-22 Jan Hubicka <jh@suse.cz>
1902 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1905 2012-04-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1908 * typeck.c (composite_pointer_type): Likewise.
1909 (cxx_sizeof_or_alignof_type): Likewise.
1910 (cp_build_array_ref): Likewise.
1911 (cp_build_function_call_vec): Likewise.
1912 (cp_build_addr_expr_1): Likewise.
1913 (convert_member_func_to_ptr): Likewise.
1914 * decl.c (check_tag_decl): Likewise.
1915 (check_static_variable_definition): Likewise.
1916 (compute_array_index_type): Likewise.
1917 (create_array_type_for_decl): Likewise.
1918 (grokdeclarator): Likewise.
1919 (grok_op_properties): Likewise.
1920 * error.c (maybe_warn_cpp0x): Likewise.
1921 * pt.c (maybe_process_partial_specialization): Likewise.
1922 (convert_template_argument): Likewise.
1923 (do_decl_instantiation): Likewise.
1924 (do_type_instantiation): Likewise.
1925 * parser.c (cp_parser_primary_expression): Likewise.
1926 (cp_parser_postfix_expression): Likewise.
1927 (cp_parser_unary_expression): Likewise.
1928 (cp_parser_question_colon_clause): Likewise.
1929 (cp_parser_lambda_introducer): Likewise.
1930 (cp_parser_lambda_declarator_opt): Likewise.
1931 (cp_parser_compound_statement): Likewise.
1932 (cp_parser_jump_statement): Likewise.
1933 (cp_parser_declaration_seq_opt): Likewise.
1934 (cp_parser_enum_specifier): Likewise.
1935 (cp_parser_enumerator_list): Likewise.
1936 (cp_parser_initializer_list): Likewise.
1937 (cp_parser_member_declaration): Likewise.
1938 * call.c (build_conditional_expr_1): Likewise.
1939 * friend.c (make_friend_class): Likewise.
1940 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1942 2012-04-21 Jan Hubicka <jh@suse.cz>
1944 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1945 * decl2.c (mark_needed): Likewise.
1946 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1948 * decl2.c (cxx_callgraph_analyze_expr): Remove.
1949 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1950 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1952 2012-04-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
1955 * typeck.c (cp_build_function_call_vec): Do not pretty-print
1956 expressions when caret is enabled.
1958 2012-04-20 Jan Hubicka <jh@suse.cz>
1961 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1962 list when target has no support for it.
1964 2012-04-20 Michael Matz <matz@suse.de>
1966 * error.c (pedwarn_cxx98): Move va_end call after user
1969 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
1972 * cp-tree.h (build_addr_func, decay_conversion,
1973 get_member_function_from_ptrfunc,
1974 build_m_component_ref, convert_member_func_to_ptr):
1975 Add tsubst_flags_t parameter.
1976 * typeck.c (cp_default_conversion): Add.
1977 (decay_conversion, default_conversion,
1978 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1979 Add tsubst_flags_t parameter and use it throughout.
1980 (cp_build_indirect_ref, cp_build_array_ref,
1981 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1982 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1983 build_const_cast_1, expand_ptrmemfunc_cst,
1984 convert_for_initialization): Adjust.
1985 * init.c (build_vec_init): Adjust.
1986 * decl.c (grok_reference_init, get_atexit_node): Likewise.
1987 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1988 * except.c (build_throw): Likewise.
1989 * typeck2.c (build_x_arrow): Likewise.
1990 (build_m_component_ref): Add tsubst_flags_t parameter and
1992 * pt.c (convert_nontype_argument): Adjust.
1993 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1994 * decl2.c (build_offset_ref_call_from_tree): Likewise.
1995 * call.c (build_addr_func): Add tsubst_flags_t parameter and
1997 (build_call_a, build_conditional_expr_1, build_new_op_1,
1998 convert_like_real, convert_arg_to_ellipsis, build_over_call,
1999 build_special_member_call): Adjust.
2000 * cvt.c (cp_convert_to_pointer, force_rvalue,
2001 build_expr_type_conversion): Likewise.
2003 2012-04-17 Tom de Vries <tom@codesourcery.com>
2005 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
2006 location argument to create_artificial_label.
2007 (finish_bc_block): Change return type to void. Remove body_seq
2008 parameter, and add block parameter. Append label to STMT_LIST and
2010 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
2011 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
2012 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
2013 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
2014 (genericize_break_stmt, genericize_omp_for_stmt): New function.
2015 (cp_gimplify_omp_for): Remove bc_continue processing.
2016 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
2017 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
2018 CONTINUE_STMT, and BREAK_STMT as unreachable.
2019 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
2020 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
2021 (cp_genericize_tree): New function, factored out of ...
2022 (cp_genericize): ... this function.
2024 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
2027 * semantics.c (build_constexpr_constructor_member_initializers):
2028 Check for function-try-block as function-body.
2030 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
2033 * parser.c (cp_parser_member_declaration): Check that
2034 initializer_token_start is non null before dereferencing it.
2036 2012-04-16 Jason Merrill <jason@redhat.com>
2039 * pt.c (determine_specialization): Instead of comparing the number
2040 of parms, check that tsubst gives the right answer.
2043 * pt.c (process_partial_specialization): Complain about a partial
2044 specialization with fewer args than primary template parms.
2047 * pt.c (convert_template_argument): Handle template template
2051 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
2052 template parameters.
2054 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2057 * call.c (op_error): Print types; when flag_diagnostics_show_caret
2058 is false print expressions too.
2059 (op_error_string): Add.
2061 2012-04-16 Jason Merrill <jason@redhat.com>
2064 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
2066 2012-04-16 Jan Hubicka <jh@suse.cz>
2068 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
2069 walkers to walk cgraph and varpool.
2071 2012-04-15 Jason Merrill <jason@redhat.com>
2074 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
2078 * pt.c (coerce_template_parms): Even if we aren't converting we
2079 want to expand argument packs.
2082 * mangle.c (write_type): nullptr_t is a builtin type.
2084 2012-04-14 Jan Hubicka <jh@suse.cz>
2086 * tree.c: Update field referenced for new cgraph/varpool layout.
2087 * decl2.c: Likewise.
2089 2012-04-13 Jason Merrill <jason@redhat.com>
2092 * pt.c (any_pack_expanson_args_p): New.
2093 (coerce_template_parms): Use it.
2096 * call.c (joust): Handle comparing list and non-list ctors.
2099 * decl2.c (finish_anon_union): Use cp_finish_decl.
2100 * error.c (dump_function_name): Avoid showing anonymous "name".
2102 2012-04-11 Fabien ChĂȘne <fabien@gcc.gnu.org>
2105 * parser.c (cp_parser_class_name): Call strip_using_decl and
2106 return the target decl.
2107 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
2108 to be stripped is NULL_TREE.
2109 (qualify_lookup): Call strip_using_decl and perform some checks on
2112 2012-04-11 Jason Merrill <jason@redhat.com>
2115 * decl.c (grokdeclarator): Strip the injected-class-name typedef
2116 if we are building a declaration or compound type.
2119 * decl.c (check_tag_decl): Don't complain about attributes if we
2120 don't even have a type.
2122 2012-04-10 Manuel López-Ibåñez <manu@gcc.gnu.org>
2124 * cvt.c (convert_to_void): Update comment.
2126 2012-04-05 Jason Merrill <jason@redhat.com>
2129 * semantics.c (finish_non_static_data_member): In templates, pass
2130 the decl to build_qualified_name.
2131 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
2133 2012-04-04 Jason Merrill <jason@redhat.com>
2136 * decl.c (finish_function): Update fntype after deducing return type.
2138 2012-04-03 Jason Merrill <jason@redhat.com>
2141 * pt.c (tsubst_initializer_list): A pack expansion with no elements
2142 means value-initialization.
2144 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2147 * class.c (deduce_noexcept_on_destructor,
2148 deduce_noexcept_on_destructors): New.
2149 (check_bases_and_members): Call the latter.
2150 * decl.c (grokfndecl): Call the former.
2151 * method.c (implicitly_declare_fn): Not static.
2152 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
2155 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2158 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
2159 warn for a zero as null pointer constant default argument.
2161 2012-03-29 Jason Merrill <jason@redhat.com>
2164 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
2166 2012-03-29 Jakub Jelinek <jakub@redhat.com>
2169 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
2170 if processing_template_decl.
2172 2012-03-29 Jason Merrill <jason@redhat.com>
2175 * call.c (compare_ics): Handle ck_aggr like ck_list.
2177 2012-03-28 Jason Merrill <jason@redhat.com>
2180 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
2181 we didn't get an explicit scope.
2182 * pt.c (tsubst_baselink): Likewise.
2184 2012-03-28 Richard Guenther <rguenther@suse.de>
2186 * typeck2.c (process_init_constructor_array): Use the proper
2187 type for computing the array length.
2189 2012-03-27 Meador Inge <meadori@codesourcery.com>
2192 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
2193 stripped child trees that are not pointer types.
2195 2012-03-21 Jason Merrill <jason@redhat.com>
2197 Implement return type deduction for normal functions with -std=c++1y.
2198 * cp-tree.h (FNDECL_USED_AUTO): New macro.
2199 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
2200 (dependent_lambda_return_type_node): Remove.
2201 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
2202 (struct language_function): Add x_auto_return_pattern field.
2203 (current_function_auto_return_pattern): New.
2204 (enum tsubst_flags): Add tf_partial.
2205 * decl.c (decls_match): Handle auto return comparison.
2206 (duplicate_decls): Adjust error message for auto return.
2207 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
2208 (cp_finish_decl): Don't do auto deduction for functions.
2209 (grokdeclarator): Allow auto return without trailing return type in
2211 (check_function_type): Defer checking of deduced return type.
2212 (start_preparsed_function): Set current_function_auto_return_pattern.
2213 (finish_function): Set deduced return type to void if not previously
2215 * decl2.c (change_return_type): Handle error_mark_node.
2216 (mark_used): Always instantiate functions with deduced return type.
2217 Complain about use if deduction isn't done.
2218 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
2219 initial return type.
2220 (cp_parser_lambda_body): Don't deduce return type in a template.
2221 (cp_parser_conversion_type_id): Allow auto in C++1y.
2222 * pt.c (instantiate_class_template_1): Don't mess with
2223 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
2224 (tsubst_copy_and_build): Likewise.
2225 (fn_type_unification, tsubst): Don't reduce the template parm level
2226 of 'auto' during deduction.
2227 (unify): Compare 'auto' specially.
2228 (get_bindings): Change test.
2229 (always_instantiate_p): Always instantiate functions with deduced
2231 (do_auto_deduction): Handle error_mark_node and lambda context.
2232 Don't check for use in initializer.
2233 (contains_auto_r): Remove.
2234 * search.c (lookup_conversions_r): Handle auto conversion function.
2235 * semantics.c (lambda_return_type): Handle null return. Don't mess
2236 with dependent_lambda_return_type_node.
2237 (apply_deduced_return_type): Rename from apply_lambda_return_type.
2238 * typeck.c (merge_types): Handle auto.
2239 (check_return_expr): Do auto deduction.
2240 * typeck2.c (add_exception_specifier): Fix complain check.
2242 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
2245 * class.c (check_field_decls): Call literal_type_p only
2248 2012-03-22 Jakub Jelinek <jakub@redhat.com>
2251 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
2252 on CLASS_TYPE_P types.
2254 2012-03-20 Jason Merrill <jason@redhat.com>
2256 * lex.c (init_reswords): Use >= for cxx_dialect test.
2257 * parser.c (cp_parser_exception_specification_opt): Likewise.
2259 * mangle.c (write_type): Handle 'auto'.
2260 * init.c (build_new): Don't do auto deduction where it might
2261 affect template mangling.
2264 * decl.c (reshape_init_class): Handle repeated reshaping.
2265 * search.c (lookup_field_1): Add sanity check.
2267 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2270 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
2271 * tree.c (xvalue_p): Define.
2272 * typeck.c (maybe_warn_about_useless_cast): Define.
2273 (build_reinterpret_cast, build_const_cast,
2274 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
2275 * rtti.c (build_dynamic_cast): Likewise.
2276 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
2277 c_inhibit_evaluation_warnings before/after the build_* calls.
2279 2012-03-15 Jason Merrill <jason@redhat.com>
2282 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
2284 2012-03-15 Manuel López-Ibåñez <manu@gcc.gnu.org>
2287 * error.c (print_instantiation_partial_context): Use
2288 template_backtrace_limit.
2290 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2292 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
2294 2012-03-14 Jakub Jelinek <jakub@redhat.com>
2297 * parser.c (lookup_literal_operator): Return fn only if
2298 processed all arguments from args vector and argtypes is
2301 2012-01-30 Dodji Seketeli <dodji@redhat.com>
2304 * cp-tree.h (template_type_parameter_p): Declare new function.
2305 (parameter_of_template_p): Remove.
2306 * pt.c (template_type_parameter_p): Define new function.
2307 (parameter_of_template_p): Remove.
2308 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
2309 on parameter_of_template_p anymore. Compare the level of the
2310 template parameter to the depth of the template.
2312 2011-12-15 Dodji Seketeli <dodji@redhat.com>
2314 * call.c (standard_conversion, build_integral_nontype_arg_conv)
2315 (build_new_op_1, convert_like_real, is_subseq)
2316 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
2317 (joust): Use next_conversion instead of accessing fields of struct
2318 conversion directly.
2320 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2323 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
2324 division by zero warnings.
2326 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
2328 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
2329 build_ptrmemfunc): Consistently forward the tsubst_flags_t
2331 * call.c (resolve_args): Likewise.
2333 2012-03-07 Jason Merrill <jason@redhat.com>
2336 * mangle.c (write_literal_operator_name): The length comes after the
2339 2012-03-05 Jakub Jelinek <jakub@redhat.com>
2341 * pt.c (local_specializations): Change from htab_t into
2342 struct pointer_map_t *.
2343 (retrieve_local_specializations, register_local_specialization,
2344 tsubst_pack_expansion, instantiate_decl): Adjust users.
2345 (eq_local_specializations, hash_local_specialization): Remove.
2347 2012-03-05 Jason Merrill <jason@redhat.com>
2350 * decl2.c (determine_visibility): Correct calculation of class
2352 * decl.c (check_tag_decl): Adjust warning.
2354 * method.c (synthesized_method_walk): Cleanups don't affect the EH
2357 2012-03-03 Jason Merrill <jason@redhat.com>
2359 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
2362 * call.c (build_aggr_conv): Call reshape_init.
2363 (convert_like_real): Likewise.
2364 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
2367 * mangle.c (write_nested_name): Use decl_mangling_context.
2368 (write_prefix, write_template_prefix): Likewise.
2371 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
2373 * class.c (add_method): Always build an OVERLOAD for using-decls.
2374 * search.c (lookup_member): Handle getting an OVERLOAD for a
2377 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2380 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
2382 * cp-tree.h (build_x_arrow): Adjust prototype.
2383 * pt.c (tsubst_copy_and_build): Adjust call.
2384 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
2386 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2388 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
2390 2012-02-29 Jason Merrill <jason@redhat.com>
2393 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
2394 (shadow_tag): From here.
2395 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
2397 2012-02-21 Jakub Jelinek <jakub@redhat.com>
2400 * typeck.c (check_literal_operator_args): Initialize *long_double_p
2401 and *long_long_unsigned_p even if processing_template_decl.
2403 2012-02-16 Jason Merrill <jason@redhat.com>
2406 * decl.c (define_label): Use timevar_cond_start/stop.
2408 2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
2411 * decl.c (xref_basetypes): call dependent_scope_p instead of
2414 2012-02-16 Jason Merrill <jason@redhat.com>
2417 * error.c (dump_expr): Handle lambda closures specifically.
2419 2012-02-14 Jason Merrill <jason@redhat.com>
2421 * parser.c (cp_parser_explicit_instantiation): Give a warning
2422 for ignored attributes on explicit class instantiation.
2424 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2427 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
2428 lookup_label on label's name and set TREE_USED.
2430 2012-02-14 Jason Merrill <jason@redhat.com>
2433 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
2435 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2438 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
2439 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
2441 2012-02-07 Jason Merrill <jason@redhat.com>
2444 * semantics.c (cx_check_missing_mem_inits): Handle unions.
2445 Fix constexpr default constructor logic.
2448 * pt.c (tsubst): Strip uninstantiated typedef.
2450 2012-02-06 Jason Merrill <jason@redhat.com>
2453 * cvt.c (build_expr_type_conversion): Check for template conversion.
2455 2012-01-31 Jason Merrill <jason@redhat.com>
2458 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
2459 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
2460 (tsubst_pack_expansion): Check it.
2462 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2465 * class.c (explain_non_literal_class): Correctly handle implicitly
2466 deleted constructors.
2468 2012-01-27 Jakub Jelinek <jakub@redhat.com>
2471 * pt.c (tsubst_pack_expansion): Delete and restore
2472 local_specialization whenever need_local_specialization, not just
2473 when saved_local_specializations is non-NULL.
2475 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
2478 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
2479 as TREE_OPERAND (t, 1).
2481 2012-01-24 Jason Merrill <jason@redhat.com>
2484 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
2487 * tree.c (called_fns_equal): Check template args.
2488 (cp_tree_equal): Call it.
2490 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
2491 Patrick Marlier <patrick.marlier@gmail.com>
2494 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
2495 thunk for set_one_vmethod_tm_attributes.
2497 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2500 * call.c (build_over_call): Check for error_mark_node as
2501 TREE_VALUE when default arguments are processed.
2503 2012-01-23 Jason Merrill <jason@redhat.com>
2506 * decl2.c (determine_visibility): Check for visibility attribute
2507 on template specialization.
2509 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2512 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
2514 2012-01-23 Jason Merrill <jason@redhat.com>
2517 * class.c (add_method): Set OVL_USED for using-decls.
2518 * tree.c (ovl_scope): New.
2519 * cp-tree.h: Declare it.
2520 * parser.c (cp_parser_template_name): Use it.
2521 * semantics.c (baselink_for_fns): Likewise.
2522 * name-lookup.c (set_inherited_value_binding_p): Likewise.
2524 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2527 * pt.c (lookup_template_class_1): Check context returned by
2528 tsubst for error_mark_node.
2530 2012-01-19 Kai Tietz <ktietz@redhat.com>
2533 * decl2.c (save_template_attributes): Use merge_attributes
2534 instead of chaining up via TREE_CHAIN.
2536 2012-01-19 Jason Merrill <jason@redhat.com>
2539 * class.c (finish_struct): Call add_method here for function usings.
2540 * semantics.c (finish_member_declaration): Not here.
2542 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
2545 * typeck2.c (store_init_value): Within a template guard
2546 cxx_constant_value with require_potential_constant_expression.
2547 * pt.c (convert_nontype_argument): Likewise.
2549 2012-01-16 Jakub Jelinek <jakub@redhat.com>
2552 * mangle.c (write_template_arg_literal): Handle complex.
2554 2012-01-16 Jason Merrill <jason@redhat.com>
2557 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2560 * typeck.c (build_static_cast_1): Handle bit-fields properly.
2562 2012-01-13 Ian Lance Taylor <iant@google.com>
2565 * typeck.c (enum_cast_to_int): New static function.
2566 (cp_build_binary_op): When handling warn_sign_compare, don't test
2567 for TREE_NO_WARNING. Do call enum_cast_to_int.
2568 * call.c (avoid_sign_compare_warnings): Remove static function.
2569 (build_new_op_1): Don't call avoid_sign_compare_warnings.
2571 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
2573 * decl2.c: Do not include tree-mudflap.h
2574 * semantics.c: Likewise.
2576 2012-01-13 Jason Merrill <jason@redhat.com>
2579 * semantics.c (finish_break_stmt): Avoid adding an unreachable
2583 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2584 when reducing the visibility.
2587 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2589 2012-01-12 Jason Merrill <jason@redhat.com>
2592 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2595 2012-01-13 Dodji Seketeli <dodji@redhat.com>
2598 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2599 Set the pointer to the last block of the constructor to the
2601 (build_constexpr_constructor_member_initializers): Get
2602 build_data_member_initialization a chance to deal with more
2603 statements before we choke.
2605 2012-01-12 Jason Merrill <jason@redhat.com>
2608 * mangle.c (write_expression): Mangle BASELINK scope if
2609 BASELINK_QUALIFIED_P.
2610 * search.c (adjust_result_of_qualified_name_lookup): Set
2611 BASELINK_QUALIFIED_P.
2612 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2613 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2614 adjust_result_of_qualified_name_lookup for non-qualified names.
2617 * pt.c (unify): Handle error_mark_node.
2619 2012-01-11 Jason Merrill <jason@redhat.com>
2622 * call.c (standard_conversion): For ptrmemfuncs, compare the
2626 * mangle.c (find_substitution): A type is only a substitution
2627 match if we're looking for a type.
2628 (write_nested_name): Use decl_mangling_context.
2630 * decl.c (decls_match): Assert that the arguments are decls.
2633 * pt.c (resolve_overloaded_unification): Compare types with
2634 same_type_p, not decls_match.
2636 2012-01-10 Jason Merrill <jason@redhat.com>
2639 * class.c (build_base_path): Diagnose ambiguous base.
2642 * semantics.c (cxx_eval_call_expression): Always retry previously
2643 non-constant expressions.
2645 2012-01-06 Jason Merrill <jason@redhat.com>
2649 * parser.c (cp_parser_new_expression): Set
2650 type_definition_forbidden_message.
2656 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2657 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
2659 (write_template_arg): Fix mangling of class-scope functions and
2661 (mangle_decl): Update suggested -fabi-version argument.
2662 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2663 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2664 * tree.c (dependent_name): No longer static.
2665 * cp-tree.h: Declare it.
2666 * pt.c (unify): Defer handling of unconverted functions.
2668 * mangle.c (mangle_decl): Don't generate mangling aliases
2669 for maybe-in-charge [cd]tors.
2671 * error.c (dump_expr): Print type of CONSTRUCTOR.
2673 2012-01-05 Dodji Seketeli <dodji@redhat.com>
2676 * parser.c (cp_parser_alias_declaration): Get out early upon
2677 errors in the identifier or the attributes.
2679 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
2682 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2683 the tree returned by build_x_binary_op.
2685 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2688 * parser.c (cp_parser_postfix_open_square_expression): Handle
2689 postfix-expression [ braced-init-list ].
2691 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2694 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2695 call decay_conversion on v.
2697 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2700 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2701 declaration followed by specialization.
2703 2012-01-03 Jakub Jelinek <jakub@redhat.com>
2706 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2707 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2709 2012-01-02 Jason Merrill <jason@redhat.com>
2713 * method.c (walk_field_subobs): Don't check for uninitialized
2715 (synthesized_method_walk): Check here.
2719 * parser.c (cp_parser_cache_defarg): Split out...
2720 (cp_parser_parameter_declaration): ...from here.
2721 (cp_parser_save_nsdmi): Use it.
2722 (cp_parser_cache_group): Remove CPP_COMMA support.
2724 2012-01-02 Dodji Seketeli <dodji@redhat.com>
2727 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2730 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
2733 * typeck2.c (digest_init_r): Use copy_init when initializing
2736 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2739 * decl.c (build_enumerator): Don't call perform_integral_promotions
2742 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2745 * typeck.c (build_reinterpret_cast_1): Implement resolution of
2748 2012-01-01 Fabien ChĂȘne <fabien@gcc.gnu.org>
2750 * parser.c (cp_parser_using_declaration): Add a warning about
2751 deprecated access declarations when no errors were encountered
2752 while parsing the access declaration. Save the first token in
2753 order to emit the warning at the right place.
2755 Copyright (C) 2012 Free Software Foundation, Inc.
2757 Copying and distribution of this file, with or without modification,
2758 are permitted in any medium without royalty provided the copyright
2759 notice and this notice are preserved.