1 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
4 * semantics.c (cxx_eval_array_reference): Check for negative index.
6 2013-03-14 Jason Merrill <jason@redhat.com>
9 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
12 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
13 dso_handle parm on targets without __cxa_atexit.
15 2013-03-11 Jason Merrill <jason@redhat.com>
18 * typeck.c (check_return_expr): Disallow returning init list here.
19 * semantics.c (apply_deduced_return_type): Not here.
21 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
24 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
25 * error.c (dump_expr): Likewise.
27 2013-03-08 Jason Merrill <jason@redhat.com>
30 * class.c (modify_all_vtables): Mangle the vtable name before
33 * semantics.c (lambda_expr_this_capture): In unevaluated context,
34 just return the nearest 'this'.
39 * tree.c (maybe_dummy_object): Don't capture 'this'.
40 * semantics.c (maybe_resolve_dummy): New.
41 (finish_non_static_data_member): Use it.
42 (finish_qualified_id_expr): Don't test is_dummy_object.
43 * cp-tree.h: Declare maybe_resolve_dummy.
44 * call.c (build_new_method_call_1): Use it.
47 * semantics.c (apply_deduced_return_type): Don't allow returning
48 std::initializer_list.
50 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
53 * parser.c (cp_parser_elaborated_type_specifier): Don't call
54 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
55 * decl.c (check_elaborated_type_specifier): Tidy.
57 2013-03-06 Jakub Jelinek <jakub@redhat.com>
60 * tree.c (strip_typedefs): Don't copy args if they are NULL.
62 2013-03-05 Jakub Jelinek <jakub@redhat.com>
64 * parser.c (cp_parser_braced_list): For {} initialize
65 *non_constant_p to false.
67 2013-03-04 Jason Merrill <jason@redhat.com>
71 * semantics.c (lambda_expr_this_capture): Handle NSDMI
74 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
76 * decl.c (grokdeclarator): Remove dead code.
78 2013-02-28 Jason Merrill <jason@redhat.com>
81 * semantics.c (potential_constant_expression_1): Use
82 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
85 * call.c (build_over_call): Avoid virtual lookup in a template.
87 2013-02-27 Jason Merrill <jason@redhat.com>
91 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
92 of the base name for inheriting ctors.
93 (push_class_level_binding_1): Remove inheriting ctor handling.
94 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
95 * class.c (add_implicitly_declared_members): Adjust.
97 2013-02-26 David Binderman <dcb314@hotmail.com>
100 * decl.c (grokdeclarator): Tidy publicp assignment.
102 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
105 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
106 (build_transaction_expr): Same.
108 2013-02-25 Jason Merrill <jason@redhat.com>
111 * pt.c (fn_type_unification): Wait to call push_tinst_level until
112 we know what args we're looking at.
115 * semantics.c (potential_constant_expression_1): In C++98, a cast
116 to non-integral type can't be a constant expression.
118 2013-02-24 Jakub Jelinek <jakub@redhat.com>
121 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
124 2013-02-22 Jason Merrill <jason@redhat.com>
127 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
128 if we got the wrong number of template parms.
131 * pt.c (fn_type_unification): Use explicit args in template
132 instantiation context.
135 * call.c (can_convert_arg): Discard access checks.
138 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
141 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
144 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
145 * cvt.c (ocp_convert): Use the latter.
146 (cp_convert_to_pointer): Likewise.
147 * decl.c (check_default_argument): Likewise.
148 * typeck.c (cp_build_binary_op): Likewise.
149 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
151 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
152 Paolo Carlini <paolo.carlini@oracle.com>
155 * decl2.c (grokbitfield): Allow scoped enumeration types.
157 2013-02-15 Jason Merrill <jason@redhat.com>
160 * semantics.c (finish_id_expression): Also return the identifier
161 for an outer local static.
164 * class.c (check_bases_and_members): Deduce noexcept after
168 * semantics.c (finish_id_expression): In a template, return
169 the identifier for a constant variable.
171 2013-02-14 Jason Merrill <jason@redhat.com>
174 * semantics.c (build_anon_member_initialization): New.
175 (build_data_member_initialization): Use it.
178 * decl.c (cp_finish_decl): Force instantiation of an
179 auto static data member.
182 * pt.c (unify): A pack expansion that is not the last template
183 argument makes the entire template argument list non-deduced.
186 * name-lookup.c (do_class_using_decl): Handle typedefs with
187 inheriting constructors.
188 (push_class_level_binding_1): Allow inheriting from template
189 template parameter, too.
190 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
193 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
194 default argument scope.
195 * mangle.c (write_name): Likewise.
198 * error.c (find_typenames_r): Don't walk into a pack expansion.
200 2013-02-13 Jason Merrill <jason@redhat.com>
203 * parser.c (cp_parser_member_declaration): Check the declarator
204 form when detecting a function declaration via typedef.
207 * pt.c (maybe_process_partial_specialization): A lambda
208 isn't what's being specialized.
211 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
215 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
218 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
219 non-zero offsets, too.
222 * decl.c (build_enumerator): Always convert the value to a
223 fixed underlying type.
226 * pt.c (tsubst_copy_and_build): Don't forget any new
227 captures that arose from use of dependent names.
229 2013-02-13 Jakub Jelinek <jakub@redhat.com>
232 * semantics.c (finish_asm_stmt): If input constraints allow
233 neither register nor memory, try maybe_constant_value to get
234 a constant if possible.
236 2013-02-12 Jason Merrill <jason@redhat.com>
239 * method.c (add_one_base_init): Handle base constructor
240 taking rvalue reference parm.
243 * semantics.c (sort_constexpr_mem_initializers): Handle
246 2013-02-09 Jason Merrill <jason@redhat.com>
249 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
250 maybe_instantiate_noexcept.
253 * pt.c (eq_specializations): Set comparing_specializations.
254 * tree.c (cp_tree_equal): Check it.
255 * cp-tree.h: Declare it.
257 * decl.c (decls_match): Check versions later.
260 * pt.c (build_non_dependent_expr): Don't try to fold
261 instantiation-dependent expressions.
262 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
263 [BIND_EXPR]: Treat as dependent.
265 2013-02-07 Jakub Jelinek <jakub@redhat.com>
268 * init.c (build_vec_init): Don't append NULL values into new_vec.
269 (build_zero_init_1): Don't push anything into v if recursive call
271 (build_value_init_noctor): Don't push anything into v if
272 build_value_init call returned NULL_TREE.
275 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
276 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
277 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
278 return true only if 2nd token isn't CPP_CLOSE_PAREN.
279 (cp_parser_cast_expression): Adjust caller.
282 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
283 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
284 DECL_LANG_SPECIFIC (t).
286 2013-02-07 Jason Merrill <jason@redhat.com>
289 * method.c (do_build_copy_constructor): Don't bother turning
290 scalars from lvalues to xvalues.
291 (do_build_copy_assign): Likewise.
293 2013-02-06 Jason Merrill <jason@redhat.com>
295 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
297 2013-02-05 Jason Merrill <jason@redhat.com>
300 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
304 * decl.c (start_preparsed_function): Update restype if we change
308 * pt.c (fn_type_unification): Discard any access checks from
309 substituting explicit args.
311 2013-01-31 Jason Merrill <jason@redhat.com>
315 * typeck.c (get_member_function_from_ptrfunc): Fix
316 ptrmemfunc_vbit_in_delta case.
318 2013-01-29 Jason Merrill <jason@redhat.com>
321 * class.c (build_ctor_vtbl_group): Give construction vtables
324 2013-01-25 Jason Merrill <jason@redhat.com>
327 * pt.c (convert_nontype_argument_function): Handle invalid input.
328 (convert_nontype_argument): Likewise.
331 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
332 dynamic type has no virtual functions.
334 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
337 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
338 on TARGET_EXPR nodes.
340 2013-01-22 Jason Merrill <jason@redhat.com>
343 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
345 2013-01-22 Dodji Seketeli <dodji@redhat.com>
348 * pt.c (argument_pack_element_is_expansion_p)
349 (make_argument_pack_select, use_pack_expansion_extra_args_p)
350 (gen_elem_of_pack_expansion_instantiation): New static functions.
351 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
352 look through the possibly resulting pack expansion as well.
353 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
354 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
355 Use gen_elem_of_pack_expansion_instantiation to build the
356 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
357 as gen_elem_of_pack_expansion_instantiation and the change in
358 tsubst above generalize this particular case.
359 (arg_from_parm_pack_p): Remove this for it's not used by
360 tsubst_pack_expansion anymore.
362 2013-01-21 Jason Merrill <jason@redhat.com>
365 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
368 2013-01-18 Jason Merrill <jason@redhat.com>
371 * decl2.c (get_local_tls_init_fn): New.
372 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
373 with aliases for internal variables. Don't use weakrefs if
374 the variable needs destruction.
375 (generate_tls_wrapper): Mark the wrapper as const if no
376 initialization is needed.
377 (handle_tls_init): Don't require aliases.
379 2013-01-15 Dodji Seketeli <dodji@redhat.com>
382 * pt.c (coerce_innermost_template_parms): New static function.
383 (instantiate_alias_template): Use it here.
385 2013-01-09 Jason Merrill <jason@redhat.com>
388 * rtti.c (build_typeid, get_typeid): Add complain parm.
389 (get_tinfo_decl_dynamic): Likewise.
390 * cp-tree.h, parser.c, pt.c: Adjust.
393 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
396 2013-01-09 Jakub Jelinek <jakub@redhat.com>
399 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
400 call maybe_constant_value for the negative or too big shift
403 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
406 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
407 of the argument is true.
409 2013-01-08 Joel Brobecker <brobecker@adacore.com>
411 * parser.c (cp_parser_initializer_list): Move declaration
412 of variable non_const to start of lexical block.
414 2013-01-07 Jason Merrill <jason@redhat.com>
417 * tree.c (build_aggr_init_expr): Do nothing in a template.
418 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
419 a FUNCTION_DECL before tsubsting.
421 2013-01-04 Dodji Seketeli <dodji@redhat.com>
424 * pt.c (check_instantiated_arg): Allow type template arguments.
426 2013-01-04 Jason Merrill <jason@redhat.com>
429 * decl.c (reset_type_linkage, bt_reset_linkage): New.
430 (grokdeclarator): Use reset_type_linkage.
431 * name-lookup.c (binding_table_foreach): Handle null table.
432 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
434 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
437 * parser.c (cp_parser_template_id): Revert core of previous change
438 (keep adjusted inform message).
440 2013-01-03 Jason Merrill <jason@redhat.com>
444 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
448 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
451 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
454 * call.c (type_has_extended_temps): New.
455 * cp-tree.h: Declare it.
456 * decl.c (check_initializer): Use build_aggr_init for arrays
458 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
460 2013-01-02 Jason Merrill <jason@redhat.com>
463 * call.c (build_new_method_call_1): Don't use build_value_init for
464 user-provided default constructors.
466 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
470 * tree.c (build_cplus_array_type): Copy layout information
471 to main variant if necessary.
473 Copyright (C) 2013 Free Software Foundation, Inc.
475 Copying and distribution of this file, with or without modification,
476 are permitted in any medium without royalty provided the copyright
477 notice and this notice are preserved.