1 2013-02-26 David Binderman <dcb314@hotmail.com>
4 * decl.c (grokdeclarator): Tidy publicp assignment.
6 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
9 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
10 (build_transaction_expr): Same.
12 2013-02-25 Jason Merrill <jason@redhat.com>
15 * pt.c (fn_type_unification): Wait to call push_tinst_level until
16 we know what args we're looking at.
19 * semantics.c (potential_constant_expression_1): In C++98, a cast
20 to non-integral type can't be a constant expression.
22 2013-02-24 Jakub Jelinek <jakub@redhat.com>
25 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
28 2013-02-22 Jason Merrill <jason@redhat.com>
31 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
32 if we got the wrong number of template parms.
35 * pt.c (fn_type_unification): Use explicit args in template
36 instantiation context.
39 * call.c (can_convert_arg): Discard access checks.
42 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
45 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
48 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
49 * cvt.c (ocp_convert): Use the latter.
50 (cp_convert_to_pointer): Likewise.
51 * decl.c (check_default_argument): Likewise.
52 * typeck.c (cp_build_binary_op): Likewise.
53 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
55 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
56 Paolo Carlini <paolo.carlini@oracle.com>
59 * decl2.c (grokbitfield): Allow scoped enumeration types.
61 2013-02-15 Jason Merrill <jason@redhat.com>
64 * semantics.c (finish_id_expression): Also return the identifier
65 for an outer local static.
68 * class.c (check_bases_and_members): Deduce noexcept after
72 * semantics.c (finish_id_expression): In a template, return
73 the identifier for a constant variable.
75 2013-02-14 Jason Merrill <jason@redhat.com>
78 * semantics.c (build_anon_member_initialization): New.
79 (build_data_member_initialization): Use it.
82 * decl.c (cp_finish_decl): Force instantiation of an
83 auto static data member.
86 * pt.c (unify): A pack expansion that is not the last template
87 argument makes the entire template argument list non-deduced.
90 * name-lookup.c (do_class_using_decl): Handle typedefs with
91 inheriting constructors.
92 (push_class_level_binding_1): Allow inheriting from template
93 template parameter, too.
94 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
97 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
98 default argument scope.
99 * mangle.c (write_name): Likewise.
102 * error.c (find_typenames_r): Don't walk into a pack expansion.
104 2013-02-13 Jason Merrill <jason@redhat.com>
107 * parser.c (cp_parser_member_declaration): Check the declarator
108 form when detecting a function declaration via typedef.
111 * pt.c (maybe_process_partial_specialization): A lambda
112 isn't what's being specialized.
115 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
119 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
122 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
123 non-zero offsets, too.
126 * decl.c (build_enumerator): Always convert the value to a
127 fixed underlying type.
130 * pt.c (tsubst_copy_and_build): Don't forget any new
131 captures that arose from use of dependent names.
133 2013-02-13 Jakub Jelinek <jakub@redhat.com>
136 * semantics.c (finish_asm_stmt): If input constraints allow
137 neither register nor memory, try maybe_constant_value to get
138 a constant if possible.
140 2013-02-12 Jason Merrill <jason@redhat.com>
143 * method.c (add_one_base_init): Handle base constructor
144 taking rvalue reference parm.
147 * semantics.c (sort_constexpr_mem_initializers): Handle
150 2013-02-09 Jason Merrill <jason@redhat.com>
153 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
154 maybe_instantiate_noexcept.
157 * pt.c (eq_specializations): Set comparing_specializations.
158 * tree.c (cp_tree_equal): Check it.
159 * cp-tree.h: Declare it.
161 * decl.c (decls_match): Check versions later.
164 * pt.c (build_non_dependent_expr): Don't try to fold
165 instantiation-dependent expressions.
166 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
167 [BIND_EXPR]: Treat as dependent.
169 2013-02-07 Jakub Jelinek <jakub@redhat.com>
172 * init.c (build_vec_init): Don't append NULL values into new_vec.
173 (build_zero_init_1): Don't push anything into v if recursive call
175 (build_value_init_noctor): Don't push anything into v if
176 build_value_init call returned NULL_TREE.
179 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
180 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
181 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
182 return true only if 2nd token isn't CPP_CLOSE_PAREN.
183 (cp_parser_cast_expression): Adjust caller.
186 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
187 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
188 DECL_LANG_SPECIFIC (t).
190 2013-02-07 Jason Merrill <jason@redhat.com>
193 * method.c (do_build_copy_constructor): Don't bother turning
194 scalars from lvalues to xvalues.
195 (do_build_copy_assign): Likewise.
197 2013-02-06 Jason Merrill <jason@redhat.com>
199 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
201 2013-02-05 Jason Merrill <jason@redhat.com>
204 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
208 * decl.c (start_preparsed_function): Update restype if we change
212 * pt.c (fn_type_unification): Discard any access checks from
213 substituting explicit args.
215 2013-01-31 Jason Merrill <jason@redhat.com>
219 * typeck.c (get_member_function_from_ptrfunc): Fix
220 ptrmemfunc_vbit_in_delta case.
222 2013-01-29 Jason Merrill <jason@redhat.com>
225 * class.c (build_ctor_vtbl_group): Give construction vtables
228 2013-01-25 Jason Merrill <jason@redhat.com>
231 * pt.c (convert_nontype_argument_function): Handle invalid input.
232 (convert_nontype_argument): Likewise.
235 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
236 dynamic type has no virtual functions.
238 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
241 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
242 on TARGET_EXPR nodes.
244 2013-01-22 Jason Merrill <jason@redhat.com>
247 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
249 2013-01-22 Dodji Seketeli <dodji@redhat.com>
252 * pt.c (argument_pack_element_is_expansion_p)
253 (make_argument_pack_select, use_pack_expansion_extra_args_p)
254 (gen_elem_of_pack_expansion_instantiation): New static functions.
255 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
256 look through the possibly resulting pack expansion as well.
257 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
258 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
259 Use gen_elem_of_pack_expansion_instantiation to build the
260 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
261 as gen_elem_of_pack_expansion_instantiation and the change in
262 tsubst above generalize this particular case.
263 (arg_from_parm_pack_p): Remove this for it's not used by
264 tsubst_pack_expansion anymore.
266 2013-01-21 Jason Merrill <jason@redhat.com>
269 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
272 2013-01-18 Jason Merrill <jason@redhat.com>
275 * decl2.c (get_local_tls_init_fn): New.
276 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
277 with aliases for internal variables. Don't use weakrefs if
278 the variable needs destruction.
279 (generate_tls_wrapper): Mark the wrapper as const if no
280 initialization is needed.
281 (handle_tls_init): Don't require aliases.
283 2013-01-15 Dodji Seketeli <dodji@redhat.com>
286 * pt.c (coerce_innermost_template_parms): New static function.
287 (instantiate_alias_template): Use it here.
289 2013-01-09 Jason Merrill <jason@redhat.com>
292 * rtti.c (build_typeid, get_typeid): Add complain parm.
293 (get_tinfo_decl_dynamic): Likewise.
294 * cp-tree.h, parser.c, pt.c: Adjust.
297 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
300 2013-01-09 Jakub Jelinek <jakub@redhat.com>
303 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
304 call maybe_constant_value for the negative or too big shift
307 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
310 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
311 of the argument is true.
313 2013-01-08 Joel Brobecker <brobecker@adacore.com>
315 * parser.c (cp_parser_initializer_list): Move declaration
316 of variable non_const to start of lexical block.
318 2013-01-07 Jason Merrill <jason@redhat.com>
321 * tree.c (build_aggr_init_expr): Do nothing in a template.
322 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
323 a FUNCTION_DECL before tsubsting.
325 2013-01-04 Dodji Seketeli <dodji@redhat.com>
328 * pt.c (check_instantiated_arg): Allow type template arguments.
330 2013-01-04 Jason Merrill <jason@redhat.com>
333 * decl.c (reset_type_linkage, bt_reset_linkage): New.
334 (grokdeclarator): Use reset_type_linkage.
335 * name-lookup.c (binding_table_foreach): Handle null table.
336 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
338 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
341 * parser.c (cp_parser_template_id): Revert core of previous change
342 (keep adjusted inform message).
344 2013-01-03 Jason Merrill <jason@redhat.com>
348 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
352 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
355 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
358 * call.c (type_has_extended_temps): New.
359 * cp-tree.h: Declare it.
360 * decl.c (check_initializer): Use build_aggr_init for arrays
362 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
364 2013-01-02 Jason Merrill <jason@redhat.com>
367 * call.c (build_new_method_call_1): Don't use build_value_init for
368 user-provided default constructors.
370 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
374 * tree.c (build_cplus_array_type): Copy layout information
375 to main variant if necessary.
377 Copyright (C) 2013 Free Software Foundation, Inc.
379 Copying and distribution of this file, with or without modification,
380 are permitted in any medium without royalty provided the copyright
381 notice and this notice are preserved.