1 2011-03-15 Jason Merrill <jason@redhat.com>
4 * method.c (synthesized_method_walk): Cleanups don't affect the
5 triviality of a constructor, but do affect deletion and exception
8 2011-03-15 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
10 * decl2.c (cp_check_const_attributes): New.
11 (cplus_decl_attributes): Call cp_check_const_attributes.
13 2011-03-15 Jason Merrill <jason@redhat.com>
16 * call.c (convert_default_arg): Use DECL_ORIGIN of fn. Check for
18 (push_defarg_context, pop_defarg_context): New.
19 * parser.c (cp_parser_late_parsing_default_args): Use them.
20 * cp-tree.h: Declare them.
22 2011-03-11 Dodji Seketeli <dodji@redhat.com>
24 * call.c (add_builtin_candidate)<case INDIRECT_REF>: The type of
25 the argument of the indirection operator should not be dependent.
28 2011-03-11 Jason Merrill <jason@redhat.com>
31 * pt.c (tsubst) [TYPENAME_TYPE]: Only give errors if tf_error.
34 * parser.c (cp_parser_template_type_arg): Set
35 type_definition_forbidden_message.
38 * decl.c (compute_array_index_type): Discard folding
39 if it didn't produce a constant.
41 2011-03-11 Jakub Jelinek <jakub@redhat.com>
44 * init.c (build_zero_init_1): Extracted from build_zero_init.
45 Add FIELD_SIZE argument, if non-NULL and field bit_position
46 as not smaller than that, don't add that field's initializer.
47 Pass DECL_SIZE as last argument to build_zero_init_1
48 for DECL_FIELD_IS_BASE fields.
49 (build_zero_init): Use build_zero_init_1.
51 2011-03-10 Jason Merrill <jason@redhat.com>
54 * pt.c (iterative_hash_template_arg): Remove special case for
58 * parser.c (cp_parser_single_declaration): Just return if
59 cp_parser_parse_and_diagnose_invalid_type_name complained.
61 2011-03-09 Jason Merrill <jason@redhat.com>
64 * pt.c (unify): An unresolved overload is a nondeduced context.
66 2011-03-09 Martin Jambor <mjambor@suse.cz>
68 PR tree-optimization/47714
69 * method.c (use_thunk): Clear addressable flag of thunk arguments.
71 2011-03-08 Dodji Seketeli <dodji@redhat.com>
74 * pt.c (convert_nontype_argument): Only call decay_conversion on
77 2011-03-08 Jason Merrill <jason@redhat.com>
80 * mangle.c (write_template_arg_literal) [STRING_CST]: Sorry.
83 * pt.c (convert_nontype_argument): Don't crash on non-pointer
84 argument to pointer parameter.
87 * pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on
90 2011-03-08 Dodji Seketeli <dodji@redhat.com>
93 * name-lookup.c (binding_to_template_parms_of_scope_p): Only
94 consider scopes of primary template definitions. Adjust comments.
96 2011-03-07 Jason Merrill <jason@redhat.com>
99 * pt.c (convert_nontype_argument): Fix -fpermissive allowing
101 * semantics.c (potential_constant_expression_1): Check TREE_OVERFLOW.
104 * init.c (constant_value_1): Always require init to be TREE_CONSTANT.
107 * mangle.c (write_type): Strip cv-quals from FUNCTION_TYPE here.
108 (write_CV_qualifiers_for_type): Not here.
110 2011-03-06 Joseph Myers <joseph@codesourcery.com>
112 * lang-specs.h: Match -save-temps* instead of -save-temps.
114 2011-03-05 Jason Merrill <jason@redhat.com>
116 * mangle.c (write_expression): Change ABI v6 to v5.
117 (write_type): Likewise.
119 2011-03-04 Jan Hubicka <jh@suse.cz>
122 * optimize.c (maybe_clone_body): Update call of cgraph_same_body_alias
123 and cgraph_add_thunk.
124 * method.c (make_alias_for_thunk, use_thunk): Likewise.
125 * mangle.c (mangle_decl): Likewise.
127 2011-03-04 Jason Merrill <jason@redhat.com>
130 * pt.c (tsubst_copy_and_build) [PSEUDO_DTOR_EXPR]: Use tsubst for type.
131 (tsubst_copy) [default]: Just return t if !ENABLE_CHECKING.
134 * search.c (check_final_overrider): Allow pointer to same incomplete
135 class type with different cv-quals.
137 2011-03-03 Paolo Carlini <paolo.carlini@oracle.com>
140 * pt.c (tsubst_template_args): Check argument t for error_mark_node.
142 2011-03-03 Jason Merrill <jason@redhat.com>
145 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Retain TREE_CONSTANT.
147 2011-03-02 Jason Merrill <jason@redhat.com>
150 * parser.c (cp_parser_condition): Don't fold_non_dependent_expr here.
153 * tree.c (build_vec_init_elt): Split out from...
154 (build_vec_init_expr): ...here.
155 (diagnose_non_constexpr_vec_init): New fn.
156 * semantics.c (potential_constant_expression_1): Use it.
157 * cp-tree.h: Declare it.
159 2011-03-01 Jason Merrill <jason@redhat.com>
162 * parser.c (cp_parser_primary_expression): Don't warn about a
163 failed tentative parse.
166 * semantics.c (cxx_bind_parameters_in_call): Don't call
167 adjust_temp_type on non-constant args.
170 * call.c (standard_conversion): Provide requested cv-quals on
171 class rvalue conversion.
174 * decl2.c (grokbitfield): Handle type-dependent width.
176 2011-02-28 Jason Merrill <jason@redhat.com>
179 * class.c (update_vtable_entry_for_fn): Check BINFO_LOST_PRIMARY_P
180 after checking for a non-thunk.
182 2011-02-26 Jason Merrill <jason@redhat.com>
185 * tree.c (cp_tree_equal): Compare DECL_PARM_LEVEL.
186 * pt.c (iterative_hash_template_arg): And hash it.
189 * semantics.c (non_const_var_error): Split out from...
190 (cxx_eval_constant_expression): ...here.
191 (potential_constant_expression_1) [VAR_DECL]: Use it.
192 Allow dependent variables.
194 2011-02-24 Jason Merrill <jason@redhat.com>
196 * parser.c (cp_parser_constant_expression): Set
197 non_integral_constant_expression correctly for C++0x too.
198 (cp_parser_static_assert): Allow non-constant expression.
199 (cp_parser_direct_declarator): Expect non_constant_p to be set
201 * pt.c (value_dependent_expression_p): Handle TYPEID_EXPR.
202 * semantics.c (maybe_constant_value): Check type_unknown_p too.
203 (potential_rvalue_constant_expression): New.
204 (require_potential_rvalue_constant_expression): New.
206 2011-02-23 Jason Merrill <jason@redhat.com>
208 * cp-tree.h (DECL_PARM_LEVEL): New.
209 (struct lang_decl_parm): Add level field.
210 * name-lookup.c (function_parm_depth): New fn.
211 * name-lookup.h: Declare it.
212 * parser.c (cp_parser_parameter_declaration_list): Use it.
213 * mangle.c (struct globals): Add parm_depth field.
214 (write_bare_function_type): Adjust it.
215 (write_expression): Include the level delta in PARM_DECL mangling
218 * semantics.c (finish_decltype_type): Remove shortcut for decltype
220 * mangle.c (write_type) [DECLTYPE_TYPE]: Strip it here for abi < 6.
222 2011-02-23 Nathan Froyd <froydnj@codesourcery.com>
225 * parser.c (cp_parser_class_specifier): Require a closing brace
226 to attempt error recovery.
228 2011-02-23 Jakub Jelinek <jakub@redhat.com>
231 * pt.c (struct pending_template): Add chain_next GTY option.
232 * decl.c (struct named_label_use_entry): Likewise.
234 2011-02-22 Paolo Carlini <paolo.carlini@oracle.com>
237 * semantics.c (build_lambda_object): Bail out if a field is
240 2011-02-22 Dodji Seketeli <dodji@redhat.com>
243 * class.c (dfs_declare_virt_assop_and_dtor)
244 (declare_virt_assop_and_dtor): New static functions.
245 (add_implicitly_declared_members): Use
246 declare_virt_assop_and_dtor.
248 2011-02-21 Jason Merrill <jason@redhat.com>
251 * decl2.c (decl_constant_var_p): A constexpr var needs an
252 initializer to be constant.
253 * semantics.c (cxx_eval_constant_expression): Complain about
254 constexpr var used in its own initializer.
255 * call.c (set_up_extended_ref_temp): Set
256 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P too.
258 2011-02-20 Jason Merrill <jason@redhat.com>
261 * semantics.c (cxx_eval_call_expression): Call
262 cxx_eval_constant_expression in trivial shortcut.
265 * call.c (convert_class_to_reference): Don't try to set up a
266 second conv sequence for non-viable candidates.
269 * error.c (location_of): Handle non-tagged types.
272 * method.c (process_subob_fn): Instantiate constexpr templates.
273 * optimize.c (maybe_clone_body): Propagate DECL_DECLARED_CONSTEXPR_P.
275 2011-02-20 Dodji Seketeli <dodji@redhat.com>
278 * pt.c (tsubst_pack_expansion): do not use
279 cp_tree_equal/same_type_p to detect an expansion of a parameter
282 2011-02-19 Jason Merrill <jason@redhat.com>
285 * semantics.c (cxx_eval_call_expression): Shortcut trivial copy.
287 2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
290 * semantics.c (finish_non_static_data_member): Early return if
291 object is error_mark_node.
293 2011-02-18 Dodji Seketeli <dodji@redhat.com>
296 * pt.c (do_auto_deduction): Do not mention error_mark_node in
298 * semantics.c (finish_id_expression): Do not pass erroneous decl
299 to decl_constant_var_p.
301 2011-02-17 Jakub Jelinek <jakub@redhat.com>
304 * cvt.c (convert_from_reference): Call mark_exp_read.
306 2011-02-11 Dodji Seketeli <dodji@redhat.com>
309 * pt.c (finish_call_expr): Consider a call expression that has a
310 dependent "this" pointer as being dependent. Add comments.
311 (dependent_type_p, type_dependent_expression_p): Update comments.
313 2011-02-16 Dodji Seketeli <dodji@redhat.com>
316 * pt.c (tsubst_copy)<case SIZEOF_EXPR>: Ensure that even pack
317 expansion arguments are not evaluated.
319 2011-02-16 Jakub Jelinek <jakub@redhat.com>
322 * cp-tree.h (ENUM_FIXED_UNDERLYING_TYPE_P): Use TYPE_LANG_FLAG_5
323 instead of TYPE_LANG_FLAG_3.
324 * pt.c (lookup_template_class): Copy over
325 ENUM_FIXED_UNDERLYING_TYPE_P.
327 2011-02-15 Jason Merrill <jason@redhat.com>
330 * method.c (synthesized_method_walk): Always exit early for
331 trivial fn in C++98 mode.
333 2011-02-14 Jason Merrill <jason@redhat.com>
336 * parser.c (cp_parser_enumerator_definition): Call
337 fold_non_dependent_expr.
339 2011-02-09 Jason Merrill <jason@redhat.com>
341 * decl.c (cp_make_fname_decl): Set DECL_THIS_STATIC at toplevel.
342 * semantics.c (finish_fname): Only return the name if we're in
345 * decl.c (build_enumerator): Don't perform integral promotions on
346 non-integral constants.
348 * cvt.c (convert_to_void): Handle null op1.
350 * class.c (type_has_constexpr_default_constructor): Make sure the
351 caller stripped an enclosing array.
352 * init.c (perform_member_init): Strip arrays before calling it.
355 * semantics.c (potential_constant_expression_1): Handle TEMPLATE_DECL.
357 2011-02-03 Dodji Seketeli <dodji@redhat.com>
360 * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of
361 template parameters in account.
363 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
366 * parser.c (cp_parser_class_specifier): Fix setting of
369 2011-01-31 Jakub Jelinek <jakub@redhat.com>
372 * semantics.c (build_data_member_initialization): Handle
373 STATEMENT_LIST always instead of just for CLEANUP_BODY.
375 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
377 * g++spec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
378 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
380 2011-01-29 Dodji Seketeli <dodji@redhat.com>
383 * cp-tree.h (fixup_template_parms): Declare.
384 * pt.c (end_template_parm_list): Do not fixup template parms here.
385 (fixup_template_parms): Remove static. Fix typo in the
386 comments. Remove useless code statement.
387 (fixup_template_parm): For a template template parameter, fixup
388 its attributes before fixing up its type.
390 (cp_parser_template_declaration_after_export): After parsing
391 template parameters fixup their types.
393 2011-01-26 Jakub Jelinek <jakub@redhat.com>
396 * semantics.c (potential_constant_expression_1): Handle
399 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
402 * semantics.c (expand_or_defer_fn_1): Handle it.
403 * decl2.c (decl_needed_p): Likewise.
405 2011-01-21 Jason Merrill <jason@redhat.com>
408 * semantics.c (build_constexpr_constructor_member_initializers):
411 2011-01-21 Jakub Jelinek <jakub@redhat.com>
414 * semantics.c (begin_for_stmt): If -fno-for-scope, don't
415 assume init must be NULL if scope is NULL.
416 (begin_range_for_stmt): Likewise.
418 2011-01-21 Jason Merrill <jason@redhat.com>
421 * semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.
424 * semantics.c (potential_constant_expression_1): Split out from
425 potential_constant_expression. Add want_rval parm. Handle
426 template expression forms. Don't enforce restriction on address
427 of automatic variable here. Add a couple of diagnostics that
429 (require_potential_constant_expression): New entry point.
430 (build_data_member_initialization, register_constexpr_fundef): Adjust.
431 (maybe_constant_value): Check potential_constant_expression.
432 * pt.c (fold_non_dependent_expr_sfinae): Likewise.
433 * tree.c (build_vec_init_expr): Adjust.
435 2011-01-19 Jakub Jelinek <jakub@redhat.com>
438 * decl2.c (finish_anon_union): Only call mangle_decl if TREE_STATIC
441 2011-01-17 Jason Merrill <jason@redhat.com>
444 * semantics.c (base_field_constructor_elt): New fn.
445 (cxx_eval_bare_aggregate): Use it.
446 (build_data_member_initialization): Leave COMPONENT_REF for
449 2011-01-14 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
451 * parser.c (cp_parser_range_for): Remove the "unused variable" warning
454 2011-01-15 Giovanni Funchal <gafunchal@gmail.com>
455 Jonathan Wakely <jwakely.gcc@gmail.com>
458 * decl.c (grokdeclarator): Reject mutable reference members.
460 2011-01-14 Jason Merrill <jason@redhat.com>
463 * pt.c (coerce_template_parms): Fix error recovery.
466 * typeck2.c (check_narrowing): Only check arithmetic types.
469 * tree.c (build_vec_init_expr): Handle flexible array
472 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
475 * cp-tree.h (CLASSTYPE_VISIBILITY): Use
476 TYPE_MAIN_DECL instead of TYPE_NAME.
477 (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise.
478 * decl2.c (determine_visibility): Add check
479 of CLASS_TYPE_P for underlying_type.
481 2011-01-12 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
483 * cp-tree.h (begin_for_scope): New prototype.
484 (begin_for_stmt): Update prototype.
485 (begin_range_for_stmt): Update prototype.
486 * init.c (build_vec_init): Update call to begin_for_stmt.
487 * parser.c (cp_parser_for): New.
488 (cp_parser_c_for): Add three new parameters.
489 (cp_parser_range_for): Likewise. Most parsing code removed.
490 (cp_parser_iteration_statement): Call cp_parser_for instead of
491 cp_parser_c_for and cp_parser_range_for.
492 (cp_parser_for_init_statement): Add new parameter and return type.
493 (cp_parser_block_declaration): Update call to
494 cp_parser_simple_declaration.
495 (cp_parser_simple_declaration): Add new parameter.
496 Update call to cp_parser_init_declarator.
497 (cp_parser_init_declarator): Add new parameter.
498 * pt.c (tsubst_expr): Update call to begin_for_stmt.
499 * semantics.c (begin_for_scope): New.
500 (begin_for_stmt): Add two new parameters.
501 (begin_range_for_stmt): Likewise.
503 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
505 * parser.c (cp_parser_objc_at_property_declaration): Improved
508 2011-01-11 Dodji Seketeli <dodji@redhat.com>
511 * cp-lang.c (get_template_innermost_arguments_folded)
512 (get_template_argument_pack_elems_folded)
513 (template_arg_needs_folding, fold_cplus_constants): New static
515 (LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
516 get_template_innermost_arguments_folded.
517 (LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
518 get_template_argument_pack_elems_folded.
520 2011-01-11 Jason Merrill <jason@redhat.com>
523 * init.c (build_new_1): Handle value-init in templates differently.
526 * tree.c (maybe_dummy_object): Check current_class_ref against
527 context, not current_class_type.
529 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
532 * parser.c (cp_parser_objc_typename): If the type is unknown, for
533 error recovery purposes behave as if it was not specified so that
534 the default type is used.
536 2011-01-07 Jakub Jelinek <jakub@redhat.com>
539 * pt.c (tsubst_copy_and_build): Use tsubst instead of tsubst_copy
540 for the second build_x_va_arg argument.
542 2011-01-05 Tom Tromey <tromey@redhat.com>
544 * typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
545 (lvalue_or_else): Likewise.
547 2011-01-01 Kai Tietz <kai.tietz@onevision.com>
550 * tree.c (cxx_type_hash_eq):
551 Allow METHOD_TYPE, too.
554 Copyright (C) 2011 Free Software Foundation, Inc.
556 Copying and distribution of this file, with or without modification,
557 are permitted in any medium without royalty provided the copyright
558 notice and this notice are preserved.