1 2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
5 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
8 * pt.c (most_specialized_class): Bump processing_template_decl for
11 2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
14 * call.c (build_over_call): Check return value of mark_used.
16 2013-10-30 Jason Merrill <jason@redhat.com>
18 * semantics.c (finish_compound_literal): Don't create a static variable
19 inside cp_unevaluated_operand.
21 * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
23 2013-10-30 Tobias Burnus <burnus@net-b.de>
26 * cp-tree.h (RANGE_FOR_IVDEP): Define.
27 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
28 finish_for_cond): Take 'bool ivdep' parameter.
29 * cp-array-notation.c (create_an_loop): Update call.
30 * init.c (build_vec_init): Ditto.
31 * pt.c (tsubst_expr): Ditto.
32 * parser.c (cp_parser_iteration_statement, cp_parser_for,
33 cp_parser_range_for, cp_convert_range_for): Update calls.
34 (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
35 * semantics.c (finish_while_stmt_cond, finish_do_stmt,
36 finish_for_cond): Optionally build ivdep annotation.
38 2013-10-30 Jason Merrill <jason@redhat.com>
40 * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
42 2013-10-29 David Malcolm <dmalcolm@redhat.com>
44 Patch autogenerated by refactor_symtab.py from
45 https://github.com/davidmalcolm/gcc-refactoring-scripts
46 revision 58bb219cc090b2f4516a9297d868c245495ee622
48 * call.c (mark_versions_used): Update for conversion of symtab types
49 to a true class hierarchy.
50 * decl2.c (cp_write_global_declarations): Likewise.
51 (clear_decl_external): Likewise.
52 (build_java_method_aliases): Likewise.
53 (collect_candidates_for_java_method_aliases): Likewise.
54 (mark_needed): Likewise.
55 (var_finalized_p): Likewise.
56 (maybe_make_one_only): Likewise.
57 (maybe_emit_vtables): Likewise.
58 * lambda.c (maybe_add_lambda_conv_op): Likewise.
59 * method.c (use_thunk): Likewise.
60 * optimize.c (maybe_clone_body): Likewise.
61 * tree.c (cp_fix_function_decl_p): Likewise.
63 2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
66 * decl2.c (grokfield): Handle auto like NSDMI.
68 2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
71 * pt.c (check_template_shadow): Don't skip declarations in inline
74 2013-10-25 Tobias Burnus <burnus@net-b.de>
77 * parser.c (cp_parser_iteration_statement,
78 cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
81 2013-10-24 Marek Polacek <polacek@redhat.com>
84 * typeck2.c (check_narrowing): Don't check narrowing when the scalar
87 2013-10-23 Jason Merrill <jason@redhat.com>
90 * method.c (defaulted_late_check): Delete on eh-spec mismatch.
91 (maybe_explain_implicit_delete): Explain it.
93 * error.c (eh_spec_to_string): New.
94 (cp_printer): Use it for %X.
96 In C++11 a trivial [cd]tor might not be callable.
97 * class.c (user_provided_p): A function deleted on its declation
98 in the class is not user-provided.
99 (type_build_ctor_call): Also force a ctor call if we
100 might have a deleted or private trivial ctor.
101 (type_build_dtor_call): New.
102 (deduce_noexcept_on_destructors): Remove obsolete code.
103 * cp-tree.h: Declare type_build_dtor_call.
104 * decl.c (expand_static_init): Make sure trivial dtors are callable.
105 (cxx_maybe_build_cleanup): Likewise.
106 * except.c (build_throw): Likewise.
107 * init.c (build_value_init): Handle trivial but not callable ctors.
108 (perform_target_ctor): Make sure trivial dtor is callable.
109 (perform_member_init): Likewise.
110 (expand_cleanup_for_base): Likewise.
111 (build_vec_delete_1): Likewise.
112 (build_delete): Likewise.
113 (push_base_cleanups): Likewise.
114 (build_new_1): Avoid redundant error.
115 * method.c (synthesized_method_walk): Can't ever exit early in C++11.
116 Always process the subobject destructor.
117 * semantics.c (finish_compound_literal): Make sure trivial dtor is
119 * typeck2.c (split_nonconstant_init): Likewise.
121 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
123 Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
124 * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
125 as [[gnu::deprecated]].
127 2013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
130 * pt.c (apply_late_template_attributes): Use get_attribute_name,
133 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
136 * pt.c (most_specialized_class): Bump processing_template_decl for
139 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
141 * parser.c (cp_parser_lookup_name): Tidy.
143 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
145 * parser.c: Include omp-low.h.
146 * semantics.c: Likewise.
148 2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
151 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
152 cp_unevaluated_operand case.
154 2013-10-16 Jason Merrill <jason@redhat.com>
156 * pt.c (apply_late_template_attributes): Use
157 attribute_takes_identifier_p.
159 * error.c (dump_exception_spec): Print "noexcept" rather than
163 * pt.c (unify_array_domain): Split out from unify.
164 (unify): Use it for list deduction, too.
167 * decl2.c (dump_tu): Split out from...
168 (cp_write_global_declarations): ...here. Call it in PCH mode.
170 2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
172 * pt.c (tsubst): Fix typo in last commit.
174 2013-10-16 Paulo Matos <pmatos@broadcom.com>
176 * error.c (code_to_string): Use new wrapper get_tree_code_name.
177 * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
178 * pt.c (tsubst): Likewise.
179 * semantics.c (cxx_eval_constant_expression,
180 potential_constant_expression_1): Likewise.
181 * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
182 add_substitution, find_substitution): Likewise.
184 2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
187 * parser.c (cp_parser_postfix_open_square_expression): Set
188 parser->greater_than_is_operator_p for the argument.
190 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
193 * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
194 (cp_parser_pseudo_destructor_name): Use it.
196 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
199 * pt.c (convert_nontype_argument): Set expr_type to
200 TREE_TYPE (probe_type).
202 2013-10-11 Jakub Jelinek <jakub@redhat.com>
204 * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
205 (declare_simd_adjust_this): New function.
206 (grokfndecl): If "omp declare simd" attribute is present,
207 call declare_simd_adjust_this if needed and
208 c_omp_declare_simd_clauses_to_numbers.
209 * cp-array-notation.c (expand_array_notation_exprs): Handle
211 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
212 OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
213 OMP_CLAUSE_REDUCTION.
214 (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
216 (cxx_omp_privatize_by_reference): Return true for
217 is_invisiref_parm decls.
218 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
220 * pt.c (apply_late_template_attributes): For "omp declare simd"
221 attribute call tsubst_omp_clauses,
222 c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
223 and c_omp_declare_simd_clauses_to_numbers.
224 (instantiate_class_template_1): Call cp_check_omp_declare_reduction
226 (tsubst_decl): Handle UDRs.
227 (tsubst_omp_clauses): Add declare_simd argument, if true don't
228 call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
229 Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
230 OMP_CLAUSE_REDUCTION.
231 (tsubst_expr): For UDRs call pushdecl and
232 cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
233 callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
234 OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
235 Adjust finish_omp_atomic caller.
236 (tsubst_omp_udr): New function.
237 (instantiate_decl): For UDRs at block scope, don't call
238 start_preparsed_function/finish_function. Call tsubst_omp_udr.
239 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
240 use it instead of need_default_ctor || need_copy_ctor.
241 (struct cp_check_omp_declare_reduction_data): New type.
242 (handle_omp_array_sections_1, handle_omp_array_sections,
243 omp_reduction_id, omp_reduction_lookup,
244 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
245 cp_check_omp_declare_reduction, clone_omp_udr,
246 find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
247 (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
249 (finish_omp_for): Add CODE argument, use it instead of hardcoded
250 OMP_FOR. Adjust c_finish_omp_for caller.
251 (finish_omp_atomic): Add seq_cst argument, adjust
252 c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
254 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
255 * decl2.c (mark_used): Force immediate instantiation of
256 DECL_OMP_DECLARE_REDUCTION_P decls.
257 (is_late_template_attribute): Return true for "omp declare simd"
259 (cp_omp_mappable_type): New function.
260 (cplus_decl_attributes): Add implicit "omp declare target" attribute
262 * parser.c (cp_debug_parser): Print
263 parser->colon_doesnt_start_class_def_p.
264 (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
266 (enum pragma_context): Add pragma_member and pragma_objc_icode.
267 (cp_parser_binary_expression): Handle no_toplevel_fold_p
268 even for binary operations other than comparison.
269 (cp_parser_linkage_specification): Call
270 cp_ensure_no_omp_declare_simd if needed.
271 (cp_parser_namespace_definition): Likewise.
272 (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
273 (cp_parser_direct_declarator): Pass declarator to
274 cp_parser_late_return_type_opt.
275 (cp_parser_late_return_type_opt): Add declarator argument,
276 call cp_parser_late_parsing_omp_declare_simd for declare simd.
277 (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
278 Parse UDRs before all other methods.
279 (cp_parser_member_specification_opt): Use pragma_member instead of
281 (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
282 (cp_parser_function_definition_from_specifiers_and_declarator,
283 cp_parser_save_member_function_body): Likewise.
284 (cp_parser_late_parsing_for_member): Handle UDRs specially.
285 (cp_parser_next_token_starts_class_definition_p): Don't allow
286 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
287 (cp_parser_objc_interstitial_code): Use pragma_objc_icode
288 instead of pragma_external.
289 (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
290 (cp_parser_omp_var_list_no_open): Parse array sections for
291 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
292 if non-NULL, allow parsing to end with a colon rather than close
294 (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
296 (cp_parser_omp_clause_reduction): Handle user defined reductions.
297 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
298 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
299 cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
300 cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
301 cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
302 cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
303 cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
304 cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
306 (cp_parser_omp_all_clauses): Add finish_p argument. Don't call
307 finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
308 (cp_parser_omp_atomic): Parse seq_cst clause, pass
309 true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
311 (cp_parser_omp_for_loop): Add CODE argument, pass it through
312 to finish_omp_for. Change last argument to cclauses,
313 and adjust uses to grab parallel clauses from the array of all
315 (cp_omp_split_clauses): New function.
316 (cp_parser_omp_simd): New function.
317 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
318 Allow the function to be called also when parsing combined constructs,
319 and call c_parser_omp_simd when parsing for simd.
320 (cp_parser_omp_sections_scope): If section-sequence doesn't start with
321 #pragma omp section, require exactly one structured-block instead of
322 sequence of statements.
323 (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
324 Allow the function to be called also when parsing combined constructs.
325 (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
326 Allow the function to be called also when parsing combined
328 (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
329 cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
330 cp_parser_omp_teams, cp_parser_omp_target_data,
331 cp_parser_omp_target_update, cp_parser_omp_target,
332 cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
333 cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
334 cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
335 cp_parser_omp_declare): New functions.
336 (cp_parser_omp_construct): Add p_name and mask vars. Handle
337 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
338 PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
339 and cp_parser_omp_sections callers.
340 (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
341 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
342 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
343 PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
344 Handle pragma_member and pragma_objc_icode like pragma_external.
345 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
346 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
347 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
348 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
350 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
351 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
352 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
353 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
354 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
355 * parser.h (struct cp_omp_declare_simd_data): New type.
356 (struct cp_parser): Add colon_doesnt_start_class_def_p and
357 omp_declare_simd fields.
358 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
359 * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
361 (DECL_OMP_DECLARE_REDUCTION_P): Define.
362 (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
363 (struct saved_scope): Add omp_declare_target_attribute field.
364 (cp_omp_mappable_type, omp_reduction_id,
365 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
366 finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
367 (finish_omp_for): Add CODE argument.
368 (finish_omp_atomic): Add seq_cst argument.
369 (cxx_omp_create_clause_info): Add need_dtor argument.
371 2013-10-09 Marek Polacek <polacek@redhat.com>
374 * semantics.c (finish_return_stmt): Return error_mark_node
375 when error_operand_p of the expr is true.
376 (build_transaction_expr): Check for EXPR_P before setting the
379 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
382 * lambda.c (begin_lambda_type): Check return value of xref_tag
383 for error_mark_node; tidy.
384 * decl.c (grokdeclarator): Tweak error message.
386 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
390 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
393 * pt.c (tsubst): Use error_operand_p on parameter t.
395 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
398 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
399 and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
400 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
401 messages about uninitialized const and references members to mention
404 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
407 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
409 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
412 * typeck2.c (build_functional_cast): Use error_operand_p on exp.
414 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
417 * parser.c (cp_parser_perform_range_for_lookup): If eventually
418 either *begin or *end is type-dependent, return NULL_TREE.
419 (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
420 returns NULL_TREE, don't actually do_auto_deduction.
422 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
425 * pt.c (tsubst): Use error_operand_p on parameter t.
427 2013-10-04 Marc Glisse <marc.glisse@inria.fr>
430 * decl.c (cxx_init_decl_processing): Set operator_new_flag.
432 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
435 * decl2.c (save_template_attributes): Handle error_mark_node as
437 (cp_check_const_attributes): Likewise for attributes.
438 * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
439 error_mark_node call cp_parser_skip_to_end_of_statement.
441 2013-10-03 Easwaran Raman <eraman@google.com>
444 * parser.c (cp_parser_init_declarator): Do not drop attributes
445 of template member functions.
447 2013-10-03 Marek Polacek <polacek@redhat.com>
450 * init.c (sort_mem_initializers): Splice when giving an error.
452 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
455 * parser.c (cp_parser_function_specifier_opt): Upon error about
456 virtual templates don't set ds_virtual.
457 (finish_fully_implicit_template): Reject virtual implicit templates.
459 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
462 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
464 2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
467 * parser.c (cp_parser_lookup_name): Check make_typename_type return
468 value for error_mark_node.
470 2013-09-25 Tom Tromey <tromey@redhat.com>
472 * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
475 2013-09-25 Tom Tromey <tromey@redhat.com>
477 * Make-lang.in (g++spec.o): Remove.
478 (CFLAGS-cp/g++spec.o): New variable.
479 (GXX_OBJS): Reference cp/g++spec.o.
480 (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
481 (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
482 (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
483 (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
484 (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
485 (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
486 (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
487 (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
489 2013-09-25 Tom Tromey <tromey@redhat.com>
491 * Make-lang.in (g++spec.o): Don't use subshell.
493 2013-09-25 Marek Polacek <polacek@redhat.com>
496 * semantics.c (finish_transaction_stmt): Check for EXPR_P before
497 setting the expr location.
499 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
502 * type-utils.h (find_type_usage): Only traverse one type level into
503 member function pointers.
505 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
507 * parser.c (cp_parser_init_declarator): Defer calling
508 finish_fully_implicit_template for forward declarations until after
509 other decl processing is complete. Cleanup for clarity: Extract 'else'
510 case after 'if' containing unconditional return.
512 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
514 * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
515 rather than '__GenN'.
517 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
519 * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
520 callop in the case of generic lambdas.
522 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
524 * parser.c (make_generic_type_name): Use global count rather than
526 (add_implicit_template_parms): ... propagate interface change here.
528 2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
531 * pt.c (tsubst_copy): Use current_nonlambda_class_type to
532 call tsubst_baselink.
534 2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
537 * class.c (instantiate_type): Loosen a bit the gcc_assert.
539 2013-09-18 Marek Polacek <polacek@redhat.com>
542 * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
543 Remove unnecessary check.
545 2013-09-18 Marek Polacek <polacek@redhat.com>
548 * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
549 no_sanitize_undefined attribute.
551 2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
554 * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
555 the cp_type_quals (r) too.
557 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
559 * cp-tree.h (type_uses_auto_or_concept): Declare.
560 (is_auto_or_concept): Declare.
561 * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
562 -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
563 * type-utils.h: New header defining ...
564 (find_type_usage): ... this new function based on pt.c (type_uses_auto)
565 for searching a type tree given a predicate.
566 * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
567 (is_auto_or_concept): New function.
568 (type_uses_auto_or_concept): New function.
569 * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
570 * parser.c (cp_parser_new): Initialize
571 fully_implicit_function_template_p.
572 (cp_parser_new): Initialize fully_implicit_function_template_p.
573 (cp_parser_lambda_expression): Copy and restore value of
574 fully_implicit_function_template_p as per other parser fields.
575 (cp_parser_parameter_declaration_list): Count generic
576 parameters and call ...
577 (add_implicit_template_parms): ... this new function to synthesize them
578 with help from type-utils.h (find_type_usage), ...
579 (tree_type_is_auto_or_concept): ... this new static function and ...
580 (make_generic_type_name): ... this new static function.
581 (cp_parser_direct_declarator): Account for implicit template parameters.
582 (cp_parser_lambda_declarator_opt): Finish fully implicit template if
583 necessary by calling ...
584 (finish_fully_implicit_template): ... this new function.
585 (cp_parser_init_declarator): Likewise.
586 (cp_parser_function_definition_after_declarator): Likewise.
587 (cp_parser_member_declaration): Likewise.
588 * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
589 (cp/parser.o): Likewise.
591 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
593 * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
594 list with std=c++1y or std=gnu++1y.
595 (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
596 operator template to avoid adding template result to symbol table.
597 * lambda.c (lambda_function): Return template result if call operator is
599 (maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
600 operator call building in order to support conversion of a non-capturing
601 lambda template to a function pointer with help from ...
602 (prepare_op_call): ... this new function.
603 * decl2.c (check_member_template): Don't reject lambda call operator
604 template in local [lambda] class.
605 * pt.c (instantiate_class_template_1): Don't instantiate lambda call
606 operator template when instantiating lambda class.
608 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
610 * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
612 2013-09-15 Jason Merrill <jason@redhat.com>
616 * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
617 * lambda.c (add_capture): Handle variadic capture.
618 (add_default_capture, lambda_capture_field_type): Likewise.
619 (build_capture_proxy, register_capture_members): Likewise.
620 * pt.c (register_specialization): Allow FIELD_DECL.
621 (retrieve_specialization): Likewise.
622 (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
623 (tsubst_pack_expansion): Handle FIELD_DECL packs.
624 (gen_elem_of_pack_expansion_instantiation): Likewise.
625 (instantiate_class_template_1): Likewise.
626 (tsubst_decl, tsubst_copy): Likewise.
627 (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
628 (tsubst_copy_and_build) [VAR_DECL]: Likewise.
629 * semantics.c (finish_non_static_data_member): Don't try to represent
630 the type of a COMPOUND_REF of a FIELD_DECL pack.
633 * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
634 * cxx-pretty-print.c (direct_declarator): Adjust.
635 * decl2.c (cp_build_parm_decl): Adjust.
636 * pt.c (function_parameter_pack_p): Adjust.
637 (find_parameter_packs_r, push_template_decl_real): Adjust.
638 (tsubst_pack_expansion, tsubst_decl): Adjust.
639 (regenerate_decl_from_template, instantiate_decl): Adjust.
641 * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
643 2013-09-13 Jason Merrill <jason@redhat.com>
646 * pt.c (any_type_dependent_elements_p): Actually check for
647 type-dependence, not value-dependence.
649 2013-09-13 Jacek Caban <jacek@codeweavers.com>
651 * decl.c: Use new cxx_implicit_extern_c hook
653 2013-09-12 Brooks Moses <bmoses@google.com>
656 * Make-lang.in: Do not install driver binaries in $(target)/bin.
658 2013-09-12 Adam Butcher <adam@jessamine.co.uk>
660 * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
661 c_inhibit_evaluation_warnings. Reset if instantiating within a
662 function-local template.
664 2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
666 * semantics.c (finish_pseudo_destructor_expr): Add location_t
668 * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
669 (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
671 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
672 (cp_parser_postfix_expression): Pass the proper location to
673 cp_parser_postfix_dot_deref_expression.
674 * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
676 2013-09-10 Jan Hubicka <jh@suse.cz>
677 Paolo Carlini <paolo.carlini@oracle.com>
679 * error.c (print_instantiation_partial_context_line): If
680 loc == UNKNOWN_LOCATION return immediately.
682 2013-09-09 Jakub Jelinek <jakub@redhat.com>
685 * init.c (build_vec_delete): Call mark_rvalue_use on base.
687 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
690 * init.c (build_vec_delete_1): When the type is incomplete emit a
691 warning, enabled by default (not an error).
692 (build_delete): Adjust to use OPT_Wdelete_incomplete.
694 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
697 * error.c (location_of): Don't handle PARM_DECLs specially.
699 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
701 * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
702 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
703 Tweak, TREE_OPERAND (t, 1) may be null.
705 2013-09-08 Caroline Tice <cmtice@google.com>
708 * vtable-class-hierarchy.c (vtv_generate_init_routine): In
709 preinit case, move call to assemble_vtv_preinit_initializer to
710 after call to cgraph_process_new_functions.
712 2013-09-08 Tom de Vries <tom@codesourcery.com>
715 * except.c (build_must_not_throw_expr): Handle
718 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
720 * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
722 2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
725 * class.c (finish_struct_anon_r): New.
726 (finish_struct_anon): Use it.
728 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
730 * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
731 Declare as overrider.
732 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
733 Rename from pp_cxx_simple_type_specifier.
734 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
735 simple_type_specifier.
737 2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
740 * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
742 2013-09-03 Mike Stump <mikestump@comcast.net>
744 * Make-lang.in (cp/lambda.o): Add dependencies.
746 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
748 * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
750 * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
751 (pp_cxx_userdef_literal): Tidy.
752 (pp_cxx_template_argument_list): Likewise.
753 (pp_cxx_typeid_expression): Likewise.
754 (pp_cxx_offsetof_expression_1): Likewise.
755 (cxx_pretty_printer::postfix_expression): Likewise.
756 (cxx_pretty_printer::unary_expression): Likewise.
757 (cxx_pretty_printer::statement): Likewise.
758 (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
759 (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
760 * error.c (dump_decl): Tidy.
761 (dump_expr): Likewise.
763 2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
765 PR c++/21682, implement DR 565
766 * name-lookup.c (compparms_for_decl_and_using_decl): New.
767 (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
769 2013-08-30 Marek Polacek <polacek@redhat.com>
771 * typeck.c (cp_build_binary_op): Add division by zero and shift
773 * error.c (dump_expr): Special-case ubsan builtins.
775 2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
778 * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
779 * init.c (perform_target_ctor): Use it.
780 * call.c (build_special_member_call): Diagnose self-delegating
783 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
785 * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
787 (cxx_pretty_printer::declaration_specifiers): Likewise.
788 (cxx_pretty_printer::function_specifier): Likewise.
789 (cxx_pretty_printer::declarator): Likewise.
790 (cxx_pretty_printer::direct_declarator): Likewise.
791 (cxx_pretty_printer::abstract_declarator): Likewise.
792 (cxx_pretty_printer::direct_abstract_declarator): Likewise.
793 (pp_cxx_declaration): Remove.
794 * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
795 Rename from pp_cxx_function_specifier. Adjust.
796 (cxx_pretty_printer::declaration_specifiers): Rename from
797 pp_cxx_decl_specifier_seq. Adjust.
798 (cxx_pretty_printer::direct_declarator): Rename from
799 pp_cxx_direct_declarator. Adjust.
800 (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
802 (cxx_pretty_printer::abstract_declarator): Rename from
803 pp_cxx_abstract_declarator. Adjust.
804 (cxx_pretty_printer::direct_abstract_declarator): Rename from
805 pp_cxx_direct_abstract_declarator. Adjust.
806 (cxx_pretty_printer::declaration): Rename from
807 pp_cxx_declaration. Adjust.
808 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
809 declaration, declaration_specifiers, function_specifier,
810 declarator, direct_declarator, abstract_declarator,
811 direct_abstract_declarator.
812 * error.c (dump_decl): Adjust.
814 2013-08-29 Jan Hubicka <jh@suse.cz>
816 Correct previous patch to not mark terminate as LEAF.
817 * class.c (build_vtbl_initializer): Drop LEAF
818 * decl.c (cxx_init_decl_processing): Likewise.
819 (push_throw_library_fn): Likewise.
820 * except.c (init_exception_processing): Likewise.
821 (do_begin_catch): Likewise.
822 (do_end_catch): Likewise.
823 (do_allocate_exception): Likewise.
825 2013-08-29 Jan Hubicka <jh@suse.cz>
827 * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
828 ECF_NORETURN | ECF_LEAF
829 * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
830 push_library_fn, push_void_library_fn): Update prototype.
831 * decl.c (build_library_fn_1): Remove.
832 (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
833 (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
834 __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
835 (build_library_fn_1): Add ecf_flags argument; rename to ...
836 (build_library_fn): ... this one.
837 (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
838 (build_library_fn_ptr): Take ecf_flags.
839 (build_cp_library_fn_ptr): Likewise.
840 (push_library_fn): Likewise.
841 (push_cp_library_fn): Likewise.
842 (push_void_library_fn): Likewise.
843 (push_throw_library_fn): All throws are ECF_NORETURN.
844 (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
845 (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
846 __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
847 * except.c (init_exception_processing): terminate is
848 ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
849 (declare_nothrow_library_fn): Add ecf_flags parameter.
850 (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
852 (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
853 are ECF_NOTHROW | ECF_LEAF.
854 (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
856 (do_allocate_exception): _cxa_allocate_exception
857 and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
859 (do_free_exception): __cxa_free_exception is
860 ECF_NOTHROW | ECF_LEAF.
861 * rtti.c (build_dynamic_cast_1): __dynamic_cast
862 is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
864 2013-08-29 Adam Butcher <adam@jessamine.co.uk>
866 * error.c (dump_lambda_function): New function, dependent on ...
867 (dump_substitution): ... this new function, factored out of ...
868 (subst_to_string): ... here and ...
869 (dump_function_decl): ... here. Updated to early-out with call to
870 dump_lambda_function after determining template bindings.
872 2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
875 * init.c (build_aggr_init): When init == void_type_node do not
876 set LOOKUP_ONLYCONVERTING.
878 2013-08-27 Caroline Tice <cmtice@google.com>
880 * vtable-class-hierarchy.c: Remove unnecessary include statements.
881 (MAX_SET_SIZE): Remove unnecessary constant.
882 (register_construction_vtables): Make vtable_ptr_array parameter
883 into a vector; remove num_args parameter. Change array accesses to
885 (register_other_binfo_vtables): Ditto.
886 (insert_call_to_register_set): Ditto.
887 (insert_call_to_register_pair): Ditto.
888 (output_set_info): Ditto. Also change warning calls to warning_at
889 calls, and fix format of warning messages.
890 (register_all_pairs): Change vtbl_ptr_array from an array into a
891 vector. Remove num_vtable_args (replace with calls to vector length).
892 Change array stores & accesses to vector functions. Change calls to
893 register_construction_vtables, register_other_binfo_vtables,
894 insert_call_to_register_set, insert_call_to_register_pair and
895 output_set_info to match their new signatures. Change warning to
896 warning_at and fix the format of the warning message.
898 2013-08-27 Jakub Jelinek <jakub@redhat.com>
899 Aldy Hernandez <aldyh@redhat.com>
901 * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
903 2013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
905 * decl.c (grokfndecl): Remove old bison hack.
907 2013-08-26 Jan Hubicka <jh@suse.cz>
909 * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
912 2013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
914 * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
915 Declare as overrider.
916 (cxx_pretty_printer::multiplicative_expression): Likewise.
917 (cxx_pretty_printer::conditional_expression): Likewise.
918 (cxx_pretty_printer::assignment_expression): Likewise.
919 (cxx_pretty_printer::expression): Likewise.
920 * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
921 Rename from pp_cxx_unary_expression. Adjust.
922 (cxx_pretty_printer::multiplicative_expression): Rename from
923 pp_cxx_multiplicative_expression. Adjust.
924 (cxx_pretty_printer::conditional_expression): Rename from
925 pp_cxx_conditional_expression. Adjust.
926 (cxx_pretty_printer::assignment_expression): Rename from
927 pp_cxx_assignment_expression. Adjust.
928 (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
930 (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
931 unary_expression, multiplicative_expression,
932 conditional_expression, assignment_expression, expression.
934 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
936 * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
937 Declare as overrider.
938 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
939 Rename from pp_cxx_postfix_expression. Adjust.
940 (pp_cxx_expression): Use pp_postfix_expression.
941 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
944 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
946 * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
947 an overrider of c_pretty_printer::primary_expression.
948 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
949 Rename from pp_cxx_primary_expression. Adjust.
950 (pp_cxx_postfix_expression): Use pp_primary_expression.
951 (pp_cxx_ctor_initializer): Likewise.
952 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
955 2013-08-23 Jan Hubicka <jh@suse.cz>
957 * cp-tree.h (struct lang_type_class): Free is_final bit.
958 (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
959 (DECL_FINAL_P): Remove.
960 * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
961 is called on CLASS_TYPE_P.
963 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
965 * cxx-pretty-print.c (M_): Remove.
966 (pp_cxx_unqualified_id): Use translate_string instead of M_.
967 (pp_cxx_canonical_template_parameter): Likewise.
969 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
971 * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
972 * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
973 from pp_cxx_id_expression. Adjust.
974 (pp_cxx_userdef_literal): Use pp_id_expression.
975 (pp_cxx_primary_expression): Likewise.
976 (pp_cxx_direct_declarator): Likewise.
977 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
980 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
982 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
983 function, overriding c_pretty_printer::constant.
984 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
985 pp_cxx_constant. Adjust.
986 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
988 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
990 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
991 destructor for the early printer.
992 * error.c (type_to_string): Use pp_buffer.
994 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
997 * class.c (check_field_decls): Check for const mutable and const
998 reference data members.
1000 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1002 * error.c (init_error): Remove calls to pp_construct and
1003 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
1004 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1005 (cxx_pretty_printer_init): Remove.
1006 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1007 Rename from cxx_pretty_printer_init. Adjust.
1008 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1009 initialization of C++ diagnostics pretty printer.
1011 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1013 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1014 * cp-tree.h (REFERENCE_REF_P): Likewise.
1015 * semantics.c (finish_offsetof): Likewise.
1017 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1020 * semantics.c (finish_id_expression): Handle deprecated references.
1022 2013-08-20 Jason Merrill <jason@redhat.com>
1025 * cvt.c (build_expr_type_conversion): Don't complain about a
1026 template that can't match the desired type category.
1028 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
1030 * error.c (pp_ggc_formatted_text): New.
1031 (type_as_string): Use it in lieu of pp_formatted_text.
1032 (type_as_string_translate): Likewise.
1033 (expr_as_string): Likewise.
1034 (decl_as_string): Likewise.
1035 (decl_as_string_translate): Likewise.
1036 (lang_decl_name): Likewise.
1037 (decl_to_string): Likewise.
1038 (expr_to_string): Likewise.
1039 (fndecl_to_string): Likewise.
1040 (parm_to_string): Likewise.
1041 (type_to_string): Likewise.
1042 (args_to_string): Likewise.
1043 (subst_to_string): Likewise.
1045 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1048 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1049 check for truth values.
1050 (expand_array_notation_exprs): Added truth values case. Removed an
1051 unwanted else. Added for-loop to walk through subtrees in default
1053 * call.c (build_cxx_call): Inherited the type of the array notation for
1054 certain built-in array notation functions.
1056 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1058 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1059 Use cp_parser_lookup_name_simple.
1061 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1063 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1064 * name-lookup.c (pop_bindings_and_leave_scope): Define.
1065 * parser.c (cp_parser_lambda_declarator_opt,
1066 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1068 2013-08-17 Jason Merrill <jason@redhat.com>
1071 * name-lookup.c (push_class_level_binding_1): It's OK to push a
1072 lambda type after the enclosing type is complete.
1074 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1076 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1078 (dump_template_argument): Likewise.
1079 (dump_template_argument_list): Likewise.
1080 (dump_template_parameter): Likewise.
1081 (dump_template_bindings): Likewise.
1082 (dump_alias_template_specialization): Likewise.
1083 (dump_type): Likewise.
1084 (dump_typename): Likewise.
1085 (dump_aggr_type): Likewise.
1086 (dump_type_prefix): Likewise.
1087 (dump_type_suffix): Likewise.
1088 (dump_global_iord): Likewise.
1089 (dump_simple_decl): Likewise.
1090 (dump_decl): Likewise.
1091 (dump_template_decl): Likewise.
1092 (dump_function_decl): Likewise.
1093 (dump_parameters): Likewise.
1094 (dump_ref_qualifier): Likewise.
1095 (dump_exception_spec): Likewise.
1096 (dump_function_name): Likewise.
1097 (dump_template_parms): Likewise.
1098 (dump_call_expr_args): Likewise.
1099 (dump_aggr_init_expr_args): Likewise.
1100 (dump_expr_list): Likewise.
1101 (dump_expr_init_vec): Likewise.
1102 (dump_expr): Likewise.
1103 (dump_binary_op): Likewise.
1104 (dump_unary_op): Likewise.
1106 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1109 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1110 * decl.c (case_conversion): Use it.
1111 * call.c (standard_conversion): Likewise.
1112 (implicit_conversion): Adjust.
1114 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
1116 * pt.c: Grammar fix in comments ("it's" to "its").
1118 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1120 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1121 check_elaborated_type_specifier): Use error + inform.
1122 * friend.c (make_friend_class): Likewise.
1123 * semantics.c (finish_id_expression): Likewise.
1125 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1128 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1131 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1134 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1137 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1140 2013-08-06 Caroline Tice <cmtice@google.com>
1142 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
1144 (vtable-class-hierarchy.o): Add build rule.
1145 * cp-tree.h (vtv_start_verification_constructor_init_function): New
1146 extern function decl.
1147 (vtv_finish_verification_constructor_init_function): New extern
1149 (build_vtbl_address): New extern function decl.
1150 (get_mangled_vtable_map_var_name): New extern function decl.
1151 (vtv_compute_class_hierarchy_transitive_closure): New extern function
1153 (vtv_generate_init_routine): New extern function decl.
1154 (vtv_save_class_info): New extern function decl.
1155 (vtv_recover_class_info): New extern function decl.
1156 (vtv_build_vtable_verify_fndecl): New extern function decl.
1157 * class.c (finish_struct_1): Add call to vtv_save_class_info if
1158 flag_vtable_verify is true.
1159 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1160 * vtable-class-hierarchy.c: New file.
1161 * mangle.c (get_mangled_vtable_map_var_name): New function.
1162 * decl2.c (start_objects): Update function comment.
1163 (cp_write_global_declarations): Call vtv_recover_class_info,
1164 vtv_compute_class_hierarchy_transitive_closure and
1165 vtv_build_vtable_verify_fndecl, before calling
1166 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1167 flag_vtable_verify is true.
1168 (vtv_start_verification_constructor_init_function): New function.
1169 (vtv_finish_verification_constructor_init_function): New function.
1170 * init.c (build_vtbl_address): Remove static qualifier from function.
1172 2013-08-06 Jason Merrill <jason@redhat.com>
1175 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1177 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
1180 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1181 (cp_build_binary_op): Adjust.
1183 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1185 * cxx-pretty-print.h (pp_c_base): Remove.
1186 (cxx_pretty_printer): Derive from c_pretty_printer.
1187 Adjust macros using pp_c_base.
1188 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1189 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1190 (pp_cxx_colon_colon): Likewise.
1191 (pp_cxx_separate_with): Likewise.
1192 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1193 (pp_cxx_expression_list): Likewise.
1194 (pp_cxx_space_for_pointer_operator): Likewise.
1195 (pp_cxx_init_declarator): Likewise.
1196 (pp_cxx_call_argument_list): Likewise.
1197 (pp_cxx_constant): Likewise.
1198 (pp_cxx_postfix_expression): Likewise.
1199 (pp_cxx_new_expression): Likewise.
1200 (pp_cxx_unary_expression): Likewise.
1201 (pp_cxx_cast_expression): Likewise.
1202 (pp_cxx_conditional_expression): Likewise.
1203 (pp_cxx_assignment_expression): Likewise.
1204 (pp_cxx_expression): Likewise.
1205 (pp_cxx_function_specifier): Likewise.
1206 (pp_cxx_decl_specifier_seq): Likewise.
1207 (pp_cxx_simple_type_specifier): Likewise.
1208 (pp_cxx_type_specifier_seq): Likewise.
1209 (pp_cxx_ptr_operator): Likewise.
1210 (pp_cxx_parameter_declaration_clause): Likewise.
1211 (pp_cxx_direct_declarator): Likewise.
1212 (pp_cxx_direct_abstract_declarator): Likewise.
1213 (pp_cxx_type_id): Likewise.
1214 (pp_cxx_statement): Likewise.
1215 (pp_cxx_pretty_printer_init): Tidy.
1216 * error.c (init_error): Do not use pp_base.
1217 (dump_aggr_type): Likewise.
1218 (dump_type_prefix): Likewise.
1219 (dump_type_suffix): Likewise.
1220 (dump_global_iord): Likewise.
1221 (dump_decl): Likewise.
1222 (dump_function_decl): Likewise.
1223 (dump_ref_qualifier): Likewise.
1224 (reinit_cxx_pp): Likewise.
1225 (decl_as_dwarf_string): Likewise.
1226 (lang_decl_dwarf_name): Likewise.
1227 (type_to_string): Likewise.
1228 (cv_to_string): Likewise.
1229 (cxx_print_error_function): Likewise.
1230 (cp_diagnostic_starter): Likewise.
1231 (cp_diagnostic_finalizer): Likewise.
1232 (cp_print_error_function): Likewise.
1233 (print_instantiation_context): Likewise.
1234 (cp_printer): Likewise.
1236 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1238 * error.c (dump_type_prefix): Use specialized pretty printer
1239 functions instead of pp_string or operators and punctuators.
1240 (dump_decl): Likewise.
1241 (dump_expr): Likewise.
1243 2013-08-03 Jason Merrill <jason@redhat.com>
1246 * pt.c (get_underlying_template): New.
1247 (convert_template_argument, lookup_template_class_1): Use it.
1251 * pt.c (pack_expansion_args_count): Rename from
1252 any_pack_expanson_args_p.
1253 (coerce_template_parms): Reject pack expansion to
1254 non-pack template parameter of alias template.
1256 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1258 * error.c (dump_aggr_type): Use specialized pretty printer
1259 functions instead of pp_character.
1260 (dump_type_prefix): Likewise.
1261 (dump_simple_decl): Likewise.
1262 (type_to_string): Likewise.
1264 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1266 * cp-tree.h (finish_stmt): Do not declare.
1267 * decl.c (finish_stmt): Do not define.
1268 * parser.c (cp_parser_expression_statement,
1269 cp_parser_declaration_statement,
1270 cp_parser_transaction_cancel): Don't call finish_stmt.
1271 * semantics.c (finish_expr_stmt, finish_if_stmt,
1272 finish_while_stmt, finish_do_stmt, finish_return_stmt,
1273 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1274 finish_transaction_stmt): Likewise.
1276 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
1279 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1280 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1281 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1282 instead of issuing an error without mentioning the conflicting
1285 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1287 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1288 return value for error_mark_node.
1290 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1293 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1294 token->type == CPP_ELLIPSIS.
1296 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1299 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1301 2013-07-29 Jason Merrill <jason@redhat.com>
1304 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1305 Use break_out_target_exprs instead of unshare_expr.
1307 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
1310 * call.c (initialize_reference): Don't crash when reference_binding
1311 returns a conv with conv->kind == ck_ambig.
1313 2013-07-29 Jason Merrill <jason@redhat.com>
1315 * mangle.c (write_name): Check for null context.
1316 (write_unscoped_name): Allow PARM_DECL context.
1318 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1321 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1322 (grokparms): Adjust.
1323 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1324 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1325 a tsubst_flags_t parameter.
1326 (tsubst_decl): Adjust.
1327 * call.c (convert_default_arg): Likewise.
1328 * cp-tree.h (check_default_argument, tsubst_default_argument):
1329 Update declarations.
1331 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1334 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1335 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1336 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1337 Fix string_len management, tidy.
1339 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1342 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1343 target type is incomplete; return a bool, not an int.
1344 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1346 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
1348 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1349 tf_warning_or_error.
1351 2013-07-21 Ondřej BÃÂlka <neleai@seznam.cz>
1353 * class.c: Fix typos.
1354 * cp-array-notation.c: Likewise.
1355 * cp-objcp-common.c: Likewise.
1358 * mangle.c: Likewise.
1359 * parser.c: Likewise.
1361 * semantics.c: Likewise.
1363 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
1365 * semantics.c (build_lambda_expr),
1366 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1367 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1368 (is_normal_capture_proxy), (insert_capture_proxy),
1369 (insert_pending_capture_proxies), (lambda_proxy_type),
1370 (build_capture_proxy), (vla_capture_type),
1371 (register_capture_members), (add_default_capture),
1372 (lambda_expr_this_capture), (maybe_resolve_dummy),
1373 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1374 (is_lambda_ignored_entity): Moved definitions into ...
1375 * lambda.c: ... this new file.
1377 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
1379 * call.c (build_conditional_expr_1): Handle the case with 1 vector
1380 and 2 scalars. Call save_expr before building a vector.
1381 * typeck.c (cp_build_binary_op): Check complain before complaining.
1383 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
1386 * init.c (build_aggr_init): Check for warn_unused attribute.
1387 * decl.c (poplevel): Likewise.
1389 2013-07-13 Jason Merrill <jason@redhat.com>
1392 * init.c (build_vec_init): Use {} for arrays of class type.
1393 (build_vec_delete): Don't take the address of the array.
1396 * class.c (layout_class_type): Check for too-large class.
1398 * call.c (can_convert): Allow user-defined conversions.
1399 (can_convert_standard): New.
1400 * cp-tree.h: Declare it.
1401 * cvt.c (convert_to_reference): Use it.
1402 * pt.c (convert_nontype_argument): Likewise.
1403 * search.c (check_final_overrider): Likewise.
1404 Don't worry about user-defined conversions.
1406 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1409 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1410 warn about casting between pointer-to-function and pointer-to-object.
1412 2013-07-09 Jason Merrill <jason@redhat.com>
1415 * init.c (build_vec_init): Don't take shortcuts when initializing
1419 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1422 * semantics.c (finish_id_expression): Return the id for an
1423 unevaluated outer variable.
1426 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1427 if the variable type uses 'auto'.
1430 * typeck.c (check_return_expr): Lambda proxies aren't eligible
1431 for nrv or return by move.
1434 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1435 a ref-qualifier in C++98 mode.
1438 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1439 argument to have the exact type of the parameter.
1442 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1443 a POINTER_PLUS_EXPR for type punning diagnostic.
1446 * pt.c (tsubst_copy): Handle USING_DECL.
1448 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
1451 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1453 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
1456 * call.c (build_conditional_expr_1): Preserve xvalues.
1458 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1461 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1462 also check declares_class_or_enum.
1464 2013-07-08 Jason Merrill <jason@redhat.com>
1467 * pt.c (fn_type_unification): Only defer during substitution.
1468 (type_unification_real): Defer during defarg substitution,
1469 add checks parm to pass back deferred checks.
1470 (unify, do_auto_deduction): Adjust.
1471 * semantics.c (reopen_deferring_access_checks): New.
1472 * cp-tree.h: Declare it.
1474 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
1477 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1478 set parser->default_arg_ok_p to false before cp_parser_declarator.
1480 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1483 * class.c (build_base_path): Improve diagnostic.
1485 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
1488 * decl.c (start_preparsed_function): Return a bool, false if
1489 push_template_decl fails.
1490 (start_function): Adjust.
1491 * cp-tree.h: Update.
1493 2013-07-03 Jakub Jelinek <jakub@redhat.com>
1496 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1497 Temporarily set parser->greater_than_is_operator_p for
1498 cp_parser_expression and restore from saved value afterwards.
1500 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
1502 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1503 * parser.c (cp_parser_operator()): Parse user-defined string
1504 literal as literal operator.
1506 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1509 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1510 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1513 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1515 * parser.c (cp_parser_array_notation): Removed rejection array notation
1516 of type function pointers. Added handling of array expressions when
1517 Cilk Plus is enabled. Took out type-checking.
1518 (cp_parser_postfix_open_square_expression): Moved normal array expr.
1519 parsing into cp_parser_array_notation when cilkplus is enabled.
1520 (cp_parser_compound_statement): Removed expansion of array notations.
1521 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1522 (cp_parser_function_definition_after_declarator): Likewise.
1523 (cp_parser_selection_statement): Removed error reporting.
1524 (cp_parser_iteration_statement): Likewise.
1525 (cp_parser_direct_declarator): Removed error checking/reporting if
1526 array notations are used in the declarator.
1527 * pt.c (instantiate_decl): Likewise.
1528 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1529 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1530 (potential_constant_expression_1): Returned false for
1531 ARRAY_NOTATION_REF case.
1532 * cp-gimplify.c (cp_genericize): Added expansion of array notation
1534 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
1535 parameters. Replaced build_decls with get_temp_regvar with type as
1537 (create_array_refs): Made the type-casting to ptrdiff_type.
1538 (replace_invariant_var): Added a check for void return type before
1539 creating new var. Replaced build_decl and build_min_nt_loc with
1541 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
1542 with gcc_unreachable. Removed few unwanted checks. Made induction
1543 variable type as ptrdiff_type. Removed loc and complain arguments
1544 passed into make_triplet_val_inv. Replaced all modify expression's
1545 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
1546 into stmt. list with the non-forceful one. Replaced some integer
1547 conversion and equality-checking to using tree_int_cst_equal.
1548 (expand_sec_reduce_builtin): All changes mentioned in above function
1549 expand_an_in_modify_expr. Made the new variable type of
1550 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1551 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
1552 the error reporting from parser to this function. Removed unwanted
1553 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1554 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1555 in function pointers.
1556 (cp_expand_cond_array_notations): Added a new if statements to check
1557 if condition has a zero rank. If so, then just return.
1558 (expand_return_expr): Added a check for return expressions with a rank.
1559 Replaced get_tmp_regvar with a create_temporary_var.
1560 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1561 Moved common code outside if-statements. Moved type-checking from
1563 * semantics.c (finish_return_stmt): Removed a check for return exprs.
1565 * call.c (convert_like_real): Removed a check for array notation
1566 expression in a function.
1567 (build_over_call): Likewise.
1568 (magic_varargs_p): Added a check for builtin array notation function.
1569 Made this function non-static and removed its prototype.
1570 * cp-tree.h (magic_varargs_p): New prototype.
1571 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1572 nargs to the param->length when builtin reduction function is used.
1573 (convert_arguments): Replaced check for a constant_p function with
1574 margic_varargs_p function call.
1575 (cp_build_binary_op): Removed calling of the function
1576 find_correct_array_notation_type.
1577 (cp_build_addr_expr_1): Removed an unwanted if-statement.
1578 (convert_for_assignment): Removed automatic return of rhs when array
1579 notation builtin function is used.
1581 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1584 * parser.c (cp_parser_save_member_function_body): Handle correctly
1585 curly braces in function-try-block mem-initializers.
1587 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
1590 * typeck.c (cp_build_vec_perm_expr): New function.
1591 * cp-tree.h: Declare it.
1592 * parser.c (cp_parser_postfix_expression): Call it.
1593 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1594 (tsubst_copy_and_build): Likewise.
1596 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
1599 * pt.c (more_specialized_fn): If both arguments are references,
1600 give priority to an lvalue.
1602 2013-06-26 Jason Merrill <jason@redhat.com>
1604 * typeck2.c (store_init_value): Diagnose a non-constant
1605 initializer for in-class static.
1608 * semantics.c (add_capture): Set type to error_mark_node after
1611 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
1614 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1615 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1617 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1619 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1620 * class.c (add_implicitly_declared_members): Likewise.
1621 (check_field_decl): Likewise.
1622 (finalize_literal_type_property): Likewise.
1623 (check_bases_and_members): Likewise.
1624 * decl.c (poplevel): Likewise.
1625 (case_conversion): Likewise.
1626 (check_initializer): Likewise.
1627 (grokfndecl): Likewise.
1628 (check_static_variable_definition): Likewise.
1629 (compute_array_index_type): Likewise.
1630 (grokdeclarator): Likewise.
1631 (build_enumerator): Likewise.
1632 * friend.c (make_friend_class): Likewise.
1633 * lex.c (init_reswords): Likewise.
1634 * method.c (synthesized_method_walk): Likewise.
1635 (implicitly_declare_fn): Likewise.
1636 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1637 (cp_parser_constant_expression): Likewise.
1638 (cp_parser_for_init_statement): Likewise.
1639 (cp_parser_block_declaration): Likewise.
1640 (cp_parser_type_name): Likewise.
1641 (cp_parser_enum_specifier): Likewise.
1642 (cp_parser_enumerator_list): Likewise.
1643 (cp_parser_member_declaration): Likewise.
1644 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1645 (cp_parser_template_declaration_after_export): Likewise.
1646 * pt.c (convert_nontype_argument_function): Likewise.
1647 (convert_nontype_argument): Likewise.
1648 (convert_template_argument): Likewise.
1649 (tsubst_copy_and_build): Likewise.
1650 (build_non_dependent_expr): Likewise.
1651 * semantics.c (non_const_var_error): Likewise.
1652 (potential_constant_expression_1): Likewise.
1653 * tree.c (lvalue_kind): Likewise.
1654 (build_vec_init_expr): Likewise.
1655 (cast_valid_in_integral_constant_expression_p): Likewise.
1656 * typeck.c (build_x_conditional_expr): Likewise.
1657 * typeck2.c (check_narrowing): Likewise.
1659 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1661 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1662 (expand_an_in_modify_expr): Changed a function call from the above
1663 removed function to length_mismatch_in_expr_p.
1665 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1667 * call.c (convert_like_real): Added a check if array notation is present
1668 in expression. If so, then no conversion of arguments is necessary.
1669 (build_over_call): Likewise.
1670 * typeck.c (cp_build_function_call_vec): Likewise.
1671 (convert_for_assignment): Likewise.
1672 (cp_build_array_ref): Reject array notations with a rank greater than 1
1673 as an array's index.
1674 (cp_build_binary_op): If array notations are preent in op, then call
1675 find_correct_array_notation_type.
1676 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1677 * cp-array-notation.c: New file.
1678 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1680 * cp-tree.h (fix_array_notation_exprs): New prototype.
1681 * semantics.c (finish_return_stmt): Reject array notations as
1683 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1684 (potential_constant_expression_1): Likewise.
1685 * tree.c (lvalue_kind): Likewise.
1686 * error.c (dump_decl): Likewise.
1687 (dump_expr): Likewise.
1688 * pt.c (ARRAY_NOTATION_REF): Likewise.
1689 (type_unification_real): Do not unify any arguments if array notations
1691 (instantiate_decl): Added a check for array notaitons inside the
1692 function body. If so, then expand them.
1693 * parser.c (cp_parser_array_notation): New function.
1694 (cp_parser_postfix_open_square_expression): Added a check for colons
1695 inside square braces. If found, then handle the array access as an
1696 array notation access. Also, disable auto-correction from a single
1697 colon to scope when Cilk Plus is enabled.
1698 (cp_parser_compound_statement): Added a check for array notations
1699 inside the statement. If found, then expand them.
1700 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1701 (cp_parser_function_definition_after_declarator): Likewise.
1702 (cp_parser_selection_statement): Searched for array notations inside
1703 condition. If so, then emit an error.
1704 (cp_parser_iteration_statement): Likewise.
1705 (cp_parser_direct_declarator): Reject array notations inside a
1706 variable or array declaration.
1707 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1709 2013-06-20 Jason Merrill <jason@redhat.com>
1712 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1713 context if we're in C++14 mode.
1714 * tree.c (array_of_runtime_bound_p): Return true for a dependent
1715 bound that is not potentually constant.
1716 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1717 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1718 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1719 (build_capture_proxy): Set REFERENCE_VLA_OK.
1720 (vla_capture_type): Make it a proper C++ class.
1721 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
1724 * decl.c (compute_array_index_type): Use size_one_node.
1726 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1727 a partial specialization.
1728 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1730 (most_specialized_class): Adjust.
1732 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1733 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1734 TEMPLATE_DECL_CHECK.
1736 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1739 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1740 TREE_TYPE (arg), not arg itself.
1742 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
1745 * pt.c (type_dependent_expression_p): Handle an array of unknown
1746 bound depending on a variadic parameter.
1747 * parser.c (cp_parser_range_for): Revert PR56794 changes.
1749 2013-06-17 Richard Biener <rguenther@suse.de>
1751 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1753 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
1756 * parser.c (cp_parser_expression_statement): Check whether
1757 cp_parser_expression returns error_mark_node.
1759 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1762 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1764 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1767 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1768 accessible base simply forward to build_static_cast.
1770 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
1773 * decl.c (poplevel): For the benefit of -Wunused-variable see
1776 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
1778 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
1780 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
1783 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
1784 again diagnostic already emitted by cp_parser_lookup_name.
1786 2013-06-11 Jan Hubicka <jh@suse.cz>
1789 * cp/pt.c (mark_decl_instantiated): Do not export explicit
1790 instantiations of anonymous namespace templates.
1792 2013-06-10 Jason Merrill <jason@redhat.com>
1794 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
1795 namespace to static_decls.
1797 2013-06-07 Sriraman Tallam <tmsriram@google.com>
1800 * call.c (build_over_call): Check if current_function_decl is
1803 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1806 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
1807 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
1809 2013-06-06 Jason Merrill <jason@redhat.com>
1812 * semantics.c (add_capture): Diagnose capture of variable-size
1813 type that is not a C++1y array of runtime bound.
1815 * decl.c (grokdeclarator): Keep a decl with error type.
1816 (grokfield, grokbitfield): Likewise.
1817 * pt.c (instantiate_class_template_1): Likewise.
1818 (tsubst_decl): Drop redundant error.
1819 * class.c (walk_subobject_offsets): Handle erroneous fields.
1820 * typeck2.c (process_init_constructor_record): Likewise.
1822 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
1825 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
1826 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
1828 2013-06-03 Jan Hubicka <jh@suse.cz>
1830 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
1831 mark_decl_referenced.
1832 (mark_needed): Likewise.
1834 2013-06-03 Jason Merrill <jason@redhat.com>
1836 * class.c (mark_type_abi_tags): New.
1837 (check_abi_tags): Use it.
1839 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1842 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
1843 * semantics.c (finish_qualified_id_expr): Use it.
1844 * cp-tree.h: Update.
1846 2013-06-01 Jan Hubicka <jh@suse.cz>
1848 * decl2.c (cp_write_global_declarations): Replace same_body_alias
1849 by symbol.cpp_implicit_alias.
1851 2013-05-30 Jason Merrill <jason@redhat.com>
1854 * cp-lang.c (cp_classify_record): Handle structs without
1858 * class.c (common_enclosing_class): New.
1859 * cp-tree.h: Declare it.
1860 * init.c (sort_mem_initializers): Don't splice out a union member
1863 2013-05-29 Jan Hubicka <jh@suse.cz>
1865 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
1866 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
1868 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
1871 * decl2.c (check_classfn): Check for destructors declared as member
1874 2013-05-24 Jason Merrill <jason@redhat.com>
1877 * pt.c (any_template_arguments_need_structural_equality_p): A
1878 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
1880 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
1883 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
1884 with width exceeding the type.
1886 2013-05-24 Jason Merrill <jason@redhat.com>
1889 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
1890 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
1892 2013-05-23 Jason Merrill <jason@redhat.com>
1895 * tree.c (build_ref_qualified_type): Clear
1896 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
1898 2013-05-22 Jason Merrill <jason@redhat.com>
1901 * call.c (convert_like_real): Use cp_convert_and_check.
1902 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
1903 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
1904 (potential_constant_expression_1): Handle OMP_ATOMIC*.
1907 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
1910 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1913 * parser.c (cp_parser_conversion_type_id): Set up
1914 parser->type_definition_forbidden_message before calling
1915 cp_parser_type_specifier_seq.
1917 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1920 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
1921 warnings about defaulted functions.
1923 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
1925 * call.c (build_conditional_expr_1): Add location_t parameter.
1926 (build_conditional_expr): Likewise.
1927 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
1928 get_member_function_from_ptrfunc, build_x_conditional_expr,
1929 cp_build_modify_expr): Update.
1930 * init.c (build_new_1): Likewise.
1931 * cp-tree.h: Update declaration.
1933 2013-05-20 Jason Merrill <jason@redhat.com>
1936 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1940 * decl.c (fndecl_declared_return_type): Also look in
1941 DECL_SAVED_FUNCTION_DATA.
1943 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1946 * parser.c (cp_parser_parameter_declaration): Check return value
1947 of cp_parser_parse_and_diagnose_invalid_type_name.
1949 2013-05-20 Jason Merrill <jason@redhat.com>
1952 * class.c (vbase_has_user_provided_move_assign): New.
1953 * method.c (synthesized_method_walk): Check it.
1954 * cp-tree.h: Declare it.
1957 * tree.c (build_cplus_array_type): Copy layout info if element
1960 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1963 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1965 2013-05-20 Jason Merrill <jason@redhat.com>
1968 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1969 whether a template has its own args.
1971 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1974 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1976 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1979 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1980 instead of cp_parser_initializer_list for compound-literals.
1982 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
1985 * typeck.c (check_return_expr): Reverse the alignment comparison.
1987 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1990 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1991 correctly sizeof compound-literal; update comments.
1993 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
1995 * call.c (build_conditional_expr_1): Use cp_build_binary_op
1996 instead of directly calling fold_build2.
1998 2013-05-16 Jason Merrill <jason@redhat.com>
2000 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2003 * decl.c (grokdeclarator): Allow member function qualifiers in
2004 TYPENAME context in C++11 mode.
2006 2013-05-16 Dodji Seketeli <dodji@redhat.com>
2008 PR c++/56782 - Regression with empty pack expansions
2009 * pt.c (use_pack_expansion_extra_args_p): When at least a
2010 parameter pack has an empty argument pack, and another parameter
2011 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2014 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2016 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2017 warning_at and permerror with warning_at/inform and permerror/
2018 inform, respectively.
2020 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2023 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2026 2013-05-14 Jason Merrill <jason@redhat.com>
2029 * parser.c (cp_parser_range_for): Call complete_type.
2032 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2034 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2037 * method.c (defaulted_late_check): Check for compatible exception
2038 specification out of class explicitly defaulted functions too.
2040 2013-05-14 Jason Merrill <jason@redhat.com>
2043 * semantics.c (potential_constant_expression_1): Make sure the
2044 called function is potentially constant.
2045 * call.c (null_ptr_cst_p): Revert earlier change.
2047 2013-05-13 Jason Merrill <jason@redhat.com>
2050 * call.c (null_ptr_cst_p): An expression with side-effects can't
2051 be a C++03 null pointer constant.
2054 * decl.c (reshape_init_class): Handle error_mark_node.
2057 * typeck.c (merge_types): Propagate ref-qualifier
2058 in METHOD_TYPE case.
2061 * decl.c (grokdeclarator): Apply ref-qualifier
2062 in the TYPENAME case.
2065 * decl.c (decls_match): Compare ref-qualifiers.
2067 2013-05-10 Jason Merrill <jason@redhat.com>
2070 * pt.c (convert_template_argument): Use dependent_template_arg_p,
2071 not uses_template_parms.
2074 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2077 * semantics.c (add_capture): Error rather than abort on copy
2079 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2080 warn about capture proxy.
2082 2013-05-09 Jason Merrill <jason@redhat.com>
2084 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2087 * pt.c (lookup_template_class_1): Handle getting a template
2088 template parameter as D1.
2090 N3639 C++1y VLA diagnostics
2091 * decl.c (grokdeclarator): Complain about reference, pointer, or
2093 (create_array_type_for_decl): Complain about array of VLA.
2094 * pt.c (tsubst): Likewise.
2095 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2096 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2097 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2098 (cxx_sizeof_or_alignof_type): Likewise.
2100 N3639 C++1y VLA support
2101 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2102 (check_array_initializer): Allow VLA init.
2103 (reshape_init_array_1): Adjust.
2104 (cp_finish_decl): Check for invalid VLA length.
2105 * typeck2.c (process_init_constructor_array): Adjust.
2106 (store_init_value): Use build_vec_init for VLAs.
2107 * semantics.c (add_capture): Capture VLA as ptr+len.
2108 (vla_capture_type): New.
2109 (build_capture_proxy): Rebuild the VLA.
2110 * typeck.c (build_simple_component_ref): Split out from...
2111 (build_ptrmemfunc_access_expr): ...here.
2112 * tree.c (array_of_runtime_bound_p): New.
2113 * init.c (throw_bad_array_length): New.
2114 (build_vec_init): Use it.
2115 * parser.c (cp_convert_range_for): When iterating over a VLA,
2116 use it directly rather than bind a reference.
2117 * cp-tree.h: Declare new functions.
2119 2013-05-08 Jason Merrill <jason@redhat.com>
2121 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2122 variably_modified_type_p.
2123 (expand_start_catch_block): Mark the typeinfo used here.
2124 * semantics.c (finish_handler_parms): Not here.
2126 * error.c (dump_type_suffix): Try harder on VLA length.
2129 * init.c (throw_bad_array_new_length): New.
2130 (build_new_1): Use it. Don't warn about braced-init-list.
2131 (build_vec_init): Use it.
2132 * call.c (build_operator_new_call): Use it.
2135 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2136 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2137 * error.c (maybe_warn_cpp0x): s/0x/11/.
2139 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2142 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2145 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
2147 * typeck.c (cp_build_binary_op): Call save_expr before
2148 build_vector_from_val.
2150 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2153 * decl.c (cp_finish_decl): After do_auto_deduction copy the
2154 qualifers with cp_apply_type_quals_to_decl.
2156 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
2158 * pt.c (convert_nontype_argument): Add missing whitespace in
2161 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2164 * decl.c (build_enumerator): Improve error message.
2166 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2169 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2170 messages for template types and fix column numbers.
2172 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2175 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2176 c_inhibit_evaluation_warnings around build_x_modify_expr call.
2178 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2181 * semantics.c (finish_decltype_type): Handle instantiated template
2184 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2187 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2189 2013-04-26 Jakub Jelinek <jakub@redhat.com>
2191 * error.c (cp_print_error_function): Adjust file_name_as_prefix
2194 2013-04-25 Jason Merrill <jason@redhat.com>
2197 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2200 * init.c (perform_member_init): Call reshape_init.
2202 2013-04-24 Jason Merrill <jason@redhat.com>
2205 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2207 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2209 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2210 pedwarn to simply use OPT_Wpointer_arith.
2211 (cp_build_unary_op): Likewise.
2213 2013-04-24 Jason Merrill <jason@redhat.com>
2215 N3648: init-captures are named.
2216 * semantics.c (add_capture): Don't prepend "__" to init-captures.
2217 (build_capture_proxy): Adjust.
2218 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2220 N3648: Allow braced and parenthesized initializers.
2221 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2222 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2223 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2224 (add_capture): Collapse a parenthesized initializer into a single
2226 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2228 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2231 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2232 * semantics.c (finish_qualified_id_expr): Likewise.
2233 (finish_id_expression): Update.
2234 * typeck.c (cp_build_addr_expr_1): Likewise.
2235 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2236 * cp-tree.h: Update declarations.
2238 2013-04-22 Jason Merrill <jason@redhat.com>
2241 * parser.c (cp_parser_unqualified_id): Handle ~auto.
2242 (cp_parser_pseudo_destructor_name): Likewise.
2243 (cp_parser_postfix_dot_deref_expression): Adjust.
2244 (cp_lexer_nth_token_is_keyword): New.
2245 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2246 * typeck.c (lookup_destructor): Handle ~auto.
2248 * pt.c (fn_type_unification): Push tinst level around
2249 type_unification_real if we aren't explaining.
2250 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2251 * error.c (dump_function_decl): Respect it.
2252 (subst_to_string): Pass it.
2255 * rtti.c (get_typeid): Diagnose qualified function type.
2256 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2258 * error.c (dump_aggr_type): Fix lambda detection.
2259 (dump_simple_decl): Pretty-print capture field.
2262 * cvt.c (build_expr_type_conversion): Two conversions that return
2263 the same type aren't necessarily ambiguous.
2266 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2267 pedwarn unconditional except in C++1y mode.
2269 * semantics.c (potential_constant_expression_1): Don't crash on
2273 * semantics.c (finish_id_expression): Reject capture of anonymous
2277 * decl2.c (check_default_args): Check for pack expansion.
2279 * mangle.c (write_type): Mangle decltype(auto).
2281 2013-04-19 Jason Merrill <jason@redhat.com>
2283 N3638 changes to return type deduction
2284 * decl.c (undeduced_auto_decl): New.
2285 (require_deduced_type): New.
2286 (fndecl_declared_return_type): New.
2287 (decls_match): Use it.
2288 (duplicate_decls): Don't check for auto return.
2289 (grokdeclarator): Reject virtual auto.
2290 * class.c (resolve_address_of_overloaded_function): Handle
2291 auto function templates.
2292 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2293 * cp-tree.h: Declare new fns.
2294 * error.c (dump_function_decl): Use fndecl_declared_return_type.
2295 * search.c (check_final_overrider): Likewise.
2296 * pt.c (make_decltype_auto): New.
2297 (do_auto_deduction): Require plain decltype(auto).
2301 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2302 template specializations.
2304 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
2306 Implement n3599 - Literal operator templates for strings.
2307 * parser.c (make_string_pack (tree value)): New function.
2308 (cp_parser_userdef_string_literal (cp_token *)): Use it
2309 to construct calls to character string literal operator templates.
2310 (cp_parser_template_declaration_after_export): Check for new string
2311 literal operator template parameter form.
2313 2013-04-15 Jason Merrill <jason@redhat.com>
2315 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2318 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2319 rather than a destructor name, it isn't an unqualified-name.
2320 (tsubst_copy_and_build): Pass down decltype_flag to operator
2324 * semantics.c (insert_capture_proxy): Just use index 1 in the
2327 2013-04-12 Jakub Jelinek <jakub@redhat.com>
2329 * error.c (cp_print_error_function,
2330 print_instantiation_partial_context_line,
2331 maybe_print_constexpr_context): Colorize locus strings.
2333 2013-04-11 Jason Merrill <jason@redhat.com>
2336 * parser.c (complain_flags): New.
2337 (cp_parser_postfix_expression): Use it.
2338 (cp_parser_unary_expression): Likewise.
2339 (cp_parser_binary_expression): Likewise.
2340 (cp_parser_assignment_expression): Likewise.
2341 (cp_parser_expression): Likewise.
2342 (cp_parser_postfix_open_square_expression): Take decltype_p.
2343 (cp_parser_builtin_offsetof): Adjust.
2344 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2345 * decl2.c (grok_array_decl): Add decltype_p parm.
2346 * cp-tree.h: Adjust prototype.
2347 * semantics.c (finish_unary_op_expr): Add complain parm.
2349 2013-04-11 Jakub Jelinek <jakub@redhat.com>
2352 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2353 calling maybe_constant_value for C++98.
2355 2013-04-11 Jason Merrill <jason@redhat.com>
2358 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2359 Strip references before checking WILDCARD_TYPE_P.
2361 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2363 * call.c (build_conditional_expr_1, build_over_call): Protect
2364 error calls with complain & tf_error.
2365 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2366 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2367 build_ptrmemfunc): Likewise.
2368 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2370 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2371 (convert_to_reference): Adjust.
2373 2013-04-11 Jason Merrill <jason@redhat.com>
2375 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2376 local variables, look them up instead.
2377 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2378 proxies and substitution in unevaluated context.
2379 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2380 before the iterators.
2383 * pt.c (uses_deducible_template_parms): New.
2384 (deducible_array_bound, deducible_expression): New.
2385 (deducible_template_args): New.
2386 (unify_one_argument): Call uses_deducible_template_parms.
2388 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2391 * typeck2.c (build_m_component_ref): Protect error calls with
2392 (complain & tf_error).
2394 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2397 * parser.c (cp_parser_enum_specifier): Check for empty
2398 anonymous enums and anonymous scoped enums.
2400 2013-04-10 Jakub Jelinek <jakub@redhat.com>
2403 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2404 first before calling maybe_constant_value for warn_for_div_by_zero
2405 or invalid shift count warning purposes.
2407 2013-04-09 Jason Merrill <jason@redhat.com>
2410 * rtti.c (build_typeid): Check the address of the argument
2411 rather than looking for an INDIRECT_REF.
2413 2013-04-04 Jason Merrill <jason@redhat.com>
2417 * typeck2.c (abstract_virtuals_error_sfinae): Disable
2418 complete_type again.
2420 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2423 * decl.c (validate_constexpr_redeclaration): Allow an explicit
2424 specialization to be different wrt the constexpr specifier.
2426 2013-04-06 Jason Merrill <jason@redhat.com>
2428 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2431 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
2433 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2434 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
2436 2013-04-03 Jason Merrill <jason@redhat.com>
2438 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2439 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2440 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2442 * mangle.c (write_type): When writing a function type with
2443 function-cv-quals, don't add the unqualified type as a
2444 substitution candidate.
2446 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2449 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2452 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2455 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2456 from args to new_args.
2457 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2458 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2460 2013-04-02 Jason Merrill <jason@redhat.com>
2463 * mangle.c (write_function_type): Mangle ref-qualifier.
2464 (write_nested_name): Likewise.
2465 (canonicalize_for_substitution): Preserve ref-qualifier.
2466 (write_type): Likewise.
2469 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2471 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2473 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2474 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2475 (for_each_template_parm_r): Use TYPE_TI_ARGS.
2477 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2479 * cp-tree.h (TAGGED_TYPE_P): Remove.
2480 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2481 (TYPE_ANONYMOUS_P): Adjust.
2482 * call.c (build_new_op_1): Likewise.
2483 * class.c (find_abi_tags_r): Likewise.
2484 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2485 type_is_deprecated): Likewise.
2486 * decl2.c (grokfield, min_vis_r): Likewise.
2487 * pt.c (get_template_info): Likewise.
2488 * tree.c (handle_abi_tag_attribute): Likewise.
2490 2013-04-01 Jason Merrill <jason@redhat.com>
2492 * semantics.c (maybe_constant_value): Check
2493 instantiation_dependent_expression_p.
2494 * pt.c (build_non_dependent_expr): Don't check it here.
2497 * init.c (build_new): Don't try to process an array initializer
2498 at template definition time.
2501 * typeck.c (finish_class_member_access_expr): Handle enum scope.
2504 * parser.c (cp_parser_range_for): Don't try to do auto deduction
2505 in a template if the type of the range is incomplete.
2507 * call.c (add_function_candidate): Take the address of 'this' here.
2508 (build_over_call): And here.
2509 (build_new_method_call_1, build_op_call_1): Not here.
2510 (build_user_type_conversion_1): Or here.
2511 (add_candidates): Adjust.
2513 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2514 * class.c (same_signature_p): Use type_memfn_quals.
2515 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2516 FUNCTION_OR_METHOD_TYPE_CHECK.
2517 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2518 * pt.c (unify): Use static_fn_type.
2520 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
2521 Jason Merrill <jason@redhat.com>
2523 Implement N2439 (ref-qualifiers for 'this')
2524 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2525 (FUNCTION_RVALUE_QUALIFIED): New.
2526 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2527 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2528 (cp_ref_qualifier): New enum.
2529 (cp_declarator): Add ref_qualifier.
2530 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2531 (cp_parser_direct_declarator): Use it.
2532 (make_call_declarator): Adjust.
2533 (cp_parser_lambda_declarator_opt): Adjust.
2534 * call.c (add_function_candidate): Handle ref-qualifier overload
2535 resolution semantics.
2536 (standard_conversion): Adjust.
2537 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2538 * decl.c (grokdeclarator): Handle ref-qualifiers.
2539 (grokfndecl): Check for invalid ref-qualifiers.
2540 (static_fn_type, revert_static_member_fn): Adjust.
2541 * decl2.c (build_memfn_type): Handle ref-qualifiers.
2542 (check_classfn): Check them.
2543 (cp_reconstruct_complex_type): Retain them.
2544 * error.c (dump_ref_qualifier): New.
2545 (dump_type_suffix, dump_function_decl): Use it.
2546 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2547 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2548 (unify): Retain them.
2549 * tree.c (cp_check_qualified_type): New.
2550 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2551 (build_ref_qualified_type): New.
2552 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2553 (cp_build_type_attribute_variant): Keep ref-qualifier.
2554 * typeck.c (merge_types): Keep ref-qualifier.
2555 (structural_comptypes): Compare ref-qualifier.
2556 (type_memfn_rqual): New.
2557 (apply_memfn_quals): Take ref-qual argument.
2558 * typeck2.c (build_m_component_ref): Check ref-qualifier.
2560 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2562 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2563 (DECL_FUNCTION_TEMPLATE_P): Adjust.
2565 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2566 pp_cxx_qualified_id): Use get_containing_scope.
2567 * parser.c (cp_parser_class_head): Likewise.
2568 * pt.c (push_template_decl_real): Likewise.
2570 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2571 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2573 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
2575 * decl2.c (collect_candidates_for_java_method_aliases): Use
2577 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2578 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2579 * decl.c (duplicate_decls): Likewise.
2580 * parser.c (cp_parser_template_declaration_after_export): Likewise,
2581 also DECL_DECLARES_TYPE_P.
2582 * pt.c (instantiate_class_template_1): Likewise.
2583 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2584 (lookup_field_r): Likewise.
2585 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2586 (lookup_fnfields_slot_nolazy): Likewise.
2587 * semantics.c (finish_member_declaration): Likewise.
2588 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2590 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2592 * pt.c (template_parms_to_args): Fix typo in comment.
2594 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2596 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2598 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2600 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2601 (build_op_call_1): Likewise.
2602 (build_over_call): Likewise.
2603 (compare_ics): Likewise.
2604 * class.c (build_base_path): Likewise.
2605 (resolve_address_of_overloaded_function): Likewise.
2606 * cp-tree.h: Likewise.
2607 * cvt.c (cp_convert_to_pointer): Likewise.
2608 (convert_to_reference): Likewise.
2609 (ocp_convert): Likewise.
2610 (convert_force): Likewise, tidy.
2611 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2612 (pp_cxx_ptr_operator): Likewise.
2613 * decl.c (duplicate_decls): Likewise.
2614 (start_decl): Likewise.
2615 (grok_op_properties): Likewise.
2616 (start_preparsed_function): Likewise.
2617 (store_parm_decls): Likewise.
2618 (finish_function): Likewise.
2619 * decl2.c (delete_sanity): Likewise.
2620 (acceptable_java_type): Likewise.
2621 (grokbitfield): Likewise.
2622 (cp_reconstruct_complex_type): Likewise.
2623 * error.c (dump_type_prefix): Likewise.
2624 (dump_expr): Likewise.
2625 * except.c (push_eh_cleanup): Likewise.
2626 (complete_ptr_ref_or_void_ptr_p): Likewise.
2627 (can_convert_eh): Likewise.
2628 * init.c (build_new_1): Likewise.
2629 (build_delete): Likewise.
2630 (build_vec_delete): Likewise.
2631 * mangle.c (write_type): Likewise.
2632 * parser.c (lookup_literal_operator): Likewise.
2633 * pt.c (convert_nontype_argument_function): Likewise.
2634 (convert_nontype_argument): Likewise.
2637 (dependent_type_p_r): Likewise.
2638 * rtti.c (build_headof): Likewise.
2639 (build_typeid): Likewise.
2640 (build_dynamic_cast_1): Likewise.
2641 (target_incomplete_p): Likewise.
2642 (typeinfo_in_lib_p): Likewise.
2643 * semantics.c (finish_omp_for): Likewise.
2644 (cxx_eval_call_expression): Likewise.
2645 (maybe_resolve_dummy): Likewise.
2646 * tree.c (build_target_expr): Likewise.
2647 (cp_build_qualified_type_real): Likewise.
2648 * typeck.c (composite_pointer_type_r): Likewise.
2649 (composite_pointer_type): Likewise.
2650 (comp_except_types): Likewise.
2651 (cxx_sizeof_nowarn): Likewise.
2652 (string_conv_p): Likewise.
2653 (cp_build_array_ref): Likewise.
2654 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2655 (pointer_diff): Likewise.
2656 (cp_build_addr_expr_1): Likewise.
2657 (cp_build_unary_op): Likewise.
2658 (build_static_cast_1): Likewise.
2659 (cp_build_c_cast): Likewise.
2660 (comp_ptr_ttypes_real): Likewise.
2661 (ptr_reasonably_similar): Likewise.
2662 (comp_ptr_ttypes_const): Likewise.
2663 (casts_away_constness): Likewise.
2664 (check_literal_operator_args): Likewise.
2665 * typeck2.c (build_x_arrow): Likewise.
2666 (add_exception_specifier): Likewise.
2668 2013-03-29 Jason Merrill <jason@redhat.com>
2671 * cp-tree.h (AUTO_IS_DECLTYPE): New.
2672 * parser.c (cp_parser_decltype): Handle decltype(auto).
2673 (cp_parser_type_id_1): Allow auto without a late-specified
2675 (cp_parser_primary_expression): Use the return value of
2676 finish_parenthesized_expr.
2677 (cp_parser_transaction_expression): Likewise.
2678 * semantics.c (force_paren_expr): New.
2679 (finish_parenthesized_expr): Use it.
2680 * call.c (build_conditional_expr_1): Likewise.
2681 * pt.c (do_auto_deduction): Handle decltype(auto).
2682 (tsubst_copy): Handle PAREN_EXPR.
2683 (tsubst_copy_and_build): Likewise.
2684 * error.c (dump_expr): Handle PAREN_EXPR.
2685 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2686 * mangle.c (write_expression): Ignore PAREN_EXPR.
2688 * parser.c (cp_parser_decltype_expr): Split out...
2689 (cp_parser_decltype): ...from here.
2693 * pt.c (unify_pack_expansion): Fix indexing.
2695 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2697 * call.c (build_java_interface_fn_ref): Likewise.
2698 (make_temporary_var_for_ref_to_temp): Likewise.
2699 * class.c (check_field_decls): Likewise.
2700 (layout_class_type): Likewise.
2701 (finish_struct_1): Likewise.
2702 (fixed_type_or_null): Likewise.
2703 (get_vtbl_decl_for_binfo): Likewise.
2704 * cp-gimplify.c (omp_var_to_track): Likewise.
2705 (cp_genericize_r): Likewise.
2706 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2707 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2708 (DECL_DISCRIMINATOR_P): Likewise.
2709 * decl.c (poplevel): Likewise.
2710 (decls_match): Likewise.
2711 (duplicate_decls): Likewise.
2712 (decl_jump_unsafe): Likewise.
2713 (start_decl): Likewise.
2714 (check_for_uninitialized_const_var): Likewise.
2715 (make_rtl_for_nonlocal_decl): Likewise.
2716 (cp_finish_decl): Likewise.
2717 (expand_static_init): Likewise.
2718 (local_variable_p): Likewise.
2719 (maybe_register_incomplete_var): Likewise.
2720 * decl2.c (grokfield): Likewise.
2721 (comdat_linkage): Likewise.
2722 (determine_visibility): Likewise.
2723 (import_export_decl): Likewise.
2724 (prune_vars_needing_no_initialization): Likewise.
2725 (decl_maybe_constant_var_p): Likewise.
2726 * error.c (dump_simple_decl): Likewise.
2727 (dump_template_decl): Likewise.
2728 (cp_printer): Likewise.
2729 * except.c (build_throw): Likewise.
2730 * init.c (build_vtbl_address): Likewise.
2731 (member_init_ok_or_else): Likewise.
2732 (build_aggr_init): Likewise.
2733 (expand_aggr_init_1): Likewise.
2734 (build_offset_ref): Likewise.
2735 (constant_value_1): Likewise.
2736 * mangle.c (write_mangled_name): Likewise.
2737 (write_prefix): Likewise.
2738 * name-lookup.c (supplement_binding_1): Likewise.
2739 (add_decl_to_level): Likewise.
2740 (pushdecl_maybe_friend_1): Likewise.
2741 (check_for_out_of_scope_variable): Likewise.
2742 (validate_nonmember_using_decl): Likewise.
2743 (lookup_name_innermost_nonclass_level_1): Likewise.
2744 (lookup_arg_dependent_1): Likewise.
2745 * parser.c (cp_parser_lambda_introducer): Likewise.
2746 (cp_parser_template_argument): Likewise.
2747 (cp_parser_single_declaration): Likewise.
2748 * pt.c (convert_nontype_argument): Likewise.
2749 (instantiate_class_template_1): Likewise.
2750 (tsubst_decl): Likewise.
2751 (tsubst_expr): Likewise.
2752 (do_decl_instantiation): Likewise.
2753 (do_type_instantiation): Likewise.
2754 (regenerate_decl_from_template): Likewise.
2755 (always_instantiate_p): Likewise.
2756 (instantiate_decl): Likewise.
2757 (type_dependent_expression_p): Likewise.
2758 (build_non_dependent_expr): Likewise.
2759 * repo.c (repo_emit_p): Likewise.
2760 * rtti.c (build_dynamic_cast_1): Likewise.
2761 * search.c (shared_member_p): Likewise.
2762 * semantics.c (outer_var_p): Likewise.
2763 (finish_id_expression): Likewise.
2764 (finish_omp_clauses): Likewise.
2765 (finish_decltype_type): Likewise.
2766 (ensure_literal_type_for_constexpr_object): Likewise.
2767 * tree.c (lvalue_kind): Likewise.
2768 (bot_replace): Likewise.
2769 (cp_tree_equal): Likewise.
2770 (handle_init_priority_attribute): Likewise.
2771 (decl_storage_duration): Likewise.
2772 * typeck.c (cxx_sizeof_expr): Likewise.
2773 (cxx_alignof_expr): Likewise.
2774 (decay_conversion): Likewise.
2775 (build_class_member_access_expr): Likewise.
2776 (cp_build_array_ref): Likewise.
2777 (cxx_mark_addressable): Likewise.
2778 (maybe_warn_about_returning_address_of_local): Likewise.
2779 (check_return_expr): Likewise.
2780 * typeck2.c (cxx_readonly_error): Likewise.
2781 (abstract_virtuals_error_sfinae): Likewise.
2782 (cxx_incomplete_type_diagnostic): Likewise.
2784 2013-03-28 Lawrence Crowl <crowl@google.com>
2787 (CXX_PARSER_H): Add header dependence.
2789 (extern debug (cp_binding_level &)): New.
2790 (extern debug (cp_binding_level *)): New.
2792 (debug (cp_binding_level &)): New.
2793 (debug (cp_binding_level *)): New.
2795 (debug (cp_parser &)): New.
2796 (debug (cp_parser *)): New.
2797 (debug (cp_token &)): New.
2798 (debug (cp_token *)): New.
2799 (debug (vec<cp_token, va_gc> &)): New.
2800 (debug (vec<cp_token, va_gc> *)): New.
2801 * parser.c: Add header dependence.
2802 (extern debug (cp_parser &)): New.
2803 (extern debug (cp_parser *)): New.
2804 (extern debug (cp_token &)): New.
2805 (extern debug (cp_token *)): New.
2806 (extern debug (vec<cp_token, va_gc> &)): New.
2807 (extern debug (vec<cp_token, va_gc> *)): New.
2809 2013-03-28 Jason Merrill <jason@redhat.com>
2813 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
2814 the type if tf_decltype is set.
2815 * pt.c (fn_type_unification): Add decltype_p parm.
2816 (get_bindings): Adjust.
2817 * cp-tree.h: Adjust.
2818 * class.c (resolve_address_of_overloaded_function): Adjust.
2819 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
2822 * parser.c (cp_parser_sizeof_pack): Split out from...
2823 (cp_parser_sizeof_operand): ...here. Require (id).
2826 * semantics.c (finish_this_expr): 'this' is an rvalue.
2827 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
2830 * semantics.c (finish_member_declaration): Don't push closure
2833 * name-lookup.c (pushdecl_maybe_friend_1): Use
2834 nonlambda_method_basetype and current_nonlambda_class_type.
2837 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
2838 conversion from integer to pointer.
2839 (cxx_eval_constant_expression): Likewise.
2840 (cxx_eval_indirect_ref): Use the folded operand if we still think
2841 this might be constant.
2843 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
2844 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2847 * call.c (convert_like_real): Change series of two permerrors
2848 to permerror + inform (and likewise for two errors).
2849 (build_new_method_call_1): Likewise.
2850 * typeck.c (convert_for_initialization): Change additional
2851 warning or error to inform.
2853 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2855 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
2856 (first_aggr_init_expr): Likewise.
2857 (more_aggr_init_expr_args_p): Likewise.
2858 (type_of_this_parm): Likewise.
2859 (class_of_this_parm): Likewise.
2860 * name-lookup.h (get_global_value_if_present): Likewise.
2861 (is_typename_at_global_scope): Likewise.
2863 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
2865 * call.c (joust): Don't call inform for a permerror returning false.
2866 * parser.c (cp_parser_check_class_key): Likewise.
2867 * pt.c (tsubst_copy_and_build): Likewise.
2869 2013-03-27 Jason Merrill <jason@redhat.com>
2872 * semantics.c (finish_qualified_id_expr): Return early
2875 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
2877 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
2878 * cvt.c (convert_to_void): Likewise.
2879 * error.c (dump_expr): Likewise.
2880 * mangle.c (write_expression): Likewise.
2881 * parser.c (cp_parser_template_argument): Likewise.
2882 * pt.c (convert_nontype_argument): Likewise.
2883 (tsubst_copy_and_build): Likewise.
2884 * rtti.c (build_typeid): Likewise.
2885 * semantics.c (finish_call_expr): Likewise.
2886 (finish_decltype_type): Likewise.
2887 (build_data_member_initialization): Likewise.
2888 * tree.c (is_dummy_object): Likewise.
2889 * typeck.c (decay_conversion): Likewise.
2890 (build_class_member_access_expr): Likewise.
2891 (cp_build_addr_expr_1): Likewise.
2892 (unary_complex_lvalue): Likewise.
2893 (check_return_expr): Likewise.
2894 * typeck2.c (cxx_readonly_error): Likewise.
2896 2013-03-26 Jason Merrill <jason@redhat.com>
2899 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
2900 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
2901 * cp-tree.h: Adjust prototype.
2904 * typeck2.c (build_m_component_ref): Handle prvalue object.
2906 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
2908 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
2909 * decl.c (duplicate_decls): Likewise.
2910 (cp_finish_decl): Likewise.
2911 (check_class_member_definition_namespace): Likewise.
2912 * decl2.c (grokfield): Likewise.
2913 (decl_needed_p): Likewise.
2914 (import_export_decl): Likewise.
2915 (mark_used): Likewise.
2916 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2917 * pt.c (push_access_scope): Likewise.
2918 (instantiate_decl): Likewise.
2919 * ptree.c (cxx_print_decl): Likewise.
2920 * repo.c (repo_emit_p): Likewise.
2921 * semantics.c (note_decl_for_pch): Likewise.
2922 * tree.c (decl_linkage): Likewise.
2924 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
2927 * decl.c (check_array_designated_initializer): Handle CONST_DECL
2930 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
2932 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2935 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2937 2013-03-25 Jason Merrill <jason@redhat.com>
2940 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2941 class is derived from the type of the object.
2944 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2945 unevaluated context.
2947 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
2950 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2951 DECL_TEMPLATE_INSTANTIATION.
2953 2013-03-22 Jason Merrill <jason@redhat.com>
2956 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2959 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2961 * cp-tree.h (identifier_p): New.
2962 * call.c: Throughout, call identifier_p insstead of direct
2963 comparaison of TREE_CODE against IDENTIFIER_NODE.
2964 * decl.c: Likewisse.
2965 * decl2.c: Likewise.
2967 * mangle.c: Likewise.
2968 * name-lookup.c: Likewise.
2969 * parser.c: Likewise.
2971 * search.c: Likewise.
2972 * semantics.c: Likewise.
2974 * typeck.c: Likewise.
2975 * typeck2.c: Likewise.
2977 2013-03-21 Jakub Jelinek <jakub@redhat.com>
2980 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2981 * call.c (build_temp): Likewise.
2982 * method.c (synthesize_method): Likewise.
2983 * typeck.c (convert_for_initialization): Likewise.
2985 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
2987 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2989 2013-03-21 Richard Biener <rguenther@suse.de>
2991 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2992 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2994 2013-03-20 Jason Merrill <jason@redhat.com>
2997 * parser.c (cp_parser_late_return_type_opt): Save and restore
2998 current_class_ptr/ref.
3001 * expr.c (cplus_expand_constant): Do nothing if the class is
3003 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3004 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3005 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3006 (complete_vars): Likewise.
3008 * name-lookup.c (get_anonymous_namespace_name): Never use
3009 get_file_function_name.
3011 * pt.c (retrieve_specialization): Handle null tmpl argument.
3015 * pt.c (tsubst_decl): Check return value of register_specialization.
3016 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3019 2013-03-17 Jason Merrill <jason@redhat.com>
3023 * parser.c (cp_parser_direct_declarator): Bail if we see a
3024 qualified-id not at namespace scope.
3028 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3031 2013-03-16 Jason Merrill <jason@redhat.com>
3033 * decl.c (grokdeclarator): Assert that we won't see a pointer to
3037 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3038 (MAYBE_CLASS_TYPE_P): ...here.
3039 * semantics.c (lambda_capture_field_type): Only build a
3040 magic decltype for wildcard types.
3041 (lambda_proxy_type): Likewise.
3042 (finish_non_static_data_member): Get the quals from
3046 * parser.c (cp_parser_template_argument): Don't
3047 fold_non_dependent_expr.
3049 * parser.c (cp_parser_lambda_declarator_opt): Use
3050 cp_parser_trailing_type_id.
3053 * parser.c (cp_parser_template_id): Don't forget access checks.
3056 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3060 * name-lookup.h (tag_scope): Add ts_lambda.
3061 * semantics.c (begin_lambda_type): Use it.
3062 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3063 * pt.c (check_default_tmpl_args): Ignore lambdas.
3064 (push_template_decl_real): Handle lambdas.
3065 * tree.c (no_linkage_check): Adjust lambda check.
3068 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3071 * parser.c (cp_parser_direct_declarator): Fix late return
3072 for out-of-class defn of member function.
3075 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3076 parms to avoid duplicate -Wshadow warnings.
3078 * search.c (lookup_base): Handle NULL_TREE.
3081 * semantics.c (potential_constant_expression_1): Use of 'this' in
3082 a non-constexpr function makes the expression not potentially
3087 * cp-tree.h (tsubst_flags): Add tf_decltype.
3088 * call.c (build_cxx_call): Don't build a temporary if it's set.
3089 (build_over_call): Make sure it's only passed to build_cxx_call.
3090 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3091 (cp_parser_unary_expression): Likewise.
3092 (cp_parser_cast_expression): Likewise.
3093 (cp_parser_binary_expression): Likewise.
3094 (cp_parser_assignment_expression): Likewise.
3095 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
3096 (cp_parser_expression): Add decltype_p. Force a
3097 temporary for a call on the LHS of a comma.
3098 (cp_parser_decltype): Pass true to decltype_p parms.
3099 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3100 (tsubst_copy_and_build): Pass tf_decltype down only for
3101 CALL_EXPR and the RHS of COMPOUND_EXPR.
3102 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3104 * cp-tree.h (abstract_class_use): New enum.
3105 * typeck2.c (pending_abstract_type): Add use field.
3106 (abstract_virtuals_error_sfinae): Add overloads taking
3107 abstract_class_use instead of tree.
3108 * typeck.c (build_static_cast_1): Call it.
3109 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3110 * pt.c: Adjust calls.
3111 * decl.c (cp_finish_decl): Don't handle functions specially.
3112 (grokdeclarator): Always check return type.
3113 * init.c (build_new_1): Adjust call.
3117 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3118 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3121 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3122 (tsubst_arg_types): Likewise.
3126 * call.c (convert_like_real): Check for explicit constructors
3127 even for value-initialization.
3130 * pt.c (convert_nontype_argument): Handle invalid pointer.
3132 * parser.c (cp_parser_lambda_expression): Use nreverse.
3136 * pt.c (instantiate_class_template_1): Instantiate lambda capture
3138 (tsubst_copy_and_build): Not here.
3141 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3144 * parser.c (parsing_nsdmi): New.
3145 * semantics.c (outer_automatic_var_p): Check it.
3146 (finish_id_expression): Likewise.
3147 * cp-tree.h: Declare it.
3150 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3152 * parser.c (lookup_literal_operator): Correct parm/arg naming
3156 * pt.c (fold_non_dependent_expr_sfinae): Check
3157 instantiation_dependent_expression_p.
3160 * class.c (resolve_address_of_overloaded_function): Accept a
3161 reference to function for target_type.
3162 (instantiate_type): Likewise.
3163 * pt.c (convert_nontype_argument): Pass it to
3164 convert_nontype_argument_function.
3166 2013-03-16 Jakub Jelinek <jakub@redhat.com>
3168 * tree.c (cp_tree_equal): Fix a pasto.
3171 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3172 pass op1 through maybe_constant_value first.
3174 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
3177 * semantics.c (cxx_eval_array_reference): Check for negative index.
3179 2013-03-14 Jason Merrill <jason@redhat.com>
3182 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3185 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3186 dso_handle parm on targets without __cxa_atexit.
3188 2013-03-11 Jason Merrill <jason@redhat.com>
3191 * typeck.c (check_return_expr): Disallow returning init list here.
3192 * semantics.c (apply_deduced_return_type): Not here.
3194 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
3197 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3198 * error.c (dump_expr): Likewise.
3200 2013-03-08 Jason Merrill <jason@redhat.com>
3203 * class.c (modify_all_vtables): Mangle the vtable name before
3206 * semantics.c (lambda_expr_this_capture): In unevaluated context,
3207 just return the nearest 'this'.
3212 * tree.c (maybe_dummy_object): Don't capture 'this'.
3213 * semantics.c (maybe_resolve_dummy): New.
3214 (finish_non_static_data_member): Use it.
3215 (finish_qualified_id_expr): Don't test is_dummy_object.
3216 * cp-tree.h: Declare maybe_resolve_dummy.
3217 * call.c (build_new_method_call_1): Use it.
3220 * semantics.c (apply_deduced_return_type): Don't allow returning
3221 std::initializer_list.
3223 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3226 * parser.c (cp_parser_elaborated_type_specifier): Don't call
3227 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3228 * decl.c (check_elaborated_type_specifier): Tidy.
3230 2013-03-06 Jakub Jelinek <jakub@redhat.com>
3233 * tree.c (strip_typedefs): Don't copy args if they are NULL.
3235 2013-03-05 Jakub Jelinek <jakub@redhat.com>
3237 * parser.c (cp_parser_braced_list): For {} initialize
3238 *non_constant_p to false.
3240 2013-03-04 Jason Merrill <jason@redhat.com>
3244 * semantics.c (lambda_expr_this_capture): Handle NSDMI
3245 and non-class scopes.
3247 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3249 * decl.c (grokdeclarator): Remove dead code.
3251 2013-02-28 Jason Merrill <jason@redhat.com>
3254 * semantics.c (potential_constant_expression_1): Use
3255 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3258 * call.c (build_over_call): Avoid virtual lookup in a template.
3260 2013-02-27 Jason Merrill <jason@redhat.com>
3264 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3265 of the base name for inheriting ctors.
3266 (push_class_level_binding_1): Remove inheriting ctor handling.
3267 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3268 * class.c (add_implicitly_declared_members): Adjust.
3270 2013-02-26 David Binderman <dcb314@hotmail.com>
3273 * decl.c (grokdeclarator): Tidy publicp assignment.
3275 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
3278 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3279 (build_transaction_expr): Same.
3281 2013-02-25 Jason Merrill <jason@redhat.com>
3284 * pt.c (fn_type_unification): Wait to call push_tinst_level until
3285 we know what args we're looking at.
3288 * semantics.c (potential_constant_expression_1): In C++98, a cast
3289 to non-integral type can't be a constant expression.
3291 2013-02-24 Jakub Jelinek <jakub@redhat.com>
3294 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3297 2013-02-22 Jason Merrill <jason@redhat.com>
3300 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3301 if we got the wrong number of template parms.
3304 * pt.c (fn_type_unification): Use explicit args in template
3305 instantiation context.
3308 * call.c (can_convert_arg): Discard access checks.
3311 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3314 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
3317 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3318 * cvt.c (ocp_convert): Use the latter.
3319 (cp_convert_to_pointer): Likewise.
3320 * decl.c (check_default_argument): Likewise.
3321 * typeck.c (cp_build_binary_op): Likewise.
3322 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3324 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3325 Paolo Carlini <paolo.carlini@oracle.com>
3328 * decl2.c (grokbitfield): Allow scoped enumeration types.
3330 2013-02-15 Jason Merrill <jason@redhat.com>
3333 * semantics.c (finish_id_expression): Also return the identifier
3334 for an outer local static.
3337 * class.c (check_bases_and_members): Deduce noexcept after
3341 * semantics.c (finish_id_expression): In a template, return
3342 the identifier for a constant variable.
3344 2013-02-14 Jason Merrill <jason@redhat.com>
3347 * semantics.c (build_anon_member_initialization): New.
3348 (build_data_member_initialization): Use it.
3351 * decl.c (cp_finish_decl): Force instantiation of an
3352 auto static data member.
3355 * pt.c (unify): A pack expansion that is not the last template
3356 argument makes the entire template argument list non-deduced.
3359 * name-lookup.c (do_class_using_decl): Handle typedefs with
3360 inheriting constructors.
3361 (push_class_level_binding_1): Allow inheriting from template
3362 template parameter, too.
3363 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3366 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3367 default argument scope.
3368 * mangle.c (write_name): Likewise.
3371 * error.c (find_typenames_r): Don't walk into a pack expansion.
3373 2013-02-13 Jason Merrill <jason@redhat.com>
3376 * parser.c (cp_parser_member_declaration): Check the declarator
3377 form when detecting a function declaration via typedef.
3380 * pt.c (maybe_process_partial_specialization): A lambda
3381 isn't what's being specialized.
3384 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3388 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3391 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3392 non-zero offsets, too.
3395 * decl.c (build_enumerator): Always convert the value to a
3396 fixed underlying type.
3399 * pt.c (tsubst_copy_and_build): Don't forget any new
3400 captures that arose from use of dependent names.
3402 2013-02-13 Jakub Jelinek <jakub@redhat.com>
3405 * semantics.c (finish_asm_stmt): If input constraints allow
3406 neither register nor memory, try maybe_constant_value to get
3407 a constant if possible.
3409 2013-02-12 Jason Merrill <jason@redhat.com>
3412 * method.c (add_one_base_init): Handle base constructor
3413 taking rvalue reference parm.
3416 * semantics.c (sort_constexpr_mem_initializers): Handle
3419 2013-02-09 Jason Merrill <jason@redhat.com>
3422 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3423 maybe_instantiate_noexcept.
3426 * pt.c (eq_specializations): Set comparing_specializations.
3427 * tree.c (cp_tree_equal): Check it.
3428 * cp-tree.h: Declare it.
3430 * decl.c (decls_match): Check versions later.
3433 * pt.c (build_non_dependent_expr): Don't try to fold
3434 instantiation-dependent expressions.
3435 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3436 [BIND_EXPR]: Treat as dependent.
3438 2013-02-07 Jakub Jelinek <jakub@redhat.com>
3441 * init.c (build_vec_init): Don't append NULL values into new_vec.
3442 (build_zero_init_1): Don't push anything into v if recursive call
3444 (build_value_init_noctor): Don't push anything into v if
3445 build_value_init call returned NULL_TREE.
3448 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3449 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
3450 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
3451 return true only if 2nd token isn't CPP_CLOSE_PAREN.
3452 (cp_parser_cast_expression): Adjust caller.
3455 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3456 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3457 DECL_LANG_SPECIFIC (t).
3459 2013-02-07 Jason Merrill <jason@redhat.com>
3462 * method.c (do_build_copy_constructor): Don't bother turning
3463 scalars from lvalues to xvalues.
3464 (do_build_copy_assign): Likewise.
3466 2013-02-06 Jason Merrill <jason@redhat.com>
3468 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3470 2013-02-05 Jason Merrill <jason@redhat.com>
3473 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3477 * decl.c (start_preparsed_function): Update restype if we change
3481 * pt.c (fn_type_unification): Discard any access checks from
3482 substituting explicit args.
3484 2013-01-31 Jason Merrill <jason@redhat.com>
3488 * typeck.c (get_member_function_from_ptrfunc): Fix
3489 ptrmemfunc_vbit_in_delta case.
3491 2013-01-29 Jason Merrill <jason@redhat.com>
3494 * class.c (build_ctor_vtbl_group): Give construction vtables
3497 2013-01-25 Jason Merrill <jason@redhat.com>
3500 * pt.c (convert_nontype_argument_function): Handle invalid input.
3501 (convert_nontype_argument): Likewise.
3504 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3505 dynamic type has no virtual functions.
3507 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
3510 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3511 on TARGET_EXPR nodes.
3513 2013-01-22 Jason Merrill <jason@redhat.com>
3516 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3518 2013-01-22 Dodji Seketeli <dodji@redhat.com>
3521 * pt.c (argument_pack_element_is_expansion_p)
3522 (make_argument_pack_select, use_pack_expansion_extra_args_p)
3523 (gen_elem_of_pack_expansion_instantiation): New static functions.
3524 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3525 look through the possibly resulting pack expansion as well.
3526 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3527 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3528 Use gen_elem_of_pack_expansion_instantiation to build the
3529 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
3530 as gen_elem_of_pack_expansion_instantiation and the change in
3531 tsubst above generalize this particular case.
3532 (arg_from_parm_pack_p): Remove this for it's not used by
3533 tsubst_pack_expansion anymore.
3535 2013-01-21 Jason Merrill <jason@redhat.com>
3538 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3539 template args count.
3541 2013-01-18 Jason Merrill <jason@redhat.com>
3544 * decl2.c (get_local_tls_init_fn): New.
3545 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
3546 with aliases for internal variables. Don't use weakrefs if
3547 the variable needs destruction.
3548 (generate_tls_wrapper): Mark the wrapper as const if no
3549 initialization is needed.
3550 (handle_tls_init): Don't require aliases.
3552 2013-01-15 Dodji Seketeli <dodji@redhat.com>
3555 * pt.c (coerce_innermost_template_parms): New static function.
3556 (instantiate_alias_template): Use it here.
3558 2013-01-09 Jason Merrill <jason@redhat.com>
3561 * rtti.c (build_typeid, get_typeid): Add complain parm.
3562 (get_tinfo_decl_dynamic): Likewise.
3563 * cp-tree.h, parser.c, pt.c: Adjust.
3566 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3569 2013-01-09 Jakub Jelinek <jakub@redhat.com>
3572 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3573 call maybe_constant_value for the negative or too big shift
3576 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
3579 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3580 of the argument is true.
3582 2013-01-08 Joel Brobecker <brobecker@adacore.com>
3584 * parser.c (cp_parser_initializer_list): Move declaration
3585 of variable non_const to start of lexical block.
3587 2013-01-07 Jason Merrill <jason@redhat.com>
3590 * tree.c (build_aggr_init_expr): Do nothing in a template.
3591 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3592 a FUNCTION_DECL before tsubsting.
3594 2013-01-04 Dodji Seketeli <dodji@redhat.com>
3597 * pt.c (check_instantiated_arg): Allow type template arguments.
3599 2013-01-04 Jason Merrill <jason@redhat.com>
3602 * decl.c (reset_type_linkage, bt_reset_linkage): New.
3603 (grokdeclarator): Use reset_type_linkage.
3604 * name-lookup.c (binding_table_foreach): Handle null table.
3605 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3607 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
3609 PR c++/54526 (again)
3610 * parser.c (cp_parser_template_id): Revert core of previous change
3611 (keep adjusted inform message).
3613 2013-01-03 Jason Merrill <jason@redhat.com>
3617 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3621 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3624 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3627 * call.c (type_has_extended_temps): New.
3628 * cp-tree.h: Declare it.
3629 * decl.c (check_initializer): Use build_aggr_init for arrays
3631 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3633 2013-01-02 Jason Merrill <jason@redhat.com>
3636 * call.c (build_new_method_call_1): Don't use build_value_init for
3637 user-provided default constructors.
3639 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3643 * tree.c (build_cplus_array_type): Copy layout information
3644 to main variant if necessary.
3646 Copyright (C) 2013 Free Software Foundation, Inc.
3648 Copying and distribution of this file, with or without modification,
3649 are permitted in any medium without royalty provided the copyright
3650 notice and this notice are preserved.