1 2012-10-25 Jason Merrill <jason@redhat.com>
3 * semantics.c (finish_omp_threadprivate): Call complete_type.
5 * class.c (one_inherited_ctor): Warn about variadic inherited ctor.
7 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10 * typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
11 * call.c (build_conditional_expr_1): Likewise.
13 2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
16 * parser.c (cp_parser_template_parameter): When
17 cp_parser_parameter_declaration parsed a default argument don't
18 see if *is_parameter_pack needs setting.
20 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
23 * semantics.c (cx_check_missing_mem_inits): Handle anonymous union
26 2012-10-23 Jakub Jelinek <jakub@redhat.com>
29 * pt.c (tsubst_copy, tsubst_copy_and_build) <case SIZEOF_EXPR>: Use
30 tsubst instead of tsubst_copy* on types.
33 * decl2.c (cplus_decl_attributes): Don't return early
34 if attributes is NULL.
36 2012-10-18 Paolo Carlini <paolo.carlini@oracle.com>
39 * decl.c (reshape_init_array_1): Avoid infinite loops.
41 2012-10-15 Alexandre Oliva <aoliva@redhat.com>
42 Paolo Carlini <paolo.carlini@oracle.com>
45 * call.c (build_new_op_1): Filter out operator functions that don't
46 satisfy enum-conversion match requirements.
48 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
51 * parser.c (cp_parser_optional_template_keyword): When -pedantic
52 and C++98 mode restore pre-Core/468 behavior.
54 2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
57 * parser.c (cp_parser_optional_template_keyword): Implement
58 Core/468, allow outside template.
60 2012-10-14 Jason Merrill <jason@redhat.com>
61 Ville Voutilainen <ville.voutilainen@gmail.com>
63 Implement C++11 inheriting constructors.
64 * cp-tree.h (cpp0x_warn_str): Add CPP0X_INHERITING_CTORS.
65 (DECL_INHERITED_CTOR_BASE, SET_DECL_INHERITED_CTOR_BASE): New.
66 (special_function_kind): Add sfk_inheriting_constructor.
67 * class.c (add_method): An inheriting ctor is hidden by a
69 (one_inheriting_sig, one_inherited_ctor): New.
70 (add_implicitly_declared_members): Handle inheriting ctors.
71 * error.c (maybe_warn_cpp0x): Handle CPP0X_INHERITING_CTORS.
72 * init.c (emit_mem_initializers): Don't set LOOKUP_DEFAULTED
73 for an inheriting constructor.
74 * method.c (type_has_trivial_fn): Handle sfk_inheriting_constructor.
75 (type_set_nontrivial_flag): Likewise.
76 (add_one_base_init): Split out from...
77 (do_build_copy_constructor): ...here. Handle inheriting constructors.
78 (locate_fn_flags): Handle a list of arg types.
79 (synthesized_method_walk): Handle inheriting constructors.
80 (maybe_explain_implicit_delete): Likewise.
81 (deduce_inheriting_ctor): New.
82 (implicitly_declare_fn): Handle inheriting constructors.
83 * name-lookup.c (push_class_level_binding_1): An inheriting constructor
84 does not declare the base's name.
85 (do_class_using_decl): Allow inheriting constructors.
86 * pt.c (template_parms_to_args): Split from current_template_args.
87 (add_inherited_template_parms): New.
88 (tsubst_decl): Handle inheriting constructors.
89 * tree.c (special_function_p): Handle inheriting constructors.
91 2012-10-12 Jakub Jelinek <jakub@redhat.com>
94 * semantics.c (finish_call_expr): Pass array of 3 sizeof_arg
95 trees and locs (corresponding to first 3 arguments) to
96 sizeof_pointer_memaccess_warning.
98 2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>
101 * decl.c (grokfndecl): When checking for ::main declarations
102 use PROCESSING_REAL_TEMPLATE_DECL_P().
104 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
107 * call.c (build_new_op_1): Pass RO_ARROW_STAR to cp_build_indirect_ref.
108 * typeck.c (cp_build_indirect_ref): Handle RO_ARROW_STAR.
110 2012-10-11 Jason Merrill <jason@redhat.com>
112 * cp-tree.h (DECL_THUNKS): NULL_TREE for non-virtual functions.
113 (SET_DECL_THUNKS): New.
114 * decl.c (duplicate_decls): Adjust.
115 * method.c (make_thunk): Adjust.
117 * decl.c (grokdeclarator): Set DECL_GNU_TLS_P for static data
120 2012-10-09 Dodji Seketeli <dodji@redhat.com>
122 PR c++/53540 - using fails to be equivalent to typedef
123 * cp-tree.h (TYPE_TEMPLATE_INFO): For an alias that is not an
124 instance of alias template, don't look for its TEMPLATE_INFO in
126 (alias_template_specialization_p): Take const_tree.
127 * pt.c (alias_template_specialization_p): Take a const_tree.
128 Don't call primary_template_instantiation_p.
129 (primary_template_instantiation_p): Call
130 alias_template_specialization_p.
132 2012-10-10 Dodji Seketeli <dodji@redhat.com>
134 * parser (cp_parser_statement): Parse c++11 attributes
136 (cp_parser_std_attribute_spec_seq): Do not warn too early about
137 using c++11 attributes in non c++11 mode.
139 2012-10-10 Dehao Chen <dehao@google.com>
141 * cp-gimplify.c (cp_genericize_r): Set location for TRY expr.
143 2012-10-09 Lawrence Crowl <crowl@google.com>
145 * Make-lang.in (class.o): Add dependence on hash-table.h.
147 (semantics.o): Likewise.
148 * class.c (fixed_type_or_null): Change to new type-safe hash table.
149 * tree.c (verify_stmt_tree): Likewise.
150 (verify_stmt_tree_r): Likewise.
151 * semantics.c (struct nrv_data): Likewise.
153 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
156 * typeck.c (build_x_binary_op): Update warn_about_parentheses call.
157 * parser.c (cp_parser_binary_expression): Use SET_EXPR_LOCATION
160 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
163 * typeck.c (cp_build_binary_op): Handle mixed scalar-vector
165 [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise.
167 2012-10-08 Jakub Jelinek <jakub@redhat.com>
170 * tree.c (cp_tree_equal): Handle FIELD_DECL.
172 2012-10-08 Jason Merrill <jason@redhat.com>
174 Allow dynamic initialization of thread_locals.
175 * decl.c: Define tls_aggregates.
176 (expand_static_init): Remove sorry. Add to tls_aggregates.
177 * cp-tree.h: Declare tls_aggregates.
178 * call.c (set_up_extended_ref_temp): Add to tls_aggregates.
179 * decl2.c (var_needs_tls_wrapper): New.
180 (var_defined_without_dynamic_init): New.
181 (get_tls_init_fn, get_tls_wrapper_fn): New.
182 (generate_tls_wrapper, handle_tls_init): New.
183 (cp_write_global_declarations): Call handle_tls_init and
185 * mangle.c (write_guarded_var_name): Split out from..
186 (mangle_guard_variable): ...here.
187 (mangle_tls_init_fn, mangle_tls_wrapper_fn): Use it.
188 (decl_tls_wrapper_p): New.
189 * semantics.c (finish_id_expression): Replace use of thread_local
190 variable with a call to its wrapper.
192 * decl.c (get_thread_atexit_node): New.
193 (register_dtor_fn): Use it for TLS.
195 Partial implementation of C++11 thread_local.
196 * decl.c (cp_finish_decl): Remove errors about non-trivial
197 initialization and destruction of TLS variables.
198 (register_dtor_fn): Add sorry about TLS variables.
199 (expand_static_init): Add sorry about non-local TLS variables,
200 or error with __thread.
201 Don't emit thread-safety guards for local TLS variables.
202 (grokdeclarator): thread_local in a function implies static.
203 * decl.h: Adjust prototype.
204 * decl2.c (get_guard): Copy DECL_TLS_MODEL.
205 * parser.c (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
206 (set_and_check_decl_spec_loc): Take the token rather than the location.
207 Distinguish between __thread and thread_local.
208 (cp_parser_set_storage_class): Don't complain about thread_local before
210 (token_is__thread): New.
211 * call.c (make_temporary_var_for_ref_to_temp): Handle TLS.
212 * cp-tree.h (DECL_GNU_TLS_P): New.
213 (cp_decl_specifier_seq): Add gnu_thread_keyword_p.
215 2012-10-08 Dodji Seketeli <dodji@redhat.com>
217 PR c++/53528 C++11 attribute support
218 * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
219 (enum cp_decl_spec::ds_std_attribute): New enumerator.
220 (struct cp_decl_specifier_seq::std_attributes): New field.
221 (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
223 (check_tag_decl): Take an extra parameter for explicit
225 * decl.c (warn_misplaced_attr_for_class_type): Extract from ...
226 (check_tag_decl): ... here. Add check for c++11 attributes being
227 applied to an explicit instantiation. Take an extra parameter for
228 explicit instantiations.
229 (grokdeclarator): Make sure a c++11 attribute after an array
230 declarator appertains to the array, an attribute after a function
231 declarator appertains to the function type, an attribute after a
232 declarator-id appertains to the entity being declared, and an
233 attribute after a pointer declarator appertain to the pointer.
234 * decl2.c (is_late_template_attribute): Use get_attribute_name.
235 * error.c (maybe_warn_cpp0x): Support
236 CPP0X_GENERALIZED_ATTRIBUTES.
237 * parser.c (cp_next_tokens_can_be_attribute_p)
238 (cp_next_tokens_can_be_gnu_attribute_p)
239 (cp_next_tokens_can_be_std_attribute_p)
240 (cp_nth_tokens_can_be_attribute_p)
241 (cp_nth_tokens_can_be_gnu_attribute_p)
242 (cp_nth_tokens_can_be_std_attribute_p)
243 (cp_parser_gnu_attribute_list, cp_parser_std_attribute)
244 (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
245 (cp_parser_attributes_opt, cp_parser_std_attribute_list): New
247 (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
248 (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
249 (cp_parser_postfix_expression): Disallow "[[" tokens here.
250 (cp_parser_label_for_labeled_statement): Use take an extra
251 parameter for attributes.
252 (cp_parser_block_declaration): Use
253 cp_nth_tokens_can_be_std_attribute_p here.
254 (cp_parser_decl_specifier_seq): Likewise. Store C++11 attributes
255 that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
256 declaration. Emit proper warning about misplaced c++11 attributes
258 (cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
259 (cp_parser_init_declarator): Parsing attributes here is no more a
260 GNU extension in c++-11.
261 (cp_parser_type_specifier_seq): Use
262 cp_next_tokens_can_be_attribute_p.
263 (cp_parser_direct_declarator): Likewise. Hang c++11 attributes
264 following the declarator to its syntactic construct. It'll later
265 be applied to the proper appertaining entity by grokdeclarator.
266 (cp_parser_ptr_operator): Likewise.
267 (make_declarator): Initialize cp_declarator::std_attribute.
268 (make_pointer_declarator, make_reference_declarator)
269 (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
270 attributes that appertain to the pointer/reference in argument.
271 (cp_parser_ptr_operator): Take an out parameter for c++11
272 attributes. Update comments.
273 (cp_parser_new_declarator_opt)
274 (cp_parser_conversion_declarator_opt): Adjust.
275 (cp_parser_declarator): Likewise. Handle C++11 attributes.
276 Rename attributes to gnu_attribute for better legibility.
277 (cp_parser_simple_declaration): Update comment.
278 (cp_parser_class_specifier_1): Parse GNU attributes specifically
279 (cp_parser_enum_specifier): Accept only gnu attributes after the
281 (cp_parser_member_declaration): Don't clear attributes -- intended
282 for the entity being declared -- too early because check_tag_decl
284 (cp_parser_statement): Update comment. Parse optional c++11
285 attributes at the beginning of the relevant kind of statements and
286 ignore them, for now, unless when calling
287 cp_parser_label_for_labeled_statement.
288 (cp_parser_label_for_labeled_statement): Take c++11 attributes
290 * semantics.c (potential_constant_expression_1): Likewise.
291 * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
294 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
296 * pt.c (fold_non_dependent_expr_sfinae): Remove static specifier.
297 (tsubst_copy_and_build): Use get_target_expr_sfinae.
298 * call.c (build_conditional_expr_1, convert_like_real): Likewise.
299 * cvt.c (build_up_reference): Likewise.
300 (ocp_convert): Use abstract_virtuals_error_sfinae.
301 (build_up_reference): Propagate complain to cp_build_addr_expr.
302 * decl.c (compute_array_index_type): Use fold_non_dependent_expr_sfinae.
303 * cp-tree.h: Update declarations.
305 * cvt.c (build_expr_type_conversion): Tidy.
307 * tree.c (stabilize_aggr_init): Change to static.
309 2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
312 * semantics.c (is_normal_capture_proxy): Return true for
313 error_mark_node as DECL_VALUE_EXPR.
315 2012-10-05 Jakub Jelinek <jakub@redhat.com>
317 * cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
318 * tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
320 * mangle.c (write_expression): Likewise.
321 * cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
322 * error.c (dump_expr): Likewise.
323 * parser.c (cp_parser_unary_expression): For sizeof call
324 cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
325 return SIZEOF_EXPR with the operand.
326 * pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
327 call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
328 return SIZEOF_EXPR with tsubsted operand.
329 (value_dependent_expression_p): Handle SIZEOF_EXPR with
331 (instantiation_dependent_r): Likewise.
332 * call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
333 * semantics.c (finish_call_expr): Call
334 sizeof_pointer_memaccess_warning if needed.
335 (cxx_eval_constant_expression): Handle SIZEOF_EXPR.
336 (potential_constant_expression_1): Remove early exit for
337 C++98. Handle PROPERTY_REF.
338 * decl.c (duplicate_decls): When redeclaring a builtin function,
339 keep the merged decl builtin also if newdecl is a gnu_inline
341 (fold_sizeof_expr_r): New function.
342 (compute_array_index_type): Fold SIZEOF_EXPRs in itype.
343 * cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
344 * typeck.c (cp_build_binary_op): For warn_for_sign_compare
345 try harder using maybe_constant_value to get INTEGER_CSTs.
347 * decl.c (stabilize_vla_size): Call pointer_set_destroy
350 2012-10-04 Arnaud Charlet <charlet@adacore.com>
352 * decl2.c (cp_write_global_declarations): Fix handling of
355 2012-10-03 Jakub Jelinek <jakub@redhat.com>
358 * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
359 not ignoring the second operand, pass the original second operand
360 and not one with stripped nops to cxx_eval_constant_expression.
362 2012-10-01 Jason Merrill <jason@redhat.com>
364 * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
365 for a constructor call.
366 (decl_jump_unsafe): So don't bother checking
367 type_has_nontrivial_default_init.
368 * call.c (set_up_extended_ref_temp): Set
369 DECL_NONTRIVIALLY_INITIALIZED_P.
371 * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
372 (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
373 (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
374 * name-lookup.c (hidden_name_p): Use it.
376 * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
377 * decl.c (cp_make_fname_decl): Adjust.
379 2012-09-30 Sharad Singhai <singhai@google.com>
381 * decl2.c (cp_write_global_declarations): Use a different method
382 to determine if the dump has ben initialized.
384 2012-09-29 Paolo Carlini <paolo.carlini@oracle.com>
387 * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
389 * pt.c (tsubst_copy_and_build): Adjust.
390 * parser.c (cp_parser_postfix_expression): Likewise.
391 * cp-tree.h: Adjust declaration.
393 2012-09-28 Dodji Seketeli <dodji@redhat.com>
395 PR c++/54372 - unused attribute inactive on dependant entities
396 * decl2.c (is_late_template_attribute): "unused" attribute is to
397 be applied at compile time.
399 2012-09-25 Dodji Seketeli <dodji@redhat.com>
401 PR c++/29028 - Missed unused warning on using declaration
402 * decl.c (poplevel<warn_unused*>): Do not forget that some local
403 bindings are represented by a TREE_LIST.
405 2012-09-25 Dodji Seketeli <dodji@redhat.com>
407 PR c++/53551 - -Wunused-local-typedefs misses uses
408 * decl.c (make_typename_type): Record the use of typedefs.
410 2012-09-27 Jakub Jelinek <jakub@redhat.com>
412 * init.c (build_new_1): Don't test TREE_CONSTANT
415 2012-09-25 Paolo Carlini <paolo.carlini@oracle.com>
418 * parser.c (cp_parser_template_id): In C++11 mode simply accept
421 2012-09-25 Zhenqiang Chen <zhenqiang.chen@linaro.org>
424 * typeck.c (cp_build_binary_op): Check side effects before generating
425 pfn and delta related expressions.
427 2012-09-24 Lawrence Crowl <crowl@google.com>
429 * init.c (build_new_1): Change to new double_int API.
430 * decl.c (build_enumerator): Likewise.
431 * typeck2.c (process_init_constructor_array): Likewise.
432 * mangle.c (write_array_type): Likewise.
434 2012-09-24 Paolo Carlini <paolo.carlini@oracle.com>
437 * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
440 2012-09-24 Jason Merrill <jason@redhat.com>
442 * decl.c (get_atexit_node): Remove dead code.
444 * Make-lang.in (cp/parser.o): Depend on decl.h.
446 2012-09-20 Paolo Carlini <paolo.carlini@oracle.com>
449 * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
450 argument don't call unqualified_name_lookup_error.
452 2012-09-19 Marc Glisse <marc.glisse@inria.fr>
455 * semantics.c (finish_decltype_type): Make vectors not opaque.
457 2012-09-17 Jason Merrill <jason@redhat.com>
460 * pt.c (instantiate_alias_template): New.
462 (push_access_scope): Allow TYPE_DECL.
464 2012-09-14 Jason Merrill <jason@redhat.com>
467 * typeck2.c (check_narrowing): Avoid false positives on conversion
470 2012-09-14 Marc Glisse <marc.glisse@inria.fr>
473 * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
474 NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
476 2012-09-14 Paolo Carlini <paolo.carlini@oracle.com>
478 * decl.c (make_typename_type): Only error out if tf_error is set
481 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
482 Manuel López-Ibåñez <manu@gcc.gnu.org>
485 * init.c (perform_member_init): Use OPT_Winit_self instead of
488 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
490 * typeck.c (build_indirect_ref, build_function_call,
491 build_function_call_vec, build_binary_op, build_unary_op,
492 build_compound_expr, build_c_cast, build_modify_expr): Remove
493 uses of ATTRIBUTE_UNUSED on the parameters.
494 * class.c (set_linkage_according_to_type, resort_type_method_vec,
495 dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
497 * decl.c (local_variable_p_walkfn): Likewise.
498 * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
499 * error.c (find_typenames_r): Likewise.
500 * tree.c (verify_stmt_tree_r, bot_replace,
501 handle_java_interface_attribute, handle_com_interface_attribute,
502 handle_init_priority_attribute, c_register_addr_space): Likewise.
503 * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
504 * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
505 * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
507 * semantics.c (dfs_calculate_bases_pre): Likewise.
508 * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
510 * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
511 cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
512 cp_parser_omp_clause_untied): Likewise.
513 * mangle.c (write_unnamed_type_name,
514 discriminator_for_string_literal): Likewise.
515 * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
516 * lex.c (handle_pragma_vtable, handle_pragma_unit,
517 handle_pragma_interface, handle_pragma_implementation,
518 handle_pragma_java_exceptions): Likewise.
520 2012-09-13 Jason Merrill <jason@redhat.com>
523 * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
524 address, make sure the value is constant.
527 * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
530 * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
533 2012-09-10 Paolo Carlini <paolo.carlini@oracle.com>
537 * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
538 require_complete_type_sfinae.
539 (build_op_delete_call, build_over_call): Adjust.
540 * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
542 (cp_build_function_call_vec): Adjust.
543 * init.c (build_new_1): Likewise.
544 * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
546 * optimize.c (build_delete_destructor_body): Likewise.
547 * cp-tree.h: Adjust declarations.
549 * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
551 2012-09-10 Jason Merrill <jason@redhat.com>
555 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
556 for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
559 * decl.c (move_signature_fn_p): Split out from move_fn_p.
560 * method.c (process_subob_fn): Use it.
561 * cp-tree.h: Declare it.
563 2012-09-07 Jason Merrill <jason@redhat.com>
565 * semantics.c (sort_constexpr_mem_initializers): Tweak.
567 2012-09-09 Mark Kettenis <kettenis@openbsd.org>
569 * decl.c (reshape_init_class): Avoid dereferencing a
570 past-the-end pointer.
572 2012-09-07 Paolo Carlini <paolo.carlini@oracle.com>
574 * pt.c (num_template_headers_for_class): Rework per the code
575 inline in cp_parser_check_declarator_template_parameters.
576 * parser.c (cp_parser_check_declarator_template_parameters):
577 Use num_template_headers_for_class.
579 2012-09-06 Jason Merrill <jason@redhat.com>
583 * semantics.c (sort_constexpr_mem_initializers): New.
584 (build_constexpr_constructor_member_initializers): Use it.
585 (cx_check_missing_mem_inits): Skip artificial fields.
586 * init.c (expand_aggr_init_1): Don't zero out a class
589 2012-09-05 Paolo Carlini <paolo.carlini@oracle.com>
592 * search.c (lookup_base): Add tsubst_flags_t parameter.
593 (adjust_result_of_qualified_name_lookup, check_final_overrider):
595 * name-lookup.c (do_class_using_decl): Adjust.
596 * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
598 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
599 build_up_reference): Likewise.
600 * rtti.c (build_dynamic_cast_1): Likewise.
601 * tree.c (maybe_dummy_object): Likewise.
602 * call.c (build_conditional_expr_1, build_over_call): Likewise.
603 * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
605 (enum base_access_flags, ba_quiet): Remove.
606 (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
607 * except.c (can_convert_eh): Adjust.
608 * decl.c (grokdeclarator): Likewise.
609 * typeck.c (comp_except_types, build_class_member_access_expr,
610 finish_class_member_access_expr, get_member_function_from_ptrfunc,
611 build_static_cast_1, get_delta_difference_1): Likewise.
612 * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
613 warn_about_ambiguous_bases): Likewise.
614 (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
616 2012-09-04 Jason Merrill <jason@redhat.com>
619 * decl.c (reshape_init_class): Handle invalid initializer for
620 0-length array member.
622 * error.c (dump_type_suffix): Correct handling of 0-length arrays.
625 * cp-tree.h (LAMBDANAME_P): Remove.
626 (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
627 * cp-lang.c (cxx_dwarf_name): Likewise.
628 * error.c (dump_aggr_type): Likewise.
629 * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
632 * decl.c (check_default_argument): Set cp_unevaluated_operand
633 around call to perform_implicit_conversion_flags.
637 * pt.c (fn_type_unification): Call coerce_template_parms before
638 entering substitution context.
640 2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
641 Jason Merrill <jason@redhat.com>
644 * pt.c (check_template_variable): New.
645 (num_template_headers_for_class): Split out...
646 * decl.c (grokdeclarator): ...from here.
647 (start_decl): Remove redundant diagnostic.
648 * cp-tree.h: Declare them
649 * parser.c (cp_parser_single_declaration): Call check_template_variable.
651 2012-08-31 Ollie Wild <aaw@google.com>
654 * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
656 2012-08-30 Jason Merrill <jason@redhat.com>
660 * pt.c (instantiation_dependent_r): New.
661 (instantiation_dependent_expression_p): New.
662 (value_dependent_expression_p): Use it. SCOPE_REF is always dependent.
663 * semantics.c (finish_decltype_type): Use it.
664 * cp-tree.h: Declare it.
666 * semantics.c (finish_qualified_id_expr): Handle building up a
667 non-dependent SCOPE_REF here.
668 (finish_id_expression): Not here.
669 * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
671 * friend.c (make_friend_class): Handle template template parameters.
672 * parser.c (cp_parser_template_declaration_after_export): Likewise.
673 * pt.c (tsubst_friend_class): Likewise.
674 (instantiate_class_template_1): Likewise
675 * decl.c (check_elaborated_type_specifier): Likewise.
676 (lookup_and_check_tag): Likewise.
678 * pt.c (get_class_bindings): Call coerce_template_parms. Add
680 (more_specialized_class): Add main_tmpl parameter.
681 (most_specialized_class): Adjust calls.
683 * decl.c (cp_finish_decl): Check for invalid multiple initializers
684 even if the initializer is dependent.
686 * pt.c (instantiate_template_1): Keep processing_template_decl set
687 if there are dependent args.
689 2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
692 * decl2.c (mark_used): Consistently return false after errors
693 about uses before deduction of auto.
694 * semantics.c (finish_id_expression): Check mark_used return
695 value and return error_mark_node in case of failure.
697 2012-08-24 Jason Merrill <jason@redhat.com>
700 * pt.c (deduction_tsubst_fntype): Remove.
701 (fn_type_unification): Check deduction depth and call
702 instantiate_template here. Handle default argument access checks.
703 (determine_specialization): Suppress access control.
704 (tsubst_decl): Check for excessive deduction depth.
705 (recheck_decl_substitution): Make sure access control is on.
706 (type_unification_real): Don't mess with access deferring here.
707 (get_bindings): Adjust for fn_type_unification return type.
708 * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
709 (template_instantiation_rejection): Remove.
710 (struct rejection_reason): Change targs to num_targs.
711 (template_unification_rejection, print_z_candidate): Adjust.
712 (add_template_candidate_real): Adjust for fn_type_unification change.
713 * class.c (resolve_address_of_overloaded_function): Likewise.
714 * cp-tree.h: Adjust declaration.
716 * pt.c (tsubst_default_argument): Indicate where the default
717 argument is being instantiated for.
718 (tsubst_expr): Restore previous location.
719 (tsubst_copy_and_build): Set and restore location.
720 * call.c (build_new_method_call_1): Remember location of call.
721 * semantics.c (finish_call_expr): Here too.
722 * parser.c (cp_parser_omp_for_loop): Remember the location of the
723 increment expression.
725 * pt.c (resolve_overloaded_unification): Use coerce_template_parms
726 instead of get_bindings.
727 (resolve_nondeduced_context): Likewise.
729 * pt.c (register_specialization): Correct argument to
730 check_specialization_namespace.
731 (determine_specialization): Don't consider members of
734 2012-08-23 Jason Merrill <jason@redhat.com>
736 * decl.c (compute_array_index_type): Use type_dependent_expression_p.
738 2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
741 * name-lookup.c (supplement_binding_1): Handle specially enums
742 only in class templates.
743 (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
744 using declarations at function scope.
746 2012-08-21 Richard Guenther <rguenther@suse.de>
748 * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
749 (ATTR_IS_DEPENDENT): Likewise.
750 (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
751 TREE_LANG_FLAG_0 on TREE_VECs.
753 2012-08-20 Florian Weimer <fweimer@redhat.com>
756 * call.c (build_operator_new_call): Add size_check argument and
758 * cp-tree.h (build_operator_new_call): Adjust declaration.
759 * init.c (build_new_1): Compute array size check and apply it.
761 2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
764 * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
765 Wunused_variable too.
767 2012-08-20 Diego Novillo <dnovillo@google.com>
769 * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
771 2012-08-20 Richard Guenther <rguenther@suse.de>
773 * name-lookup.c (store_binding_p): New predicate, split out from ...
774 (store_binding): ... here. Always store binding and require
775 target vector with enough space.
776 (store_bindings): Collect to store bindings and reserve space
777 for them, then store them.
778 (store_class_bindings): Likewise.
780 2012-08-19 Mikael Morin <mikael@gcc.gnu.org>
782 * Make-lang.in: Fix typo.
784 2012-08-17 Jakub Jelinek <jakub@redhat.com>
786 * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
788 2012-08-14 Diego Novillo <dnovillo@google.com>
790 Merge from cxx-conversion branch. Re-write VEC in C++.
792 * call.c (add_function_candidate): Remove const qualifier
793 from call to VEC_index.
795 2012-08-10 Richard Guenther <rguenther@suse.de>
797 * error.c (dump_expr): Handle anonymous SSA names.
799 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
801 * error.c (print_instantiation_context): Pretty-print a newline before
802 diagnostic_flush_buffer.
803 * cxx-pretty-print.c (pp_cxx_function_definition): Use
804 pp_newline_and_flush instead of separate pp_newline and pp_flush.
806 2012-08-06 Dodji Seketeli <dodji@redhat.com>
808 Avoid crashing on erroneous static_assert usage
809 * semantics.c (finish_static_assert): Don't crash on erroneous
810 message or condition.
812 2012-08-06 Marc Glisse <marc.glisse@inria.fr>
813 Paolo Carlini <paolo.carlini@oracle.com>
816 * typeck.c (build_static_cast_1): Move the conversion to void case
817 before the perform_direct_initialization_if_possible call.
819 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
821 * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
822 * cp-tree.h (scalarish_type_p): Declare.
823 * tree.c (scalarish_type_p): Make non-static.
825 2012-08-02 Jason Merrill <jason@redhat.com>
826 Paolo Carlini <paolo.carlini@oracle.com>
829 * pt.c (type_unification_real): Call push_deferring_access_checks /
830 pop_deferring_access_checks around the substitution of default
832 (instantiate_template_1): When the specialization returned by
833 retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
834 are in a SFINAE context, simply return error_mark_node.
835 * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
837 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
839 * pt.c (check_default_tmpl_args): Change is_primary and is_partial
840 parameters to bool type, adjust.
841 (push_template_decl_real): Tidy.
842 * parser.c (cp_parser_init_declarator): Adjust.
843 * decl.c (redeclaration_error_message): Likewise.
844 * cp-tree.h (check_default_tmpl_args): Update prototype.
846 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
849 * pt.c (check_default_tmpl_args): Don't check local types.
851 2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
852 Paul Brook <paul@codesourcery.com>
855 * decl.c (finish_function): Check targetm.warn_func_return.
857 2012-07-25 Jason Merrill <jason@redhat.com>
860 * decl.c (grokdeclarator): Allow const and constexpr together.
863 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
864 maybe_constant_value.
866 * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
867 * call.c (standard_conversion): Don't set it.
868 * class.c (resolve_address_of_overloaded_function): Don't check it.
869 * decl.c (check_default_argument): Call
870 perform_implicit_conversion_flags.
872 * pt.c (print_candidates_1): Use inform instead of error.
874 2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
876 * pt.c (convert_template_argument, tsubst): Simplify fourth argument
877 to make_typename_type (complain & tf_error -> complain).
879 2012-07-24 Steven Bosscher <steven@gcc.gnu.org>
881 * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
882 n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
883 n_inner_fields_searched): Always define.
884 (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
885 (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
886 * tree.c (depth_reached): Always define global.
887 (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
888 * pt.c (depth_reached): Always define.
889 (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
890 * search.c (n_fields_searched, n_calls_lookup_field,
891 n_calls_lookup_field_1, n_calls_lookup_fnfields,
892 n_calls_lookup_fnfields_1, n_calls_get_base_type,
893 n_outer_fields_searched, n_contexts_saved): Always define.
894 (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
895 (lookup_member): Likewise.
896 (lookup_fnfields_idx_nolazy): Likewise.
897 (print_search_statistics): Likewise.
898 (reinit_search_statistics): Unconditionally re-set counters.
899 * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
901 (cxx_dup_lang_specific_decl): Likewise.
902 (copy_lang_type): Likewise.
903 (cxx_make_type): Likewise.
905 2012-07-20 Jason Merrill <jason@redhat.com>
908 * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
909 canonical array type rather than mess with its TYPE_*_VARIANT.
911 2012-07-19 Jason Merrill <jason@redhat.com>
914 * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
917 * call.c (build_cxx_call): Set optimize when folding
918 __builtin_constant_p in a constexpr function.
920 2012-07-18 Jason Merrill <jason@redhat.com>
922 * pt.c (instantiate_decl): Don't recheck substitutions.
924 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
925 Jason Merrill <jason@redhat.com>
929 * semantics.c (perform_access_checks): Add complain parm, return bool.
930 (perform_deferred_access_checks): Likewise.
931 (perform_or_defer_access_check): Likewise.
932 (speculative_access_check): Remove.
933 * call.c (enforce_access): Add complain parm, return bool.
934 * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
935 * search.c: Adjust callers.
936 * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
937 (FNDECL_RECHECK_ACCESS_P): New macro.
938 * method.c (synthesized_method_walk): Stop deferring access checks.
939 * pt.c (recheck_decl_substitution): New.
940 (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
942 2012-07-18 Jason Merrill <jason@redhat.com>
944 * method.c (process_subob_fn): Make sure no_implicit_p is non-null
945 before trying to store through it.
947 2012-07-17 Jason Merrill <jason@redhat.com>
950 * decl.c (finish_enum_value_list): Only call
951 insert_late_enum_def_into_classtype_sorted_fields in class scope.
954 * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
955 to the list of variants.
957 * decl.c (xref_basetypes): Complain about incomplete template base.
958 * class.c (finish_struct): Adjust variants in templates, too.
961 * parser.c (cp_parser_class_head): Call xref_basetypes here.
962 (cp_parser_class_specifier_1): Not here.
963 * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
964 as well as DECL_DEPENDENT_P.
966 2012-07-16 Jason Merrill <jason@redhat.com>
968 * cp-tree.h (struct deferred_access_check): Add location.
969 * semantics.c (perform_access_checks): Use it.
970 (perform_or_defer_access_check): Store it.
972 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
974 * dump.c (dump_stmt): Moved here from c-dump.c.
975 * optimize.c: Include dumpfile.h instead of tree-dump.h.
978 * Make-lang.in: Fix dependencies.
980 2012-07-13 Jason Merrill <jason@redhat.com>
983 * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
985 2012-07-12 Jason Merrill <jason@redhat.com>
987 * pt.c (instantiate_decl): Check typedefs access here.
988 (instantiate_template_1): Not here.
990 * pt.c (deduction_tsubst_fntype): Just suppress access checking.
991 (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
992 (push_deduction_access_scope, pop_deduction_access_scope): Remove.
994 2012-07-11 Jason Merrill <jason@redhat.com>
997 * method.c (synthesized_method_walk): Replace uses of msg with diag.
998 Correct handling of virtual bases with move operations.
999 (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
1001 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
1003 * method.c: Do not include tree-pass.h.
1005 2012-07-10 Jason Merrill <jason@redhat.com>
1009 * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
1010 (struct lang_decl_fn): Add suppress_implicit_decl field.
1011 * method.c (implicitly_declare_fn): Check it.
1012 (process_subob_fn): Add no_implicit_p parm.
1013 (walk_field_subobs, synthesized_method_walk): Likewise.
1014 (maybe_explain_implicit_delete): Adjust.
1015 (explain_implicit_non_constexpr): Adjust.
1017 * method.c (synthesized_method_walk): Avoid changing
1018 EH spec based on cleanups in other places, too.
1020 2012-07-09 Sterling Augustine <saugustine@google.com>
1022 * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
1024 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
1026 * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
1028 2012-07-06 Jason Merrill <jason@redhat.com>
1031 * pt.c (tsubst_arg_types): Add "end" parameter.
1032 (check_undeduced_parms): Use it.
1034 * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
1037 * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
1039 2012-07-05 Jason Merrill <jason@redhat.com>
1042 * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
1045 * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
1046 (struct template_parm_index_s): Remove num_siblings.
1047 * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
1048 (fixup_template_type_parm_type): Remove.
1049 (build_template_parm_index): Remove num_siblings parm.
1050 (process_template_parm): Likewise.
1051 * parser.c (cp_parser_template_parameter_list): Adjust.
1052 * tree.c (cp_tree_equal): Don't compare num_siblings.
1053 * typeck.c (comp_template_parms_position): Likewise.
1057 * tree.c (strip_typedefs_expr): New.
1058 * cp-tree.h: Declare it.
1059 * pt.c (convert_template_argument, unify): Use it.
1060 * parser.c (cp_parser_template_declaration_after_export): Don't call
1061 fixup_template_parms.
1063 2012-07-04 Jason Merrill <jason@redhat.com>
1067 * decl.c (build_enumerator): Don't use build_lang_decl_loc.
1069 2012-07-03 Jakub Jelinek <jakub@redhat.com>
1072 * semantics.c (finish_goto_stmt): Surround computed goto argument
1073 with CLEANUP_POINT_EXPR if needed.
1075 2012-07-02 Jason Merrill <jason@redhat.com>
1078 * pt.c (in_template_function): New.
1079 * cp-tree.h: Declare it.
1080 * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
1083 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
1084 for LAMBDA_EXPR_EXTRA_SCOPE.
1087 * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
1090 * class.c (resolves_to_fixed_type_p): Check uses_template_parms
1091 (current_function_decl) instead of processing_template_decl.
1094 * semantics.c (maybe_add_lambda_conv_op): Don't set
1095 DECL_INTERFACE_KNOWN.
1098 * call.c (build_conditional_expr_1): Don't warn about comparison of
1099 two enumerators before their enumeration is complete.
1100 (build_new_op_1): Call decay_conversion before warn_logical_operator.
1101 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
1103 * decl2.c (mark_used): Call used_types_insert for enums.
1104 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
1105 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
1106 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
1107 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
1108 (build_class_member_access_expr): Look through unscoped enums.
1109 * search.c (context_for_name_lookup): Look through unscoped enums.
1110 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
1111 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
1112 * tree.c (decl_linkage): Likewise.
1113 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
1115 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1117 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
1119 2012-06-27 Jason Merrill <jason@redhat.com>
1121 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
1122 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
1123 (cp_parser_elaborated_type_specifier): Adjust.
1124 * decl.c (duplicate_decls): Return error_mark_node on template
1128 * parser.c (cp_parser_template_id): Add tag_type parm.
1129 (cp_parser_template_name): Likewise.
1130 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
1131 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
1132 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
1133 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
1135 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1138 * semantics.c (constexpr_call): Fix typo in comment.
1139 (cxx_eval_vec_perm_expr): New.
1140 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
1142 2012-06-26 Richard Guenther <rguenther@suse.de>
1145 * mangle.c (write_array_type): Truncate the number-of-elements
1148 2012-06-25 Jason Merrill <jason@redhat.com>
1152 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
1153 if cp_unevaluated_operand is set.
1154 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
1157 * typeck.c (decay_conversion): Don't discard side-effects from
1158 expressions of nullptr_t.
1160 2012-06-25 Florian Weimer <fweimer@redhat.com>
1162 * init.c (build_new_1): Warn about (T[N]) for variable N, and
1165 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
1166 expressions. Handled now in build_new_1.
1168 2012-06-25 Jason Merrill <jason@redhat.com>
1171 * semantics.c (build_data_member_initialization): Always keep
1172 initializer for empty base.
1173 (cxx_eval_bare_aggregate): Discard it here.
1176 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
1177 (tsubst_expr) [OMP_FOR]: Here, too.
1179 2012-06-25 Jakub Jelinek <jakub@redhat.com>
1182 * class.c (check_bases_and_members): Avoid -Wuninitialized
1183 diagnostics for non-static const members or references if they
1186 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
1188 * parser.c (cp_parser_direct_declarator): Move virt-specifier
1189 parsing after late-specified return type parsing.
1191 2012-06-14 Jason Merrill <jason@redhat.com>
1194 * name-lookup.c (constructor_name_p): Don't try to look at the
1195 name of a DECLTYPE_TYPE.
1197 2012-06-18 Lawrence Crowl <crowl@google.com>
1199 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
1200 to TV_PHASE_OPT_GEN.
1202 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
1204 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
1206 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
1209 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
1210 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
1211 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
1213 2012-06-09 Jason Merrill <jason@redhat.com>
1215 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
1216 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
1217 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
1220 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
1221 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
1222 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
1223 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
1224 Don't return the decl.
1226 2012-06-11 Richard Guenther <rguenther@suse.de>
1229 * mangle.c (write_array_type): Use double-ints for array domain
1232 2012-06-07 Fabien ChĂȘne <fabien@gcc.gnu.org>
1235 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
1237 * class.c (insert_into_classtype_sorted_fields): New.
1238 (add_enum_fields_to_record_type): New.
1239 (count_fields): Adjust the comment.
1240 (add_fields_to_record_type): Likewise.
1241 (finish_struct_1): Move the code that inserts the fields for the
1242 sorted case, into insert_into_classtype_sorted_fields, and call
1244 (insert_late_enum_def_into_classtype_sorted_fields): Define.
1245 * decl.c (finish_enum_value_list): Call
1246 insert_late_enum_def_into_classtype_sorted_fields if a late enum
1247 definition is encountered.
1249 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1252 * typeck.c (cp_perform_integral_promotions): New, like
1253 perform_integral_promotions but also takes a tsubst_flags_t parameter.
1254 (pointer_diff): Add tsubst_flags_t parameter.
1255 (decay_conversion, cp_default_conversion, cp_build_array_ref,
1256 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
1257 build_reinterpret_cast_1, cp_build_modify_expr,
1258 convert_for_assignment): Adjust.
1259 * optimize.c (build_delete_destructor_body): Adjust.
1260 * init.c (expand_virtual_init, expand_default_init, build_new_1,
1261 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
1262 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
1263 * class.c (build_base_path): Adjust.
1264 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
1265 * method.c (synthesized_method_walk): Adjust flag and complain.
1266 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
1267 (build_typeid, build_dynamic_cast_1): Adjust.
1268 * except.c (initialize_handler_parm): Likewise.
1269 * typeck2.c (process_init_constructor_record): Likewise.
1270 * pt.c (tsubst_friend_class): Don't change flags.
1271 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
1272 finish_static_assert): Likewise.
1273 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
1275 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
1276 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
1278 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
1279 (implicit_conversion): Mask out tf_error with a FIXME.
1280 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
1281 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
1282 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1283 build_up_reference, convert_to_reference, cp_convert,
1284 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
1286 (convert_to_reference, ocp_convert): Use complain & tf_error instead
1287 of flags & LOOKUP_COMPLAIN.
1288 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
1289 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
1290 lookup_name_real, lookup_function_nonclass, lookup_name,
1291 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
1292 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
1294 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
1296 * decl.c: Do not include output.h.
1297 (start_decl): Remove code for flag_conserve_space.
1299 2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
1302 * parser.c (cp_parser_alias_declaration): Return earlier
1303 if an error occured.
1305 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1308 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
1309 to control enumeral mismatch in conditional expression too.
1311 2012-06-04 Sterling Augustine <saugustine@google.com>
1313 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
1314 * cp-lang.c (cxx_dwarf_name): Call them.
1316 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
1318 * semantics.c: Do not include output.h.
1319 * decl2.c: Likewise.
1320 * friend.c: Likewise.
1321 * typeck.c: Likewise.
1322 * typeck2.c: Likewise.
1323 * Make-lang.in: Fix dependencies.
1325 2012-06-01 Jason Merrill <jason@redhat.com>
1328 * parser.c (cp_parser_class_head): Apply attributes here.
1329 * semantics.c (begin_class_definition): Not here.
1330 * cp-tree.h: Adjust.
1333 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
1334 tentatively and the LHS has a parse error.
1337 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
1338 (instantiate_decl): Don't push_to_top_level for local class methods.
1339 (instantiate_class_template_1): Or for local classes.
1342 * pt.c (do_auto_deduction): Don't try to deduce from a
1343 type-dependent initializer.
1345 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
1348 * name-lookup.c (push_namespace): When error recovery is
1349 impossible just error out in duplicate_decls.
1351 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
1353 * call.c: Do not include output.h.
1354 * class.c: Likewise.
1355 * except.c: Likewise.
1356 * friend.c: Likewise.
1359 * method.c: Likewise.
1360 * parser.c: Likewise.
1363 * search.c: Likewise.
1365 2012-05-30 Jason Merrill <jason@redhat.com>
1368 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1369 representing a bitwise copy of a glvalue.
1371 * tree.c (stabilize_expr): Tweak logic.
1374 * tree.c (stabilize_init): Side effects make the init unstable.
1376 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
1379 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1381 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
1384 * tree.c (stabilize_expr): Handle exp of void type.
1386 2012-05-26 Jason Merrill <jason@redhat.com>
1389 * call.c (convert_like_real) [ck_list]: Take array address directly.
1390 * typeck.c (decay_conversion): Reject decay of an array compound
1393 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
1396 * parser.c (cp_parser_member_declaration): A storage class is not
1397 allowed in a declaration of an anonymous aggregate in a class scope.
1399 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
1402 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1403 before calling constructor_name_p.
1405 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
1408 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1409 cp_parser_function_body): Add a bool parameter, true when parsing
1410 a function-try-block.
1411 (cp_parser_function_try_block): Pass true to the above.
1412 (cp_parser_function_definition_after_declarator,
1413 cp_parser_function_transaction): Adjust.
1415 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
1418 * decl2.c (delete_sanity): Extend 'deleting array' warning to
1421 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1424 * decl.c (grokdeclarator): Diagnose functions returning abstract
1425 class types as TYPENAME.
1426 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1427 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1428 * pt.c (tsubst): Likewise.
1429 * semantics.c (trait_expr_value): Likewise.
1431 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1434 * parser.c (cp_parser_attributes_opt): Enforce error checking of
1435 unbalanced parentheses in the presence of tentative parsing.
1437 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1440 * parser.c (cp_parser_new_type_id): Early return error_mark_node
1441 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1442 error_mark_node; tidy.
1443 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1444 avoid uninitialized warnings.
1445 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1446 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1447 returns error_mark_node.
1449 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1452 * except.c (is_admissible_throw_operand): Rename to
1453 is_admissible_throw_operand_or_catch_parameter and handle
1454 catch parameter too.
1455 (expand_start_catch_block): Use it.
1456 (build_throw): Adjust.
1458 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1461 * typeck.c (build_x_array_ref, build_x_conditional_expr,
1462 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1463 (finish_class_member_access_expr, build_x_indirect_ref,
1464 build_x_binary_op, build_x_compound_expr_from_list,
1465 build_x_compound_expr_from_vec): Adjust callers.
1466 * tree.c (build_min_nt_loc): New.
1467 (build_min_nt): Remove.
1468 * typeck2.c (build_x_arrow): Adjust callers.
1469 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1470 tsubst_copy_and_build): Likewise.
1471 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1472 finish_omp_atomic): Likewise.
1473 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1474 * parser.c (cp_parser_question_colon_clause,
1475 cp_parser_assignment_expression, cp_parser_expression,
1476 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1477 * cp-tree.h: Update.
1479 2012-05-16 Dodji Seketeli <dodji@redhat.com>
1481 PR preprocessor/7263
1482 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1483 the possible declarator specifiers so far.
1484 (struct cp_decl_specifier_seq::locations): Declare new member.
1485 (cp_decl_specifier_seq::{specs, type_location}): Remove.
1486 (decl_spec_seq_has_spec_p): Declare new function.
1487 * parser.c (cp_parser_check_decl_spec): Remove.
1488 (set_and_check_decl_spec_loc): Define new static function.
1489 (decl_spec_seq_has_spec_p): Define new public function.
1490 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1491 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1492 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1493 (cp_parser_alias_declaration): Set the locations for each
1494 declspec, using set_and_check_decl_spec_loc.
1495 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1496 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1497 new declspec location for specifiers. Use the new
1498 decl_spec_seq_has_spec_p.
1499 (cp_parser_type_specifier_seq): Use the new
1500 set_and_check_decl_spec_loc. Stop using
1501 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
1502 (, cp_parser_init_declarator): Use the new
1503 set_and_check_decl_spec_loc.
1504 (cp_parser_single_declaration, cp_parser_friend_p)
1505 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1506 Use the new decl_spec_seq_has_spec_p.
1507 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
1508 the more precise ds_redefined_builtin_type_spec location for
1509 diagnostics about re-declaring C++ built-in types.
1510 (start_decl, grokvardecl, grokdeclarator): Use the new
1511 decl_spec_seq_has_spec_p.
1513 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1516 * pt.c (tsubst_copy_and_build): Increase / decrease
1517 c_inhibit_evaluation_warnings around build_x_binary_op call.
1519 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1521 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1522 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1523 (TYPE_PTR_OR_PTRMEM_P): Add.
1524 * typeck.c (composite_pointer_type_r, composite_pointer_type,
1525 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1526 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1527 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1528 casts_away_constness_r, casts_away_constness): Adjust.
1529 * init.c (build_zero_init_1): Adjust.
1530 * class.c (check_field_decls): Likewise.
1531 * decl.c (check_default_argument): Likewise.
1532 * rtti.c (target_incomplete_p): Likewise.
1533 * tree.c (zero_init_p): Likewise.
1534 * cxx-pretty-print.c (pp_cxx_ptr_operator,
1535 pp_cxx_abstract_declarator): Likewise.
1536 * typeck2.c (build_m_component_ref): Likewise.
1537 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1538 dependent_type_p_r): Likewise.
1539 * call.c (null_member_pointer_value_p, standard_conversion,
1540 add_builtin_candidate, build_conditional_expr_1, compare_ics):
1542 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1543 * cvt.c (cp_convert_to_pointer, ocp_convert,
1544 perform_qualification_conversions): Likewise.
1545 * mangle.c (write_type): Likewise.
1546 * name-lookup.c (arg_assoc_type): Likewise.
1548 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1550 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1552 (cp_parser_binary_expression): Rework to always update at the same
1553 time tree_type and loc.
1554 * call.c (print_z_candidate): Add location_t parameter.
1555 (print_z_candidates, convert_like_real, joust): Adjust.
1557 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
1560 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1562 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1565 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1566 tsubst_decl returns NULL_TREE.
1567 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1568 BOUND_TEMPLATE_TEMPLATE_PARM.
1570 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1573 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1574 * typeck.c (decay_conversion): Use error_at.
1575 * call.c (build_integral_nontype_arg_conv, convert_like_real,
1576 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1577 initialize_reference): Likewise.
1578 * cvt.c (warn_ref_binding): Add location_t parameter.
1579 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1580 convert_to_void, ): Use error_at and warning_at.
1582 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
1585 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1586 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1588 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1591 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1593 (build_conditional_expr_1): Adjust.
1594 * typeck.c (build_x_indirect_ref, build_x_binary_op,
1595 build_x_unary_op): Add location_t parameter.
1596 (rationalize_conditional_expr, build_x_array_ref,
1597 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1599 * typeck2.c (build_x_arrow): Add location_t parameter.
1600 * semantics.c (finish_unary_op_expr): Likewise.
1601 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1602 * decl2.c (grok_array_decl): Add location_t parameter.
1603 * parser.c (cp_parser_postfix_open_square_expression,
1604 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1605 cp_parser_binary_expression, cp_parser_builtin_offsetof,
1606 do_range_for_auto_deduction, cp_convert_range_for,
1607 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1609 * pt.c (tsubst_copy_and_build): Adjust.
1610 * tree.c (maybe_dummy_object): Likewise.
1611 * cp-tree.h: Update declarations.
1613 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1615 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1617 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1620 * pt.c (instantiate_class_template_1): Increase / decrease
1621 c_inhibit_evaluation_warnings around the tsubst_expr call
1622 for STATIC_ASSERT_CONDITION.
1623 (tsubst_expr, case STATIC_ASSERT): Likewise.
1624 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1625 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1627 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1630 * call.c (build_over_call): Handle final member functions
1632 (build_new_method_call_1): Do not handle here.
1634 2012-05-02 Richard Guenther <rguenther@suse.de>
1636 * decl.c (grokdeclarator): Properly check for sizes that
1637 cover more than half of the address-space.
1639 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
1642 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1643 * decl2.c (grok_array_decl): Likewise.
1646 * parser.c (cp_parser_sizeof_operand): Require parentheses for
1649 2012-04-30 Dodji Seketeli <dodji@redhat.com>
1651 Fix location for static class members
1652 * decl.c (grokdeclarator): Use the location carried by the
1653 declarator for the DECL of the static class member.
1655 Fix va_arg type location
1656 * cp-tree.h (build_x_va_arg): Take an additional location
1658 * call.c (build_x_va_arg): Take a loc parameter for the location
1659 of the type of the va_arg expression.
1660 * parser.c (cp_parser_primary_expression): Pass the type of the
1661 type in the va_arg expression to build_x_va_arg.
1662 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1664 Make conversion warnings work on NULL with -ftrack-macro-expansion
1665 * call.c (conversion_null_warnings): Use the new
1666 expansion_point_location_if_in_system_header.
1667 * cvt.c (build_expr_type_conversion): Likewise.
1668 * typeck.c (cp_build_binary_op): Likewise.
1670 2012-04-30 Manuel López-Ibåñez <manu@gcc.gnu.org>
1672 * typeck.c (convert_for_assignment): Replace
1673 Wmissing-format-attribute with Wsuggest-attribute=format.
1674 * call.c (convert_for_arg_passing): Likewise.
1676 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
1679 * class.c (check_bases_and_members): Implement core/1333, do not
1680 disallow defaulted in the class body non-const ref special members.
1682 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1685 * call.c (tourney, perform_overload_resolution,
1686 build_operator_new_call, build_user_type_conversion_1,
1687 build_user_type_conversion, perform_overload_resolution,
1688 add_template_candidate, add_template_candidate_real,
1689 add_template_conv_candidate, add_builtin_candidates,
1690 add_builtin_candidate, build_builtin_candidate,
1691 add_conv_candidate, add_function_candidate, implicit_conversion,
1692 reference_binding, build_list_conv, conditional_conversion,
1693 add_candidates, can_convert_array, build_aggr_conv,
1694 build_array_conv, build_complex_conv, conditional_conversion):
1695 Add tsubst_flags_t parameter.
1696 (joust): Likewise, use it to handle SFINAE as if pedantic.
1697 (add_list_candidates, build_integral_nontype_arg_conv,
1698 perform_overload_resolution, build_new_function_call,
1699 build_operator_new_call, build_op_call_1,
1700 build_conditional_expr_1, build_new_op_1, convert_like_real,
1701 convert_arg_to_ellipsis, convert_default_arg,
1702 convert_for_arg_passing, build_over_call,
1703 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1704 perform_implicit_conversion_flags,
1705 perform_direct_initialization_if_possible,
1706 initialize_reference): Adjust.
1707 * typeck.c (casts_away_constness, casts_away_constness_r):
1708 Add tsubst_flags_t parameter.
1709 (convert_arguments, check_for_casting_away_constness,
1710 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1712 * decl.c (reshape_init_r, check_default_argument): Likewise.
1713 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1714 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1716 * init.c (build_new_1): Likewise.
1717 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1718 build_expr_type_conversion, ): Likewise.
1719 * search.c (check_final_overrider): Likewise.
1720 * cp-tree.h (build_user_type_conversion,
1721 build_operator_new_call, can_convert, can_convert_arg,
1722 can_convert_arg_bad, convert_default_arg,
1723 convert_arg_to_ellipsis, convert_for_arg_passing):
1726 2012-04-22 Jan Hubicka <jh@suse.cz>
1728 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1731 2012-04-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1734 * typeck.c (composite_pointer_type): Likewise.
1735 (cxx_sizeof_or_alignof_type): Likewise.
1736 (cp_build_array_ref): Likewise.
1737 (cp_build_function_call_vec): Likewise.
1738 (cp_build_addr_expr_1): Likewise.
1739 (convert_member_func_to_ptr): Likewise.
1740 * decl.c (check_tag_decl): Likewise.
1741 (check_static_variable_definition): Likewise.
1742 (compute_array_index_type): Likewise.
1743 (create_array_type_for_decl): Likewise.
1744 (grokdeclarator): Likewise.
1745 (grok_op_properties): Likewise.
1746 * error.c (maybe_warn_cpp0x): Likewise.
1747 * pt.c (maybe_process_partial_specialization): Likewise.
1748 (convert_template_argument): Likewise.
1749 (do_decl_instantiation): Likewise.
1750 (do_type_instantiation): Likewise.
1751 * parser.c (cp_parser_primary_expression): Likewise.
1752 (cp_parser_postfix_expression): Likewise.
1753 (cp_parser_unary_expression): Likewise.
1754 (cp_parser_question_colon_clause): Likewise.
1755 (cp_parser_lambda_introducer): Likewise.
1756 (cp_parser_lambda_declarator_opt): Likewise.
1757 (cp_parser_compound_statement): Likewise.
1758 (cp_parser_jump_statement): Likewise.
1759 (cp_parser_declaration_seq_opt): Likewise.
1760 (cp_parser_enum_specifier): Likewise.
1761 (cp_parser_enumerator_list): Likewise.
1762 (cp_parser_initializer_list): Likewise.
1763 (cp_parser_member_declaration): Likewise.
1764 * call.c (build_conditional_expr_1): Likewise.
1765 * friend.c (make_friend_class): Likewise.
1766 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1768 2012-04-21 Jan Hubicka <jh@suse.cz>
1770 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1771 * decl2.c (mark_needed): Likewise.
1772 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1774 * decl2.c (cxx_callgraph_analyze_expr): Remove.
1775 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1776 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1778 2012-04-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
1781 * typeck.c (cp_build_function_call_vec): Do not pretty-print
1782 expressions when caret is enabled.
1784 2012-04-20 Jan Hubicka <jh@suse.cz>
1787 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1788 list when target has no support for it.
1790 2012-04-20 Michael Matz <matz@suse.de>
1792 * error.c (pedwarn_cxx98): Move va_end call after user
1795 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
1798 * cp-tree.h (build_addr_func, decay_conversion,
1799 get_member_function_from_ptrfunc,
1800 build_m_component_ref, convert_member_func_to_ptr):
1801 Add tsubst_flags_t parameter.
1802 * typeck.c (cp_default_conversion): Add.
1803 (decay_conversion, default_conversion,
1804 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1805 Add tsubst_flags_t parameter and use it throughout.
1806 (cp_build_indirect_ref, cp_build_array_ref,
1807 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1808 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1809 build_const_cast_1, expand_ptrmemfunc_cst,
1810 convert_for_initialization): Adjust.
1811 * init.c (build_vec_init): Adjust.
1812 * decl.c (grok_reference_init, get_atexit_node): Likewise.
1813 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1814 * except.c (build_throw): Likewise.
1815 * typeck2.c (build_x_arrow): Likewise.
1816 (build_m_component_ref): Add tsubst_flags_t parameter and
1818 * pt.c (convert_nontype_argument): Adjust.
1819 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1820 * decl2.c (build_offset_ref_call_from_tree): Likewise.
1821 * call.c (build_addr_func): Add tsubst_flags_t parameter and
1823 (build_call_a, build_conditional_expr_1, build_new_op_1,
1824 convert_like_real, convert_arg_to_ellipsis, build_over_call,
1825 build_special_member_call): Adjust.
1826 * cvt.c (cp_convert_to_pointer, force_rvalue,
1827 build_expr_type_conversion): Likewise.
1829 2012-04-17 Tom de Vries <tom@codesourcery.com>
1831 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1832 location argument to create_artificial_label.
1833 (finish_bc_block): Change return type to void. Remove body_seq
1834 parameter, and add block parameter. Append label to STMT_LIST and
1836 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1837 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1838 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1839 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1840 (genericize_break_stmt, genericize_omp_for_stmt): New function.
1841 (cp_gimplify_omp_for): Remove bc_continue processing.
1842 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1843 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1844 CONTINUE_STMT, and BREAK_STMT as unreachable.
1845 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1846 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1847 (cp_genericize_tree): New function, factored out of ...
1848 (cp_genericize): ... this function.
1850 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1853 * semantics.c (build_constexpr_constructor_member_initializers):
1854 Check for function-try-block as function-body.
1856 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1859 * parser.c (cp_parser_member_declaration): Check that
1860 initializer_token_start is non null before dereferencing it.
1862 2012-04-16 Jason Merrill <jason@redhat.com>
1865 * pt.c (determine_specialization): Instead of comparing the number
1866 of parms, check that tsubst gives the right answer.
1869 * pt.c (process_partial_specialization): Complain about a partial
1870 specialization with fewer args than primary template parms.
1873 * pt.c (convert_template_argument): Handle template template
1877 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1878 template parameters.
1880 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1883 * call.c (op_error): Print types; when flag_diagnostics_show_caret
1884 is false print expressions too.
1885 (op_error_string): Add.
1887 2012-04-16 Jason Merrill <jason@redhat.com>
1890 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1892 2012-04-16 Jan Hubicka <jh@suse.cz>
1894 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1895 walkers to walk cgraph and varpool.
1897 2012-04-15 Jason Merrill <jason@redhat.com>
1900 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1904 * pt.c (coerce_template_parms): Even if we aren't converting we
1905 want to expand argument packs.
1908 * mangle.c (write_type): nullptr_t is a builtin type.
1910 2012-04-14 Jan Hubicka <jh@suse.cz>
1912 * tree.c: Update field referenced for new cgraph/varpool layout.
1913 * decl2.c: Likewise.
1915 2012-04-13 Jason Merrill <jason@redhat.com>
1918 * pt.c (any_pack_expanson_args_p): New.
1919 (coerce_template_parms): Use it.
1922 * call.c (joust): Handle comparing list and non-list ctors.
1925 * decl2.c (finish_anon_union): Use cp_finish_decl.
1926 * error.c (dump_function_name): Avoid showing anonymous "name".
1928 2012-04-11 Fabien ChĂȘne <fabien@gcc.gnu.org>
1931 * parser.c (cp_parser_class_name): Call strip_using_decl and
1932 return the target decl.
1933 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1934 to be stripped is NULL_TREE.
1935 (qualify_lookup): Call strip_using_decl and perform some checks on
1938 2012-04-11 Jason Merrill <jason@redhat.com>
1941 * decl.c (grokdeclarator): Strip the injected-class-name typedef
1942 if we are building a declaration or compound type.
1945 * decl.c (check_tag_decl): Don't complain about attributes if we
1946 don't even have a type.
1948 2012-04-10 Manuel López-Ibåñez <manu@gcc.gnu.org>
1950 * cvt.c (convert_to_void): Update comment.
1952 2012-04-05 Jason Merrill <jason@redhat.com>
1955 * semantics.c (finish_non_static_data_member): In templates, pass
1956 the decl to build_qualified_name.
1957 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1959 2012-04-04 Jason Merrill <jason@redhat.com>
1962 * decl.c (finish_function): Update fntype after deducing return type.
1964 2012-04-03 Jason Merrill <jason@redhat.com>
1967 * pt.c (tsubst_initializer_list): A pack expansion with no elements
1968 means value-initialization.
1970 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1973 * class.c (deduce_noexcept_on_destructor,
1974 deduce_noexcept_on_destructors): New.
1975 (check_bases_and_members): Call the latter.
1976 * decl.c (grokfndecl): Call the former.
1977 * method.c (implicitly_declare_fn): Not static.
1978 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1981 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1984 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1985 warn for a zero as null pointer constant default argument.
1987 2012-03-29 Jason Merrill <jason@redhat.com>
1990 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1992 2012-03-29 Jakub Jelinek <jakub@redhat.com>
1995 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1996 if processing_template_decl.
1998 2012-03-29 Jason Merrill <jason@redhat.com>
2001 * call.c (compare_ics): Handle ck_aggr like ck_list.
2003 2012-03-28 Jason Merrill <jason@redhat.com>
2006 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
2007 we didn't get an explicit scope.
2008 * pt.c (tsubst_baselink): Likewise.
2010 2012-03-28 Richard Guenther <rguenther@suse.de>
2012 * typeck2.c (process_init_constructor_array): Use the proper
2013 type for computing the array length.
2015 2012-03-27 Meador Inge <meadori@codesourcery.com>
2018 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
2019 stripped child trees that are not pointer types.
2021 2012-03-21 Jason Merrill <jason@redhat.com>
2023 Implement return type deduction for normal functions with -std=c++1y.
2024 * cp-tree.h (FNDECL_USED_AUTO): New macro.
2025 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
2026 (dependent_lambda_return_type_node): Remove.
2027 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
2028 (struct language_function): Add x_auto_return_pattern field.
2029 (current_function_auto_return_pattern): New.
2030 (enum tsubst_flags): Add tf_partial.
2031 * decl.c (decls_match): Handle auto return comparison.
2032 (duplicate_decls): Adjust error message for auto return.
2033 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
2034 (cp_finish_decl): Don't do auto deduction for functions.
2035 (grokdeclarator): Allow auto return without trailing return type in
2037 (check_function_type): Defer checking of deduced return type.
2038 (start_preparsed_function): Set current_function_auto_return_pattern.
2039 (finish_function): Set deduced return type to void if not previously
2041 * decl2.c (change_return_type): Handle error_mark_node.
2042 (mark_used): Always instantiate functions with deduced return type.
2043 Complain about use if deduction isn't done.
2044 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
2045 initial return type.
2046 (cp_parser_lambda_body): Don't deduce return type in a template.
2047 (cp_parser_conversion_type_id): Allow auto in C++1y.
2048 * pt.c (instantiate_class_template_1): Don't mess with
2049 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
2050 (tsubst_copy_and_build): Likewise.
2051 (fn_type_unification, tsubst): Don't reduce the template parm level
2052 of 'auto' during deduction.
2053 (unify): Compare 'auto' specially.
2054 (get_bindings): Change test.
2055 (always_instantiate_p): Always instantiate functions with deduced
2057 (do_auto_deduction): Handle error_mark_node and lambda context.
2058 Don't check for use in initializer.
2059 (contains_auto_r): Remove.
2060 * search.c (lookup_conversions_r): Handle auto conversion function.
2061 * semantics.c (lambda_return_type): Handle null return. Don't mess
2062 with dependent_lambda_return_type_node.
2063 (apply_deduced_return_type): Rename from apply_lambda_return_type.
2064 * typeck.c (merge_types): Handle auto.
2065 (check_return_expr): Do auto deduction.
2066 * typeck2.c (add_exception_specifier): Fix complain check.
2068 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
2071 * class.c (check_field_decls): Call literal_type_p only
2074 2012-03-22 Jakub Jelinek <jakub@redhat.com>
2077 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
2078 on CLASS_TYPE_P types.
2080 2012-03-20 Jason Merrill <jason@redhat.com>
2082 * lex.c (init_reswords): Use >= for cxx_dialect test.
2083 * parser.c (cp_parser_exception_specification_opt): Likewise.
2085 * mangle.c (write_type): Handle 'auto'.
2086 * init.c (build_new): Don't do auto deduction where it might
2087 affect template mangling.
2090 * decl.c (reshape_init_class): Handle repeated reshaping.
2091 * search.c (lookup_field_1): Add sanity check.
2093 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2096 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
2097 * tree.c (xvalue_p): Define.
2098 * typeck.c (maybe_warn_about_useless_cast): Define.
2099 (build_reinterpret_cast, build_const_cast,
2100 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
2101 * rtti.c (build_dynamic_cast): Likewise.
2102 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
2103 c_inhibit_evaluation_warnings before/after the build_* calls.
2105 2012-03-15 Jason Merrill <jason@redhat.com>
2108 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
2110 2012-03-15 Manuel López-Ibåñez <manu@gcc.gnu.org>
2113 * error.c (print_instantiation_partial_context): Use
2114 template_backtrace_limit.
2116 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2118 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
2120 2012-03-14 Jakub Jelinek <jakub@redhat.com>
2123 * parser.c (lookup_literal_operator): Return fn only if
2124 processed all arguments from args vector and argtypes is
2127 2012-01-30 Dodji Seketeli <dodji@redhat.com>
2130 * cp-tree.h (template_type_parameter_p): Declare new function.
2131 (parameter_of_template_p): Remove.
2132 * pt.c (template_type_parameter_p): Define new function.
2133 (parameter_of_template_p): Remove.
2134 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
2135 on parameter_of_template_p anymore. Compare the level of the
2136 template parameter to the depth of the template.
2138 2011-12-15 Dodji Seketeli <dodji@redhat.com>
2140 * call.c (standard_conversion, build_integral_nontype_arg_conv)
2141 (build_new_op_1, convert_like_real, is_subseq)
2142 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
2143 (joust): Use next_conversion instead of accessing fields of struct
2144 conversion directly.
2146 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
2149 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
2150 division by zero warnings.
2152 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
2154 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
2155 build_ptrmemfunc): Consistently forward the tsubst_flags_t
2157 * call.c (resolve_args): Likewise.
2159 2012-03-07 Jason Merrill <jason@redhat.com>
2162 * mangle.c (write_literal_operator_name): The length comes after the
2165 2012-03-05 Jakub Jelinek <jakub@redhat.com>
2167 * pt.c (local_specializations): Change from htab_t into
2168 struct pointer_map_t *.
2169 (retrieve_local_specializations, register_local_specialization,
2170 tsubst_pack_expansion, instantiate_decl): Adjust users.
2171 (eq_local_specializations, hash_local_specialization): Remove.
2173 2012-03-05 Jason Merrill <jason@redhat.com>
2176 * decl2.c (determine_visibility): Correct calculation of class
2178 * decl.c (check_tag_decl): Adjust warning.
2180 * method.c (synthesized_method_walk): Cleanups don't affect the EH
2183 2012-03-03 Jason Merrill <jason@redhat.com>
2185 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
2188 * call.c (build_aggr_conv): Call reshape_init.
2189 (convert_like_real): Likewise.
2190 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
2193 * mangle.c (write_nested_name): Use decl_mangling_context.
2194 (write_prefix, write_template_prefix): Likewise.
2197 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
2199 * class.c (add_method): Always build an OVERLOAD for using-decls.
2200 * search.c (lookup_member): Handle getting an OVERLOAD for a
2203 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2206 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
2208 * cp-tree.h (build_x_arrow): Adjust prototype.
2209 * pt.c (tsubst_copy_and_build): Adjust call.
2210 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
2212 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
2214 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
2216 2012-02-29 Jason Merrill <jason@redhat.com>
2219 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
2220 (shadow_tag): From here.
2221 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
2223 2012-02-21 Jakub Jelinek <jakub@redhat.com>
2226 * typeck.c (check_literal_operator_args): Initialize *long_double_p
2227 and *long_long_unsigned_p even if processing_template_decl.
2229 2012-02-16 Jason Merrill <jason@redhat.com>
2232 * decl.c (define_label): Use timevar_cond_start/stop.
2234 2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
2237 * decl.c (xref_basetypes): call dependent_scope_p instead of
2240 2012-02-16 Jason Merrill <jason@redhat.com>
2243 * error.c (dump_expr): Handle lambda closures specifically.
2245 2012-02-14 Jason Merrill <jason@redhat.com>
2247 * parser.c (cp_parser_explicit_instantiation): Give a warning
2248 for ignored attributes on explicit class instantiation.
2250 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2253 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
2254 lookup_label on label's name and set TREE_USED.
2256 2012-02-14 Jason Merrill <jason@redhat.com>
2259 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
2261 2012-02-14 Jakub Jelinek <jakub@redhat.com>
2264 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
2265 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
2267 2012-02-07 Jason Merrill <jason@redhat.com>
2270 * semantics.c (cx_check_missing_mem_inits): Handle unions.
2271 Fix constexpr default constructor logic.
2274 * pt.c (tsubst): Strip uninstantiated typedef.
2276 2012-02-06 Jason Merrill <jason@redhat.com>
2279 * cvt.c (build_expr_type_conversion): Check for template conversion.
2281 2012-01-31 Jason Merrill <jason@redhat.com>
2284 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
2285 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
2286 (tsubst_pack_expansion): Check it.
2288 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2291 * class.c (explain_non_literal_class): Correctly handle implicitly
2292 deleted constructors.
2294 2012-01-27 Jakub Jelinek <jakub@redhat.com>
2297 * pt.c (tsubst_pack_expansion): Delete and restore
2298 local_specialization whenever need_local_specialization, not just
2299 when saved_local_specializations is non-NULL.
2301 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
2304 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
2305 as TREE_OPERAND (t, 1).
2307 2012-01-24 Jason Merrill <jason@redhat.com>
2310 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
2313 * tree.c (called_fns_equal): Check template args.
2314 (cp_tree_equal): Call it.
2316 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
2317 Patrick Marlier <patrick.marlier@gmail.com>
2320 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
2321 thunk for set_one_vmethod_tm_attributes.
2323 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2326 * call.c (build_over_call): Check for error_mark_node as
2327 TREE_VALUE when default arguments are processed.
2329 2012-01-23 Jason Merrill <jason@redhat.com>
2332 * decl2.c (determine_visibility): Check for visibility attribute
2333 on template specialization.
2335 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2338 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
2340 2012-01-23 Jason Merrill <jason@redhat.com>
2343 * class.c (add_method): Set OVL_USED for using-decls.
2344 * tree.c (ovl_scope): New.
2345 * cp-tree.h: Declare it.
2346 * parser.c (cp_parser_template_name): Use it.
2347 * semantics.c (baselink_for_fns): Likewise.
2348 * name-lookup.c (set_inherited_value_binding_p): Likewise.
2350 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2353 * pt.c (lookup_template_class_1): Check context returned by
2354 tsubst for error_mark_node.
2356 2012-01-19 Kai Tietz <ktietz@redhat.com>
2359 * decl2.c (save_template_attributes): Use merge_attributes
2360 instead of chaining up via TREE_CHAIN.
2362 2012-01-19 Jason Merrill <jason@redhat.com>
2365 * class.c (finish_struct): Call add_method here for function usings.
2366 * semantics.c (finish_member_declaration): Not here.
2368 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
2371 * typeck2.c (store_init_value): Within a template guard
2372 cxx_constant_value with require_potential_constant_expression.
2373 * pt.c (convert_nontype_argument): Likewise.
2375 2012-01-16 Jakub Jelinek <jakub@redhat.com>
2378 * mangle.c (write_template_arg_literal): Handle complex.
2380 2012-01-16 Jason Merrill <jason@redhat.com>
2383 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2386 * typeck.c (build_static_cast_1): Handle bit-fields properly.
2388 2012-01-13 Ian Lance Taylor <iant@google.com>
2391 * typeck.c (enum_cast_to_int): New static function.
2392 (cp_build_binary_op): When handling warn_sign_compare, don't test
2393 for TREE_NO_WARNING. Do call enum_cast_to_int.
2394 * call.c (avoid_sign_compare_warnings): Remove static function.
2395 (build_new_op_1): Don't call avoid_sign_compare_warnings.
2397 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
2399 * decl2.c: Do not include tree-mudflap.h
2400 * semantics.c: Likewise.
2402 2012-01-13 Jason Merrill <jason@redhat.com>
2405 * semantics.c (finish_break_stmt): Avoid adding an unreachable
2409 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2410 when reducing the visibility.
2413 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2415 2012-01-12 Jason Merrill <jason@redhat.com>
2418 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2421 2012-01-13 Dodji Seketeli <dodji@redhat.com>
2424 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2425 Set the pointer to the last block of the constructor to the
2427 (build_constexpr_constructor_member_initializers): Get
2428 build_data_member_initialization a chance to deal with more
2429 statements before we choke.
2431 2012-01-12 Jason Merrill <jason@redhat.com>
2434 * mangle.c (write_expression): Mangle BASELINK scope if
2435 BASELINK_QUALIFIED_P.
2436 * search.c (adjust_result_of_qualified_name_lookup): Set
2437 BASELINK_QUALIFIED_P.
2438 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2439 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2440 adjust_result_of_qualified_name_lookup for non-qualified names.
2443 * pt.c (unify): Handle error_mark_node.
2445 2012-01-11 Jason Merrill <jason@redhat.com>
2448 * call.c (standard_conversion): For ptrmemfuncs, compare the
2452 * mangle.c (find_substitution): A type is only a substitution
2453 match if we're looking for a type.
2454 (write_nested_name): Use decl_mangling_context.
2456 * decl.c (decls_match): Assert that the arguments are decls.
2459 * pt.c (resolve_overloaded_unification): Compare types with
2460 same_type_p, not decls_match.
2462 2012-01-10 Jason Merrill <jason@redhat.com>
2465 * class.c (build_base_path): Diagnose ambiguous base.
2468 * semantics.c (cxx_eval_call_expression): Always retry previously
2469 non-constant expressions.
2471 2012-01-06 Jason Merrill <jason@redhat.com>
2475 * parser.c (cp_parser_new_expression): Set
2476 type_definition_forbidden_message.
2482 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2483 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
2485 (write_template_arg): Fix mangling of class-scope functions and
2487 (mangle_decl): Update suggested -fabi-version argument.
2488 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2489 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2490 * tree.c (dependent_name): No longer static.
2491 * cp-tree.h: Declare it.
2492 * pt.c (unify): Defer handling of unconverted functions.
2494 * mangle.c (mangle_decl): Don't generate mangling aliases
2495 for maybe-in-charge [cd]tors.
2497 * error.c (dump_expr): Print type of CONSTRUCTOR.
2499 2012-01-05 Dodji Seketeli <dodji@redhat.com>
2502 * parser.c (cp_parser_alias_declaration): Get out early upon
2503 errors in the identifier or the attributes.
2505 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
2508 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2509 the tree returned by build_x_binary_op.
2511 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2514 * parser.c (cp_parser_postfix_open_square_expression): Handle
2515 postfix-expression [ braced-init-list ].
2517 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2520 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2521 call decay_conversion on v.
2523 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2526 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2527 declaration followed by specialization.
2529 2012-01-03 Jakub Jelinek <jakub@redhat.com>
2532 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2533 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2535 2012-01-02 Jason Merrill <jason@redhat.com>
2539 * method.c (walk_field_subobs): Don't check for uninitialized
2541 (synthesized_method_walk): Check here.
2545 * parser.c (cp_parser_cache_defarg): Split out...
2546 (cp_parser_parameter_declaration): ...from here.
2547 (cp_parser_save_nsdmi): Use it.
2548 (cp_parser_cache_group): Remove CPP_COMMA support.
2550 2012-01-02 Dodji Seketeli <dodji@redhat.com>
2553 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2556 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
2559 * typeck2.c (digest_init_r): Use copy_init when initializing
2562 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2565 * decl.c (build_enumerator): Don't call perform_integral_promotions
2568 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
2571 * typeck.c (build_reinterpret_cast_1): Implement resolution of
2574 2012-01-01 Fabien ChĂȘne <fabien@gcc.gnu.org>
2576 * parser.c (cp_parser_using_declaration): Add a warning about
2577 deprecated access declarations when no errors were encountered
2578 while parsing the access declaration. Save the first token in
2579 order to emit the warning at the right place.
2581 Copyright (C) 2012 Free Software Foundation, Inc.
2583 Copying and distribution of this file, with or without modification,
2584 are permitted in any medium without royalty provided the copyright
2585 notice and this notice are preserved.