1 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
4 * parser.c (cp_parser_simple_type_specifier): Make the check
5 for disambiguating between an 'auto' placeholder and an implicit
6 template parameter more robust.
8 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
12 * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
13 setting its TREE_USED flag.
15 2016-02-08 Jason Merrill <jason@redhat.com>
18 * name-lookup.c (do_nonmember_using_decl): Leave anticipated
21 2016-02-08 Jakub Jelinek <jakub@redhat.com>
24 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
25 of the DECL_OMP_DECLARE_REDUCTION_P decls.
27 2016-02-08 Marek Polacek <polacek@redhat.com>
30 * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
31 Call clear_fold_cache.
32 * cp-tree.h: Adjust declaration.
33 * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
34 rather than clear_cv_cache and clear_fold_cache.
35 * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
37 2016-02-08 Jason Merrill <jason@redhat.com>
39 * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
40 * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
41 (ocp_convert): Use *_maybe_fold.
42 (cp_convert_to_pointer): Add dofold parameter.
43 * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
45 2016-02-05 Martin Sebor <msebor@redhat.com>
48 * init.c (find_field_init): New function.
49 (warn_placement_new_too_small): Call it. Handle one-element arrays
50 at ends of structures special.
52 2016-02-05 Jason Merrill <jason@redhat.com>
55 * semantics.c (finish_expr_stmt): If expr is error_mark_node,
56 make sure we've seen_error().
58 2016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
61 * pt.c (tsubst_baselink): Diagnose an invalid constructor call
62 if lookup_fnfields returns NULL_TREE and the name being looked
65 2016-02-04 Patrick Palka <ppalka@gcc.gnu.org>
67 * constexpr.c (cxx_eval_binary_expression): Fold equality
68 comparisons involving PTRMEM_CSTs.
70 2016-02-04 Jakub Jelinek <jakub@redhat.com>
72 * class.c (find_flexarrays): Don't declare dom variable.
73 (diagnose_flexarray): Likewise.
75 2016-02-02 Martain Sebor <msebor@redhat.com>
82 * class.c (walk_subobject_offsets): Avoid testing the upper bound
83 of a flexible array member for equality to null.
84 (find_flexarrays): Remove spurious whitespace introduced in r231665.
85 (diagnose_flexarrays): Avoid checking the upper bound of arrays.
86 (check_flexarrays): Same.
87 * decl.c (compute_array_index_type): Avoid special case for flexible
89 (grokdeclarator): Avoid calling compute_array_index_type for flexible
91 * error.c (dump_type_suffix): Revert changes introduced in r231665
92 and rendered unnecessary by the changes above.
93 * pt.c (tsubst): Same.
94 * tree.c (build_ctor_subob_ref): Handle flexible array members.
95 * typeck2.c (digest_init_r): Revert changes introduced in r231665.
96 (process_init_constructor_array): Same.
97 (process_init_constructor_record): Same.
99 2016-02-03 Patrick Palka <ppalka@gcc.gnu.org>
102 * pt.c (try_one_overload): Handle comparing argument packs so
103 that there is no conflict if we deduced more arguments of an
104 argument pack than were explicitly specified.
106 2016-01-31 Jakub Jelinek <jakub@redhat.com>
107 Jason Merrill <jason@redhat.com>
110 * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
111 function type if nothing is changing.
113 2016-01-31 Jason Merrill <jason@redhat.com>
116 * pt.c (partial_specialization_p, impartial_args): New.
117 (instantiate_decl): Call impartial_args.
119 * mangle.c (maybe_check_abi_tags): New.
120 (write_guarded_var_name): Call it.
121 (mangle_ref_init_variable): Call check_abi_tags.
123 * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
124 between template and instantiation.
126 2016-01-29 Jakub Jelinek <jakub@redhat.com>
129 * decl.c (wrapup_globals_for_namespace): Warn about unused static
130 function declarations.
132 2016-01-29 Marek Polacek <polacek@redhat.com>
136 * constexpr.c (cxx_eval_array_reference): Give the "array subscript
137 out of bound" error earlier.
138 * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
141 2016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
143 * name-lookup.c (begin_scope): After reusing a cp_binding_level
144 structure, update free_binding_level before the structure's
145 level_chain field gets cleared, not after.
147 2016-01-28 Jason Merrill <jason@redhat.com>
150 * search.c (dfs_walk_once, dfs_walk_once_r)
151 (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
152 hash_set instead of BINFO_MARKED.
153 (dfs_unmark_r): Remove.
155 2016-01-28 Patrick Palka <ppalka@gcc.gnu.org>
158 * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
159 (cp_lexer_debugging_p): Use it.
160 (cp_lexer_start_debugging): Likewise.
161 (cp_lexer_stop_debugging): Likewise.
163 2016-01-27 Marek Polacek <polacek@redhat.com>
166 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
167 needed. Add -Wsign-compare warning.
169 2016-01-27 Ryan Burn <contact@rnburn.com>
172 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
173 superfluous post_p argument in call to
174 cilk_gimplify_call_params_in_spawned_fn.
176 2016-01-27 Marek Polacek <polacek@redhat.com>
179 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
180 wrapped in NOP_EXPRs.
182 2016-01-27 Martin Sebor <msebor@redhat.com>
185 * mangle.c (mangle_decl): Reference the correct (saved) version
186 of the ABI in -Wabi diagnostics.
188 2016-01-27 Marek Polacek <polacek@redhat.com>
191 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
192 elements of the array.
194 2016-01-26 Jason Merrill <jason@redhat.com>
197 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
198 (cxx_eval_call_expression): Don't look through clones.
199 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
200 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
201 maybe-in-charge *tor.
203 2016-01-26 Jason Merrill <jason@redhat.com>
206 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
207 and TREE_SIDE_EFFECTS.
208 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
209 verify_constructor_flags.
211 2016-01-26 Jakub Jelinek <jakub@redhat.com>
214 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
215 return error_mark_node instead of building trees with error_mark_node
218 2016-01-26 David Malcolm <dmalcolm@redhat.com>
221 * error.c (print_instantiation_partial_context_line): Add missing
222 newlines from output for the t == NULL case.
223 (print_instantiation_partial_context): Remove call to pp_newline.
225 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
228 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
233 * decl.c (grokdeclarator): Don't decay array parameter type to
234 a pointer type if it's dependent.
235 (grokparms): Invoke strip_top_quals instead of directly invoking
236 cp_build_qualified_type.
237 * pt.c (decay_dependent_array_parm_type): New static function.
238 (type_unification_real): Call decay_dependent_array_parm_type
239 to decay a dependent array parameter type to its corresponding
240 pointer type before unification.
241 (more_specialized_fn): Likewise.
242 (get_bindings): Likewise.
243 * tree.c (cp_build_qualified_type): Trivial typofix in
246 2016-01-23 Martin Sebor <msebor@redhat.com>
250 * decl2.c (is_late_template_attribute): Handle dependent argument
251 to attribute align and attribute vector_size.
253 2016-01-21 Jason Merrill <jason@redhat.com>
256 * lambda.c (lambda_capture_field_type): Handle 'this' specially
257 for init-capture, too.
260 * decl.c (type_is_deprecated): Don't look into a typedef.
264 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
267 * decl.c (start_enum): Add attributes parameter.
268 * parser.c (cp_parser_enum_specifier): Pass it.
269 * pt.c (lookup_template_class_1): Pass it.
272 2016-01-19 Jason Merrill <jason@redhat.com>
275 * pt.c (convert_template_argument): Handle VAR_DECL properly.
277 2016-01-19 Marek Polacek <polacek@redhat.com>
280 * constexpr.c (clear_cv_cache): New.
281 * cp-gimplify.c (clear_fold_cache): New.
282 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
283 * decl.c (finish_enum_value_list): Call them.
286 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
288 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
293 * decl.c (grokdeclarator): Don't decay array parameter type to
294 a pointer type if it's dependent.
295 (grokparms): Invoke strip_top_quals instead of directly invoking
296 cp_build_qualified_type.
297 * pt.c (decay_dependent_array_parm_type): New static function.
298 (type_unification_real): Call decay_dependent_array_parm_type
299 to decay a dependent array parameter type to its corresponding
300 pointer type before unification.
301 (more_specialized_fn): Likewise.
302 (get_bindings): Likewise.
303 * tree.c (cp_build_qualified_type): Trivial typofix in
306 2016-01-18 Jason Merrill <jason@redhat.com>
308 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
310 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
313 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
314 (contains_label_1, contains_label_p): Remove.
316 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
319 * pt.c (type_dependent_expression_p): For a function template
320 specialization, a type is dependent iff any of its template
323 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
325 * cp-array-notation.c (cp_expand_cond_array_notations): Return
326 error_mark_node only if find_rank failed, not if it was
329 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
332 * tree.c (build_min_non_dep_call_vec): Don't retain the
333 KOENIG_LOOKUP_P flag of the non-dependent expression that's
335 (build_min_non_dep_op_overload): Instead, do it here.
337 2016-01-15 Jakub Jelinek <jakub@redhat.com>
340 * parser.h (cp_token): Remove pragma_kind field. Add comment
341 with number of unused bits.
342 * parser.c (eof_token): Remove pragma_kind field initializer.
343 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
344 field, don't clear CPP_PRAGMA u.value.
345 (cp_parser_pragma_kind): New function.
346 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
347 cp_parser_omp_construct, cp_parser_initial_pragma,
348 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
351 2016-01-15 Jason Merrill <jason@redhat.com>
354 * call.c (build_cxx_call): Use fold_non_dependent_expr.
356 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
360 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
361 array/function-to-pointer conversion. Call
362 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
363 * call.c (convert_like_real): Print call context if
364 decay_conversion errors.
366 2016-01-14 Tom de Vries <tom@codesourcery.com>
368 PR tree-optimization/68773
369 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
372 2016-01-14 Jason Merrill <jason@redhat.com>
375 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
377 2016-01-12 Marek Polacek <polacek@redhat.com>
380 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
381 error_at and adjust the return value.
383 2016-01-12 Jakub Jelinek <jakub@redhat.com>
387 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
388 GS_ERROR whenever seen_error (), only if *expr_p contains
389 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
393 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
395 2016-01-11 Jason Merrill <jason@redhat.com>
398 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
399 (process_subob_fn): Likewise. Don't consider triviality if true.
400 (synthesize_method_walk): Pass it.
402 2016-01-11 David Malcolm <dmalcolm@redhat.com>
405 * parser.c (cp_parser_postfix_expression): Initialize
406 close_paren_loc to UNKNOWN_LOCATION; only use it if
407 it has been written to by
408 cp_parser_parenthesized_expression_list.
409 (cp_parser_parenthesized_expression_list): Document the behavior
410 with respect to the CLOSE_PAREN_LOC param.
412 2016-01-11 Jakub Jelinek <jakub@redhat.com>
415 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
416 folded operands have side-effects, but folding changed any of them,
417 build a new tree with the folded operands instead of returning the
420 2016-01-09 Marek Polacek <polacek@redhat.com>
423 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
425 2016-01-09 Jakub Jelinek <jakub@redhat.com>
428 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
430 2016-01-08 Jason Merrill <jason@redhat.com>
433 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
436 2016-01-08 Marek Polacek <polacek@redhat.com>
439 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
441 2016-01-08 Jason Merrill <jason@redhat.com>
443 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
448 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
449 TREE_ADDRESSABLE type.
453 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
455 2016-01-05 Nathan Sidwell <nathan@acm.org>
458 * pt.c (build_non_dependent_expr): Don't try a checking fold when
461 2016-01-04 Jakub Jelinek <jakub@redhat.com>
463 Update copyright years.
465 Copyright (C) 2016 Free Software Foundation, Inc.
467 Copying and distribution of this file, with or without modification,
468 are permitted in any medium without royalty provided the copyright
469 notice and this notice are preserved.