1 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3 * error.c, init.c, parser.c, semantics.c: Replace
4 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6 2013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
9 * decl.c (validate_constexpr_redeclaration): Redeclarations of
10 variables can differ in constexpr.
12 2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
15 * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
16 '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
18 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
20 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
21 * cp-cilkplus.c: New file.
22 * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
23 * parser.c (cp_parser_cilk_simd): New.
24 (cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
25 (cp_parser_jump_statement): Same.
26 (cp_parser_omp_for_cond): Add new argument.
28 (cp_parser_omp_for_loop): Pass new argument to
29 cp_parser_omp_for_cond.
30 Handle CILK_SIMD nodes.
31 Abstract initilization code to..
32 (cp_parser_omp_for_loop_init): ...here.
33 (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
34 (cp_parser_cilk_simd_vectorlength): New.
35 (cp_parser_cilk_simd_linear): New.
36 (cp_parser_cilk_simd_clause_name): New.
37 (cp_parser_cilk_simd_all_clauses): New.
38 (cp_parser_cilk_simd): New.
39 * parser.h (IN_CILK_SIMD_FOR): New macro.
40 * pt.c (tsubst_expr): Add case for CILK_SIMD.
41 * typeck2.c (cxx_readonly_error): Pass location argument to
44 2013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
47 * parser.c (cp_parser_late_parsing_nsdmi): Call
48 maybe_begin_member_template_processing.
49 * pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
50 (inline_needs_template_parms): Adjust.
52 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
54 * class.c: Include only gimplify.h and gimple.h as needed.
55 * cp-gimplify.c: Likewise.
58 * optimize.c: Likewise.
60 * semantics.c: Likewise.
62 * vtable-class-hierarchy.c: Likewise.
64 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
66 * class.c: Include gimplify.h.
67 * cp-gimplify.c: Likewise.
70 * optimize.c: Likewise.
72 * semantics.c: Likewise.
74 * vtable-class-hierarchy.c: Likewise.
75 * decl2.c: Don't include gimple.h.
77 * method.c: Include pointer-set.h instead of gimple.h.
79 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
81 * pt.c (convert_generic_types_to_packs): New function to transform
82 a range of implicitly introduced non-pack template parms to be parameter
84 * cp-tree.h (convert_generic_types_to_packs): Declare.
85 * parser.c (cp_parser_parameter_declaration_list): If a function
86 parameter pack contains generic types, convert them to packs prior to
89 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
96 * parser.h (struct cp_parser): New members implicit_template_parms,
97 implicit_template_scope and auto_is_implicit_function_template_parm_p.
98 * parser.c (add_implicit_template_parms): Refactor as ...
99 (synthesize_implicit_template_parm): ... this to append a new template
100 type parm to the current template parameter list (introducing a new list
101 if necessary). Removed push_deferring_access_checks.
102 (finish_fully_implicit_template): Removed pop_deferring_access_checks.
103 (cp_parser_new): Initialize new cp_parser members.
104 (cp_parser_parameter_declaration_clause): Consider auto as implicit
105 template parm when parsing a parameter declaration (unless parsing an
106 explicit specialization).
107 (cp_parser_parameter_declaration_list): Remove local
108 implicit_template_parms counter and reset cp_parser implicit template
110 (cp_parser_lambda_expression): Reset implicit template cp_parser members
111 whilst generating lambda class.
112 (cp_parser_function_definition_after_declarator): Reset implicit
113 template cp_parser members whilst parsing function definition.
114 (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
115 better with template diagnostics.
116 (cp_parser_simple_type_specifier): Synthesize implicit template parm on
117 parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
119 * decl.c (grokdeclarator): ... that were previously done here.
121 2013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
124 * pt.c (lookup_template_class_1): Handle alias template declarations
125 of enumeration types.
127 2013-11-10 Paolo Carlini <paolo.carlini@oracle.com>
129 * cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
130 maybe_warn_zero_as_null_pointer_constant to avoid duplicate
131 -Wzero-as-null-pointer-constant diagnostics.
133 * typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
135 2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
138 * init.c (build_new_1): Don't call build_java_class_ref on non-class
141 2013-11-05 Jason Merrill <jason@redhat.com>
144 * decl.c (check_initializer): Don't use build_vec_init for arrays
147 2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
150 * name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
152 2013-11-05 Tobias Burnus <burnus@net-b.de>
154 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
155 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
156 cp_parser_omp_declare): Handle -fopenmp-simd.
158 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
160 * decl2.c (cpp_check): Change type of first parameter and deal with
163 2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
166 * parser.c (cp_parser_constructor_declarator_p): Check that the
167 class-name matches current_class_type.
169 2013-11-03 Marek Polacek <polacek@redhat.com>
171 * decl.c (cp_finish_decl): Move C++1y bounds checking...
172 (compute_array_index_type): ...here. Add VLA instrumentation.
173 Call stabilize_vla_size.
174 (grokdeclarator): Don't call stabilize_vla_size here.
176 2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
180 * parser.c (cp_parser_cast_expression): If we aren't looking at
181 a cast-expression don't call cp_parser_type_id.
182 (cp_parser_postfix_expression): Likewise for compound-literal.
183 (cp_parser_tokens_start_cast_expression): Adjust.
185 2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
188 * parser.c (make_string_pack): Discover non-const type and size
189 of character and build parm pack with correct type and chars.
191 2013-11-01 Trevor Saunders <tsaunders@mozilla.com>
193 * semantics.c (build_anon_member_initialization): Convert fields to be
196 2013-11-01 Marc Glisse <marc.glisse@inria.fr>
199 * pt.c (type_dependent_expression_p): Handle null argument.
201 2013-11-01 Jakub Jelinek <jakub@redhat.com>
203 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
204 check_dup_generic at the end, unless remove is true.
205 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
208 2013-10-31 Jakub Jelinek <jakub@redhat.com>
210 * semantics.c (finish_omp_clauses): Diagnose aligned clause
211 with decl that is not pointer nor array nor reference to those.
213 2013-10-31 Jason Merrill <jason@redhat.com>
215 * semantics.c (cxx_eval_call_expression): Handle trivial
216 value-initialization.
217 * typeck2.c (store_init_value): Call maybe_constant_init after
220 * decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
221 * decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
224 * parser.c (cp_parser_late_parse_one_default_arg): Set
225 TARGET_EXPR_DIRECT_INIT_P.
227 * class.c (type_build_ctor_call): Return early in C++98 mode.
228 (type_build_dtor_call): Likewise.
230 2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
234 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
237 * pt.c (most_specialized_class): Bump processing_template_decl for
240 2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
243 * call.c (build_over_call): Check return value of mark_used.
245 2013-10-30 Jason Merrill <jason@redhat.com>
247 * semantics.c (finish_compound_literal): Don't create a static variable
248 inside cp_unevaluated_operand.
250 * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
252 2013-10-30 Tobias Burnus <burnus@net-b.de>
255 * cp-tree.h (RANGE_FOR_IVDEP): Define.
256 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
257 finish_for_cond): Take 'bool ivdep' parameter.
258 * cp-array-notation.c (create_an_loop): Update call.
259 * init.c (build_vec_init): Ditto.
260 * pt.c (tsubst_expr): Ditto.
261 * parser.c (cp_parser_iteration_statement, cp_parser_for,
262 cp_parser_range_for, cp_convert_range_for): Update calls.
263 (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
264 * semantics.c (finish_while_stmt_cond, finish_do_stmt,
265 finish_for_cond): Optionally build ivdep annotation.
267 2013-10-30 Jason Merrill <jason@redhat.com>
269 * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
271 2013-10-29 David Malcolm <dmalcolm@redhat.com>
273 Patch autogenerated by refactor_symtab.py from
274 https://github.com/davidmalcolm/gcc-refactoring-scripts
275 revision 58bb219cc090b2f4516a9297d868c245495ee622
277 * call.c (mark_versions_used): Update for conversion of symtab types
278 to a true class hierarchy.
279 * decl2.c (cp_write_global_declarations): Likewise.
280 (clear_decl_external): Likewise.
281 (build_java_method_aliases): Likewise.
282 (collect_candidates_for_java_method_aliases): Likewise.
283 (mark_needed): Likewise.
284 (var_finalized_p): Likewise.
285 (maybe_make_one_only): Likewise.
286 (maybe_emit_vtables): Likewise.
287 * lambda.c (maybe_add_lambda_conv_op): Likewise.
288 * method.c (use_thunk): Likewise.
289 * optimize.c (maybe_clone_body): Likewise.
290 * tree.c (cp_fix_function_decl_p): Likewise.
292 2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
295 * decl2.c (grokfield): Handle auto like NSDMI.
297 2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
300 * pt.c (check_template_shadow): Don't skip declarations in inline
303 2013-10-25 Tobias Burnus <burnus@net-b.de>
306 * parser.c (cp_parser_iteration_statement,
307 cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
310 2013-10-24 Marek Polacek <polacek@redhat.com>
313 * typeck2.c (check_narrowing): Don't check narrowing when the scalar
314 initializer is empty.
316 2013-10-23 Jason Merrill <jason@redhat.com>
319 * method.c (defaulted_late_check): Delete on eh-spec mismatch.
320 (maybe_explain_implicit_delete): Explain it.
322 * error.c (eh_spec_to_string): New.
323 (cp_printer): Use it for %X.
325 In C++11 a trivial [cd]tor might not be callable.
326 * class.c (user_provided_p): A function deleted on its declation
327 in the class is not user-provided.
328 (type_build_ctor_call): Also force a ctor call if we
329 might have a deleted or private trivial ctor.
330 (type_build_dtor_call): New.
331 (deduce_noexcept_on_destructors): Remove obsolete code.
332 * cp-tree.h: Declare type_build_dtor_call.
333 * decl.c (expand_static_init): Make sure trivial dtors are callable.
334 (cxx_maybe_build_cleanup): Likewise.
335 * except.c (build_throw): Likewise.
336 * init.c (build_value_init): Handle trivial but not callable ctors.
337 (perform_target_ctor): Make sure trivial dtor is callable.
338 (perform_member_init): Likewise.
339 (expand_cleanup_for_base): Likewise.
340 (build_vec_delete_1): Likewise.
341 (build_delete): Likewise.
342 (push_base_cleanups): Likewise.
343 (build_new_1): Avoid redundant error.
344 * method.c (synthesized_method_walk): Can't ever exit early in C++11.
345 Always process the subobject destructor.
346 * semantics.c (finish_compound_literal): Make sure trivial dtor is
348 * typeck2.c (split_nonconstant_init): Likewise.
350 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
352 Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
353 * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
354 as [[gnu::deprecated]].
356 2013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
359 * pt.c (apply_late_template_attributes): Use get_attribute_name,
362 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
365 * pt.c (most_specialized_class): Bump processing_template_decl for
368 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
370 * parser.c (cp_parser_lookup_name): Tidy.
372 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
374 * parser.c: Include omp-low.h.
375 * semantics.c: Likewise.
377 2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
380 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
381 cp_unevaluated_operand case.
383 2013-10-16 Jason Merrill <jason@redhat.com>
385 * pt.c (apply_late_template_attributes): Use
386 attribute_takes_identifier_p.
388 * error.c (dump_exception_spec): Print "noexcept" rather than
392 * pt.c (unify_array_domain): Split out from unify.
393 (unify): Use it for list deduction, too.
396 * decl2.c (dump_tu): Split out from...
397 (cp_write_global_declarations): ...here. Call it in PCH mode.
399 2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
401 * pt.c (tsubst): Fix typo in last commit.
403 2013-10-16 Paulo Matos <pmatos@broadcom.com>
405 * error.c (code_to_string): Use new wrapper get_tree_code_name.
406 * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
407 * pt.c (tsubst): Likewise.
408 * semantics.c (cxx_eval_constant_expression,
409 potential_constant_expression_1): Likewise.
410 * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
411 add_substitution, find_substitution): Likewise.
413 2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
416 * parser.c (cp_parser_postfix_open_square_expression): Set
417 parser->greater_than_is_operator_p for the argument.
419 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
422 * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
423 (cp_parser_pseudo_destructor_name): Use it.
425 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
428 * pt.c (convert_nontype_argument): Set expr_type to
429 TREE_TYPE (probe_type).
431 2013-10-11 Jakub Jelinek <jakub@redhat.com>
433 * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
434 (declare_simd_adjust_this): New function.
435 (grokfndecl): If "omp declare simd" attribute is present,
436 call declare_simd_adjust_this if needed and
437 c_omp_declare_simd_clauses_to_numbers.
438 * cp-array-notation.c (expand_array_notation_exprs): Handle
440 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
441 OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
442 OMP_CLAUSE_REDUCTION.
443 (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
445 (cxx_omp_privatize_by_reference): Return true for
446 is_invisiref_parm decls.
447 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
449 * pt.c (apply_late_template_attributes): For "omp declare simd"
450 attribute call tsubst_omp_clauses,
451 c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
452 and c_omp_declare_simd_clauses_to_numbers.
453 (instantiate_class_template_1): Call cp_check_omp_declare_reduction
455 (tsubst_decl): Handle UDRs.
456 (tsubst_omp_clauses): Add declare_simd argument, if true don't
457 call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
458 Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
459 OMP_CLAUSE_REDUCTION.
460 (tsubst_expr): For UDRs call pushdecl and
461 cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
462 callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
463 OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
464 Adjust finish_omp_atomic caller.
465 (tsubst_omp_udr): New function.
466 (instantiate_decl): For UDRs at block scope, don't call
467 start_preparsed_function/finish_function. Call tsubst_omp_udr.
468 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
469 use it instead of need_default_ctor || need_copy_ctor.
470 (struct cp_check_omp_declare_reduction_data): New type.
471 (handle_omp_array_sections_1, handle_omp_array_sections,
472 omp_reduction_id, omp_reduction_lookup,
473 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
474 cp_check_omp_declare_reduction, clone_omp_udr,
475 find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
476 (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
478 (finish_omp_for): Add CODE argument, use it instead of hardcoded
479 OMP_FOR. Adjust c_finish_omp_for caller.
480 (finish_omp_atomic): Add seq_cst argument, adjust
481 c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
483 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
484 * decl2.c (mark_used): Force immediate instantiation of
485 DECL_OMP_DECLARE_REDUCTION_P decls.
486 (is_late_template_attribute): Return true for "omp declare simd"
488 (cp_omp_mappable_type): New function.
489 (cplus_decl_attributes): Add implicit "omp declare target" attribute
491 * parser.c (cp_debug_parser): Print
492 parser->colon_doesnt_start_class_def_p.
493 (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
495 (enum pragma_context): Add pragma_member and pragma_objc_icode.
496 (cp_parser_binary_expression): Handle no_toplevel_fold_p
497 even for binary operations other than comparison.
498 (cp_parser_linkage_specification): Call
499 cp_ensure_no_omp_declare_simd if needed.
500 (cp_parser_namespace_definition): Likewise.
501 (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
502 (cp_parser_direct_declarator): Pass declarator to
503 cp_parser_late_return_type_opt.
504 (cp_parser_late_return_type_opt): Add declarator argument,
505 call cp_parser_late_parsing_omp_declare_simd for declare simd.
506 (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
507 Parse UDRs before all other methods.
508 (cp_parser_member_specification_opt): Use pragma_member instead of
510 (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
511 (cp_parser_function_definition_from_specifiers_and_declarator,
512 cp_parser_save_member_function_body): Likewise.
513 (cp_parser_late_parsing_for_member): Handle UDRs specially.
514 (cp_parser_next_token_starts_class_definition_p): Don't allow
515 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
516 (cp_parser_objc_interstitial_code): Use pragma_objc_icode
517 instead of pragma_external.
518 (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
519 (cp_parser_omp_var_list_no_open): Parse array sections for
520 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
521 if non-NULL, allow parsing to end with a colon rather than close
523 (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
525 (cp_parser_omp_clause_reduction): Handle user defined reductions.
526 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
527 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
528 cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
529 cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
530 cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
531 cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
532 cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
533 cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
535 (cp_parser_omp_all_clauses): Add finish_p argument. Don't call
536 finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
537 (cp_parser_omp_atomic): Parse seq_cst clause, pass
538 true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
540 (cp_parser_omp_for_loop): Add CODE argument, pass it through
541 to finish_omp_for. Change last argument to cclauses,
542 and adjust uses to grab parallel clauses from the array of all
544 (cp_omp_split_clauses): New function.
545 (cp_parser_omp_simd): New function.
546 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
547 Allow the function to be called also when parsing combined constructs,
548 and call c_parser_omp_simd when parsing for simd.
549 (cp_parser_omp_sections_scope): If section-sequence doesn't start with
550 #pragma omp section, require exactly one structured-block instead of
551 sequence of statements.
552 (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
553 Allow the function to be called also when parsing combined constructs.
554 (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
555 Allow the function to be called also when parsing combined
557 (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
558 cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
559 cp_parser_omp_teams, cp_parser_omp_target_data,
560 cp_parser_omp_target_update, cp_parser_omp_target,
561 cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
562 cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
563 cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
564 cp_parser_omp_declare): New functions.
565 (cp_parser_omp_construct): Add p_name and mask vars. Handle
566 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
567 PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
568 and cp_parser_omp_sections callers.
569 (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
570 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
571 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
572 PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
573 Handle pragma_member and pragma_objc_icode like pragma_external.
574 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
575 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
576 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
577 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
579 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
580 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
581 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
582 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
583 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
584 * parser.h (struct cp_omp_declare_simd_data): New type.
585 (struct cp_parser): Add colon_doesnt_start_class_def_p and
586 omp_declare_simd fields.
587 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
588 * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
590 (DECL_OMP_DECLARE_REDUCTION_P): Define.
591 (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
592 (struct saved_scope): Add omp_declare_target_attribute field.
593 (cp_omp_mappable_type, omp_reduction_id,
594 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
595 finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
596 (finish_omp_for): Add CODE argument.
597 (finish_omp_atomic): Add seq_cst argument.
598 (cxx_omp_create_clause_info): Add need_dtor argument.
600 2013-10-09 Marek Polacek <polacek@redhat.com>
603 * semantics.c (finish_return_stmt): Return error_mark_node
604 when error_operand_p of the expr is true.
605 (build_transaction_expr): Check for EXPR_P before setting the
608 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
611 * lambda.c (begin_lambda_type): Check return value of xref_tag
612 for error_mark_node; tidy.
613 * decl.c (grokdeclarator): Tweak error message.
615 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
619 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
622 * pt.c (tsubst): Use error_operand_p on parameter t.
624 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
627 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
628 and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
629 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
630 messages about uninitialized const and references members to mention
633 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
636 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
638 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
641 * typeck2.c (build_functional_cast): Use error_operand_p on exp.
643 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
646 * parser.c (cp_parser_perform_range_for_lookup): If eventually
647 either *begin or *end is type-dependent, return NULL_TREE.
648 (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
649 returns NULL_TREE, don't actually do_auto_deduction.
651 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
654 * pt.c (tsubst): Use error_operand_p on parameter t.
656 2013-10-04 Marc Glisse <marc.glisse@inria.fr>
659 * decl.c (cxx_init_decl_processing): Set operator_new_flag.
661 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
664 * decl2.c (save_template_attributes): Handle error_mark_node as
666 (cp_check_const_attributes): Likewise for attributes.
667 * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
668 error_mark_node call cp_parser_skip_to_end_of_statement.
670 2013-10-03 Easwaran Raman <eraman@google.com>
673 * parser.c (cp_parser_init_declarator): Do not drop attributes
674 of template member functions.
676 2013-10-03 Marek Polacek <polacek@redhat.com>
679 * init.c (sort_mem_initializers): Splice when giving an error.
681 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
684 * parser.c (cp_parser_function_specifier_opt): Upon error about
685 virtual templates don't set ds_virtual.
686 (finish_fully_implicit_template): Reject virtual implicit templates.
688 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
691 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
693 2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
696 * parser.c (cp_parser_lookup_name): Check make_typename_type return
697 value for error_mark_node.
699 2013-09-25 Tom Tromey <tromey@redhat.com>
701 * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
704 2013-09-25 Tom Tromey <tromey@redhat.com>
706 * Make-lang.in (g++spec.o): Remove.
707 (CFLAGS-cp/g++spec.o): New variable.
708 (GXX_OBJS): Reference cp/g++spec.o.
709 (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
710 (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
711 (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
712 (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
713 (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
714 (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
715 (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
716 (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
718 2013-09-25 Tom Tromey <tromey@redhat.com>
720 * Make-lang.in (g++spec.o): Don't use subshell.
722 2013-09-25 Marek Polacek <polacek@redhat.com>
725 * semantics.c (finish_transaction_stmt): Check for EXPR_P before
726 setting the expr location.
728 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
731 * type-utils.h (find_type_usage): Only traverse one type level into
732 member function pointers.
734 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
736 * parser.c (cp_parser_init_declarator): Defer calling
737 finish_fully_implicit_template for forward declarations until after
738 other decl processing is complete. Cleanup for clarity: Extract 'else'
739 case after 'if' containing unconditional return.
741 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
743 * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
744 rather than '__GenN'.
746 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
748 * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
749 callop in the case of generic lambdas.
751 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
753 * parser.c (make_generic_type_name): Use global count rather than
755 (add_implicit_template_parms): ... propagate interface change here.
757 2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
760 * pt.c (tsubst_copy): Use current_nonlambda_class_type to
761 call tsubst_baselink.
763 2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
766 * class.c (instantiate_type): Loosen a bit the gcc_assert.
768 2013-09-18 Marek Polacek <polacek@redhat.com>
771 * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
772 Remove unnecessary check.
774 2013-09-18 Marek Polacek <polacek@redhat.com>
777 * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
778 no_sanitize_undefined attribute.
780 2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
783 * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
784 the cp_type_quals (r) too.
786 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
788 * cp-tree.h (type_uses_auto_or_concept): Declare.
789 (is_auto_or_concept): Declare.
790 * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
791 -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
792 * type-utils.h: New header defining ...
793 (find_type_usage): ... this new function based on pt.c (type_uses_auto)
794 for searching a type tree given a predicate.
795 * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
796 (is_auto_or_concept): New function.
797 (type_uses_auto_or_concept): New function.
798 * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
799 * parser.c (cp_parser_new): Initialize
800 fully_implicit_function_template_p.
801 (cp_parser_new): Initialize fully_implicit_function_template_p.
802 (cp_parser_lambda_expression): Copy and restore value of
803 fully_implicit_function_template_p as per other parser fields.
804 (cp_parser_parameter_declaration_list): Count generic
805 parameters and call ...
806 (add_implicit_template_parms): ... this new function to synthesize them
807 with help from type-utils.h (find_type_usage), ...
808 (tree_type_is_auto_or_concept): ... this new static function and ...
809 (make_generic_type_name): ... this new static function.
810 (cp_parser_direct_declarator): Account for implicit template parameters.
811 (cp_parser_lambda_declarator_opt): Finish fully implicit template if
812 necessary by calling ...
813 (finish_fully_implicit_template): ... this new function.
814 (cp_parser_init_declarator): Likewise.
815 (cp_parser_function_definition_after_declarator): Likewise.
816 (cp_parser_member_declaration): Likewise.
817 * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
818 (cp/parser.o): Likewise.
820 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
822 * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
823 list with std=c++1y or std=gnu++1y.
824 (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
825 operator template to avoid adding template result to symbol table.
826 * lambda.c (lambda_function): Return template result if call operator is
828 (maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
829 operator call building in order to support conversion of a non-capturing
830 lambda template to a function pointer with help from ...
831 (prepare_op_call): ... this new function.
832 * decl2.c (check_member_template): Don't reject lambda call operator
833 template in local [lambda] class.
834 * pt.c (instantiate_class_template_1): Don't instantiate lambda call
835 operator template when instantiating lambda class.
837 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
839 * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
841 2013-09-15 Jason Merrill <jason@redhat.com>
845 * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
846 * lambda.c (add_capture): Handle variadic capture.
847 (add_default_capture, lambda_capture_field_type): Likewise.
848 (build_capture_proxy, register_capture_members): Likewise.
849 * pt.c (register_specialization): Allow FIELD_DECL.
850 (retrieve_specialization): Likewise.
851 (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
852 (tsubst_pack_expansion): Handle FIELD_DECL packs.
853 (gen_elem_of_pack_expansion_instantiation): Likewise.
854 (instantiate_class_template_1): Likewise.
855 (tsubst_decl, tsubst_copy): Likewise.
856 (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
857 (tsubst_copy_and_build) [VAR_DECL]: Likewise.
858 * semantics.c (finish_non_static_data_member): Don't try to represent
859 the type of a COMPOUND_REF of a FIELD_DECL pack.
862 * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
863 * cxx-pretty-print.c (direct_declarator): Adjust.
864 * decl2.c (cp_build_parm_decl): Adjust.
865 * pt.c (function_parameter_pack_p): Adjust.
866 (find_parameter_packs_r, push_template_decl_real): Adjust.
867 (tsubst_pack_expansion, tsubst_decl): Adjust.
868 (regenerate_decl_from_template, instantiate_decl): Adjust.
870 * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
872 2013-09-13 Jason Merrill <jason@redhat.com>
875 * pt.c (any_type_dependent_elements_p): Actually check for
876 type-dependence, not value-dependence.
878 2013-09-13 Jacek Caban <jacek@codeweavers.com>
880 * decl.c: Use new cxx_implicit_extern_c hook
882 2013-09-12 Brooks Moses <bmoses@google.com>
885 * Make-lang.in: Do not install driver binaries in $(target)/bin.
887 2013-09-12 Adam Butcher <adam@jessamine.co.uk>
889 * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
890 c_inhibit_evaluation_warnings. Reset if instantiating within a
891 function-local template.
893 2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
895 * semantics.c (finish_pseudo_destructor_expr): Add location_t
897 * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
898 (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
900 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
901 (cp_parser_postfix_expression): Pass the proper location to
902 cp_parser_postfix_dot_deref_expression.
903 * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
905 2013-09-10 Jan Hubicka <jh@suse.cz>
906 Paolo Carlini <paolo.carlini@oracle.com>
908 * error.c (print_instantiation_partial_context_line): If
909 loc == UNKNOWN_LOCATION return immediately.
911 2013-09-09 Jakub Jelinek <jakub@redhat.com>
914 * init.c (build_vec_delete): Call mark_rvalue_use on base.
916 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
919 * init.c (build_vec_delete_1): When the type is incomplete emit a
920 warning, enabled by default (not an error).
921 (build_delete): Adjust to use OPT_Wdelete_incomplete.
923 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
926 * error.c (location_of): Don't handle PARM_DECLs specially.
928 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
930 * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
931 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
932 Tweak, TREE_OPERAND (t, 1) may be null.
934 2013-09-08 Caroline Tice <cmtice@google.com>
937 * vtable-class-hierarchy.c (vtv_generate_init_routine): In
938 preinit case, move call to assemble_vtv_preinit_initializer to
939 after call to cgraph_process_new_functions.
941 2013-09-08 Tom de Vries <tom@codesourcery.com>
944 * except.c (build_must_not_throw_expr): Handle
947 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
949 * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
951 2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
954 * class.c (finish_struct_anon_r): New.
955 (finish_struct_anon): Use it.
957 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
959 * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
960 Declare as overrider.
961 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
962 Rename from pp_cxx_simple_type_specifier.
963 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
964 simple_type_specifier.
966 2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
969 * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
971 2013-09-03 Mike Stump <mikestump@comcast.net>
973 * Make-lang.in (cp/lambda.o): Add dependencies.
975 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
977 * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
979 * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
980 (pp_cxx_userdef_literal): Tidy.
981 (pp_cxx_template_argument_list): Likewise.
982 (pp_cxx_typeid_expression): Likewise.
983 (pp_cxx_offsetof_expression_1): Likewise.
984 (cxx_pretty_printer::postfix_expression): Likewise.
985 (cxx_pretty_printer::unary_expression): Likewise.
986 (cxx_pretty_printer::statement): Likewise.
987 (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
988 (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
989 * error.c (dump_decl): Tidy.
990 (dump_expr): Likewise.
992 2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
994 PR c++/21682, implement DR 565
995 * name-lookup.c (compparms_for_decl_and_using_decl): New.
996 (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
998 2013-08-30 Marek Polacek <polacek@redhat.com>
1000 * typeck.c (cp_build_binary_op): Add division by zero and shift
1002 * error.c (dump_expr): Special-case ubsan builtins.
1004 2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1007 * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
1008 * init.c (perform_target_ctor): Use it.
1009 * call.c (build_special_member_call): Diagnose self-delegating
1012 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1014 * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
1016 (cxx_pretty_printer::declaration_specifiers): Likewise.
1017 (cxx_pretty_printer::function_specifier): Likewise.
1018 (cxx_pretty_printer::declarator): Likewise.
1019 (cxx_pretty_printer::direct_declarator): Likewise.
1020 (cxx_pretty_printer::abstract_declarator): Likewise.
1021 (cxx_pretty_printer::direct_abstract_declarator): Likewise.
1022 (pp_cxx_declaration): Remove.
1023 * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
1024 Rename from pp_cxx_function_specifier. Adjust.
1025 (cxx_pretty_printer::declaration_specifiers): Rename from
1026 pp_cxx_decl_specifier_seq. Adjust.
1027 (cxx_pretty_printer::direct_declarator): Rename from
1028 pp_cxx_direct_declarator. Adjust.
1029 (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
1031 (cxx_pretty_printer::abstract_declarator): Rename from
1032 pp_cxx_abstract_declarator. Adjust.
1033 (cxx_pretty_printer::direct_abstract_declarator): Rename from
1034 pp_cxx_direct_abstract_declarator. Adjust.
1035 (cxx_pretty_printer::declaration): Rename from
1036 pp_cxx_declaration. Adjust.
1037 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1038 declaration, declaration_specifiers, function_specifier,
1039 declarator, direct_declarator, abstract_declarator,
1040 direct_abstract_declarator.
1041 * error.c (dump_decl): Adjust.
1043 2013-08-29 Jan Hubicka <jh@suse.cz>
1045 Correct previous patch to not mark terminate as LEAF.
1046 * class.c (build_vtbl_initializer): Drop LEAF
1047 * decl.c (cxx_init_decl_processing): Likewise.
1048 (push_throw_library_fn): Likewise.
1049 * except.c (init_exception_processing): Likewise.
1050 (do_begin_catch): Likewise.
1051 (do_end_catch): Likewise.
1052 (do_allocate_exception): Likewise.
1054 2013-08-29 Jan Hubicka <jh@suse.cz>
1056 * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
1057 ECF_NORETURN | ECF_LEAF
1058 * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
1059 push_library_fn, push_void_library_fn): Update prototype.
1060 * decl.c (build_library_fn_1): Remove.
1061 (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
1062 (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
1063 __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
1064 (build_library_fn_1): Add ecf_flags argument; rename to ...
1065 (build_library_fn): ... this one.
1066 (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
1067 (build_library_fn_ptr): Take ecf_flags.
1068 (build_cp_library_fn_ptr): Likewise.
1069 (push_library_fn): Likewise.
1070 (push_cp_library_fn): Likewise.
1071 (push_void_library_fn): Likewise.
1072 (push_throw_library_fn): All throws are ECF_NORETURN.
1073 (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
1074 (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
1075 __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
1076 * except.c (init_exception_processing): terminate is
1077 ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
1078 (declare_nothrow_library_fn): Add ecf_flags parameter.
1079 (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
1081 (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
1082 are ECF_NOTHROW | ECF_LEAF.
1083 (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
1085 (do_allocate_exception): _cxa_allocate_exception
1086 and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
1088 (do_free_exception): __cxa_free_exception is
1089 ECF_NOTHROW | ECF_LEAF.
1090 * rtti.c (build_dynamic_cast_1): __dynamic_cast
1091 is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
1093 2013-08-29 Adam Butcher <adam@jessamine.co.uk>
1095 * error.c (dump_lambda_function): New function, dependent on ...
1096 (dump_substitution): ... this new function, factored out of ...
1097 (subst_to_string): ... here and ...
1098 (dump_function_decl): ... here. Updated to early-out with call to
1099 dump_lambda_function after determining template bindings.
1101 2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1104 * init.c (build_aggr_init): When init == void_type_node do not
1105 set LOOKUP_ONLYCONVERTING.
1107 2013-08-27 Caroline Tice <cmtice@google.com>
1109 * vtable-class-hierarchy.c: Remove unnecessary include statements.
1110 (MAX_SET_SIZE): Remove unnecessary constant.
1111 (register_construction_vtables): Make vtable_ptr_array parameter
1112 into a vector; remove num_args parameter. Change array accesses to
1114 (register_other_binfo_vtables): Ditto.
1115 (insert_call_to_register_set): Ditto.
1116 (insert_call_to_register_pair): Ditto.
1117 (output_set_info): Ditto. Also change warning calls to warning_at
1118 calls, and fix format of warning messages.
1119 (register_all_pairs): Change vtbl_ptr_array from an array into a
1120 vector. Remove num_vtable_args (replace with calls to vector length).
1121 Change array stores & accesses to vector functions. Change calls to
1122 register_construction_vtables, register_other_binfo_vtables,
1123 insert_call_to_register_set, insert_call_to_register_pair and
1124 output_set_info to match their new signatures. Change warning to
1125 warning_at and fix the format of the warning message.
1127 2013-08-27 Jakub Jelinek <jakub@redhat.com>
1128 Aldy Hernandez <aldyh@redhat.com>
1130 * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
1132 2013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1134 * decl.c (grokfndecl): Remove old bison hack.
1136 2013-08-26 Jan Hubicka <jh@suse.cz>
1138 * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
1141 2013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1143 * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
1144 Declare as overrider.
1145 (cxx_pretty_printer::multiplicative_expression): Likewise.
1146 (cxx_pretty_printer::conditional_expression): Likewise.
1147 (cxx_pretty_printer::assignment_expression): Likewise.
1148 (cxx_pretty_printer::expression): Likewise.
1149 * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
1150 Rename from pp_cxx_unary_expression. Adjust.
1151 (cxx_pretty_printer::multiplicative_expression): Rename from
1152 pp_cxx_multiplicative_expression. Adjust.
1153 (cxx_pretty_printer::conditional_expression): Rename from
1154 pp_cxx_conditional_expression. Adjust.
1155 (cxx_pretty_printer::assignment_expression): Rename from
1156 pp_cxx_assignment_expression. Adjust.
1157 (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
1159 (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
1160 unary_expression, multiplicative_expression,
1161 conditional_expression, assignment_expression, expression.
1163 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1165 * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
1166 Declare as overrider.
1167 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1168 Rename from pp_cxx_postfix_expression. Adjust.
1169 (pp_cxx_expression): Use pp_postfix_expression.
1170 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1173 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1175 * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
1176 an overrider of c_pretty_printer::primary_expression.
1177 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
1178 Rename from pp_cxx_primary_expression. Adjust.
1179 (pp_cxx_postfix_expression): Use pp_primary_expression.
1180 (pp_cxx_ctor_initializer): Likewise.
1181 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1184 2013-08-23 Jan Hubicka <jh@suse.cz>
1186 * cp-tree.h (struct lang_type_class): Free is_final bit.
1187 (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
1188 (DECL_FINAL_P): Remove.
1189 * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
1190 is called on CLASS_TYPE_P.
1192 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1194 * cxx-pretty-print.c (M_): Remove.
1195 (pp_cxx_unqualified_id): Use translate_string instead of M_.
1196 (pp_cxx_canonical_template_parameter): Likewise.
1198 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1200 * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
1201 * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
1202 from pp_cxx_id_expression. Adjust.
1203 (pp_cxx_userdef_literal): Use pp_id_expression.
1204 (pp_cxx_primary_expression): Likewise.
1205 (pp_cxx_direct_declarator): Likewise.
1206 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1209 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1211 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
1212 function, overriding c_pretty_printer::constant.
1213 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
1214 pp_cxx_constant. Adjust.
1215 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
1217 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
1219 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
1220 destructor for the early printer.
1221 * error.c (type_to_string): Use pp_buffer.
1223 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1226 * class.c (check_field_decls): Check for const mutable and const
1227 reference data members.
1229 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1231 * error.c (init_error): Remove calls to pp_construct and
1232 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
1233 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1234 (cxx_pretty_printer_init): Remove.
1235 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1236 Rename from cxx_pretty_printer_init. Adjust.
1237 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1238 initialization of C++ diagnostics pretty printer.
1240 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1242 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1243 * cp-tree.h (REFERENCE_REF_P): Likewise.
1244 * semantics.c (finish_offsetof): Likewise.
1246 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1249 * semantics.c (finish_id_expression): Handle deprecated references.
1251 2013-08-20 Jason Merrill <jason@redhat.com>
1254 * cvt.c (build_expr_type_conversion): Don't complain about a
1255 template that can't match the desired type category.
1257 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
1259 * error.c (pp_ggc_formatted_text): New.
1260 (type_as_string): Use it in lieu of pp_formatted_text.
1261 (type_as_string_translate): Likewise.
1262 (expr_as_string): Likewise.
1263 (decl_as_string): Likewise.
1264 (decl_as_string_translate): Likewise.
1265 (lang_decl_name): Likewise.
1266 (decl_to_string): Likewise.
1267 (expr_to_string): Likewise.
1268 (fndecl_to_string): Likewise.
1269 (parm_to_string): Likewise.
1270 (type_to_string): Likewise.
1271 (args_to_string): Likewise.
1272 (subst_to_string): Likewise.
1274 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1277 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1278 check for truth values.
1279 (expand_array_notation_exprs): Added truth values case. Removed an
1280 unwanted else. Added for-loop to walk through subtrees in default
1282 * call.c (build_cxx_call): Inherited the type of the array notation for
1283 certain built-in array notation functions.
1285 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1287 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1288 Use cp_parser_lookup_name_simple.
1290 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1292 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1293 * name-lookup.c (pop_bindings_and_leave_scope): Define.
1294 * parser.c (cp_parser_lambda_declarator_opt,
1295 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1297 2013-08-17 Jason Merrill <jason@redhat.com>
1300 * name-lookup.c (push_class_level_binding_1): It's OK to push a
1301 lambda type after the enclosing type is complete.
1303 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1305 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1307 (dump_template_argument): Likewise.
1308 (dump_template_argument_list): Likewise.
1309 (dump_template_parameter): Likewise.
1310 (dump_template_bindings): Likewise.
1311 (dump_alias_template_specialization): Likewise.
1312 (dump_type): Likewise.
1313 (dump_typename): Likewise.
1314 (dump_aggr_type): Likewise.
1315 (dump_type_prefix): Likewise.
1316 (dump_type_suffix): Likewise.
1317 (dump_global_iord): Likewise.
1318 (dump_simple_decl): Likewise.
1319 (dump_decl): Likewise.
1320 (dump_template_decl): Likewise.
1321 (dump_function_decl): Likewise.
1322 (dump_parameters): Likewise.
1323 (dump_ref_qualifier): Likewise.
1324 (dump_exception_spec): Likewise.
1325 (dump_function_name): Likewise.
1326 (dump_template_parms): Likewise.
1327 (dump_call_expr_args): Likewise.
1328 (dump_aggr_init_expr_args): Likewise.
1329 (dump_expr_list): Likewise.
1330 (dump_expr_init_vec): Likewise.
1331 (dump_expr): Likewise.
1332 (dump_binary_op): Likewise.
1333 (dump_unary_op): Likewise.
1335 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1338 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1339 * decl.c (case_conversion): Use it.
1340 * call.c (standard_conversion): Likewise.
1341 (implicit_conversion): Adjust.
1343 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
1345 * pt.c: Grammar fix in comments ("it's" to "its").
1347 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1349 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1350 check_elaborated_type_specifier): Use error + inform.
1351 * friend.c (make_friend_class): Likewise.
1352 * semantics.c (finish_id_expression): Likewise.
1354 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1357 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1360 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1363 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1366 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1369 2013-08-06 Caroline Tice <cmtice@google.com>
1371 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
1373 (vtable-class-hierarchy.o): Add build rule.
1374 * cp-tree.h (vtv_start_verification_constructor_init_function): New
1375 extern function decl.
1376 (vtv_finish_verification_constructor_init_function): New extern
1378 (build_vtbl_address): New extern function decl.
1379 (get_mangled_vtable_map_var_name): New extern function decl.
1380 (vtv_compute_class_hierarchy_transitive_closure): New extern function
1382 (vtv_generate_init_routine): New extern function decl.
1383 (vtv_save_class_info): New extern function decl.
1384 (vtv_recover_class_info): New extern function decl.
1385 (vtv_build_vtable_verify_fndecl): New extern function decl.
1386 * class.c (finish_struct_1): Add call to vtv_save_class_info if
1387 flag_vtable_verify is true.
1388 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1389 * vtable-class-hierarchy.c: New file.
1390 * mangle.c (get_mangled_vtable_map_var_name): New function.
1391 * decl2.c (start_objects): Update function comment.
1392 (cp_write_global_declarations): Call vtv_recover_class_info,
1393 vtv_compute_class_hierarchy_transitive_closure and
1394 vtv_build_vtable_verify_fndecl, before calling
1395 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1396 flag_vtable_verify is true.
1397 (vtv_start_verification_constructor_init_function): New function.
1398 (vtv_finish_verification_constructor_init_function): New function.
1399 * init.c (build_vtbl_address): Remove static qualifier from function.
1401 2013-08-06 Jason Merrill <jason@redhat.com>
1404 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1406 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
1409 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1410 (cp_build_binary_op): Adjust.
1412 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1414 * cxx-pretty-print.h (pp_c_base): Remove.
1415 (cxx_pretty_printer): Derive from c_pretty_printer.
1416 Adjust macros using pp_c_base.
1417 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1418 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1419 (pp_cxx_colon_colon): Likewise.
1420 (pp_cxx_separate_with): Likewise.
1421 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1422 (pp_cxx_expression_list): Likewise.
1423 (pp_cxx_space_for_pointer_operator): Likewise.
1424 (pp_cxx_init_declarator): Likewise.
1425 (pp_cxx_call_argument_list): Likewise.
1426 (pp_cxx_constant): Likewise.
1427 (pp_cxx_postfix_expression): Likewise.
1428 (pp_cxx_new_expression): Likewise.
1429 (pp_cxx_unary_expression): Likewise.
1430 (pp_cxx_cast_expression): Likewise.
1431 (pp_cxx_conditional_expression): Likewise.
1432 (pp_cxx_assignment_expression): Likewise.
1433 (pp_cxx_expression): Likewise.
1434 (pp_cxx_function_specifier): Likewise.
1435 (pp_cxx_decl_specifier_seq): Likewise.
1436 (pp_cxx_simple_type_specifier): Likewise.
1437 (pp_cxx_type_specifier_seq): Likewise.
1438 (pp_cxx_ptr_operator): Likewise.
1439 (pp_cxx_parameter_declaration_clause): Likewise.
1440 (pp_cxx_direct_declarator): Likewise.
1441 (pp_cxx_direct_abstract_declarator): Likewise.
1442 (pp_cxx_type_id): Likewise.
1443 (pp_cxx_statement): Likewise.
1444 (pp_cxx_pretty_printer_init): Tidy.
1445 * error.c (init_error): Do not use pp_base.
1446 (dump_aggr_type): Likewise.
1447 (dump_type_prefix): Likewise.
1448 (dump_type_suffix): Likewise.
1449 (dump_global_iord): Likewise.
1450 (dump_decl): Likewise.
1451 (dump_function_decl): Likewise.
1452 (dump_ref_qualifier): Likewise.
1453 (reinit_cxx_pp): Likewise.
1454 (decl_as_dwarf_string): Likewise.
1455 (lang_decl_dwarf_name): Likewise.
1456 (type_to_string): Likewise.
1457 (cv_to_string): Likewise.
1458 (cxx_print_error_function): Likewise.
1459 (cp_diagnostic_starter): Likewise.
1460 (cp_diagnostic_finalizer): Likewise.
1461 (cp_print_error_function): Likewise.
1462 (print_instantiation_context): Likewise.
1463 (cp_printer): Likewise.
1465 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1467 * error.c (dump_type_prefix): Use specialized pretty printer
1468 functions instead of pp_string or operators and punctuators.
1469 (dump_decl): Likewise.
1470 (dump_expr): Likewise.
1472 2013-08-03 Jason Merrill <jason@redhat.com>
1475 * pt.c (get_underlying_template): New.
1476 (convert_template_argument, lookup_template_class_1): Use it.
1480 * pt.c (pack_expansion_args_count): Rename from
1481 any_pack_expanson_args_p.
1482 (coerce_template_parms): Reject pack expansion to
1483 non-pack template parameter of alias template.
1485 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1487 * error.c (dump_aggr_type): Use specialized pretty printer
1488 functions instead of pp_character.
1489 (dump_type_prefix): Likewise.
1490 (dump_simple_decl): Likewise.
1491 (type_to_string): Likewise.
1493 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1495 * cp-tree.h (finish_stmt): Do not declare.
1496 * decl.c (finish_stmt): Do not define.
1497 * parser.c (cp_parser_expression_statement,
1498 cp_parser_declaration_statement,
1499 cp_parser_transaction_cancel): Don't call finish_stmt.
1500 * semantics.c (finish_expr_stmt, finish_if_stmt,
1501 finish_while_stmt, finish_do_stmt, finish_return_stmt,
1502 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1503 finish_transaction_stmt): Likewise.
1505 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
1508 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1509 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1510 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1511 instead of issuing an error without mentioning the conflicting
1514 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1516 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1517 return value for error_mark_node.
1519 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1522 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1523 token->type == CPP_ELLIPSIS.
1525 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1528 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1530 2013-07-29 Jason Merrill <jason@redhat.com>
1533 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1534 Use break_out_target_exprs instead of unshare_expr.
1536 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
1539 * call.c (initialize_reference): Don't crash when reference_binding
1540 returns a conv with conv->kind == ck_ambig.
1542 2013-07-29 Jason Merrill <jason@redhat.com>
1544 * mangle.c (write_name): Check for null context.
1545 (write_unscoped_name): Allow PARM_DECL context.
1547 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1550 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1551 (grokparms): Adjust.
1552 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1553 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1554 a tsubst_flags_t parameter.
1555 (tsubst_decl): Adjust.
1556 * call.c (convert_default_arg): Likewise.
1557 * cp-tree.h (check_default_argument, tsubst_default_argument):
1558 Update declarations.
1560 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1563 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1564 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1565 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1566 Fix string_len management, tidy.
1568 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1571 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1572 target type is incomplete; return a bool, not an int.
1573 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1575 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
1577 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1578 tf_warning_or_error.
1580 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
1582 * class.c: Fix typos.
1583 * cp-array-notation.c: Likewise.
1584 * cp-objcp-common.c: Likewise.
1587 * mangle.c: Likewise.
1588 * parser.c: Likewise.
1590 * semantics.c: Likewise.
1592 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
1594 * semantics.c (build_lambda_expr),
1595 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1596 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1597 (is_normal_capture_proxy), (insert_capture_proxy),
1598 (insert_pending_capture_proxies), (lambda_proxy_type),
1599 (build_capture_proxy), (vla_capture_type),
1600 (register_capture_members), (add_default_capture),
1601 (lambda_expr_this_capture), (maybe_resolve_dummy),
1602 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1603 (is_lambda_ignored_entity): Moved definitions into ...
1604 * lambda.c: ... this new file.
1606 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
1608 * call.c (build_conditional_expr_1): Handle the case with 1 vector
1609 and 2 scalars. Call save_expr before building a vector.
1610 * typeck.c (cp_build_binary_op): Check complain before complaining.
1612 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
1615 * init.c (build_aggr_init): Check for warn_unused attribute.
1616 * decl.c (poplevel): Likewise.
1618 2013-07-13 Jason Merrill <jason@redhat.com>
1621 * init.c (build_vec_init): Use {} for arrays of class type.
1622 (build_vec_delete): Don't take the address of the array.
1625 * class.c (layout_class_type): Check for too-large class.
1627 * call.c (can_convert): Allow user-defined conversions.
1628 (can_convert_standard): New.
1629 * cp-tree.h: Declare it.
1630 * cvt.c (convert_to_reference): Use it.
1631 * pt.c (convert_nontype_argument): Likewise.
1632 * search.c (check_final_overrider): Likewise.
1633 Don't worry about user-defined conversions.
1635 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1638 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1639 warn about casting between pointer-to-function and pointer-to-object.
1641 2013-07-09 Jason Merrill <jason@redhat.com>
1644 * init.c (build_vec_init): Don't take shortcuts when initializing
1648 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1651 * semantics.c (finish_id_expression): Return the id for an
1652 unevaluated outer variable.
1655 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1656 if the variable type uses 'auto'.
1659 * typeck.c (check_return_expr): Lambda proxies aren't eligible
1660 for nrv or return by move.
1663 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1664 a ref-qualifier in C++98 mode.
1667 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1668 argument to have the exact type of the parameter.
1671 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1672 a POINTER_PLUS_EXPR for type punning diagnostic.
1675 * pt.c (tsubst_copy): Handle USING_DECL.
1677 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
1680 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1682 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
1685 * call.c (build_conditional_expr_1): Preserve xvalues.
1687 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1690 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1691 also check declares_class_or_enum.
1693 2013-07-08 Jason Merrill <jason@redhat.com>
1696 * pt.c (fn_type_unification): Only defer during substitution.
1697 (type_unification_real): Defer during defarg substitution,
1698 add checks parm to pass back deferred checks.
1699 (unify, do_auto_deduction): Adjust.
1700 * semantics.c (reopen_deferring_access_checks): New.
1701 * cp-tree.h: Declare it.
1703 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
1706 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1707 set parser->default_arg_ok_p to false before cp_parser_declarator.
1709 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1712 * class.c (build_base_path): Improve diagnostic.
1714 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
1717 * decl.c (start_preparsed_function): Return a bool, false if
1718 push_template_decl fails.
1719 (start_function): Adjust.
1720 * cp-tree.h: Update.
1722 2013-07-03 Jakub Jelinek <jakub@redhat.com>
1725 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1726 Temporarily set parser->greater_than_is_operator_p for
1727 cp_parser_expression and restore from saved value afterwards.
1729 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
1731 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1732 * parser.c (cp_parser_operator()): Parse user-defined string
1733 literal as literal operator.
1735 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1738 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1739 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1742 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1744 * parser.c (cp_parser_array_notation): Removed rejection array notation
1745 of type function pointers. Added handling of array expressions when
1746 Cilk Plus is enabled. Took out type-checking.
1747 (cp_parser_postfix_open_square_expression): Moved normal array expr.
1748 parsing into cp_parser_array_notation when cilkplus is enabled.
1749 (cp_parser_compound_statement): Removed expansion of array notations.
1750 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1751 (cp_parser_function_definition_after_declarator): Likewise.
1752 (cp_parser_selection_statement): Removed error reporting.
1753 (cp_parser_iteration_statement): Likewise.
1754 (cp_parser_direct_declarator): Removed error checking/reporting if
1755 array notations are used in the declarator.
1756 * pt.c (instantiate_decl): Likewise.
1757 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1758 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1759 (potential_constant_expression_1): Returned false for
1760 ARRAY_NOTATION_REF case.
1761 * cp-gimplify.c (cp_genericize): Added expansion of array notation
1763 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
1764 parameters. Replaced build_decls with get_temp_regvar with type as
1766 (create_array_refs): Made the type-casting to ptrdiff_type.
1767 (replace_invariant_var): Added a check for void return type before
1768 creating new var. Replaced build_decl and build_min_nt_loc with
1770 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
1771 with gcc_unreachable. Removed few unwanted checks. Made induction
1772 variable type as ptrdiff_type. Removed loc and complain arguments
1773 passed into make_triplet_val_inv. Replaced all modify expression's
1774 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
1775 into stmt. list with the non-forceful one. Replaced some integer
1776 conversion and equality-checking to using tree_int_cst_equal.
1777 (expand_sec_reduce_builtin): All changes mentioned in above function
1778 expand_an_in_modify_expr. Made the new variable type of
1779 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1780 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
1781 the error reporting from parser to this function. Removed unwanted
1782 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1783 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1784 in function pointers.
1785 (cp_expand_cond_array_notations): Added a new if statements to check
1786 if condition has a zero rank. If so, then just return.
1787 (expand_return_expr): Added a check for return expressions with a rank.
1788 Replaced get_tmp_regvar with a create_temporary_var.
1789 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1790 Moved common code outside if-statements. Moved type-checking from
1792 * semantics.c (finish_return_stmt): Removed a check for return exprs.
1794 * call.c (convert_like_real): Removed a check for array notation
1795 expression in a function.
1796 (build_over_call): Likewise.
1797 (magic_varargs_p): Added a check for builtin array notation function.
1798 Made this function non-static and removed its prototype.
1799 * cp-tree.h (magic_varargs_p): New prototype.
1800 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1801 nargs to the param->length when builtin reduction function is used.
1802 (convert_arguments): Replaced check for a constant_p function with
1803 margic_varargs_p function call.
1804 (cp_build_binary_op): Removed calling of the function
1805 find_correct_array_notation_type.
1806 (cp_build_addr_expr_1): Removed an unwanted if-statement.
1807 (convert_for_assignment): Removed automatic return of rhs when array
1808 notation builtin function is used.
1810 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1813 * parser.c (cp_parser_save_member_function_body): Handle correctly
1814 curly braces in function-try-block mem-initializers.
1816 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
1819 * typeck.c (cp_build_vec_perm_expr): New function.
1820 * cp-tree.h: Declare it.
1821 * parser.c (cp_parser_postfix_expression): Call it.
1822 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1823 (tsubst_copy_and_build): Likewise.
1825 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
1828 * pt.c (more_specialized_fn): If both arguments are references,
1829 give priority to an lvalue.
1831 2013-06-26 Jason Merrill <jason@redhat.com>
1833 * typeck2.c (store_init_value): Diagnose a non-constant
1834 initializer for in-class static.
1837 * semantics.c (add_capture): Set type to error_mark_node after
1840 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
1843 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1844 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1846 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1848 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1849 * class.c (add_implicitly_declared_members): Likewise.
1850 (check_field_decl): Likewise.
1851 (finalize_literal_type_property): Likewise.
1852 (check_bases_and_members): Likewise.
1853 * decl.c (poplevel): Likewise.
1854 (case_conversion): Likewise.
1855 (check_initializer): Likewise.
1856 (grokfndecl): Likewise.
1857 (check_static_variable_definition): Likewise.
1858 (compute_array_index_type): Likewise.
1859 (grokdeclarator): Likewise.
1860 (build_enumerator): Likewise.
1861 * friend.c (make_friend_class): Likewise.
1862 * lex.c (init_reswords): Likewise.
1863 * method.c (synthesized_method_walk): Likewise.
1864 (implicitly_declare_fn): Likewise.
1865 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1866 (cp_parser_constant_expression): Likewise.
1867 (cp_parser_for_init_statement): Likewise.
1868 (cp_parser_block_declaration): Likewise.
1869 (cp_parser_type_name): Likewise.
1870 (cp_parser_enum_specifier): Likewise.
1871 (cp_parser_enumerator_list): Likewise.
1872 (cp_parser_member_declaration): Likewise.
1873 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1874 (cp_parser_template_declaration_after_export): Likewise.
1875 * pt.c (convert_nontype_argument_function): Likewise.
1876 (convert_nontype_argument): Likewise.
1877 (convert_template_argument): Likewise.
1878 (tsubst_copy_and_build): Likewise.
1879 (build_non_dependent_expr): Likewise.
1880 * semantics.c (non_const_var_error): Likewise.
1881 (potential_constant_expression_1): Likewise.
1882 * tree.c (lvalue_kind): Likewise.
1883 (build_vec_init_expr): Likewise.
1884 (cast_valid_in_integral_constant_expression_p): Likewise.
1885 * typeck.c (build_x_conditional_expr): Likewise.
1886 * typeck2.c (check_narrowing): Likewise.
1888 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1890 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1891 (expand_an_in_modify_expr): Changed a function call from the above
1892 removed function to length_mismatch_in_expr_p.
1894 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1896 * call.c (convert_like_real): Added a check if array notation is present
1897 in expression. If so, then no conversion of arguments is necessary.
1898 (build_over_call): Likewise.
1899 * typeck.c (cp_build_function_call_vec): Likewise.
1900 (convert_for_assignment): Likewise.
1901 (cp_build_array_ref): Reject array notations with a rank greater than 1
1902 as an array's index.
1903 (cp_build_binary_op): If array notations are preent in op, then call
1904 find_correct_array_notation_type.
1905 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1906 * cp-array-notation.c: New file.
1907 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1909 * cp-tree.h (fix_array_notation_exprs): New prototype.
1910 * semantics.c (finish_return_stmt): Reject array notations as
1912 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1913 (potential_constant_expression_1): Likewise.
1914 * tree.c (lvalue_kind): Likewise.
1915 * error.c (dump_decl): Likewise.
1916 (dump_expr): Likewise.
1917 * pt.c (ARRAY_NOTATION_REF): Likewise.
1918 (type_unification_real): Do not unify any arguments if array notations
1920 (instantiate_decl): Added a check for array notaitons inside the
1921 function body. If so, then expand them.
1922 * parser.c (cp_parser_array_notation): New function.
1923 (cp_parser_postfix_open_square_expression): Added a check for colons
1924 inside square braces. If found, then handle the array access as an
1925 array notation access. Also, disable auto-correction from a single
1926 colon to scope when Cilk Plus is enabled.
1927 (cp_parser_compound_statement): Added a check for array notations
1928 inside the statement. If found, then expand them.
1929 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1930 (cp_parser_function_definition_after_declarator): Likewise.
1931 (cp_parser_selection_statement): Searched for array notations inside
1932 condition. If so, then emit an error.
1933 (cp_parser_iteration_statement): Likewise.
1934 (cp_parser_direct_declarator): Reject array notations inside a
1935 variable or array declaration.
1936 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1938 2013-06-20 Jason Merrill <jason@redhat.com>
1941 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1942 context if we're in C++14 mode.
1943 * tree.c (array_of_runtime_bound_p): Return true for a dependent
1944 bound that is not potentually constant.
1945 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1946 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1947 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1948 (build_capture_proxy): Set REFERENCE_VLA_OK.
1949 (vla_capture_type): Make it a proper C++ class.
1950 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
1953 * decl.c (compute_array_index_type): Use size_one_node.
1955 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1956 a partial specialization.
1957 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1959 (most_specialized_class): Adjust.
1961 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1962 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1963 TEMPLATE_DECL_CHECK.
1965 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1968 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1969 TREE_TYPE (arg), not arg itself.
1971 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
1974 * pt.c (type_dependent_expression_p): Handle an array of unknown
1975 bound depending on a variadic parameter.
1976 * parser.c (cp_parser_range_for): Revert PR56794 changes.
1978 2013-06-17 Richard Biener <rguenther@suse.de>
1980 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1982 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
1985 * parser.c (cp_parser_expression_statement): Check whether
1986 cp_parser_expression returns error_mark_node.
1988 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1991 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1993 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1996 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1997 accessible base simply forward to build_static_cast.
1999 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2002 * decl.c (poplevel): For the benefit of -Wunused-variable see
2005 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2007 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2009 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2012 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
2013 again diagnostic already emitted by cp_parser_lookup_name.
2015 2013-06-11 Jan Hubicka <jh@suse.cz>
2018 * cp/pt.c (mark_decl_instantiated): Do not export explicit
2019 instantiations of anonymous namespace templates.
2021 2013-06-10 Jason Merrill <jason@redhat.com>
2023 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
2024 namespace to static_decls.
2026 2013-06-07 Sriraman Tallam <tmsriram@google.com>
2029 * call.c (build_over_call): Check if current_function_decl is
2032 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
2035 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
2036 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2038 2013-06-06 Jason Merrill <jason@redhat.com>
2041 * semantics.c (add_capture): Diagnose capture of variable-size
2042 type that is not a C++1y array of runtime bound.
2044 * decl.c (grokdeclarator): Keep a decl with error type.
2045 (grokfield, grokbitfield): Likewise.
2046 * pt.c (instantiate_class_template_1): Likewise.
2047 (tsubst_decl): Drop redundant error.
2048 * class.c (walk_subobject_offsets): Handle erroneous fields.
2049 * typeck2.c (process_init_constructor_record): Likewise.
2051 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
2054 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
2055 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2057 2013-06-03 Jan Hubicka <jh@suse.cz>
2059 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
2060 mark_decl_referenced.
2061 (mark_needed): Likewise.
2063 2013-06-03 Jason Merrill <jason@redhat.com>
2065 * class.c (mark_type_abi_tags): New.
2066 (check_abi_tags): Use it.
2068 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2071 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
2072 * semantics.c (finish_qualified_id_expr): Use it.
2073 * cp-tree.h: Update.
2075 2013-06-01 Jan Hubicka <jh@suse.cz>
2077 * decl2.c (cp_write_global_declarations): Replace same_body_alias
2078 by symbol.cpp_implicit_alias.
2080 2013-05-30 Jason Merrill <jason@redhat.com>
2083 * cp-lang.c (cp_classify_record): Handle structs without
2087 * class.c (common_enclosing_class): New.
2088 * cp-tree.h: Declare it.
2089 * init.c (sort_mem_initializers): Don't splice out a union member
2092 2013-05-29 Jan Hubicka <jh@suse.cz>
2094 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
2095 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2097 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
2100 * decl2.c (check_classfn): Check for destructors declared as member
2103 2013-05-24 Jason Merrill <jason@redhat.com>
2106 * pt.c (any_template_arguments_need_structural_equality_p): A
2107 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2109 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
2112 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
2113 with width exceeding the type.
2115 2013-05-24 Jason Merrill <jason@redhat.com>
2118 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
2119 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2121 2013-05-23 Jason Merrill <jason@redhat.com>
2124 * tree.c (build_ref_qualified_type): Clear
2125 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2127 2013-05-22 Jason Merrill <jason@redhat.com>
2130 * call.c (convert_like_real): Use cp_convert_and_check.
2131 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
2132 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
2133 (potential_constant_expression_1): Handle OMP_ATOMIC*.
2136 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
2139 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2142 * parser.c (cp_parser_conversion_type_id): Set up
2143 parser->type_definition_forbidden_message before calling
2144 cp_parser_type_specifier_seq.
2146 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2149 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
2150 warnings about defaulted functions.
2152 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
2154 * call.c (build_conditional_expr_1): Add location_t parameter.
2155 (build_conditional_expr): Likewise.
2156 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
2157 get_member_function_from_ptrfunc, build_x_conditional_expr,
2158 cp_build_modify_expr): Update.
2159 * init.c (build_new_1): Likewise.
2160 * cp-tree.h: Update declaration.
2162 2013-05-20 Jason Merrill <jason@redhat.com>
2165 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
2169 * decl.c (fndecl_declared_return_type): Also look in
2170 DECL_SAVED_FUNCTION_DATA.
2172 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2175 * parser.c (cp_parser_parameter_declaration): Check return value
2176 of cp_parser_parse_and_diagnose_invalid_type_name.
2178 2013-05-20 Jason Merrill <jason@redhat.com>
2181 * class.c (vbase_has_user_provided_move_assign): New.
2182 * method.c (synthesized_method_walk): Check it.
2183 * cp-tree.h: Declare it.
2186 * tree.c (build_cplus_array_type): Copy layout info if element
2189 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2192 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2194 2013-05-20 Jason Merrill <jason@redhat.com>
2197 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
2198 whether a template has its own args.
2200 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2203 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2205 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2208 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
2209 instead of cp_parser_initializer_list for compound-literals.
2211 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
2214 * typeck.c (check_return_expr): Reverse the alignment comparison.
2216 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
2219 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
2220 correctly sizeof compound-literal; update comments.
2222 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
2224 * call.c (build_conditional_expr_1): Use cp_build_binary_op
2225 instead of directly calling fold_build2.
2227 2013-05-16 Jason Merrill <jason@redhat.com>
2229 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2232 * decl.c (grokdeclarator): Allow member function qualifiers in
2233 TYPENAME context in C++11 mode.
2235 2013-05-16 Dodji Seketeli <dodji@redhat.com>
2237 PR c++/56782 - Regression with empty pack expansions
2238 * pt.c (use_pack_expansion_extra_args_p): When at least a
2239 parameter pack has an empty argument pack, and another parameter
2240 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2243 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2245 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2246 warning_at and permerror with warning_at/inform and permerror/
2247 inform, respectively.
2249 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2252 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2255 2013-05-14 Jason Merrill <jason@redhat.com>
2258 * parser.c (cp_parser_range_for): Call complete_type.
2261 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2263 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2266 * method.c (defaulted_late_check): Check for compatible exception
2267 specification out of class explicitly defaulted functions too.
2269 2013-05-14 Jason Merrill <jason@redhat.com>
2272 * semantics.c (potential_constant_expression_1): Make sure the
2273 called function is potentially constant.
2274 * call.c (null_ptr_cst_p): Revert earlier change.
2276 2013-05-13 Jason Merrill <jason@redhat.com>
2279 * call.c (null_ptr_cst_p): An expression with side-effects can't
2280 be a C++03 null pointer constant.
2283 * decl.c (reshape_init_class): Handle error_mark_node.
2286 * typeck.c (merge_types): Propagate ref-qualifier
2287 in METHOD_TYPE case.
2290 * decl.c (grokdeclarator): Apply ref-qualifier
2291 in the TYPENAME case.
2294 * decl.c (decls_match): Compare ref-qualifiers.
2296 2013-05-10 Jason Merrill <jason@redhat.com>
2299 * pt.c (convert_template_argument): Use dependent_template_arg_p,
2300 not uses_template_parms.
2303 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2306 * semantics.c (add_capture): Error rather than abort on copy
2308 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2309 warn about capture proxy.
2311 2013-05-09 Jason Merrill <jason@redhat.com>
2313 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2316 * pt.c (lookup_template_class_1): Handle getting a template
2317 template parameter as D1.
2319 N3639 C++1y VLA diagnostics
2320 * decl.c (grokdeclarator): Complain about reference, pointer, or
2322 (create_array_type_for_decl): Complain about array of VLA.
2323 * pt.c (tsubst): Likewise.
2324 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2325 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2326 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2327 (cxx_sizeof_or_alignof_type): Likewise.
2329 N3639 C++1y VLA support
2330 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2331 (check_array_initializer): Allow VLA init.
2332 (reshape_init_array_1): Adjust.
2333 (cp_finish_decl): Check for invalid VLA length.
2334 * typeck2.c (process_init_constructor_array): Adjust.
2335 (store_init_value): Use build_vec_init for VLAs.
2336 * semantics.c (add_capture): Capture VLA as ptr+len.
2337 (vla_capture_type): New.
2338 (build_capture_proxy): Rebuild the VLA.
2339 * typeck.c (build_simple_component_ref): Split out from...
2340 (build_ptrmemfunc_access_expr): ...here.
2341 * tree.c (array_of_runtime_bound_p): New.
2342 * init.c (throw_bad_array_length): New.
2343 (build_vec_init): Use it.
2344 * parser.c (cp_convert_range_for): When iterating over a VLA,
2345 use it directly rather than bind a reference.
2346 * cp-tree.h: Declare new functions.
2348 2013-05-08 Jason Merrill <jason@redhat.com>
2350 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2351 variably_modified_type_p.
2352 (expand_start_catch_block): Mark the typeinfo used here.
2353 * semantics.c (finish_handler_parms): Not here.
2355 * error.c (dump_type_suffix): Try harder on VLA length.
2358 * init.c (throw_bad_array_new_length): New.
2359 (build_new_1): Use it. Don't warn about braced-init-list.
2360 (build_vec_init): Use it.
2361 * call.c (build_operator_new_call): Use it.
2364 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2365 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2366 * error.c (maybe_warn_cpp0x): s/0x/11/.
2368 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2371 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2374 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
2376 * typeck.c (cp_build_binary_op): Call save_expr before
2377 build_vector_from_val.
2379 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2382 * decl.c (cp_finish_decl): After do_auto_deduction copy the
2383 qualifers with cp_apply_type_quals_to_decl.
2385 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
2387 * pt.c (convert_nontype_argument): Add missing whitespace in
2390 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2393 * decl.c (build_enumerator): Improve error message.
2395 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2398 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2399 messages for template types and fix column numbers.
2401 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2404 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2405 c_inhibit_evaluation_warnings around build_x_modify_expr call.
2407 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2410 * semantics.c (finish_decltype_type): Handle instantiated template
2413 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2416 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2418 2013-04-26 Jakub Jelinek <jakub@redhat.com>
2420 * error.c (cp_print_error_function): Adjust file_name_as_prefix
2423 2013-04-25 Jason Merrill <jason@redhat.com>
2426 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2429 * init.c (perform_member_init): Call reshape_init.
2431 2013-04-24 Jason Merrill <jason@redhat.com>
2434 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2436 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2438 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2439 pedwarn to simply use OPT_Wpointer_arith.
2440 (cp_build_unary_op): Likewise.
2442 2013-04-24 Jason Merrill <jason@redhat.com>
2444 N3648: init-captures are named.
2445 * semantics.c (add_capture): Don't prepend "__" to init-captures.
2446 (build_capture_proxy): Adjust.
2447 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2449 N3648: Allow braced and parenthesized initializers.
2450 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2451 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2452 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2453 (add_capture): Collapse a parenthesized initializer into a single
2455 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2457 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2460 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2461 * semantics.c (finish_qualified_id_expr): Likewise.
2462 (finish_id_expression): Update.
2463 * typeck.c (cp_build_addr_expr_1): Likewise.
2464 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2465 * cp-tree.h: Update declarations.
2467 2013-04-22 Jason Merrill <jason@redhat.com>
2470 * parser.c (cp_parser_unqualified_id): Handle ~auto.
2471 (cp_parser_pseudo_destructor_name): Likewise.
2472 (cp_parser_postfix_dot_deref_expression): Adjust.
2473 (cp_lexer_nth_token_is_keyword): New.
2474 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2475 * typeck.c (lookup_destructor): Handle ~auto.
2477 * pt.c (fn_type_unification): Push tinst level around
2478 type_unification_real if we aren't explaining.
2479 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2480 * error.c (dump_function_decl): Respect it.
2481 (subst_to_string): Pass it.
2484 * rtti.c (get_typeid): Diagnose qualified function type.
2485 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2487 * error.c (dump_aggr_type): Fix lambda detection.
2488 (dump_simple_decl): Pretty-print capture field.
2491 * cvt.c (build_expr_type_conversion): Two conversions that return
2492 the same type aren't necessarily ambiguous.
2495 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2496 pedwarn unconditional except in C++1y mode.
2498 * semantics.c (potential_constant_expression_1): Don't crash on
2502 * semantics.c (finish_id_expression): Reject capture of anonymous
2506 * decl2.c (check_default_args): Check for pack expansion.
2508 * mangle.c (write_type): Mangle decltype(auto).
2510 2013-04-19 Jason Merrill <jason@redhat.com>
2512 N3638 changes to return type deduction
2513 * decl.c (undeduced_auto_decl): New.
2514 (require_deduced_type): New.
2515 (fndecl_declared_return_type): New.
2516 (decls_match): Use it.
2517 (duplicate_decls): Don't check for auto return.
2518 (grokdeclarator): Reject virtual auto.
2519 * class.c (resolve_address_of_overloaded_function): Handle
2520 auto function templates.
2521 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2522 * cp-tree.h: Declare new fns.
2523 * error.c (dump_function_decl): Use fndecl_declared_return_type.
2524 * search.c (check_final_overrider): Likewise.
2525 * pt.c (make_decltype_auto): New.
2526 (do_auto_deduction): Require plain decltype(auto).
2530 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2531 template specializations.
2533 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
2535 Implement n3599 - Literal operator templates for strings.
2536 * parser.c (make_string_pack (tree value)): New function.
2537 (cp_parser_userdef_string_literal (cp_token *)): Use it
2538 to construct calls to character string literal operator templates.
2539 (cp_parser_template_declaration_after_export): Check for new string
2540 literal operator template parameter form.
2542 2013-04-15 Jason Merrill <jason@redhat.com>
2544 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2547 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2548 rather than a destructor name, it isn't an unqualified-name.
2549 (tsubst_copy_and_build): Pass down decltype_flag to operator
2553 * semantics.c (insert_capture_proxy): Just use index 1 in the
2556 2013-04-12 Jakub Jelinek <jakub@redhat.com>
2558 * error.c (cp_print_error_function,
2559 print_instantiation_partial_context_line,
2560 maybe_print_constexpr_context): Colorize locus strings.
2562 2013-04-11 Jason Merrill <jason@redhat.com>
2565 * parser.c (complain_flags): New.
2566 (cp_parser_postfix_expression): Use it.
2567 (cp_parser_unary_expression): Likewise.
2568 (cp_parser_binary_expression): Likewise.
2569 (cp_parser_assignment_expression): Likewise.
2570 (cp_parser_expression): Likewise.
2571 (cp_parser_postfix_open_square_expression): Take decltype_p.
2572 (cp_parser_builtin_offsetof): Adjust.
2573 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2574 * decl2.c (grok_array_decl): Add decltype_p parm.
2575 * cp-tree.h: Adjust prototype.
2576 * semantics.c (finish_unary_op_expr): Add complain parm.
2578 2013-04-11 Jakub Jelinek <jakub@redhat.com>
2581 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2582 calling maybe_constant_value for C++98.
2584 2013-04-11 Jason Merrill <jason@redhat.com>
2587 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2588 Strip references before checking WILDCARD_TYPE_P.
2590 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2592 * call.c (build_conditional_expr_1, build_over_call): Protect
2593 error calls with complain & tf_error.
2594 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2595 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2596 build_ptrmemfunc): Likewise.
2597 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2599 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2600 (convert_to_reference): Adjust.
2602 2013-04-11 Jason Merrill <jason@redhat.com>
2604 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2605 local variables, look them up instead.
2606 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2607 proxies and substitution in unevaluated context.
2608 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2609 before the iterators.
2612 * pt.c (uses_deducible_template_parms): New.
2613 (deducible_array_bound, deducible_expression): New.
2614 (deducible_template_args): New.
2615 (unify_one_argument): Call uses_deducible_template_parms.
2617 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2620 * typeck2.c (build_m_component_ref): Protect error calls with
2621 (complain & tf_error).
2623 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2626 * parser.c (cp_parser_enum_specifier): Check for empty
2627 anonymous enums and anonymous scoped enums.
2629 2013-04-10 Jakub Jelinek <jakub@redhat.com>
2632 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2633 first before calling maybe_constant_value for warn_for_div_by_zero
2634 or invalid shift count warning purposes.
2636 2013-04-09 Jason Merrill <jason@redhat.com>
2639 * rtti.c (build_typeid): Check the address of the argument
2640 rather than looking for an INDIRECT_REF.
2642 2013-04-04 Jason Merrill <jason@redhat.com>
2646 * typeck2.c (abstract_virtuals_error_sfinae): Disable
2647 complete_type again.
2649 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2652 * decl.c (validate_constexpr_redeclaration): Allow an explicit
2653 specialization to be different wrt the constexpr specifier.
2655 2013-04-06 Jason Merrill <jason@redhat.com>
2657 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2660 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
2662 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2663 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
2665 2013-04-03 Jason Merrill <jason@redhat.com>
2667 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2668 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2669 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2671 * mangle.c (write_type): When writing a function type with
2672 function-cv-quals, don't add the unqualified type as a
2673 substitution candidate.
2675 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2678 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2681 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2684 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2685 from args to new_args.
2686 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2687 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2689 2013-04-02 Jason Merrill <jason@redhat.com>
2692 * mangle.c (write_function_type): Mangle ref-qualifier.
2693 (write_nested_name): Likewise.
2694 (canonicalize_for_substitution): Preserve ref-qualifier.
2695 (write_type): Likewise.
2698 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2700 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2702 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2703 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2704 (for_each_template_parm_r): Use TYPE_TI_ARGS.
2706 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2708 * cp-tree.h (TAGGED_TYPE_P): Remove.
2709 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2710 (TYPE_ANONYMOUS_P): Adjust.
2711 * call.c (build_new_op_1): Likewise.
2712 * class.c (find_abi_tags_r): Likewise.
2713 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2714 type_is_deprecated): Likewise.
2715 * decl2.c (grokfield, min_vis_r): Likewise.
2716 * pt.c (get_template_info): Likewise.
2717 * tree.c (handle_abi_tag_attribute): Likewise.
2719 2013-04-01 Jason Merrill <jason@redhat.com>
2721 * semantics.c (maybe_constant_value): Check
2722 instantiation_dependent_expression_p.
2723 * pt.c (build_non_dependent_expr): Don't check it here.
2726 * init.c (build_new): Don't try to process an array initializer
2727 at template definition time.
2730 * typeck.c (finish_class_member_access_expr): Handle enum scope.
2733 * parser.c (cp_parser_range_for): Don't try to do auto deduction
2734 in a template if the type of the range is incomplete.
2736 * call.c (add_function_candidate): Take the address of 'this' here.
2737 (build_over_call): And here.
2738 (build_new_method_call_1, build_op_call_1): Not here.
2739 (build_user_type_conversion_1): Or here.
2740 (add_candidates): Adjust.
2742 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2743 * class.c (same_signature_p): Use type_memfn_quals.
2744 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2745 FUNCTION_OR_METHOD_TYPE_CHECK.
2746 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2747 * pt.c (unify): Use static_fn_type.
2749 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
2750 Jason Merrill <jason@redhat.com>
2752 Implement N2439 (ref-qualifiers for 'this')
2753 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2754 (FUNCTION_RVALUE_QUALIFIED): New.
2755 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2756 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2757 (cp_ref_qualifier): New enum.
2758 (cp_declarator): Add ref_qualifier.
2759 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2760 (cp_parser_direct_declarator): Use it.
2761 (make_call_declarator): Adjust.
2762 (cp_parser_lambda_declarator_opt): Adjust.
2763 * call.c (add_function_candidate): Handle ref-qualifier overload
2764 resolution semantics.
2765 (standard_conversion): Adjust.
2766 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2767 * decl.c (grokdeclarator): Handle ref-qualifiers.
2768 (grokfndecl): Check for invalid ref-qualifiers.
2769 (static_fn_type, revert_static_member_fn): Adjust.
2770 * decl2.c (build_memfn_type): Handle ref-qualifiers.
2771 (check_classfn): Check them.
2772 (cp_reconstruct_complex_type): Retain them.
2773 * error.c (dump_ref_qualifier): New.
2774 (dump_type_suffix, dump_function_decl): Use it.
2775 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2776 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2777 (unify): Retain them.
2778 * tree.c (cp_check_qualified_type): New.
2779 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2780 (build_ref_qualified_type): New.
2781 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2782 (cp_build_type_attribute_variant): Keep ref-qualifier.
2783 * typeck.c (merge_types): Keep ref-qualifier.
2784 (structural_comptypes): Compare ref-qualifier.
2785 (type_memfn_rqual): New.
2786 (apply_memfn_quals): Take ref-qual argument.
2787 * typeck2.c (build_m_component_ref): Check ref-qualifier.
2789 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2791 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2792 (DECL_FUNCTION_TEMPLATE_P): Adjust.
2794 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2795 pp_cxx_qualified_id): Use get_containing_scope.
2796 * parser.c (cp_parser_class_head): Likewise.
2797 * pt.c (push_template_decl_real): Likewise.
2799 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2800 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2802 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
2804 * decl2.c (collect_candidates_for_java_method_aliases): Use
2806 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2807 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2808 * decl.c (duplicate_decls): Likewise.
2809 * parser.c (cp_parser_template_declaration_after_export): Likewise,
2810 also DECL_DECLARES_TYPE_P.
2811 * pt.c (instantiate_class_template_1): Likewise.
2812 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2813 (lookup_field_r): Likewise.
2814 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2815 (lookup_fnfields_slot_nolazy): Likewise.
2816 * semantics.c (finish_member_declaration): Likewise.
2817 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2819 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2821 * pt.c (template_parms_to_args): Fix typo in comment.
2823 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2825 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2827 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2829 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2830 (build_op_call_1): Likewise.
2831 (build_over_call): Likewise.
2832 (compare_ics): Likewise.
2833 * class.c (build_base_path): Likewise.
2834 (resolve_address_of_overloaded_function): Likewise.
2835 * cp-tree.h: Likewise.
2836 * cvt.c (cp_convert_to_pointer): Likewise.
2837 (convert_to_reference): Likewise.
2838 (ocp_convert): Likewise.
2839 (convert_force): Likewise, tidy.
2840 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2841 (pp_cxx_ptr_operator): Likewise.
2842 * decl.c (duplicate_decls): Likewise.
2843 (start_decl): Likewise.
2844 (grok_op_properties): Likewise.
2845 (start_preparsed_function): Likewise.
2846 (store_parm_decls): Likewise.
2847 (finish_function): Likewise.
2848 * decl2.c (delete_sanity): Likewise.
2849 (acceptable_java_type): Likewise.
2850 (grokbitfield): Likewise.
2851 (cp_reconstruct_complex_type): Likewise.
2852 * error.c (dump_type_prefix): Likewise.
2853 (dump_expr): Likewise.
2854 * except.c (push_eh_cleanup): Likewise.
2855 (complete_ptr_ref_or_void_ptr_p): Likewise.
2856 (can_convert_eh): Likewise.
2857 * init.c (build_new_1): Likewise.
2858 (build_delete): Likewise.
2859 (build_vec_delete): Likewise.
2860 * mangle.c (write_type): Likewise.
2861 * parser.c (lookup_literal_operator): Likewise.
2862 * pt.c (convert_nontype_argument_function): Likewise.
2863 (convert_nontype_argument): Likewise.
2866 (dependent_type_p_r): Likewise.
2867 * rtti.c (build_headof): Likewise.
2868 (build_typeid): Likewise.
2869 (build_dynamic_cast_1): Likewise.
2870 (target_incomplete_p): Likewise.
2871 (typeinfo_in_lib_p): Likewise.
2872 * semantics.c (finish_omp_for): Likewise.
2873 (cxx_eval_call_expression): Likewise.
2874 (maybe_resolve_dummy): Likewise.
2875 * tree.c (build_target_expr): Likewise.
2876 (cp_build_qualified_type_real): Likewise.
2877 * typeck.c (composite_pointer_type_r): Likewise.
2878 (composite_pointer_type): Likewise.
2879 (comp_except_types): Likewise.
2880 (cxx_sizeof_nowarn): Likewise.
2881 (string_conv_p): Likewise.
2882 (cp_build_array_ref): Likewise.
2883 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2884 (pointer_diff): Likewise.
2885 (cp_build_addr_expr_1): Likewise.
2886 (cp_build_unary_op): Likewise.
2887 (build_static_cast_1): Likewise.
2888 (cp_build_c_cast): Likewise.
2889 (comp_ptr_ttypes_real): Likewise.
2890 (ptr_reasonably_similar): Likewise.
2891 (comp_ptr_ttypes_const): Likewise.
2892 (casts_away_constness): Likewise.
2893 (check_literal_operator_args): Likewise.
2894 * typeck2.c (build_x_arrow): Likewise.
2895 (add_exception_specifier): Likewise.
2897 2013-03-29 Jason Merrill <jason@redhat.com>
2900 * cp-tree.h (AUTO_IS_DECLTYPE): New.
2901 * parser.c (cp_parser_decltype): Handle decltype(auto).
2902 (cp_parser_type_id_1): Allow auto without a late-specified
2904 (cp_parser_primary_expression): Use the return value of
2905 finish_parenthesized_expr.
2906 (cp_parser_transaction_expression): Likewise.
2907 * semantics.c (force_paren_expr): New.
2908 (finish_parenthesized_expr): Use it.
2909 * call.c (build_conditional_expr_1): Likewise.
2910 * pt.c (do_auto_deduction): Handle decltype(auto).
2911 (tsubst_copy): Handle PAREN_EXPR.
2912 (tsubst_copy_and_build): Likewise.
2913 * error.c (dump_expr): Handle PAREN_EXPR.
2914 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2915 * mangle.c (write_expression): Ignore PAREN_EXPR.
2917 * parser.c (cp_parser_decltype_expr): Split out...
2918 (cp_parser_decltype): ...from here.
2922 * pt.c (unify_pack_expansion): Fix indexing.
2924 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2926 * call.c (build_java_interface_fn_ref): Likewise.
2927 (make_temporary_var_for_ref_to_temp): Likewise.
2928 * class.c (check_field_decls): Likewise.
2929 (layout_class_type): Likewise.
2930 (finish_struct_1): Likewise.
2931 (fixed_type_or_null): Likewise.
2932 (get_vtbl_decl_for_binfo): Likewise.
2933 * cp-gimplify.c (omp_var_to_track): Likewise.
2934 (cp_genericize_r): Likewise.
2935 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2936 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2937 (DECL_DISCRIMINATOR_P): Likewise.
2938 * decl.c (poplevel): Likewise.
2939 (decls_match): Likewise.
2940 (duplicate_decls): Likewise.
2941 (decl_jump_unsafe): Likewise.
2942 (start_decl): Likewise.
2943 (check_for_uninitialized_const_var): Likewise.
2944 (make_rtl_for_nonlocal_decl): Likewise.
2945 (cp_finish_decl): Likewise.
2946 (expand_static_init): Likewise.
2947 (local_variable_p): Likewise.
2948 (maybe_register_incomplete_var): Likewise.
2949 * decl2.c (grokfield): Likewise.
2950 (comdat_linkage): Likewise.
2951 (determine_visibility): Likewise.
2952 (import_export_decl): Likewise.
2953 (prune_vars_needing_no_initialization): Likewise.
2954 (decl_maybe_constant_var_p): Likewise.
2955 * error.c (dump_simple_decl): Likewise.
2956 (dump_template_decl): Likewise.
2957 (cp_printer): Likewise.
2958 * except.c (build_throw): Likewise.
2959 * init.c (build_vtbl_address): Likewise.
2960 (member_init_ok_or_else): Likewise.
2961 (build_aggr_init): Likewise.
2962 (expand_aggr_init_1): Likewise.
2963 (build_offset_ref): Likewise.
2964 (constant_value_1): Likewise.
2965 * mangle.c (write_mangled_name): Likewise.
2966 (write_prefix): Likewise.
2967 * name-lookup.c (supplement_binding_1): Likewise.
2968 (add_decl_to_level): Likewise.
2969 (pushdecl_maybe_friend_1): Likewise.
2970 (check_for_out_of_scope_variable): Likewise.
2971 (validate_nonmember_using_decl): Likewise.
2972 (lookup_name_innermost_nonclass_level_1): Likewise.
2973 (lookup_arg_dependent_1): Likewise.
2974 * parser.c (cp_parser_lambda_introducer): Likewise.
2975 (cp_parser_template_argument): Likewise.
2976 (cp_parser_single_declaration): Likewise.
2977 * pt.c (convert_nontype_argument): Likewise.
2978 (instantiate_class_template_1): Likewise.
2979 (tsubst_decl): Likewise.
2980 (tsubst_expr): Likewise.
2981 (do_decl_instantiation): Likewise.
2982 (do_type_instantiation): Likewise.
2983 (regenerate_decl_from_template): Likewise.
2984 (always_instantiate_p): Likewise.
2985 (instantiate_decl): Likewise.
2986 (type_dependent_expression_p): Likewise.
2987 (build_non_dependent_expr): Likewise.
2988 * repo.c (repo_emit_p): Likewise.
2989 * rtti.c (build_dynamic_cast_1): Likewise.
2990 * search.c (shared_member_p): Likewise.
2991 * semantics.c (outer_var_p): Likewise.
2992 (finish_id_expression): Likewise.
2993 (finish_omp_clauses): Likewise.
2994 (finish_decltype_type): Likewise.
2995 (ensure_literal_type_for_constexpr_object): Likewise.
2996 * tree.c (lvalue_kind): Likewise.
2997 (bot_replace): Likewise.
2998 (cp_tree_equal): Likewise.
2999 (handle_init_priority_attribute): Likewise.
3000 (decl_storage_duration): Likewise.
3001 * typeck.c (cxx_sizeof_expr): Likewise.
3002 (cxx_alignof_expr): Likewise.
3003 (decay_conversion): Likewise.
3004 (build_class_member_access_expr): Likewise.
3005 (cp_build_array_ref): Likewise.
3006 (cxx_mark_addressable): Likewise.
3007 (maybe_warn_about_returning_address_of_local): Likewise.
3008 (check_return_expr): Likewise.
3009 * typeck2.c (cxx_readonly_error): Likewise.
3010 (abstract_virtuals_error_sfinae): Likewise.
3011 (cxx_incomplete_type_diagnostic): Likewise.
3013 2013-03-28 Lawrence Crowl <crowl@google.com>
3016 (CXX_PARSER_H): Add header dependence.
3018 (extern debug (cp_binding_level &)): New.
3019 (extern debug (cp_binding_level *)): New.
3021 (debug (cp_binding_level &)): New.
3022 (debug (cp_binding_level *)): New.
3024 (debug (cp_parser &)): New.
3025 (debug (cp_parser *)): New.
3026 (debug (cp_token &)): New.
3027 (debug (cp_token *)): New.
3028 (debug (vec<cp_token, va_gc> &)): New.
3029 (debug (vec<cp_token, va_gc> *)): New.
3030 * parser.c: Add header dependence.
3031 (extern debug (cp_parser &)): New.
3032 (extern debug (cp_parser *)): New.
3033 (extern debug (cp_token &)): New.
3034 (extern debug (cp_token *)): New.
3035 (extern debug (vec<cp_token, va_gc> &)): New.
3036 (extern debug (vec<cp_token, va_gc> *)): New.
3038 2013-03-28 Jason Merrill <jason@redhat.com>
3042 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
3043 the type if tf_decltype is set.
3044 * pt.c (fn_type_unification): Add decltype_p parm.
3045 (get_bindings): Adjust.
3046 * cp-tree.h: Adjust.
3047 * class.c (resolve_address_of_overloaded_function): Adjust.
3048 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
3051 * parser.c (cp_parser_sizeof_pack): Split out from...
3052 (cp_parser_sizeof_operand): ...here. Require (id).
3055 * semantics.c (finish_this_expr): 'this' is an rvalue.
3056 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
3059 * semantics.c (finish_member_declaration): Don't push closure
3062 * name-lookup.c (pushdecl_maybe_friend_1): Use
3063 nonlambda_method_basetype and current_nonlambda_class_type.
3066 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
3067 conversion from integer to pointer.
3068 (cxx_eval_constant_expression): Likewise.
3069 (cxx_eval_indirect_ref): Use the folded operand if we still think
3070 this might be constant.
3072 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3073 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3076 * call.c (convert_like_real): Change series of two permerrors
3077 to permerror + inform (and likewise for two errors).
3078 (build_new_method_call_1): Likewise.
3079 * typeck.c (convert_for_initialization): Change additional
3080 warning or error to inform.
3082 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3084 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
3085 (first_aggr_init_expr): Likewise.
3086 (more_aggr_init_expr_args_p): Likewise.
3087 (type_of_this_parm): Likewise.
3088 (class_of_this_parm): Likewise.
3089 * name-lookup.h (get_global_value_if_present): Likewise.
3090 (is_typename_at_global_scope): Likewise.
3092 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3094 * call.c (joust): Don't call inform for a permerror returning false.
3095 * parser.c (cp_parser_check_class_key): Likewise.
3096 * pt.c (tsubst_copy_and_build): Likewise.
3098 2013-03-27 Jason Merrill <jason@redhat.com>
3101 * semantics.c (finish_qualified_id_expr): Return early
3104 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3106 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
3107 * cvt.c (convert_to_void): Likewise.
3108 * error.c (dump_expr): Likewise.
3109 * mangle.c (write_expression): Likewise.
3110 * parser.c (cp_parser_template_argument): Likewise.
3111 * pt.c (convert_nontype_argument): Likewise.
3112 (tsubst_copy_and_build): Likewise.
3113 * rtti.c (build_typeid): Likewise.
3114 * semantics.c (finish_call_expr): Likewise.
3115 (finish_decltype_type): Likewise.
3116 (build_data_member_initialization): Likewise.
3117 * tree.c (is_dummy_object): Likewise.
3118 * typeck.c (decay_conversion): Likewise.
3119 (build_class_member_access_expr): Likewise.
3120 (cp_build_addr_expr_1): Likewise.
3121 (unary_complex_lvalue): Likewise.
3122 (check_return_expr): Likewise.
3123 * typeck2.c (cxx_readonly_error): Likewise.
3125 2013-03-26 Jason Merrill <jason@redhat.com>
3128 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
3129 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
3130 * cp-tree.h: Adjust prototype.
3133 * typeck2.c (build_m_component_ref): Handle prvalue object.
3135 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3137 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
3138 * decl.c (duplicate_decls): Likewise.
3139 (cp_finish_decl): Likewise.
3140 (check_class_member_definition_namespace): Likewise.
3141 * decl2.c (grokfield): Likewise.
3142 (decl_needed_p): Likewise.
3143 (import_export_decl): Likewise.
3144 (mark_used): Likewise.
3145 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
3146 * pt.c (push_access_scope): Likewise.
3147 (instantiate_decl): Likewise.
3148 * ptree.c (cxx_print_decl): Likewise.
3149 * repo.c (repo_emit_p): Likewise.
3150 * semantics.c (note_decl_for_pch): Likewise.
3151 * tree.c (decl_linkage): Likewise.
3153 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3156 * decl.c (check_array_designated_initializer): Handle CONST_DECL
3159 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3161 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
3164 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
3166 2013-03-25 Jason Merrill <jason@redhat.com>
3169 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
3170 class is derived from the type of the object.
3173 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
3174 unevaluated context.
3176 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
3179 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
3180 DECL_TEMPLATE_INSTANTIATION.
3182 2013-03-22 Jason Merrill <jason@redhat.com>
3185 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
3188 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3190 * cp-tree.h (identifier_p): New.
3191 * call.c: Throughout, call identifier_p insstead of direct
3192 comparaison of TREE_CODE against IDENTIFIER_NODE.
3193 * decl.c: Likewisse.
3194 * decl2.c: Likewise.
3196 * mangle.c: Likewise.
3197 * name-lookup.c: Likewise.
3198 * parser.c: Likewise.
3200 * search.c: Likewise.
3201 * semantics.c: Likewise.
3203 * typeck.c: Likewise.
3204 * typeck2.c: Likewise.
3206 2013-03-21 Jakub Jelinek <jakub@redhat.com>
3209 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
3210 * call.c (build_temp): Likewise.
3211 * method.c (synthesize_method): Likewise.
3212 * typeck.c (convert_for_initialization): Likewise.
3214 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
3216 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
3218 2013-03-21 Richard Biener <rguenther@suse.de>
3220 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
3221 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3223 2013-03-20 Jason Merrill <jason@redhat.com>
3226 * parser.c (cp_parser_late_return_type_opt): Save and restore
3227 current_class_ptr/ref.
3230 * expr.c (cplus_expand_constant): Do nothing if the class is
3232 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3233 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3234 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3235 (complete_vars): Likewise.
3237 * name-lookup.c (get_anonymous_namespace_name): Never use
3238 get_file_function_name.
3240 * pt.c (retrieve_specialization): Handle null tmpl argument.
3244 * pt.c (tsubst_decl): Check return value of register_specialization.
3245 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3248 2013-03-17 Jason Merrill <jason@redhat.com>
3252 * parser.c (cp_parser_direct_declarator): Bail if we see a
3253 qualified-id not at namespace scope.
3257 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3260 2013-03-16 Jason Merrill <jason@redhat.com>
3262 * decl.c (grokdeclarator): Assert that we won't see a pointer to
3266 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3267 (MAYBE_CLASS_TYPE_P): ...here.
3268 * semantics.c (lambda_capture_field_type): Only build a
3269 magic decltype for wildcard types.
3270 (lambda_proxy_type): Likewise.
3271 (finish_non_static_data_member): Get the quals from
3275 * parser.c (cp_parser_template_argument): Don't
3276 fold_non_dependent_expr.
3278 * parser.c (cp_parser_lambda_declarator_opt): Use
3279 cp_parser_trailing_type_id.
3282 * parser.c (cp_parser_template_id): Don't forget access checks.
3285 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3289 * name-lookup.h (tag_scope): Add ts_lambda.
3290 * semantics.c (begin_lambda_type): Use it.
3291 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3292 * pt.c (check_default_tmpl_args): Ignore lambdas.
3293 (push_template_decl_real): Handle lambdas.
3294 * tree.c (no_linkage_check): Adjust lambda check.
3297 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3300 * parser.c (cp_parser_direct_declarator): Fix late return
3301 for out-of-class defn of member function.
3304 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3305 parms to avoid duplicate -Wshadow warnings.
3307 * search.c (lookup_base): Handle NULL_TREE.
3310 * semantics.c (potential_constant_expression_1): Use of 'this' in
3311 a non-constexpr function makes the expression not potentially
3316 * cp-tree.h (tsubst_flags): Add tf_decltype.
3317 * call.c (build_cxx_call): Don't build a temporary if it's set.
3318 (build_over_call): Make sure it's only passed to build_cxx_call.
3319 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3320 (cp_parser_unary_expression): Likewise.
3321 (cp_parser_cast_expression): Likewise.
3322 (cp_parser_binary_expression): Likewise.
3323 (cp_parser_assignment_expression): Likewise.
3324 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
3325 (cp_parser_expression): Add decltype_p. Force a
3326 temporary for a call on the LHS of a comma.
3327 (cp_parser_decltype): Pass true to decltype_p parms.
3328 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3329 (tsubst_copy_and_build): Pass tf_decltype down only for
3330 CALL_EXPR and the RHS of COMPOUND_EXPR.
3331 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3333 * cp-tree.h (abstract_class_use): New enum.
3334 * typeck2.c (pending_abstract_type): Add use field.
3335 (abstract_virtuals_error_sfinae): Add overloads taking
3336 abstract_class_use instead of tree.
3337 * typeck.c (build_static_cast_1): Call it.
3338 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3339 * pt.c: Adjust calls.
3340 * decl.c (cp_finish_decl): Don't handle functions specially.
3341 (grokdeclarator): Always check return type.
3342 * init.c (build_new_1): Adjust call.
3346 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3347 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3350 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3351 (tsubst_arg_types): Likewise.
3355 * call.c (convert_like_real): Check for explicit constructors
3356 even for value-initialization.
3359 * pt.c (convert_nontype_argument): Handle invalid pointer.
3361 * parser.c (cp_parser_lambda_expression): Use nreverse.
3365 * pt.c (instantiate_class_template_1): Instantiate lambda capture
3367 (tsubst_copy_and_build): Not here.
3370 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3373 * parser.c (parsing_nsdmi): New.
3374 * semantics.c (outer_automatic_var_p): Check it.
3375 (finish_id_expression): Likewise.
3376 * cp-tree.h: Declare it.
3379 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3381 * parser.c (lookup_literal_operator): Correct parm/arg naming
3385 * pt.c (fold_non_dependent_expr_sfinae): Check
3386 instantiation_dependent_expression_p.
3389 * class.c (resolve_address_of_overloaded_function): Accept a
3390 reference to function for target_type.
3391 (instantiate_type): Likewise.
3392 * pt.c (convert_nontype_argument): Pass it to
3393 convert_nontype_argument_function.
3395 2013-03-16 Jakub Jelinek <jakub@redhat.com>
3397 * tree.c (cp_tree_equal): Fix a pasto.
3400 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3401 pass op1 through maybe_constant_value first.
3403 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
3406 * semantics.c (cxx_eval_array_reference): Check for negative index.
3408 2013-03-14 Jason Merrill <jason@redhat.com>
3411 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3414 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3415 dso_handle parm on targets without __cxa_atexit.
3417 2013-03-11 Jason Merrill <jason@redhat.com>
3420 * typeck.c (check_return_expr): Disallow returning init list here.
3421 * semantics.c (apply_deduced_return_type): Not here.
3423 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
3426 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3427 * error.c (dump_expr): Likewise.
3429 2013-03-08 Jason Merrill <jason@redhat.com>
3432 * class.c (modify_all_vtables): Mangle the vtable name before
3435 * semantics.c (lambda_expr_this_capture): In unevaluated context,
3436 just return the nearest 'this'.
3441 * tree.c (maybe_dummy_object): Don't capture 'this'.
3442 * semantics.c (maybe_resolve_dummy): New.
3443 (finish_non_static_data_member): Use it.
3444 (finish_qualified_id_expr): Don't test is_dummy_object.
3445 * cp-tree.h: Declare maybe_resolve_dummy.
3446 * call.c (build_new_method_call_1): Use it.
3449 * semantics.c (apply_deduced_return_type): Don't allow returning
3450 std::initializer_list.
3452 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3455 * parser.c (cp_parser_elaborated_type_specifier): Don't call
3456 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3457 * decl.c (check_elaborated_type_specifier): Tidy.
3459 2013-03-06 Jakub Jelinek <jakub@redhat.com>
3462 * tree.c (strip_typedefs): Don't copy args if they are NULL.
3464 2013-03-05 Jakub Jelinek <jakub@redhat.com>
3466 * parser.c (cp_parser_braced_list): For {} initialize
3467 *non_constant_p to false.
3469 2013-03-04 Jason Merrill <jason@redhat.com>
3473 * semantics.c (lambda_expr_this_capture): Handle NSDMI
3474 and non-class scopes.
3476 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3478 * decl.c (grokdeclarator): Remove dead code.
3480 2013-02-28 Jason Merrill <jason@redhat.com>
3483 * semantics.c (potential_constant_expression_1): Use
3484 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3487 * call.c (build_over_call): Avoid virtual lookup in a template.
3489 2013-02-27 Jason Merrill <jason@redhat.com>
3493 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3494 of the base name for inheriting ctors.
3495 (push_class_level_binding_1): Remove inheriting ctor handling.
3496 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3497 * class.c (add_implicitly_declared_members): Adjust.
3499 2013-02-26 David Binderman <dcb314@hotmail.com>
3502 * decl.c (grokdeclarator): Tidy publicp assignment.
3504 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
3507 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3508 (build_transaction_expr): Same.
3510 2013-02-25 Jason Merrill <jason@redhat.com>
3513 * pt.c (fn_type_unification): Wait to call push_tinst_level until
3514 we know what args we're looking at.
3517 * semantics.c (potential_constant_expression_1): In C++98, a cast
3518 to non-integral type can't be a constant expression.
3520 2013-02-24 Jakub Jelinek <jakub@redhat.com>
3523 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3526 2013-02-22 Jason Merrill <jason@redhat.com>
3529 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3530 if we got the wrong number of template parms.
3533 * pt.c (fn_type_unification): Use explicit args in template
3534 instantiation context.
3537 * call.c (can_convert_arg): Discard access checks.
3540 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3543 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
3546 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3547 * cvt.c (ocp_convert): Use the latter.
3548 (cp_convert_to_pointer): Likewise.
3549 * decl.c (check_default_argument): Likewise.
3550 * typeck.c (cp_build_binary_op): Likewise.
3551 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3553 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3554 Paolo Carlini <paolo.carlini@oracle.com>
3557 * decl2.c (grokbitfield): Allow scoped enumeration types.
3559 2013-02-15 Jason Merrill <jason@redhat.com>
3562 * semantics.c (finish_id_expression): Also return the identifier
3563 for an outer local static.
3566 * class.c (check_bases_and_members): Deduce noexcept after
3570 * semantics.c (finish_id_expression): In a template, return
3571 the identifier for a constant variable.
3573 2013-02-14 Jason Merrill <jason@redhat.com>
3576 * semantics.c (build_anon_member_initialization): New.
3577 (build_data_member_initialization): Use it.
3580 * decl.c (cp_finish_decl): Force instantiation of an
3581 auto static data member.
3584 * pt.c (unify): A pack expansion that is not the last template
3585 argument makes the entire template argument list non-deduced.
3588 * name-lookup.c (do_class_using_decl): Handle typedefs with
3589 inheriting constructors.
3590 (push_class_level_binding_1): Allow inheriting from template
3591 template parameter, too.
3592 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3595 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3596 default argument scope.
3597 * mangle.c (write_name): Likewise.
3600 * error.c (find_typenames_r): Don't walk into a pack expansion.
3602 2013-02-13 Jason Merrill <jason@redhat.com>
3605 * parser.c (cp_parser_member_declaration): Check the declarator
3606 form when detecting a function declaration via typedef.
3609 * pt.c (maybe_process_partial_specialization): A lambda
3610 isn't what's being specialized.
3613 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3617 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3620 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3621 non-zero offsets, too.
3624 * decl.c (build_enumerator): Always convert the value to a
3625 fixed underlying type.
3628 * pt.c (tsubst_copy_and_build): Don't forget any new
3629 captures that arose from use of dependent names.
3631 2013-02-13 Jakub Jelinek <jakub@redhat.com>
3634 * semantics.c (finish_asm_stmt): If input constraints allow
3635 neither register nor memory, try maybe_constant_value to get
3636 a constant if possible.
3638 2013-02-12 Jason Merrill <jason@redhat.com>
3641 * method.c (add_one_base_init): Handle base constructor
3642 taking rvalue reference parm.
3645 * semantics.c (sort_constexpr_mem_initializers): Handle
3648 2013-02-09 Jason Merrill <jason@redhat.com>
3651 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3652 maybe_instantiate_noexcept.
3655 * pt.c (eq_specializations): Set comparing_specializations.
3656 * tree.c (cp_tree_equal): Check it.
3657 * cp-tree.h: Declare it.
3659 * decl.c (decls_match): Check versions later.
3662 * pt.c (build_non_dependent_expr): Don't try to fold
3663 instantiation-dependent expressions.
3664 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3665 [BIND_EXPR]: Treat as dependent.
3667 2013-02-07 Jakub Jelinek <jakub@redhat.com>
3670 * init.c (build_vec_init): Don't append NULL values into new_vec.
3671 (build_zero_init_1): Don't push anything into v if recursive call
3673 (build_value_init_noctor): Don't push anything into v if
3674 build_value_init call returned NULL_TREE.
3677 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3678 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
3679 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
3680 return true only if 2nd token isn't CPP_CLOSE_PAREN.
3681 (cp_parser_cast_expression): Adjust caller.
3684 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3685 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3686 DECL_LANG_SPECIFIC (t).
3688 2013-02-07 Jason Merrill <jason@redhat.com>
3691 * method.c (do_build_copy_constructor): Don't bother turning
3692 scalars from lvalues to xvalues.
3693 (do_build_copy_assign): Likewise.
3695 2013-02-06 Jason Merrill <jason@redhat.com>
3697 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3699 2013-02-05 Jason Merrill <jason@redhat.com>
3702 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3706 * decl.c (start_preparsed_function): Update restype if we change
3710 * pt.c (fn_type_unification): Discard any access checks from
3711 substituting explicit args.
3713 2013-01-31 Jason Merrill <jason@redhat.com>
3717 * typeck.c (get_member_function_from_ptrfunc): Fix
3718 ptrmemfunc_vbit_in_delta case.
3720 2013-01-29 Jason Merrill <jason@redhat.com>
3723 * class.c (build_ctor_vtbl_group): Give construction vtables
3726 2013-01-25 Jason Merrill <jason@redhat.com>
3729 * pt.c (convert_nontype_argument_function): Handle invalid input.
3730 (convert_nontype_argument): Likewise.
3733 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3734 dynamic type has no virtual functions.
3736 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
3739 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3740 on TARGET_EXPR nodes.
3742 2013-01-22 Jason Merrill <jason@redhat.com>
3745 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3747 2013-01-22 Dodji Seketeli <dodji@redhat.com>
3750 * pt.c (argument_pack_element_is_expansion_p)
3751 (make_argument_pack_select, use_pack_expansion_extra_args_p)
3752 (gen_elem_of_pack_expansion_instantiation): New static functions.
3753 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3754 look through the possibly resulting pack expansion as well.
3755 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3756 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3757 Use gen_elem_of_pack_expansion_instantiation to build the
3758 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
3759 as gen_elem_of_pack_expansion_instantiation and the change in
3760 tsubst above generalize this particular case.
3761 (arg_from_parm_pack_p): Remove this for it's not used by
3762 tsubst_pack_expansion anymore.
3764 2013-01-21 Jason Merrill <jason@redhat.com>
3767 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3768 template args count.
3770 2013-01-18 Jason Merrill <jason@redhat.com>
3773 * decl2.c (get_local_tls_init_fn): New.
3774 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
3775 with aliases for internal variables. Don't use weakrefs if
3776 the variable needs destruction.
3777 (generate_tls_wrapper): Mark the wrapper as const if no
3778 initialization is needed.
3779 (handle_tls_init): Don't require aliases.
3781 2013-01-15 Dodji Seketeli <dodji@redhat.com>
3784 * pt.c (coerce_innermost_template_parms): New static function.
3785 (instantiate_alias_template): Use it here.
3787 2013-01-09 Jason Merrill <jason@redhat.com>
3790 * rtti.c (build_typeid, get_typeid): Add complain parm.
3791 (get_tinfo_decl_dynamic): Likewise.
3792 * cp-tree.h, parser.c, pt.c: Adjust.
3795 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3798 2013-01-09 Jakub Jelinek <jakub@redhat.com>
3801 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3802 call maybe_constant_value for the negative or too big shift
3805 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
3808 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3809 of the argument is true.
3811 2013-01-08 Joel Brobecker <brobecker@adacore.com>
3813 * parser.c (cp_parser_initializer_list): Move declaration
3814 of variable non_const to start of lexical block.
3816 2013-01-07 Jason Merrill <jason@redhat.com>
3819 * tree.c (build_aggr_init_expr): Do nothing in a template.
3820 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3821 a FUNCTION_DECL before tsubsting.
3823 2013-01-04 Dodji Seketeli <dodji@redhat.com>
3826 * pt.c (check_instantiated_arg): Allow type template arguments.
3828 2013-01-04 Jason Merrill <jason@redhat.com>
3831 * decl.c (reset_type_linkage, bt_reset_linkage): New.
3832 (grokdeclarator): Use reset_type_linkage.
3833 * name-lookup.c (binding_table_foreach): Handle null table.
3834 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3836 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
3838 PR c++/54526 (again)
3839 * parser.c (cp_parser_template_id): Revert core of previous change
3840 (keep adjusted inform message).
3842 2013-01-03 Jason Merrill <jason@redhat.com>
3846 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3850 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3853 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3856 * call.c (type_has_extended_temps): New.
3857 * cp-tree.h: Declare it.
3858 * decl.c (check_initializer): Use build_aggr_init for arrays
3860 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3862 2013-01-02 Jason Merrill <jason@redhat.com>
3865 * call.c (build_new_method_call_1): Don't use build_value_init for
3866 user-provided default constructors.
3868 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3872 * tree.c (build_cplus_array_type): Copy layout information
3873 to main variant if necessary.
3875 Copyright (C) 2013 Free Software Foundation, Inc.
3877 Copying and distribution of this file, with or without modification,
3878 are permitted in any medium without royalty provided the copyright
3879 notice and this notice are preserved.