1 2013-03-14 Jason Merrill <jason@redhat.com>
4 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
7 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
8 dso_handle parm on targets without __cxa_atexit.
10 2013-03-11 Jason Merrill <jason@redhat.com>
13 * typeck.c (check_return_expr): Disallow returning init list here.
14 * semantics.c (apply_deduced_return_type): Not here.
16 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
19 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
20 * error.c (dump_expr): Likewise.
22 2013-03-08 Jason Merrill <jason@redhat.com>
25 * class.c (modify_all_vtables): Mangle the vtable name before
28 * semantics.c (lambda_expr_this_capture): In unevaluated context,
29 just return the nearest 'this'.
34 * tree.c (maybe_dummy_object): Don't capture 'this'.
35 * semantics.c (maybe_resolve_dummy): New.
36 (finish_non_static_data_member): Use it.
37 (finish_qualified_id_expr): Don't test is_dummy_object.
38 * cp-tree.h: Declare maybe_resolve_dummy.
39 * call.c (build_new_method_call_1): Use it.
42 * semantics.c (apply_deduced_return_type): Don't allow returning
43 std::initializer_list.
45 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
48 * parser.c (cp_parser_elaborated_type_specifier): Don't call
49 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
50 * decl.c (check_elaborated_type_specifier): Tidy.
52 2013-03-06 Jakub Jelinek <jakub@redhat.com>
55 * tree.c (strip_typedefs): Don't copy args if they are NULL.
57 2013-03-05 Jakub Jelinek <jakub@redhat.com>
59 * parser.c (cp_parser_braced_list): For {} initialize
60 *non_constant_p to false.
62 2013-03-04 Jason Merrill <jason@redhat.com>
66 * semantics.c (lambda_expr_this_capture): Handle NSDMI
69 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
71 * decl.c (grokdeclarator): Remove dead code.
73 2013-02-28 Jason Merrill <jason@redhat.com>
76 * semantics.c (potential_constant_expression_1): Use
77 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
80 * call.c (build_over_call): Avoid virtual lookup in a template.
82 2013-02-27 Jason Merrill <jason@redhat.com>
86 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
87 of the base name for inheriting ctors.
88 (push_class_level_binding_1): Remove inheriting ctor handling.
89 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
90 * class.c (add_implicitly_declared_members): Adjust.
92 2013-02-26 David Binderman <dcb314@hotmail.com>
95 * decl.c (grokdeclarator): Tidy publicp assignment.
97 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
100 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
101 (build_transaction_expr): Same.
103 2013-02-25 Jason Merrill <jason@redhat.com>
106 * pt.c (fn_type_unification): Wait to call push_tinst_level until
107 we know what args we're looking at.
110 * semantics.c (potential_constant_expression_1): In C++98, a cast
111 to non-integral type can't be a constant expression.
113 2013-02-24 Jakub Jelinek <jakub@redhat.com>
116 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
119 2013-02-22 Jason Merrill <jason@redhat.com>
122 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
123 if we got the wrong number of template parms.
126 * pt.c (fn_type_unification): Use explicit args in template
127 instantiation context.
130 * call.c (can_convert_arg): Discard access checks.
133 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
136 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
139 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
140 * cvt.c (ocp_convert): Use the latter.
141 (cp_convert_to_pointer): Likewise.
142 * decl.c (check_default_argument): Likewise.
143 * typeck.c (cp_build_binary_op): Likewise.
144 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
146 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
147 Paolo Carlini <paolo.carlini@oracle.com>
150 * decl2.c (grokbitfield): Allow scoped enumeration types.
152 2013-02-15 Jason Merrill <jason@redhat.com>
155 * semantics.c (finish_id_expression): Also return the identifier
156 for an outer local static.
159 * class.c (check_bases_and_members): Deduce noexcept after
163 * semantics.c (finish_id_expression): In a template, return
164 the identifier for a constant variable.
166 2013-02-14 Jason Merrill <jason@redhat.com>
169 * semantics.c (build_anon_member_initialization): New.
170 (build_data_member_initialization): Use it.
173 * decl.c (cp_finish_decl): Force instantiation of an
174 auto static data member.
177 * pt.c (unify): A pack expansion that is not the last template
178 argument makes the entire template argument list non-deduced.
181 * name-lookup.c (do_class_using_decl): Handle typedefs with
182 inheriting constructors.
183 (push_class_level_binding_1): Allow inheriting from template
184 template parameter, too.
185 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
188 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
189 default argument scope.
190 * mangle.c (write_name): Likewise.
193 * error.c (find_typenames_r): Don't walk into a pack expansion.
195 2013-02-13 Jason Merrill <jason@redhat.com>
198 * parser.c (cp_parser_member_declaration): Check the declarator
199 form when detecting a function declaration via typedef.
202 * pt.c (maybe_process_partial_specialization): A lambda
203 isn't what's being specialized.
206 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
210 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
213 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
214 non-zero offsets, too.
217 * decl.c (build_enumerator): Always convert the value to a
218 fixed underlying type.
221 * pt.c (tsubst_copy_and_build): Don't forget any new
222 captures that arose from use of dependent names.
224 2013-02-13 Jakub Jelinek <jakub@redhat.com>
227 * semantics.c (finish_asm_stmt): If input constraints allow
228 neither register nor memory, try maybe_constant_value to get
229 a constant if possible.
231 2013-02-12 Jason Merrill <jason@redhat.com>
234 * method.c (add_one_base_init): Handle base constructor
235 taking rvalue reference parm.
238 * semantics.c (sort_constexpr_mem_initializers): Handle
241 2013-02-09 Jason Merrill <jason@redhat.com>
244 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
245 maybe_instantiate_noexcept.
248 * pt.c (eq_specializations): Set comparing_specializations.
249 * tree.c (cp_tree_equal): Check it.
250 * cp-tree.h: Declare it.
252 * decl.c (decls_match): Check versions later.
255 * pt.c (build_non_dependent_expr): Don't try to fold
256 instantiation-dependent expressions.
257 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
258 [BIND_EXPR]: Treat as dependent.
260 2013-02-07 Jakub Jelinek <jakub@redhat.com>
263 * init.c (build_vec_init): Don't append NULL values into new_vec.
264 (build_zero_init_1): Don't push anything into v if recursive call
266 (build_value_init_noctor): Don't push anything into v if
267 build_value_init call returned NULL_TREE.
270 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
271 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
272 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
273 return true only if 2nd token isn't CPP_CLOSE_PAREN.
274 (cp_parser_cast_expression): Adjust caller.
277 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
278 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
279 DECL_LANG_SPECIFIC (t).
281 2013-02-07 Jason Merrill <jason@redhat.com>
284 * method.c (do_build_copy_constructor): Don't bother turning
285 scalars from lvalues to xvalues.
286 (do_build_copy_assign): Likewise.
288 2013-02-06 Jason Merrill <jason@redhat.com>
290 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
292 2013-02-05 Jason Merrill <jason@redhat.com>
295 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
299 * decl.c (start_preparsed_function): Update restype if we change
303 * pt.c (fn_type_unification): Discard any access checks from
304 substituting explicit args.
306 2013-01-31 Jason Merrill <jason@redhat.com>
310 * typeck.c (get_member_function_from_ptrfunc): Fix
311 ptrmemfunc_vbit_in_delta case.
313 2013-01-29 Jason Merrill <jason@redhat.com>
316 * class.c (build_ctor_vtbl_group): Give construction vtables
319 2013-01-25 Jason Merrill <jason@redhat.com>
322 * pt.c (convert_nontype_argument_function): Handle invalid input.
323 (convert_nontype_argument): Likewise.
326 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
327 dynamic type has no virtual functions.
329 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
332 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
333 on TARGET_EXPR nodes.
335 2013-01-22 Jason Merrill <jason@redhat.com>
338 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
340 2013-01-22 Dodji Seketeli <dodji@redhat.com>
343 * pt.c (argument_pack_element_is_expansion_p)
344 (make_argument_pack_select, use_pack_expansion_extra_args_p)
345 (gen_elem_of_pack_expansion_instantiation): New static functions.
346 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
347 look through the possibly resulting pack expansion as well.
348 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
349 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
350 Use gen_elem_of_pack_expansion_instantiation to build the
351 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
352 as gen_elem_of_pack_expansion_instantiation and the change in
353 tsubst above generalize this particular case.
354 (arg_from_parm_pack_p): Remove this for it's not used by
355 tsubst_pack_expansion anymore.
357 2013-01-21 Jason Merrill <jason@redhat.com>
360 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
363 2013-01-18 Jason Merrill <jason@redhat.com>
366 * decl2.c (get_local_tls_init_fn): New.
367 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
368 with aliases for internal variables. Don't use weakrefs if
369 the variable needs destruction.
370 (generate_tls_wrapper): Mark the wrapper as const if no
371 initialization is needed.
372 (handle_tls_init): Don't require aliases.
374 2013-01-15 Dodji Seketeli <dodji@redhat.com>
377 * pt.c (coerce_innermost_template_parms): New static function.
378 (instantiate_alias_template): Use it here.
380 2013-01-09 Jason Merrill <jason@redhat.com>
383 * rtti.c (build_typeid, get_typeid): Add complain parm.
384 (get_tinfo_decl_dynamic): Likewise.
385 * cp-tree.h, parser.c, pt.c: Adjust.
388 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
391 2013-01-09 Jakub Jelinek <jakub@redhat.com>
394 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
395 call maybe_constant_value for the negative or too big shift
398 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
401 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
402 of the argument is true.
404 2013-01-08 Joel Brobecker <brobecker@adacore.com>
406 * parser.c (cp_parser_initializer_list): Move declaration
407 of variable non_const to start of lexical block.
409 2013-01-07 Jason Merrill <jason@redhat.com>
412 * tree.c (build_aggr_init_expr): Do nothing in a template.
413 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
414 a FUNCTION_DECL before tsubsting.
416 2013-01-04 Dodji Seketeli <dodji@redhat.com>
419 * pt.c (check_instantiated_arg): Allow type template arguments.
421 2013-01-04 Jason Merrill <jason@redhat.com>
424 * decl.c (reset_type_linkage, bt_reset_linkage): New.
425 (grokdeclarator): Use reset_type_linkage.
426 * name-lookup.c (binding_table_foreach): Handle null table.
427 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
429 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
432 * parser.c (cp_parser_template_id): Revert core of previous change
433 (keep adjusted inform message).
435 2013-01-03 Jason Merrill <jason@redhat.com>
439 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
443 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
446 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
449 * call.c (type_has_extended_temps): New.
450 * cp-tree.h: Declare it.
451 * decl.c (check_initializer): Use build_aggr_init for arrays
453 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
455 2013-01-02 Jason Merrill <jason@redhat.com>
458 * call.c (build_new_method_call_1): Don't use build_value_init for
459 user-provided default constructors.
461 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
465 * tree.c (build_cplus_array_type): Copy layout information
466 to main variant if necessary.
468 Copyright (C) 2013 Free Software Foundation, Inc.
470 Copying and distribution of this file, with or without modification,
471 are permitted in any medium without royalty provided the copyright
472 notice and this notice are preserved.