1 2013-12-20 Trevor saunders <tsaunders@mozilla.com>
3 * semantics.c (build_anon_member_initialization): Replace
4 stack_vec<T, N> with auto_vec<T, N>.
6 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8 * parser.c (cp_parser_cilk_simd_clause_name): Changed cilk_clause_name
11 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
13 * parser.c (cp_parser_omp_parallel): Fix description.
15 2013-12-12 Jason Merrill <jason@redhat.com>
18 * pt.c (resolve_overloaded_unification): Use instantiate_template.
20 2013-12-12 Jakub Jelinek <jakub@redhat.com>
23 * class.c (resolve_address_of_overloaded_function): Don't call ggc_free
26 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
28 * cp-tree.h (cilk_valid_spawn): New prototype.
29 (gimplify_cilk_spawn): Likewise.
30 (create_try_catch_expr): Likewise.
31 * decl.c (finish_function): Insert Cilk function-calls when a
32 _Cilk_spawn is used in a function.
33 * parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and
35 * cp-cilkplus.c (set_cilk_except_flag): New function.
36 (set_cilk_except_data): Likewise.
37 (cilk_install_body_with_frame_cleanup): Likewise.
38 * except.c (create_try_catch_expr): Likewise.
39 * parser.h (IN_CILK_SPAWN): New #define.
40 * pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases.
41 * semantics.c (potential_constant_expression_1): Likewise.
42 * typeck.c (cp_build_compound_expr): Reject a spawned function in a
44 (check_return_expr): Reject a spawned function in a return expression.
45 * cp-gimplify.c (cp_gimplify_expr): Added a CILK_SPAWN_STMT and
46 CALL_EXPR case. Added handling of spawned function in MODIFY_EXPR
49 2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
52 * parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
53 occur in a default argument too.
55 2013-12-06 Caroline Tice <cmtice@google.com>
57 Submitting patch from Stephen Checkoway, s@cs.jhu.edu
58 * vtable-class-hierarchy.c (init_functions): Make the libvtv
59 function decls externally visible.
61 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
63 * decl2.c: Remove struct tags when referring to class varpool_node.
65 2013-12-05 Jason Merrill <jason@redhat.com>
69 * pt.c (most_specialized_class): Use the partially instantiated
70 template for deduction. Drop the TMPL parameter.
72 2013-12-05 Paolo Carlini <paolo.carlini@oracle.com>
74 * decl.c (duplicate_decls): Replace pairs of errors and permerrors
75 with error + inform (permerror + inform, respectively).
77 2013-12-04 Joseph Myers <joseph@codesourcery.com>
80 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
81 c_sizeof_or_alignof_type.
83 2013-12-04 Jakub Jelinek <jakub@redhat.com>
86 * pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
88 2013-11-29 Marek Polacek <polacek@redhat.com>
91 * decl.c (compute_array_index_type): Don't build COMPOUND_EXPR for
94 2013-11-28 Jakub Jelinek <jakub@redhat.com>
97 * semantics.c (finish_omp_atomic): Call finish_expr_stmt
100 2013-11-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
102 * g++spec.c (TIMELIB): Define.
103 (WITHLIBC, SKIPOPT): Adjust values.
104 (lang_specific_driver): Add TIME_LIBRARY if not passed explicitly.
106 2013-11-28 Jakub Jelinek <jakub@redhat.com>
109 * parser.c (cp_parser_omp_target): Call keep_next_level only
112 2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
115 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
116 Handle function COMPONENT_REFs.
118 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
119 Jakub Jelinek <jakub@redhat.com>
121 * semantics.c (finish_omp_clauses): For #pragma omp declare simd
122 linear clause step call maybe_constant_value.
124 2013-11-27 Tom de Vries <tom@codesourcery.com>
125 Marc Glisse <marc.glisse@inria.fr>
128 * typeck.c (cp_build_unary_op): Allow vector increment and decrement.
130 2013-11-27 Tom de Vries <tom@codesourcery.com>
131 Marc Glisse <marc.glisse@inria.fr>
134 * semantics.c (cxx_fold_indirect_ref): Don't create out-of-bounds
137 2013-11-26 Jakub Jelinek <jakub@redhat.com>
140 * parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
141 pass 2 instead of 0 to finish_function.
143 2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
146 * decl.c (grokdeclarator): Don't try to pass declarator->id_loc
147 to build_lang_decl_loc when declarator is null.
149 2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
151 * cvt.c (cp_convert_and_check): Avoid calling cp_convert
154 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
157 * decl.c (duplicate_decls): Enforce 8.3.6/6 about default arguments
158 for member functions of class templates.
160 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
163 * semantics.c (check_constexpr_ctor_body): Check for BIND_EXPR_VARS.
165 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
168 * decl.c (grokdeclarator): Don't handle qualified free functions here,
169 leave the diagnostic to grokfndecl.
171 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
174 * pt.c (unify): Don't call unify_array_domain with a NULL_TREE
178 * pt.c (apply_late_template_attributes): Check that TREE_VALUE
179 isn't NULL_TREE in the attribute_takes_identifier_p case.
181 2013-11-25 Adam Butcher <adam@jessamine.co.uk>
185 * parser.c (cp_parser_parameter_declaration_clause): Disallow implicit
186 function templates in local functions unless defining a lambda.
188 2013-11-23 Easwaran Raman <eraman@google.com>
191 * call.c (build_new_method_call_1): Comnpare function context
192 with BASELINK_BINFO type rather than instance type before
193 marking the call with LOOKUP_NONVIRTUAL.
195 2013-11-23 Jason Merrill <jason@redhat.com>
198 * init.c (build_aggr_init): Don't clobber the type of init
199 if we got an INIT_EXPR back from build_vec_init.
200 (build_vec_init): Do digest_init on trivial initialization.
202 2013-11-23 Alexander Ivchenko <alexander.ivchenko@intel.com>
205 * call.c (build_operator_new_call): Add flag_exceptions check.
206 * decl.c (compute_array_index_type): Ditto.
207 * init.c (build_new_1): Ditto.
208 (build_vec_init): Ditto.
210 2013-11-22 Jakub Jelinek <jakub@redhat.com>
212 * cp-gimplify.c: Include target.h and c-family/c-ubsan.h.
213 (cp_ubsan_maybe_instrument_return): New function.
214 (cp_genericize): Call it if -fsanitize=return.
216 * decl2.c: Include asan.h.
217 (one_static_initialization_or_destruction): If -fsanitize=address,
218 init is non-NULL and guard is NULL, set
219 vnode->dynamically_initialized.
220 (do_static_initialization_or_destruction): Call
221 __asan_{before,after}_dynamic_init around the static initialization.
223 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
225 * class.c: Add required include files from gimple.h.
226 * cp-gimplify.c: Likewise
229 * optimize.c: Likewise
231 * semantics.c: Likewise
234 * vtable-class-hierarchy.c: Likewise
236 2013-11-22 David Malcolm <dmalcolm@redhat.com>
238 * call.c (build_integral_nontype_arg_conv): Remove use of
239 EXPR_LOC_OR_HERE macro.
240 (convert_like_real): Likewise.
241 (convert_arg_to_ellipsis): Likewise.
242 (build_cxx_call): Likewise.
243 (perform_implicit_conversion_flags): Likewise.
244 (initialize_reference): Likewise.
245 * cvt.c (cp_convert_to_pointer): Likewise.
246 (convert_to_reference): Likewise.
247 (ocp_convert): Likewise.
248 (convert_to_void): Likewise.
249 * decl.c (pop_label): Update comment.
250 (pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
251 (check_tag_decl): Remove use of in_system_header macro.
252 (make_rtl_for_nonlocal_decl): Remove use of input_filename
254 (compute_array_index_type): Remove use of in_system_header
256 (grokdeclarator): Likewise.
257 * error.c (dump_global_iord): Remove use of input_filename
259 (location_of): Remove use of EXPR_LOC_OR_HERE macro.
260 (maybe_warn_cpp0x): Remove use of in_system_header macro.
261 * init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
262 * lex.c (handle_pragma_interface): Remove use of input_filename
264 (handle_pragma_implementation): Likewise.
265 (cxx_make_type): Likewise.
266 (in_main_input_context): Likewise.
267 * name-lookup.c (push_binding_level): Remove use of
269 (leave_scope): Likewise.
270 (resume_scope): Likewise.
271 * parser.c (cp_parser_unqualified_id): Remove use of
272 in_system_header macro.
273 (cp_parser_cast_expression): Likewise.
274 (cp_parser_declaration_seq_opt): Likewise.
275 (cp_parser_enumerator_list): Likewise.
276 (cp_parser_parameter_declaration_clause): Likewise.
277 (cp_parser_exception_specification_opt): Likewise.
278 * pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
280 (convert_nontype_argument): Likewise.
281 (push_tinst_level): Remove use of in_system_header macro.
282 (tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
284 (do_decl_instantiation): Remove use of in_system_header macro.
285 (do_type_instantiation): Likewise.
286 * semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
288 (begin_class_definition): Remove use of input_filename macro.
289 (cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
291 (cxx_eval_constant_expression): Likewise.
292 (potential_constant_expression_1): Likewise.
293 * typeck.c (decay_conversion): Likewise.
294 (rationalize_conditional_expr): Likewise.
295 (build_x_compound_expr_from_list): Likewise.
296 (convert_for_assignment): Likewise.
297 * typeck2.c (check_narrowing): Likewise.
299 2013-11-22 Trevor Saunders <tsaunders@mozilla.com>
301 * parser.c, semantics.c: Change some local variables from vec to
302 auto_vec or stack_vec.
304 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
306 * decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
308 (grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
311 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
313 * call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
314 tree_to_uhwi throughout.
316 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
318 * class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
319 Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
321 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
323 * decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
326 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
328 * error.c, init.c, parser.c, semantics.c: Replace
329 host_integerp (..., 0) with tree_fits_shwi_p throughout.
331 2013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
334 * decl.c (validate_constexpr_redeclaration): Redeclarations of
335 variables can differ in constexpr.
337 2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
340 * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
341 '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
343 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
345 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
346 * cp-cilkplus.c: New file.
347 * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
348 * parser.c (cp_parser_cilk_simd): New.
349 (cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
350 (cp_parser_jump_statement): Same.
351 (cp_parser_omp_for_cond): Add new argument.
352 Add case for NE_EXPR.
353 (cp_parser_omp_for_loop): Pass new argument to
354 cp_parser_omp_for_cond.
355 Handle CILK_SIMD nodes.
356 Abstract initilization code to..
357 (cp_parser_omp_for_loop_init): ...here.
358 (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
359 (cp_parser_cilk_simd_vectorlength): New.
360 (cp_parser_cilk_simd_linear): New.
361 (cp_parser_cilk_simd_clause_name): New.
362 (cp_parser_cilk_simd_all_clauses): New.
363 (cp_parser_cilk_simd): New.
364 * parser.h (IN_CILK_SIMD_FOR): New macro.
365 * pt.c (tsubst_expr): Add case for CILK_SIMD.
366 * typeck2.c (cxx_readonly_error): Pass location argument to
369 2013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
372 * parser.c (cp_parser_late_parsing_nsdmi): Call
373 maybe_begin_member_template_processing.
374 * pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
375 (inline_needs_template_parms): Adjust.
377 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
379 * class.c: Include only gimplify.h and gimple.h as needed.
380 * cp-gimplify.c: Likewise.
383 * optimize.c: Likewise.
385 * semantics.c: Likewise.
387 * vtable-class-hierarchy.c: Likewise.
389 2013-11-14 Diego Novillo <dnovillo@google.com>
391 * call.c: Include stor-layout.h.
393 Include stringpool.h.
394 * class.c: Include stringpool.h.
395 Include stor-layout.h.
397 * cp-gimplify.c: Include stor-layout.h.
398 * cvt.c: Include stor-layout.h.
399 * decl.c: Include stringpool.h.
400 Include stor-layout.h.
404 * decl2.c: Include stringpool.h.
407 Include stor-layout.h.
409 * error.c: Include stringpool.h.
410 * except.c: Include stringpool.h.
413 * init.c: Include stringpool.h.
415 * lambda.c: Include stringpool.h.
416 * lex.c: Include stringpool.h.
417 * mangle.c: Include stor-layout.h.
418 Include stringpool.h.
419 * method.c: Include stringpool.h.
421 * name-lookup.c: Include stringpool.h.
422 Include print-tree.h.
424 * optimize.c: Include stringpool.h.
425 * parser.c: Include print-tree.h.
426 Include stringpool.h.
429 * pt.c: Include stringpool.h.
432 Include stor-layout.h.
433 * ptree.c: Include print-tree.h.
434 * repo.c: Include stringpool.h.
435 * rtti.c: Include stringpool.h.
436 Include stor-layout.h.
437 * semantics.c: Include stmt.h.
439 Include stor-layout.h.
440 Include stringpool.h.
441 * tree.c: Include stor-layout.h.
442 Include print-tree.h.
443 Include tree-iterator.h.
444 * typeck.c: Include stor-layout.h.
446 * typeck2.c: Include stor-layout.h.
448 * vtable-class-hierarchy.c: Include stringpool.h.
449 Include stor-layout.h.
451 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
453 * class.c: Include gimplify.h.
454 * cp-gimplify.c: Likewise.
457 * optimize.c: Likewise.
459 * semantics.c: Likewise.
461 * vtable-class-hierarchy.c: Likewise.
462 * decl2.c: Don't include gimple.h.
463 * except.c: Likewise.
464 * method.c: Include pointer-set.h instead of gimple.h.
466 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
468 * pt.c (convert_generic_types_to_packs): New function to transform
469 a range of implicitly introduced non-pack template parms to be parameter
471 * cp-tree.h (convert_generic_types_to_packs): Declare.
472 * parser.c (cp_parser_parameter_declaration_list): If a function
473 parameter pack contains generic types, convert them to packs prior to
476 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
483 * parser.h (struct cp_parser): New members implicit_template_parms,
484 implicit_template_scope and auto_is_implicit_function_template_parm_p.
485 * parser.c (add_implicit_template_parms): Refactor as ...
486 (synthesize_implicit_template_parm): ... this to append a new template
487 type parm to the current template parameter list (introducing a new list
488 if necessary). Removed push_deferring_access_checks.
489 (finish_fully_implicit_template): Removed pop_deferring_access_checks.
490 (cp_parser_new): Initialize new cp_parser members.
491 (cp_parser_parameter_declaration_clause): Consider auto as implicit
492 template parm when parsing a parameter declaration (unless parsing an
493 explicit specialization).
494 (cp_parser_parameter_declaration_list): Remove local
495 implicit_template_parms counter and reset cp_parser implicit template
497 (cp_parser_lambda_expression): Reset implicit template cp_parser members
498 whilst generating lambda class.
499 (cp_parser_function_definition_after_declarator): Reset implicit
500 template cp_parser members whilst parsing function definition.
501 (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
502 better with template diagnostics.
503 (cp_parser_simple_type_specifier): Synthesize implicit template parm on
504 parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
506 * decl.c (grokdeclarator): ... that were previously done here.
508 2013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
511 * pt.c (lookup_template_class_1): Handle alias template declarations
512 of enumeration types.
514 2013-11-10 Paolo Carlini <paolo.carlini@oracle.com>
516 * cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
517 maybe_warn_zero_as_null_pointer_constant to avoid duplicate
518 -Wzero-as-null-pointer-constant diagnostics.
520 * typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
522 2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
525 * init.c (build_new_1): Don't call build_java_class_ref on non-class
528 2013-11-05 Jason Merrill <jason@redhat.com>
531 * decl.c (check_initializer): Don't use build_vec_init for arrays
534 2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
537 * name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
539 2013-11-05 Tobias Burnus <burnus@net-b.de>
541 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
542 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
543 cp_parser_omp_declare): Handle -fopenmp-simd.
545 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
547 * decl2.c (cpp_check): Change type of first parameter and deal with
550 2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
553 * parser.c (cp_parser_constructor_declarator_p): Check that the
554 class-name matches current_class_type.
556 2013-11-03 Marek Polacek <polacek@redhat.com>
558 * decl.c (cp_finish_decl): Move C++1y bounds checking...
559 (compute_array_index_type): ...here. Add VLA instrumentation.
560 Call stabilize_vla_size.
561 (grokdeclarator): Don't call stabilize_vla_size here.
563 2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
567 * parser.c (cp_parser_cast_expression): If we aren't looking at
568 a cast-expression don't call cp_parser_type_id.
569 (cp_parser_postfix_expression): Likewise for compound-literal.
570 (cp_parser_tokens_start_cast_expression): Adjust.
572 2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
575 * parser.c (make_string_pack): Discover non-const type and size
576 of character and build parm pack with correct type and chars.
578 2013-11-01 Trevor Saunders <tsaunders@mozilla.com>
580 * semantics.c (build_anon_member_initialization): Convert fields to be
583 2013-11-01 Marc Glisse <marc.glisse@inria.fr>
586 * pt.c (type_dependent_expression_p): Handle null argument.
588 2013-11-01 Jakub Jelinek <jakub@redhat.com>
590 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
591 check_dup_generic at the end, unless remove is true.
592 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
595 2013-10-31 Jakub Jelinek <jakub@redhat.com>
597 * semantics.c (finish_omp_clauses): Diagnose aligned clause
598 with decl that is not pointer nor array nor reference to those.
600 2013-10-31 Jason Merrill <jason@redhat.com>
602 * semantics.c (cxx_eval_call_expression): Handle trivial
603 value-initialization.
604 * typeck2.c (store_init_value): Call maybe_constant_init after
607 * decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
608 * decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
611 * parser.c (cp_parser_late_parse_one_default_arg): Set
612 TARGET_EXPR_DIRECT_INIT_P.
614 * class.c (type_build_ctor_call): Return early in C++98 mode.
615 (type_build_dtor_call): Likewise.
617 2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
621 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
624 * pt.c (most_specialized_class): Bump processing_template_decl for
627 2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
630 * call.c (build_over_call): Check return value of mark_used.
632 2013-10-30 Jason Merrill <jason@redhat.com>
634 * semantics.c (finish_compound_literal): Don't create a static variable
635 inside cp_unevaluated_operand.
637 * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
639 2013-10-30 Tobias Burnus <burnus@net-b.de>
642 * cp-tree.h (RANGE_FOR_IVDEP): Define.
643 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
644 finish_for_cond): Take 'bool ivdep' parameter.
645 * cp-array-notation.c (create_an_loop): Update call.
646 * init.c (build_vec_init): Ditto.
647 * pt.c (tsubst_expr): Ditto.
648 * parser.c (cp_parser_iteration_statement, cp_parser_for,
649 cp_parser_range_for, cp_convert_range_for): Update calls.
650 (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
651 * semantics.c (finish_while_stmt_cond, finish_do_stmt,
652 finish_for_cond): Optionally build ivdep annotation.
654 2013-10-30 Jason Merrill <jason@redhat.com>
656 * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
658 2013-10-29 David Malcolm <dmalcolm@redhat.com>
660 Patch autogenerated by refactor_symtab.py from
661 https://github.com/davidmalcolm/gcc-refactoring-scripts
662 revision 58bb219cc090b2f4516a9297d868c245495ee622
664 * call.c (mark_versions_used): Update for conversion of symtab types
665 to a true class hierarchy.
666 * decl2.c (cp_write_global_declarations): Likewise.
667 (clear_decl_external): Likewise.
668 (build_java_method_aliases): Likewise.
669 (collect_candidates_for_java_method_aliases): Likewise.
670 (mark_needed): Likewise.
671 (var_finalized_p): Likewise.
672 (maybe_make_one_only): Likewise.
673 (maybe_emit_vtables): Likewise.
674 * lambda.c (maybe_add_lambda_conv_op): Likewise.
675 * method.c (use_thunk): Likewise.
676 * optimize.c (maybe_clone_body): Likewise.
677 * tree.c (cp_fix_function_decl_p): Likewise.
679 2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
682 * decl2.c (grokfield): Handle auto like NSDMI.
684 2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
687 * pt.c (check_template_shadow): Don't skip declarations in inline
690 2013-10-25 Tobias Burnus <burnus@net-b.de>
693 * parser.c (cp_parser_iteration_statement,
694 cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
697 2013-10-24 Marek Polacek <polacek@redhat.com>
700 * typeck2.c (check_narrowing): Don't check narrowing when the scalar
701 initializer is empty.
703 2013-10-23 Jason Merrill <jason@redhat.com>
706 * method.c (defaulted_late_check): Delete on eh-spec mismatch.
707 (maybe_explain_implicit_delete): Explain it.
709 * error.c (eh_spec_to_string): New.
710 (cp_printer): Use it for %X.
712 In C++11 a trivial [cd]tor might not be callable.
713 * class.c (user_provided_p): A function deleted on its declation
714 in the class is not user-provided.
715 (type_build_ctor_call): Also force a ctor call if we
716 might have a deleted or private trivial ctor.
717 (type_build_dtor_call): New.
718 (deduce_noexcept_on_destructors): Remove obsolete code.
719 * cp-tree.h: Declare type_build_dtor_call.
720 * decl.c (expand_static_init): Make sure trivial dtors are callable.
721 (cxx_maybe_build_cleanup): Likewise.
722 * except.c (build_throw): Likewise.
723 * init.c (build_value_init): Handle trivial but not callable ctors.
724 (perform_target_ctor): Make sure trivial dtor is callable.
725 (perform_member_init): Likewise.
726 (expand_cleanup_for_base): Likewise.
727 (build_vec_delete_1): Likewise.
728 (build_delete): Likewise.
729 (push_base_cleanups): Likewise.
730 (build_new_1): Avoid redundant error.
731 * method.c (synthesized_method_walk): Can't ever exit early in C++11.
732 Always process the subobject destructor.
733 * semantics.c (finish_compound_literal): Make sure trivial dtor is
735 * typeck2.c (split_nonconstant_init): Likewise.
737 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
739 Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
740 * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
741 as [[gnu::deprecated]].
743 2013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
746 * pt.c (apply_late_template_attributes): Use get_attribute_name,
749 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
752 * pt.c (most_specialized_class): Bump processing_template_decl for
755 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
757 * parser.c (cp_parser_lookup_name): Tidy.
759 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
761 * parser.c: Include omp-low.h.
762 * semantics.c: Likewise.
764 2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
767 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
768 cp_unevaluated_operand case.
770 2013-10-16 Jason Merrill <jason@redhat.com>
772 * pt.c (apply_late_template_attributes): Use
773 attribute_takes_identifier_p.
775 * error.c (dump_exception_spec): Print "noexcept" rather than
779 * pt.c (unify_array_domain): Split out from unify.
780 (unify): Use it for list deduction, too.
783 * decl2.c (dump_tu): Split out from...
784 (cp_write_global_declarations): ...here. Call it in PCH mode.
786 2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
788 * pt.c (tsubst): Fix typo in last commit.
790 2013-10-16 Paulo Matos <pmatos@broadcom.com>
792 * error.c (code_to_string): Use new wrapper get_tree_code_name.
793 * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
794 * pt.c (tsubst): Likewise.
795 * semantics.c (cxx_eval_constant_expression,
796 potential_constant_expression_1): Likewise.
797 * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
798 add_substitution, find_substitution): Likewise.
800 2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
803 * parser.c (cp_parser_postfix_open_square_expression): Set
804 parser->greater_than_is_operator_p for the argument.
806 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
809 * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
810 (cp_parser_pseudo_destructor_name): Use it.
812 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
815 * pt.c (convert_nontype_argument): Set expr_type to
816 TREE_TYPE (probe_type).
818 2013-10-11 Jakub Jelinek <jakub@redhat.com>
820 * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
821 (declare_simd_adjust_this): New function.
822 (grokfndecl): If "omp declare simd" attribute is present,
823 call declare_simd_adjust_this if needed and
824 c_omp_declare_simd_clauses_to_numbers.
825 * cp-array-notation.c (expand_array_notation_exprs): Handle
827 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
828 OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
829 OMP_CLAUSE_REDUCTION.
830 (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
832 (cxx_omp_privatize_by_reference): Return true for
833 is_invisiref_parm decls.
834 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
836 * pt.c (apply_late_template_attributes): For "omp declare simd"
837 attribute call tsubst_omp_clauses,
838 c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
839 and c_omp_declare_simd_clauses_to_numbers.
840 (instantiate_class_template_1): Call cp_check_omp_declare_reduction
842 (tsubst_decl): Handle UDRs.
843 (tsubst_omp_clauses): Add declare_simd argument, if true don't
844 call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
845 Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
846 OMP_CLAUSE_REDUCTION.
847 (tsubst_expr): For UDRs call pushdecl and
848 cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
849 callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
850 OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
851 Adjust finish_omp_atomic caller.
852 (tsubst_omp_udr): New function.
853 (instantiate_decl): For UDRs at block scope, don't call
854 start_preparsed_function/finish_function. Call tsubst_omp_udr.
855 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
856 use it instead of need_default_ctor || need_copy_ctor.
857 (struct cp_check_omp_declare_reduction_data): New type.
858 (handle_omp_array_sections_1, handle_omp_array_sections,
859 omp_reduction_id, omp_reduction_lookup,
860 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
861 cp_check_omp_declare_reduction, clone_omp_udr,
862 find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
863 (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
865 (finish_omp_for): Add CODE argument, use it instead of hardcoded
866 OMP_FOR. Adjust c_finish_omp_for caller.
867 (finish_omp_atomic): Add seq_cst argument, adjust
868 c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
870 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
871 * decl2.c (mark_used): Force immediate instantiation of
872 DECL_OMP_DECLARE_REDUCTION_P decls.
873 (is_late_template_attribute): Return true for "omp declare simd"
875 (cp_omp_mappable_type): New function.
876 (cplus_decl_attributes): Add implicit "omp declare target" attribute
878 * parser.c (cp_debug_parser): Print
879 parser->colon_doesnt_start_class_def_p.
880 (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
882 (enum pragma_context): Add pragma_member and pragma_objc_icode.
883 (cp_parser_binary_expression): Handle no_toplevel_fold_p
884 even for binary operations other than comparison.
885 (cp_parser_linkage_specification): Call
886 cp_ensure_no_omp_declare_simd if needed.
887 (cp_parser_namespace_definition): Likewise.
888 (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
889 (cp_parser_direct_declarator): Pass declarator to
890 cp_parser_late_return_type_opt.
891 (cp_parser_late_return_type_opt): Add declarator argument,
892 call cp_parser_late_parsing_omp_declare_simd for declare simd.
893 (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
894 Parse UDRs before all other methods.
895 (cp_parser_member_specification_opt): Use pragma_member instead of
897 (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
898 (cp_parser_function_definition_from_specifiers_and_declarator,
899 cp_parser_save_member_function_body): Likewise.
900 (cp_parser_late_parsing_for_member): Handle UDRs specially.
901 (cp_parser_next_token_starts_class_definition_p): Don't allow
902 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
903 (cp_parser_objc_interstitial_code): Use pragma_objc_icode
904 instead of pragma_external.
905 (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
906 (cp_parser_omp_var_list_no_open): Parse array sections for
907 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
908 if non-NULL, allow parsing to end with a colon rather than close
910 (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
912 (cp_parser_omp_clause_reduction): Handle user defined reductions.
913 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
914 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
915 cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
916 cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
917 cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
918 cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
919 cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
920 cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
922 (cp_parser_omp_all_clauses): Add finish_p argument. Don't call
923 finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
924 (cp_parser_omp_atomic): Parse seq_cst clause, pass
925 true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
927 (cp_parser_omp_for_loop): Add CODE argument, pass it through
928 to finish_omp_for. Change last argument to cclauses,
929 and adjust uses to grab parallel clauses from the array of all
931 (cp_omp_split_clauses): New function.
932 (cp_parser_omp_simd): New function.
933 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
934 Allow the function to be called also when parsing combined constructs,
935 and call c_parser_omp_simd when parsing for simd.
936 (cp_parser_omp_sections_scope): If section-sequence doesn't start with
937 #pragma omp section, require exactly one structured-block instead of
938 sequence of statements.
939 (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
940 Allow the function to be called also when parsing combined constructs.
941 (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
942 Allow the function to be called also when parsing combined
944 (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
945 cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
946 cp_parser_omp_teams, cp_parser_omp_target_data,
947 cp_parser_omp_target_update, cp_parser_omp_target,
948 cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
949 cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
950 cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
951 cp_parser_omp_declare): New functions.
952 (cp_parser_omp_construct): Add p_name and mask vars. Handle
953 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
954 PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
955 and cp_parser_omp_sections callers.
956 (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
957 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
958 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
959 PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
960 Handle pragma_member and pragma_objc_icode like pragma_external.
961 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
962 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
963 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
964 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
966 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
967 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
968 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
969 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
970 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
971 * parser.h (struct cp_omp_declare_simd_data): New type.
972 (struct cp_parser): Add colon_doesnt_start_class_def_p and
973 omp_declare_simd fields.
974 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
975 * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
977 (DECL_OMP_DECLARE_REDUCTION_P): Define.
978 (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
979 (struct saved_scope): Add omp_declare_target_attribute field.
980 (cp_omp_mappable_type, omp_reduction_id,
981 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
982 finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
983 (finish_omp_for): Add CODE argument.
984 (finish_omp_atomic): Add seq_cst argument.
985 (cxx_omp_create_clause_info): Add need_dtor argument.
987 2013-10-09 Marek Polacek <polacek@redhat.com>
990 * semantics.c (finish_return_stmt): Return error_mark_node
991 when error_operand_p of the expr is true.
992 (build_transaction_expr): Check for EXPR_P before setting the
995 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
998 * lambda.c (begin_lambda_type): Check return value of xref_tag
999 for error_mark_node; tidy.
1000 * decl.c (grokdeclarator): Tweak error message.
1002 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
1006 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1009 * pt.c (tsubst): Use error_operand_p on parameter t.
1011 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
1014 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
1015 and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
1016 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
1017 messages about uninitialized const and references members to mention
1020 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
1023 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
1025 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1028 * typeck2.c (build_functional_cast): Use error_operand_p on exp.
1030 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1033 * parser.c (cp_parser_perform_range_for_lookup): If eventually
1034 either *begin or *end is type-dependent, return NULL_TREE.
1035 (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
1036 returns NULL_TREE, don't actually do_auto_deduction.
1038 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1041 * pt.c (tsubst): Use error_operand_p on parameter t.
1043 2013-10-04 Marc Glisse <marc.glisse@inria.fr>
1046 * decl.c (cxx_init_decl_processing): Set operator_new_flag.
1048 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1051 * decl2.c (save_template_attributes): Handle error_mark_node as
1053 (cp_check_const_attributes): Likewise for attributes.
1054 * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
1055 error_mark_node call cp_parser_skip_to_end_of_statement.
1057 2013-10-03 Easwaran Raman <eraman@google.com>
1060 * parser.c (cp_parser_init_declarator): Do not drop attributes
1061 of template member functions.
1063 2013-10-03 Marek Polacek <polacek@redhat.com>
1066 * init.c (sort_mem_initializers): Splice when giving an error.
1068 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
1071 * parser.c (cp_parser_function_specifier_opt): Upon error about
1072 virtual templates don't set ds_virtual.
1073 (finish_fully_implicit_template): Reject virtual implicit templates.
1075 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
1078 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
1080 2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
1083 * parser.c (cp_parser_lookup_name): Check make_typename_type return
1084 value for error_mark_node.
1086 2013-09-25 Tom Tromey <tromey@redhat.com>
1088 * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
1091 2013-09-25 Tom Tromey <tromey@redhat.com>
1093 * Make-lang.in (g++spec.o): Remove.
1094 (CFLAGS-cp/g++spec.o): New variable.
1095 (GXX_OBJS): Reference cp/g++spec.o.
1096 (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
1097 (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
1098 (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
1099 (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
1100 (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
1101 (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
1102 (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
1103 (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
1105 2013-09-25 Tom Tromey <tromey@redhat.com>
1107 * Make-lang.in (g++spec.o): Don't use subshell.
1109 2013-09-25 Marek Polacek <polacek@redhat.com>
1112 * semantics.c (finish_transaction_stmt): Check for EXPR_P before
1113 setting the expr location.
1115 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1118 * type-utils.h (find_type_usage): Only traverse one type level into
1119 member function pointers.
1121 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1123 * parser.c (cp_parser_init_declarator): Defer calling
1124 finish_fully_implicit_template for forward declarations until after
1125 other decl processing is complete. Cleanup for clarity: Extract 'else'
1126 case after 'if' containing unconditional return.
1128 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1130 * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
1131 rather than '__GenN'.
1133 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1135 * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
1136 callop in the case of generic lambdas.
1138 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1140 * parser.c (make_generic_type_name): Use global count rather than
1142 (add_implicit_template_parms): ... propagate interface change here.
1144 2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
1147 * pt.c (tsubst_copy): Use current_nonlambda_class_type to
1148 call tsubst_baselink.
1150 2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1153 * class.c (instantiate_type): Loosen a bit the gcc_assert.
1155 2013-09-18 Marek Polacek <polacek@redhat.com>
1158 * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
1159 Remove unnecessary check.
1161 2013-09-18 Marek Polacek <polacek@redhat.com>
1164 * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
1165 no_sanitize_undefined attribute.
1167 2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
1170 * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
1171 the cp_type_quals (r) too.
1173 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1175 * cp-tree.h (type_uses_auto_or_concept): Declare.
1176 (is_auto_or_concept): Declare.
1177 * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
1178 -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
1179 * type-utils.h: New header defining ...
1180 (find_type_usage): ... this new function based on pt.c (type_uses_auto)
1181 for searching a type tree given a predicate.
1182 * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
1183 (is_auto_or_concept): New function.
1184 (type_uses_auto_or_concept): New function.
1185 * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
1186 * parser.c (cp_parser_new): Initialize
1187 fully_implicit_function_template_p.
1188 (cp_parser_new): Initialize fully_implicit_function_template_p.
1189 (cp_parser_lambda_expression): Copy and restore value of
1190 fully_implicit_function_template_p as per other parser fields.
1191 (cp_parser_parameter_declaration_list): Count generic
1192 parameters and call ...
1193 (add_implicit_template_parms): ... this new function to synthesize them
1194 with help from type-utils.h (find_type_usage), ...
1195 (tree_type_is_auto_or_concept): ... this new static function and ...
1196 (make_generic_type_name): ... this new static function.
1197 (cp_parser_direct_declarator): Account for implicit template parameters.
1198 (cp_parser_lambda_declarator_opt): Finish fully implicit template if
1199 necessary by calling ...
1200 (finish_fully_implicit_template): ... this new function.
1201 (cp_parser_init_declarator): Likewise.
1202 (cp_parser_function_definition_after_declarator): Likewise.
1203 (cp_parser_member_declaration): Likewise.
1204 * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
1205 (cp/parser.o): Likewise.
1207 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1209 * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
1210 list with std=c++1y or std=gnu++1y.
1211 (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
1212 operator template to avoid adding template result to symbol table.
1213 * lambda.c (lambda_function): Return template result if call operator is
1215 (maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
1216 operator call building in order to support conversion of a non-capturing
1217 lambda template to a function pointer with help from ...
1218 (prepare_op_call): ... this new function.
1219 * decl2.c (check_member_template): Don't reject lambda call operator
1220 template in local [lambda] class.
1221 * pt.c (instantiate_class_template_1): Don't instantiate lambda call
1222 operator template when instantiating lambda class.
1224 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1226 * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
1228 2013-09-15 Jason Merrill <jason@redhat.com>
1232 * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
1233 * lambda.c (add_capture): Handle variadic capture.
1234 (add_default_capture, lambda_capture_field_type): Likewise.
1235 (build_capture_proxy, register_capture_members): Likewise.
1236 * pt.c (register_specialization): Allow FIELD_DECL.
1237 (retrieve_specialization): Likewise.
1238 (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
1239 (tsubst_pack_expansion): Handle FIELD_DECL packs.
1240 (gen_elem_of_pack_expansion_instantiation): Likewise.
1241 (instantiate_class_template_1): Likewise.
1242 (tsubst_decl, tsubst_copy): Likewise.
1243 (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
1244 (tsubst_copy_and_build) [VAR_DECL]: Likewise.
1245 * semantics.c (finish_non_static_data_member): Don't try to represent
1246 the type of a COMPOUND_REF of a FIELD_DECL pack.
1249 * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
1250 * cxx-pretty-print.c (direct_declarator): Adjust.
1251 * decl2.c (cp_build_parm_decl): Adjust.
1252 * pt.c (function_parameter_pack_p): Adjust.
1253 (find_parameter_packs_r, push_template_decl_real): Adjust.
1254 (tsubst_pack_expansion, tsubst_decl): Adjust.
1255 (regenerate_decl_from_template, instantiate_decl): Adjust.
1257 * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
1259 2013-09-13 Jason Merrill <jason@redhat.com>
1262 * pt.c (any_type_dependent_elements_p): Actually check for
1263 type-dependence, not value-dependence.
1265 2013-09-13 Jacek Caban <jacek@codeweavers.com>
1267 * decl.c: Use new cxx_implicit_extern_c hook
1269 2013-09-12 Brooks Moses <bmoses@google.com>
1272 * Make-lang.in: Do not install driver binaries in $(target)/bin.
1274 2013-09-12 Adam Butcher <adam@jessamine.co.uk>
1276 * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
1277 c_inhibit_evaluation_warnings. Reset if instantiating within a
1278 function-local template.
1280 2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
1282 * semantics.c (finish_pseudo_destructor_expr): Add location_t
1284 * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
1285 (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
1287 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1288 (cp_parser_postfix_expression): Pass the proper location to
1289 cp_parser_postfix_dot_deref_expression.
1290 * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
1292 2013-09-10 Jan Hubicka <jh@suse.cz>
1293 Paolo Carlini <paolo.carlini@oracle.com>
1295 * error.c (print_instantiation_partial_context_line): If
1296 loc == UNKNOWN_LOCATION return immediately.
1298 2013-09-09 Jakub Jelinek <jakub@redhat.com>
1301 * init.c (build_vec_delete): Call mark_rvalue_use on base.
1303 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1306 * init.c (build_vec_delete_1): When the type is incomplete emit a
1307 warning, enabled by default (not an error).
1308 (build_delete): Adjust to use OPT_Wdelete_incomplete.
1310 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1313 * error.c (location_of): Don't handle PARM_DECLs specially.
1315 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1317 * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
1318 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1319 Tweak, TREE_OPERAND (t, 1) may be null.
1321 2013-09-08 Caroline Tice <cmtice@google.com>
1324 * vtable-class-hierarchy.c (vtv_generate_init_routine): In
1325 preinit case, move call to assemble_vtv_preinit_initializer to
1326 after call to cgraph_process_new_functions.
1328 2013-09-08 Tom de Vries <tom@codesourcery.com>
1331 * except.c (build_must_not_throw_expr): Handle
1334 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1336 * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
1338 2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
1341 * class.c (finish_struct_anon_r): New.
1342 (finish_struct_anon): Use it.
1344 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1346 * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
1347 Declare as overrider.
1348 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
1349 Rename from pp_cxx_simple_type_specifier.
1350 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1351 simple_type_specifier.
1353 2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
1356 * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
1358 2013-09-03 Mike Stump <mikestump@comcast.net>
1360 * Make-lang.in (cp/lambda.o): Add dependencies.
1362 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1364 * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
1366 * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
1367 (pp_cxx_userdef_literal): Tidy.
1368 (pp_cxx_template_argument_list): Likewise.
1369 (pp_cxx_typeid_expression): Likewise.
1370 (pp_cxx_offsetof_expression_1): Likewise.
1371 (cxx_pretty_printer::postfix_expression): Likewise.
1372 (cxx_pretty_printer::unary_expression): Likewise.
1373 (cxx_pretty_printer::statement): Likewise.
1374 (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
1375 (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
1376 * error.c (dump_decl): Tidy.
1377 (dump_expr): Likewise.
1379 2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1381 PR c++/21682, implement DR 565
1382 * name-lookup.c (compparms_for_decl_and_using_decl): New.
1383 (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
1385 2013-08-30 Marek Polacek <polacek@redhat.com>
1387 * typeck.c (cp_build_binary_op): Add division by zero and shift
1389 * error.c (dump_expr): Special-case ubsan builtins.
1391 2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1394 * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
1395 * init.c (perform_target_ctor): Use it.
1396 * call.c (build_special_member_call): Diagnose self-delegating
1399 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1401 * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
1403 (cxx_pretty_printer::declaration_specifiers): Likewise.
1404 (cxx_pretty_printer::function_specifier): Likewise.
1405 (cxx_pretty_printer::declarator): Likewise.
1406 (cxx_pretty_printer::direct_declarator): Likewise.
1407 (cxx_pretty_printer::abstract_declarator): Likewise.
1408 (cxx_pretty_printer::direct_abstract_declarator): Likewise.
1409 (pp_cxx_declaration): Remove.
1410 * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
1411 Rename from pp_cxx_function_specifier. Adjust.
1412 (cxx_pretty_printer::declaration_specifiers): Rename from
1413 pp_cxx_decl_specifier_seq. Adjust.
1414 (cxx_pretty_printer::direct_declarator): Rename from
1415 pp_cxx_direct_declarator. Adjust.
1416 (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
1418 (cxx_pretty_printer::abstract_declarator): Rename from
1419 pp_cxx_abstract_declarator. Adjust.
1420 (cxx_pretty_printer::direct_abstract_declarator): Rename from
1421 pp_cxx_direct_abstract_declarator. Adjust.
1422 (cxx_pretty_printer::declaration): Rename from
1423 pp_cxx_declaration. Adjust.
1424 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1425 declaration, declaration_specifiers, function_specifier,
1426 declarator, direct_declarator, abstract_declarator,
1427 direct_abstract_declarator.
1428 * error.c (dump_decl): Adjust.
1430 2013-08-29 Jan Hubicka <jh@suse.cz>
1432 Correct previous patch to not mark terminate as LEAF.
1433 * class.c (build_vtbl_initializer): Drop LEAF
1434 * decl.c (cxx_init_decl_processing): Likewise.
1435 (push_throw_library_fn): Likewise.
1436 * except.c (init_exception_processing): Likewise.
1437 (do_begin_catch): Likewise.
1438 (do_end_catch): Likewise.
1439 (do_allocate_exception): Likewise.
1441 2013-08-29 Jan Hubicka <jh@suse.cz>
1443 * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
1444 ECF_NORETURN | ECF_LEAF
1445 * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
1446 push_library_fn, push_void_library_fn): Update prototype.
1447 * decl.c (build_library_fn_1): Remove.
1448 (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
1449 (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
1450 __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
1451 (build_library_fn_1): Add ecf_flags argument; rename to ...
1452 (build_library_fn): ... this one.
1453 (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
1454 (build_library_fn_ptr): Take ecf_flags.
1455 (build_cp_library_fn_ptr): Likewise.
1456 (push_library_fn): Likewise.
1457 (push_cp_library_fn): Likewise.
1458 (push_void_library_fn): Likewise.
1459 (push_throw_library_fn): All throws are ECF_NORETURN.
1460 (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
1461 (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
1462 __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
1463 * except.c (init_exception_processing): terminate is
1464 ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
1465 (declare_nothrow_library_fn): Add ecf_flags parameter.
1466 (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
1468 (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
1469 are ECF_NOTHROW | ECF_LEAF.
1470 (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
1472 (do_allocate_exception): _cxa_allocate_exception
1473 and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
1475 (do_free_exception): __cxa_free_exception is
1476 ECF_NOTHROW | ECF_LEAF.
1477 * rtti.c (build_dynamic_cast_1): __dynamic_cast
1478 is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
1480 2013-08-29 Adam Butcher <adam@jessamine.co.uk>
1482 * error.c (dump_lambda_function): New function, dependent on ...
1483 (dump_substitution): ... this new function, factored out of ...
1484 (subst_to_string): ... here and ...
1485 (dump_function_decl): ... here. Updated to early-out with call to
1486 dump_lambda_function after determining template bindings.
1488 2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1491 * init.c (build_aggr_init): When init == void_type_node do not
1492 set LOOKUP_ONLYCONVERTING.
1494 2013-08-27 Caroline Tice <cmtice@google.com>
1496 * vtable-class-hierarchy.c: Remove unnecessary include statements.
1497 (MAX_SET_SIZE): Remove unnecessary constant.
1498 (register_construction_vtables): Make vtable_ptr_array parameter
1499 into a vector; remove num_args parameter. Change array accesses to
1501 (register_other_binfo_vtables): Ditto.
1502 (insert_call_to_register_set): Ditto.
1503 (insert_call_to_register_pair): Ditto.
1504 (output_set_info): Ditto. Also change warning calls to warning_at
1505 calls, and fix format of warning messages.
1506 (register_all_pairs): Change vtbl_ptr_array from an array into a
1507 vector. Remove num_vtable_args (replace with calls to vector length).
1508 Change array stores & accesses to vector functions. Change calls to
1509 register_construction_vtables, register_other_binfo_vtables,
1510 insert_call_to_register_set, insert_call_to_register_pair and
1511 output_set_info to match their new signatures. Change warning to
1512 warning_at and fix the format of the warning message.
1514 2013-08-27 Jakub Jelinek <jakub@redhat.com>
1515 Aldy Hernandez <aldyh@redhat.com>
1517 * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
1519 2013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1521 * decl.c (grokfndecl): Remove old bison hack.
1523 2013-08-26 Jan Hubicka <jh@suse.cz>
1525 * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
1528 2013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1530 * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
1531 Declare as overrider.
1532 (cxx_pretty_printer::multiplicative_expression): Likewise.
1533 (cxx_pretty_printer::conditional_expression): Likewise.
1534 (cxx_pretty_printer::assignment_expression): Likewise.
1535 (cxx_pretty_printer::expression): Likewise.
1536 * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
1537 Rename from pp_cxx_unary_expression. Adjust.
1538 (cxx_pretty_printer::multiplicative_expression): Rename from
1539 pp_cxx_multiplicative_expression. Adjust.
1540 (cxx_pretty_printer::conditional_expression): Rename from
1541 pp_cxx_conditional_expression. Adjust.
1542 (cxx_pretty_printer::assignment_expression): Rename from
1543 pp_cxx_assignment_expression. Adjust.
1544 (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
1546 (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
1547 unary_expression, multiplicative_expression,
1548 conditional_expression, assignment_expression, expression.
1550 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1552 * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
1553 Declare as overrider.
1554 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1555 Rename from pp_cxx_postfix_expression. Adjust.
1556 (pp_cxx_expression): Use pp_postfix_expression.
1557 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1560 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1562 * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
1563 an overrider of c_pretty_printer::primary_expression.
1564 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
1565 Rename from pp_cxx_primary_expression. Adjust.
1566 (pp_cxx_postfix_expression): Use pp_primary_expression.
1567 (pp_cxx_ctor_initializer): Likewise.
1568 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1571 2013-08-23 Jan Hubicka <jh@suse.cz>
1573 * cp-tree.h (struct lang_type_class): Free is_final bit.
1574 (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
1575 (DECL_FINAL_P): Remove.
1576 * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
1577 is called on CLASS_TYPE_P.
1579 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1581 * cxx-pretty-print.c (M_): Remove.
1582 (pp_cxx_unqualified_id): Use translate_string instead of M_.
1583 (pp_cxx_canonical_template_parameter): Likewise.
1585 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1587 * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
1588 * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
1589 from pp_cxx_id_expression. Adjust.
1590 (pp_cxx_userdef_literal): Use pp_id_expression.
1591 (pp_cxx_primary_expression): Likewise.
1592 (pp_cxx_direct_declarator): Likewise.
1593 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1596 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1598 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
1599 function, overriding c_pretty_printer::constant.
1600 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
1601 pp_cxx_constant. Adjust.
1602 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
1604 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
1606 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
1607 destructor for the early printer.
1608 * error.c (type_to_string): Use pp_buffer.
1610 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1613 * class.c (check_field_decls): Check for const mutable and const
1614 reference data members.
1616 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1618 * error.c (init_error): Remove calls to pp_construct and
1619 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
1620 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1621 (cxx_pretty_printer_init): Remove.
1622 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1623 Rename from cxx_pretty_printer_init. Adjust.
1624 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1625 initialization of C++ diagnostics pretty printer.
1627 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1629 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1630 * cp-tree.h (REFERENCE_REF_P): Likewise.
1631 * semantics.c (finish_offsetof): Likewise.
1633 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1636 * semantics.c (finish_id_expression): Handle deprecated references.
1638 2013-08-20 Jason Merrill <jason@redhat.com>
1641 * cvt.c (build_expr_type_conversion): Don't complain about a
1642 template that can't match the desired type category.
1644 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
1646 * error.c (pp_ggc_formatted_text): New.
1647 (type_as_string): Use it in lieu of pp_formatted_text.
1648 (type_as_string_translate): Likewise.
1649 (expr_as_string): Likewise.
1650 (decl_as_string): Likewise.
1651 (decl_as_string_translate): Likewise.
1652 (lang_decl_name): Likewise.
1653 (decl_to_string): Likewise.
1654 (expr_to_string): Likewise.
1655 (fndecl_to_string): Likewise.
1656 (parm_to_string): Likewise.
1657 (type_to_string): Likewise.
1658 (args_to_string): Likewise.
1659 (subst_to_string): Likewise.
1661 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1664 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1665 check for truth values.
1666 (expand_array_notation_exprs): Added truth values case. Removed an
1667 unwanted else. Added for-loop to walk through subtrees in default
1669 * call.c (build_cxx_call): Inherited the type of the array notation for
1670 certain built-in array notation functions.
1672 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1674 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1675 Use cp_parser_lookup_name_simple.
1677 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1679 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1680 * name-lookup.c (pop_bindings_and_leave_scope): Define.
1681 * parser.c (cp_parser_lambda_declarator_opt,
1682 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1684 2013-08-17 Jason Merrill <jason@redhat.com>
1687 * name-lookup.c (push_class_level_binding_1): It's OK to push a
1688 lambda type after the enclosing type is complete.
1690 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1692 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1694 (dump_template_argument): Likewise.
1695 (dump_template_argument_list): Likewise.
1696 (dump_template_parameter): Likewise.
1697 (dump_template_bindings): Likewise.
1698 (dump_alias_template_specialization): Likewise.
1699 (dump_type): Likewise.
1700 (dump_typename): Likewise.
1701 (dump_aggr_type): Likewise.
1702 (dump_type_prefix): Likewise.
1703 (dump_type_suffix): Likewise.
1704 (dump_global_iord): Likewise.
1705 (dump_simple_decl): Likewise.
1706 (dump_decl): Likewise.
1707 (dump_template_decl): Likewise.
1708 (dump_function_decl): Likewise.
1709 (dump_parameters): Likewise.
1710 (dump_ref_qualifier): Likewise.
1711 (dump_exception_spec): Likewise.
1712 (dump_function_name): Likewise.
1713 (dump_template_parms): Likewise.
1714 (dump_call_expr_args): Likewise.
1715 (dump_aggr_init_expr_args): Likewise.
1716 (dump_expr_list): Likewise.
1717 (dump_expr_init_vec): Likewise.
1718 (dump_expr): Likewise.
1719 (dump_binary_op): Likewise.
1720 (dump_unary_op): Likewise.
1722 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1725 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1726 * decl.c (case_conversion): Use it.
1727 * call.c (standard_conversion): Likewise.
1728 (implicit_conversion): Adjust.
1730 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
1732 * pt.c: Grammar fix in comments ("it's" to "its").
1734 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1736 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1737 check_elaborated_type_specifier): Use error + inform.
1738 * friend.c (make_friend_class): Likewise.
1739 * semantics.c (finish_id_expression): Likewise.
1741 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1744 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1747 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1750 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1753 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1756 2013-08-06 Caroline Tice <cmtice@google.com>
1758 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
1760 (vtable-class-hierarchy.o): Add build rule.
1761 * cp-tree.h (vtv_start_verification_constructor_init_function): New
1762 extern function decl.
1763 (vtv_finish_verification_constructor_init_function): New extern
1765 (build_vtbl_address): New extern function decl.
1766 (get_mangled_vtable_map_var_name): New extern function decl.
1767 (vtv_compute_class_hierarchy_transitive_closure): New extern function
1769 (vtv_generate_init_routine): New extern function decl.
1770 (vtv_save_class_info): New extern function decl.
1771 (vtv_recover_class_info): New extern function decl.
1772 (vtv_build_vtable_verify_fndecl): New extern function decl.
1773 * class.c (finish_struct_1): Add call to vtv_save_class_info if
1774 flag_vtable_verify is true.
1775 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1776 * vtable-class-hierarchy.c: New file.
1777 * mangle.c (get_mangled_vtable_map_var_name): New function.
1778 * decl2.c (start_objects): Update function comment.
1779 (cp_write_global_declarations): Call vtv_recover_class_info,
1780 vtv_compute_class_hierarchy_transitive_closure and
1781 vtv_build_vtable_verify_fndecl, before calling
1782 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1783 flag_vtable_verify is true.
1784 (vtv_start_verification_constructor_init_function): New function.
1785 (vtv_finish_verification_constructor_init_function): New function.
1786 * init.c (build_vtbl_address): Remove static qualifier from function.
1788 2013-08-06 Jason Merrill <jason@redhat.com>
1791 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1793 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
1796 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1797 (cp_build_binary_op): Adjust.
1799 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1801 * cxx-pretty-print.h (pp_c_base): Remove.
1802 (cxx_pretty_printer): Derive from c_pretty_printer.
1803 Adjust macros using pp_c_base.
1804 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1805 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1806 (pp_cxx_colon_colon): Likewise.
1807 (pp_cxx_separate_with): Likewise.
1808 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1809 (pp_cxx_expression_list): Likewise.
1810 (pp_cxx_space_for_pointer_operator): Likewise.
1811 (pp_cxx_init_declarator): Likewise.
1812 (pp_cxx_call_argument_list): Likewise.
1813 (pp_cxx_constant): Likewise.
1814 (pp_cxx_postfix_expression): Likewise.
1815 (pp_cxx_new_expression): Likewise.
1816 (pp_cxx_unary_expression): Likewise.
1817 (pp_cxx_cast_expression): Likewise.
1818 (pp_cxx_conditional_expression): Likewise.
1819 (pp_cxx_assignment_expression): Likewise.
1820 (pp_cxx_expression): Likewise.
1821 (pp_cxx_function_specifier): Likewise.
1822 (pp_cxx_decl_specifier_seq): Likewise.
1823 (pp_cxx_simple_type_specifier): Likewise.
1824 (pp_cxx_type_specifier_seq): Likewise.
1825 (pp_cxx_ptr_operator): Likewise.
1826 (pp_cxx_parameter_declaration_clause): Likewise.
1827 (pp_cxx_direct_declarator): Likewise.
1828 (pp_cxx_direct_abstract_declarator): Likewise.
1829 (pp_cxx_type_id): Likewise.
1830 (pp_cxx_statement): Likewise.
1831 (pp_cxx_pretty_printer_init): Tidy.
1832 * error.c (init_error): Do not use pp_base.
1833 (dump_aggr_type): Likewise.
1834 (dump_type_prefix): Likewise.
1835 (dump_type_suffix): Likewise.
1836 (dump_global_iord): Likewise.
1837 (dump_decl): Likewise.
1838 (dump_function_decl): Likewise.
1839 (dump_ref_qualifier): Likewise.
1840 (reinit_cxx_pp): Likewise.
1841 (decl_as_dwarf_string): Likewise.
1842 (lang_decl_dwarf_name): Likewise.
1843 (type_to_string): Likewise.
1844 (cv_to_string): Likewise.
1845 (cxx_print_error_function): Likewise.
1846 (cp_diagnostic_starter): Likewise.
1847 (cp_diagnostic_finalizer): Likewise.
1848 (cp_print_error_function): Likewise.
1849 (print_instantiation_context): Likewise.
1850 (cp_printer): Likewise.
1852 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1854 * error.c (dump_type_prefix): Use specialized pretty printer
1855 functions instead of pp_string or operators and punctuators.
1856 (dump_decl): Likewise.
1857 (dump_expr): Likewise.
1859 2013-08-03 Jason Merrill <jason@redhat.com>
1862 * pt.c (get_underlying_template): New.
1863 (convert_template_argument, lookup_template_class_1): Use it.
1867 * pt.c (pack_expansion_args_count): Rename from
1868 any_pack_expanson_args_p.
1869 (coerce_template_parms): Reject pack expansion to
1870 non-pack template parameter of alias template.
1872 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1874 * error.c (dump_aggr_type): Use specialized pretty printer
1875 functions instead of pp_character.
1876 (dump_type_prefix): Likewise.
1877 (dump_simple_decl): Likewise.
1878 (type_to_string): Likewise.
1880 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1882 * cp-tree.h (finish_stmt): Do not declare.
1883 * decl.c (finish_stmt): Do not define.
1884 * parser.c (cp_parser_expression_statement,
1885 cp_parser_declaration_statement,
1886 cp_parser_transaction_cancel): Don't call finish_stmt.
1887 * semantics.c (finish_expr_stmt, finish_if_stmt,
1888 finish_while_stmt, finish_do_stmt, finish_return_stmt,
1889 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1890 finish_transaction_stmt): Likewise.
1892 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
1895 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1896 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1897 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1898 instead of issuing an error without mentioning the conflicting
1901 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1903 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1904 return value for error_mark_node.
1906 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1909 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1910 token->type == CPP_ELLIPSIS.
1912 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1915 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1917 2013-07-29 Jason Merrill <jason@redhat.com>
1920 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1921 Use break_out_target_exprs instead of unshare_expr.
1923 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
1926 * call.c (initialize_reference): Don't crash when reference_binding
1927 returns a conv with conv->kind == ck_ambig.
1929 2013-07-29 Jason Merrill <jason@redhat.com>
1931 * mangle.c (write_name): Check for null context.
1932 (write_unscoped_name): Allow PARM_DECL context.
1934 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1937 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1938 (grokparms): Adjust.
1939 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1940 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1941 a tsubst_flags_t parameter.
1942 (tsubst_decl): Adjust.
1943 * call.c (convert_default_arg): Likewise.
1944 * cp-tree.h (check_default_argument, tsubst_default_argument):
1945 Update declarations.
1947 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1950 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1951 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1952 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1953 Fix string_len management, tidy.
1955 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1958 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1959 target type is incomplete; return a bool, not an int.
1960 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1962 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
1964 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1965 tf_warning_or_error.
1967 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
1969 * class.c: Fix typos.
1970 * cp-array-notation.c: Likewise.
1971 * cp-objcp-common.c: Likewise.
1974 * mangle.c: Likewise.
1975 * parser.c: Likewise.
1977 * semantics.c: Likewise.
1979 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
1981 * semantics.c (build_lambda_expr),
1982 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1983 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1984 (is_normal_capture_proxy), (insert_capture_proxy),
1985 (insert_pending_capture_proxies), (lambda_proxy_type),
1986 (build_capture_proxy), (vla_capture_type),
1987 (register_capture_members), (add_default_capture),
1988 (lambda_expr_this_capture), (maybe_resolve_dummy),
1989 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1990 (is_lambda_ignored_entity): Moved definitions into ...
1991 * lambda.c: ... this new file.
1993 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
1995 * call.c (build_conditional_expr_1): Handle the case with 1 vector
1996 and 2 scalars. Call save_expr before building a vector.
1997 * typeck.c (cp_build_binary_op): Check complain before complaining.
1999 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
2002 * init.c (build_aggr_init): Check for warn_unused attribute.
2003 * decl.c (poplevel): Likewise.
2005 2013-07-13 Jason Merrill <jason@redhat.com>
2008 * init.c (build_vec_init): Use {} for arrays of class type.
2009 (build_vec_delete): Don't take the address of the array.
2012 * class.c (layout_class_type): Check for too-large class.
2014 * call.c (can_convert): Allow user-defined conversions.
2015 (can_convert_standard): New.
2016 * cp-tree.h: Declare it.
2017 * cvt.c (convert_to_reference): Use it.
2018 * pt.c (convert_nontype_argument): Likewise.
2019 * search.c (check_final_overrider): Likewise.
2020 Don't worry about user-defined conversions.
2022 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
2025 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
2026 warn about casting between pointer-to-function and pointer-to-object.
2028 2013-07-09 Jason Merrill <jason@redhat.com>
2031 * init.c (build_vec_init): Don't take shortcuts when initializing
2035 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
2038 * semantics.c (finish_id_expression): Return the id for an
2039 unevaluated outer variable.
2042 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
2043 if the variable type uses 'auto'.
2046 * typeck.c (check_return_expr): Lambda proxies aren't eligible
2047 for nrv or return by move.
2050 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
2051 a ref-qualifier in C++98 mode.
2054 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
2055 argument to have the exact type of the parameter.
2058 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
2059 a POINTER_PLUS_EXPR for type punning diagnostic.
2062 * pt.c (tsubst_copy): Handle USING_DECL.
2064 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
2067 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
2069 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
2072 * call.c (build_conditional_expr_1): Preserve xvalues.
2074 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
2077 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
2078 also check declares_class_or_enum.
2080 2013-07-08 Jason Merrill <jason@redhat.com>
2083 * pt.c (fn_type_unification): Only defer during substitution.
2084 (type_unification_real): Defer during defarg substitution,
2085 add checks parm to pass back deferred checks.
2086 (unify, do_auto_deduction): Adjust.
2087 * semantics.c (reopen_deferring_access_checks): New.
2088 * cp-tree.h: Declare it.
2090 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
2093 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
2094 set parser->default_arg_ok_p to false before cp_parser_declarator.
2096 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
2099 * class.c (build_base_path): Improve diagnostic.
2101 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
2104 * decl.c (start_preparsed_function): Return a bool, false if
2105 push_template_decl fails.
2106 (start_function): Adjust.
2107 * cp-tree.h: Update.
2109 2013-07-03 Jakub Jelinek <jakub@redhat.com>
2112 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
2113 Temporarily set parser->greater_than_is_operator_p for
2114 cp_parser_expression and restore from saved value afterwards.
2116 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
2118 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
2119 * parser.c (cp_parser_operator()): Parse user-defined string
2120 literal as literal operator.
2122 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
2125 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
2126 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
2129 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2131 * parser.c (cp_parser_array_notation): Removed rejection array notation
2132 of type function pointers. Added handling of array expressions when
2133 Cilk Plus is enabled. Took out type-checking.
2134 (cp_parser_postfix_open_square_expression): Moved normal array expr.
2135 parsing into cp_parser_array_notation when cilkplus is enabled.
2136 (cp_parser_compound_statement): Removed expansion of array notations.
2137 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
2138 (cp_parser_function_definition_after_declarator): Likewise.
2139 (cp_parser_selection_statement): Removed error reporting.
2140 (cp_parser_iteration_statement): Likewise.
2141 (cp_parser_direct_declarator): Removed error checking/reporting if
2142 array notations are used in the declarator.
2143 * pt.c (instantiate_decl): Likewise.
2144 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
2145 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
2146 (potential_constant_expression_1): Returned false for
2147 ARRAY_NOTATION_REF case.
2148 * cp-gimplify.c (cp_genericize): Added expansion of array notation
2150 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
2151 parameters. Replaced build_decls with get_temp_regvar with type as
2153 (create_array_refs): Made the type-casting to ptrdiff_type.
2154 (replace_invariant_var): Added a check for void return type before
2155 creating new var. Replaced build_decl and build_min_nt_loc with
2157 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
2158 with gcc_unreachable. Removed few unwanted checks. Made induction
2159 variable type as ptrdiff_type. Removed loc and complain arguments
2160 passed into make_triplet_val_inv. Replaced all modify expression's
2161 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
2162 into stmt. list with the non-forceful one. Replaced some integer
2163 conversion and equality-checking to using tree_int_cst_equal.
2164 (expand_sec_reduce_builtin): All changes mentioned in above function
2165 expand_an_in_modify_expr. Made the new variable type of
2166 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
2167 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
2168 the error reporting from parser to this function. Removed unwanted
2169 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
2170 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
2171 in function pointers.
2172 (cp_expand_cond_array_notations): Added a new if statements to check
2173 if condition has a zero rank. If so, then just return.
2174 (expand_return_expr): Added a check for return expressions with a rank.
2175 Replaced get_tmp_regvar with a create_temporary_var.
2176 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
2177 Moved common code outside if-statements. Moved type-checking from
2179 * semantics.c (finish_return_stmt): Removed a check for return exprs.
2181 * call.c (convert_like_real): Removed a check for array notation
2182 expression in a function.
2183 (build_over_call): Likewise.
2184 (magic_varargs_p): Added a check for builtin array notation function.
2185 Made this function non-static and removed its prototype.
2186 * cp-tree.h (magic_varargs_p): New prototype.
2187 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
2188 nargs to the param->length when builtin reduction function is used.
2189 (convert_arguments): Replaced check for a constant_p function with
2190 margic_varargs_p function call.
2191 (cp_build_binary_op): Removed calling of the function
2192 find_correct_array_notation_type.
2193 (cp_build_addr_expr_1): Removed an unwanted if-statement.
2194 (convert_for_assignment): Removed automatic return of rhs when array
2195 notation builtin function is used.
2197 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
2200 * parser.c (cp_parser_save_member_function_body): Handle correctly
2201 curly braces in function-try-block mem-initializers.
2203 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
2206 * typeck.c (cp_build_vec_perm_expr): New function.
2207 * cp-tree.h: Declare it.
2208 * parser.c (cp_parser_postfix_expression): Call it.
2209 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
2210 (tsubst_copy_and_build): Likewise.
2212 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
2215 * pt.c (more_specialized_fn): If both arguments are references,
2216 give priority to an lvalue.
2218 2013-06-26 Jason Merrill <jason@redhat.com>
2220 * typeck2.c (store_init_value): Diagnose a non-constant
2221 initializer for in-class static.
2224 * semantics.c (add_capture): Set type to error_mark_node after
2227 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
2230 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
2231 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
2233 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2235 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
2236 * class.c (add_implicitly_declared_members): Likewise.
2237 (check_field_decl): Likewise.
2238 (finalize_literal_type_property): Likewise.
2239 (check_bases_and_members): Likewise.
2240 * decl.c (poplevel): Likewise.
2241 (case_conversion): Likewise.
2242 (check_initializer): Likewise.
2243 (grokfndecl): Likewise.
2244 (check_static_variable_definition): Likewise.
2245 (compute_array_index_type): Likewise.
2246 (grokdeclarator): Likewise.
2247 (build_enumerator): Likewise.
2248 * friend.c (make_friend_class): Likewise.
2249 * lex.c (init_reswords): Likewise.
2250 * method.c (synthesized_method_walk): Likewise.
2251 (implicitly_declare_fn): Likewise.
2252 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
2253 (cp_parser_constant_expression): Likewise.
2254 (cp_parser_for_init_statement): Likewise.
2255 (cp_parser_block_declaration): Likewise.
2256 (cp_parser_type_name): Likewise.
2257 (cp_parser_enum_specifier): Likewise.
2258 (cp_parser_enumerator_list): Likewise.
2259 (cp_parser_member_declaration): Likewise.
2260 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
2261 (cp_parser_template_declaration_after_export): Likewise.
2262 * pt.c (convert_nontype_argument_function): Likewise.
2263 (convert_nontype_argument): Likewise.
2264 (convert_template_argument): Likewise.
2265 (tsubst_copy_and_build): Likewise.
2266 (build_non_dependent_expr): Likewise.
2267 * semantics.c (non_const_var_error): Likewise.
2268 (potential_constant_expression_1): Likewise.
2269 * tree.c (lvalue_kind): Likewise.
2270 (build_vec_init_expr): Likewise.
2271 (cast_valid_in_integral_constant_expression_p): Likewise.
2272 * typeck.c (build_x_conditional_expr): Likewise.
2273 * typeck2.c (check_narrowing): Likewise.
2275 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2277 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
2278 (expand_an_in_modify_expr): Changed a function call from the above
2279 removed function to length_mismatch_in_expr_p.
2281 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2283 * call.c (convert_like_real): Added a check if array notation is present
2284 in expression. If so, then no conversion of arguments is necessary.
2285 (build_over_call): Likewise.
2286 * typeck.c (cp_build_function_call_vec): Likewise.
2287 (convert_for_assignment): Likewise.
2288 (cp_build_array_ref): Reject array notations with a rank greater than 1
2289 as an array's index.
2290 (cp_build_binary_op): If array notations are preent in op, then call
2291 find_correct_array_notation_type.
2292 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
2293 * cp-array-notation.c: New file.
2294 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
2296 * cp-tree.h (fix_array_notation_exprs): New prototype.
2297 * semantics.c (finish_return_stmt): Reject array notations as
2299 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
2300 (potential_constant_expression_1): Likewise.
2301 * tree.c (lvalue_kind): Likewise.
2302 * error.c (dump_decl): Likewise.
2303 (dump_expr): Likewise.
2304 * pt.c (ARRAY_NOTATION_REF): Likewise.
2305 (type_unification_real): Do not unify any arguments if array notations
2307 (instantiate_decl): Added a check for array notaitons inside the
2308 function body. If so, then expand them.
2309 * parser.c (cp_parser_array_notation): New function.
2310 (cp_parser_postfix_open_square_expression): Added a check for colons
2311 inside square braces. If found, then handle the array access as an
2312 array notation access. Also, disable auto-correction from a single
2313 colon to scope when Cilk Plus is enabled.
2314 (cp_parser_compound_statement): Added a check for array notations
2315 inside the statement. If found, then expand them.
2316 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
2317 (cp_parser_function_definition_after_declarator): Likewise.
2318 (cp_parser_selection_statement): Searched for array notations inside
2319 condition. If so, then emit an error.
2320 (cp_parser_iteration_statement): Likewise.
2321 (cp_parser_direct_declarator): Reject array notations inside a
2322 variable or array declaration.
2323 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
2325 2013-06-20 Jason Merrill <jason@redhat.com>
2328 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
2329 context if we're in C++14 mode.
2330 * tree.c (array_of_runtime_bound_p): Return true for a dependent
2331 bound that is not potentually constant.
2332 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
2333 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
2334 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
2335 (build_capture_proxy): Set REFERENCE_VLA_OK.
2336 (vla_capture_type): Make it a proper C++ class.
2337 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
2340 * decl.c (compute_array_index_type): Use size_one_node.
2342 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
2343 a partial specialization.
2344 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
2346 (most_specialized_class): Adjust.
2348 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
2349 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
2350 TEMPLATE_DECL_CHECK.
2352 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2355 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
2356 TREE_TYPE (arg), not arg itself.
2358 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
2361 * pt.c (type_dependent_expression_p): Handle an array of unknown
2362 bound depending on a variadic parameter.
2363 * parser.c (cp_parser_range_for): Revert PR56794 changes.
2365 2013-06-17 Richard Biener <rguenther@suse.de>
2367 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
2369 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
2372 * parser.c (cp_parser_expression_statement): Check whether
2373 cp_parser_expression returns error_mark_node.
2375 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2378 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
2380 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2383 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
2384 accessible base simply forward to build_static_cast.
2386 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2389 * decl.c (poplevel): For the benefit of -Wunused-variable see
2392 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2394 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2396 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2399 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
2400 again diagnostic already emitted by cp_parser_lookup_name.
2402 2013-06-11 Jan Hubicka <jh@suse.cz>
2405 * cp/pt.c (mark_decl_instantiated): Do not export explicit
2406 instantiations of anonymous namespace templates.
2408 2013-06-10 Jason Merrill <jason@redhat.com>
2410 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
2411 namespace to static_decls.
2413 2013-06-07 Sriraman Tallam <tmsriram@google.com>
2416 * call.c (build_over_call): Check if current_function_decl is
2419 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
2422 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
2423 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2425 2013-06-06 Jason Merrill <jason@redhat.com>
2428 * semantics.c (add_capture): Diagnose capture of variable-size
2429 type that is not a C++1y array of runtime bound.
2431 * decl.c (grokdeclarator): Keep a decl with error type.
2432 (grokfield, grokbitfield): Likewise.
2433 * pt.c (instantiate_class_template_1): Likewise.
2434 (tsubst_decl): Drop redundant error.
2435 * class.c (walk_subobject_offsets): Handle erroneous fields.
2436 * typeck2.c (process_init_constructor_record): Likewise.
2438 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
2441 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
2442 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2444 2013-06-03 Jan Hubicka <jh@suse.cz>
2446 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
2447 mark_decl_referenced.
2448 (mark_needed): Likewise.
2450 2013-06-03 Jason Merrill <jason@redhat.com>
2452 * class.c (mark_type_abi_tags): New.
2453 (check_abi_tags): Use it.
2455 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2458 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
2459 * semantics.c (finish_qualified_id_expr): Use it.
2460 * cp-tree.h: Update.
2462 2013-06-01 Jan Hubicka <jh@suse.cz>
2464 * decl2.c (cp_write_global_declarations): Replace same_body_alias
2465 by symbol.cpp_implicit_alias.
2467 2013-05-30 Jason Merrill <jason@redhat.com>
2470 * cp-lang.c (cp_classify_record): Handle structs without
2474 * class.c (common_enclosing_class): New.
2475 * cp-tree.h: Declare it.
2476 * init.c (sort_mem_initializers): Don't splice out a union member
2479 2013-05-29 Jan Hubicka <jh@suse.cz>
2481 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
2482 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2484 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
2487 * decl2.c (check_classfn): Check for destructors declared as member
2490 2013-05-24 Jason Merrill <jason@redhat.com>
2493 * pt.c (any_template_arguments_need_structural_equality_p): A
2494 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2496 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
2499 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
2500 with width exceeding the type.
2502 2013-05-24 Jason Merrill <jason@redhat.com>
2505 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
2506 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2508 2013-05-23 Jason Merrill <jason@redhat.com>
2511 * tree.c (build_ref_qualified_type): Clear
2512 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2514 2013-05-22 Jason Merrill <jason@redhat.com>
2517 * call.c (convert_like_real): Use cp_convert_and_check.
2518 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
2519 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
2520 (potential_constant_expression_1): Handle OMP_ATOMIC*.
2523 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
2526 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2529 * parser.c (cp_parser_conversion_type_id): Set up
2530 parser->type_definition_forbidden_message before calling
2531 cp_parser_type_specifier_seq.
2533 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2536 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
2537 warnings about defaulted functions.
2539 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
2541 * call.c (build_conditional_expr_1): Add location_t parameter.
2542 (build_conditional_expr): Likewise.
2543 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
2544 get_member_function_from_ptrfunc, build_x_conditional_expr,
2545 cp_build_modify_expr): Update.
2546 * init.c (build_new_1): Likewise.
2547 * cp-tree.h: Update declaration.
2549 2013-05-20 Jason Merrill <jason@redhat.com>
2552 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
2556 * decl.c (fndecl_declared_return_type): Also look in
2557 DECL_SAVED_FUNCTION_DATA.
2559 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2562 * parser.c (cp_parser_parameter_declaration): Check return value
2563 of cp_parser_parse_and_diagnose_invalid_type_name.
2565 2013-05-20 Jason Merrill <jason@redhat.com>
2568 * class.c (vbase_has_user_provided_move_assign): New.
2569 * method.c (synthesized_method_walk): Check it.
2570 * cp-tree.h: Declare it.
2573 * tree.c (build_cplus_array_type): Copy layout info if element
2576 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2579 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2581 2013-05-20 Jason Merrill <jason@redhat.com>
2584 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
2585 whether a template has its own args.
2587 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2590 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2592 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2595 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
2596 instead of cp_parser_initializer_list for compound-literals.
2598 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
2601 * typeck.c (check_return_expr): Reverse the alignment comparison.
2603 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
2606 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
2607 correctly sizeof compound-literal; update comments.
2609 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
2611 * call.c (build_conditional_expr_1): Use cp_build_binary_op
2612 instead of directly calling fold_build2.
2614 2013-05-16 Jason Merrill <jason@redhat.com>
2616 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2619 * decl.c (grokdeclarator): Allow member function qualifiers in
2620 TYPENAME context in C++11 mode.
2622 2013-05-16 Dodji Seketeli <dodji@redhat.com>
2624 PR c++/56782 - Regression with empty pack expansions
2625 * pt.c (use_pack_expansion_extra_args_p): When at least a
2626 parameter pack has an empty argument pack, and another parameter
2627 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2630 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2632 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2633 warning_at and permerror with warning_at/inform and permerror/
2634 inform, respectively.
2636 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2639 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2642 2013-05-14 Jason Merrill <jason@redhat.com>
2645 * parser.c (cp_parser_range_for): Call complete_type.
2648 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2650 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2653 * method.c (defaulted_late_check): Check for compatible exception
2654 specification out of class explicitly defaulted functions too.
2656 2013-05-14 Jason Merrill <jason@redhat.com>
2659 * semantics.c (potential_constant_expression_1): Make sure the
2660 called function is potentially constant.
2661 * call.c (null_ptr_cst_p): Revert earlier change.
2663 2013-05-13 Jason Merrill <jason@redhat.com>
2666 * call.c (null_ptr_cst_p): An expression with side-effects can't
2667 be a C++03 null pointer constant.
2670 * decl.c (reshape_init_class): Handle error_mark_node.
2673 * typeck.c (merge_types): Propagate ref-qualifier
2674 in METHOD_TYPE case.
2677 * decl.c (grokdeclarator): Apply ref-qualifier
2678 in the TYPENAME case.
2681 * decl.c (decls_match): Compare ref-qualifiers.
2683 2013-05-10 Jason Merrill <jason@redhat.com>
2686 * pt.c (convert_template_argument): Use dependent_template_arg_p,
2687 not uses_template_parms.
2690 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2693 * semantics.c (add_capture): Error rather than abort on copy
2695 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2696 warn about capture proxy.
2698 2013-05-09 Jason Merrill <jason@redhat.com>
2700 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2703 * pt.c (lookup_template_class_1): Handle getting a template
2704 template parameter as D1.
2706 N3639 C++1y VLA diagnostics
2707 * decl.c (grokdeclarator): Complain about reference, pointer, or
2709 (create_array_type_for_decl): Complain about array of VLA.
2710 * pt.c (tsubst): Likewise.
2711 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2712 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2713 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2714 (cxx_sizeof_or_alignof_type): Likewise.
2716 N3639 C++1y VLA support
2717 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2718 (check_array_initializer): Allow VLA init.
2719 (reshape_init_array_1): Adjust.
2720 (cp_finish_decl): Check for invalid VLA length.
2721 * typeck2.c (process_init_constructor_array): Adjust.
2722 (store_init_value): Use build_vec_init for VLAs.
2723 * semantics.c (add_capture): Capture VLA as ptr+len.
2724 (vla_capture_type): New.
2725 (build_capture_proxy): Rebuild the VLA.
2726 * typeck.c (build_simple_component_ref): Split out from...
2727 (build_ptrmemfunc_access_expr): ...here.
2728 * tree.c (array_of_runtime_bound_p): New.
2729 * init.c (throw_bad_array_length): New.
2730 (build_vec_init): Use it.
2731 * parser.c (cp_convert_range_for): When iterating over a VLA,
2732 use it directly rather than bind a reference.
2733 * cp-tree.h: Declare new functions.
2735 2013-05-08 Jason Merrill <jason@redhat.com>
2737 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2738 variably_modified_type_p.
2739 (expand_start_catch_block): Mark the typeinfo used here.
2740 * semantics.c (finish_handler_parms): Not here.
2742 * error.c (dump_type_suffix): Try harder on VLA length.
2745 * init.c (throw_bad_array_new_length): New.
2746 (build_new_1): Use it. Don't warn about braced-init-list.
2747 (build_vec_init): Use it.
2748 * call.c (build_operator_new_call): Use it.
2751 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2752 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2753 * error.c (maybe_warn_cpp0x): s/0x/11/.
2755 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2758 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2761 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
2763 * typeck.c (cp_build_binary_op): Call save_expr before
2764 build_vector_from_val.
2766 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2769 * decl.c (cp_finish_decl): After do_auto_deduction copy the
2770 qualifers with cp_apply_type_quals_to_decl.
2772 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
2774 * pt.c (convert_nontype_argument): Add missing whitespace in
2777 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2780 * decl.c (build_enumerator): Improve error message.
2782 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2785 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2786 messages for template types and fix column numbers.
2788 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2791 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2792 c_inhibit_evaluation_warnings around build_x_modify_expr call.
2794 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2797 * semantics.c (finish_decltype_type): Handle instantiated template
2800 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2803 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2805 2013-04-26 Jakub Jelinek <jakub@redhat.com>
2807 * error.c (cp_print_error_function): Adjust file_name_as_prefix
2810 2013-04-25 Jason Merrill <jason@redhat.com>
2813 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2816 * init.c (perform_member_init): Call reshape_init.
2818 2013-04-24 Jason Merrill <jason@redhat.com>
2821 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2823 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2825 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2826 pedwarn to simply use OPT_Wpointer_arith.
2827 (cp_build_unary_op): Likewise.
2829 2013-04-24 Jason Merrill <jason@redhat.com>
2831 N3648: init-captures are named.
2832 * semantics.c (add_capture): Don't prepend "__" to init-captures.
2833 (build_capture_proxy): Adjust.
2834 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2836 N3648: Allow braced and parenthesized initializers.
2837 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2838 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2839 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2840 (add_capture): Collapse a parenthesized initializer into a single
2842 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2844 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2847 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2848 * semantics.c (finish_qualified_id_expr): Likewise.
2849 (finish_id_expression): Update.
2850 * typeck.c (cp_build_addr_expr_1): Likewise.
2851 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2852 * cp-tree.h: Update declarations.
2854 2013-04-22 Jason Merrill <jason@redhat.com>
2857 * parser.c (cp_parser_unqualified_id): Handle ~auto.
2858 (cp_parser_pseudo_destructor_name): Likewise.
2859 (cp_parser_postfix_dot_deref_expression): Adjust.
2860 (cp_lexer_nth_token_is_keyword): New.
2861 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2862 * typeck.c (lookup_destructor): Handle ~auto.
2864 * pt.c (fn_type_unification): Push tinst level around
2865 type_unification_real if we aren't explaining.
2866 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2867 * error.c (dump_function_decl): Respect it.
2868 (subst_to_string): Pass it.
2871 * rtti.c (get_typeid): Diagnose qualified function type.
2872 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2874 * error.c (dump_aggr_type): Fix lambda detection.
2875 (dump_simple_decl): Pretty-print capture field.
2878 * cvt.c (build_expr_type_conversion): Two conversions that return
2879 the same type aren't necessarily ambiguous.
2882 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2883 pedwarn unconditional except in C++1y mode.
2885 * semantics.c (potential_constant_expression_1): Don't crash on
2889 * semantics.c (finish_id_expression): Reject capture of anonymous
2893 * decl2.c (check_default_args): Check for pack expansion.
2895 * mangle.c (write_type): Mangle decltype(auto).
2897 2013-04-19 Jason Merrill <jason@redhat.com>
2899 N3638 changes to return type deduction
2900 * decl.c (undeduced_auto_decl): New.
2901 (require_deduced_type): New.
2902 (fndecl_declared_return_type): New.
2903 (decls_match): Use it.
2904 (duplicate_decls): Don't check for auto return.
2905 (grokdeclarator): Reject virtual auto.
2906 * class.c (resolve_address_of_overloaded_function): Handle
2907 auto function templates.
2908 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2909 * cp-tree.h: Declare new fns.
2910 * error.c (dump_function_decl): Use fndecl_declared_return_type.
2911 * search.c (check_final_overrider): Likewise.
2912 * pt.c (make_decltype_auto): New.
2913 (do_auto_deduction): Require plain decltype(auto).
2917 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2918 template specializations.
2920 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
2922 Implement n3599 - Literal operator templates for strings.
2923 * parser.c (make_string_pack (tree value)): New function.
2924 (cp_parser_userdef_string_literal (cp_token *)): Use it
2925 to construct calls to character string literal operator templates.
2926 (cp_parser_template_declaration_after_export): Check for new string
2927 literal operator template parameter form.
2929 2013-04-15 Jason Merrill <jason@redhat.com>
2931 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2934 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2935 rather than a destructor name, it isn't an unqualified-name.
2936 (tsubst_copy_and_build): Pass down decltype_flag to operator
2940 * semantics.c (insert_capture_proxy): Just use index 1 in the
2943 2013-04-12 Jakub Jelinek <jakub@redhat.com>
2945 * error.c (cp_print_error_function,
2946 print_instantiation_partial_context_line,
2947 maybe_print_constexpr_context): Colorize locus strings.
2949 2013-04-11 Jason Merrill <jason@redhat.com>
2952 * parser.c (complain_flags): New.
2953 (cp_parser_postfix_expression): Use it.
2954 (cp_parser_unary_expression): Likewise.
2955 (cp_parser_binary_expression): Likewise.
2956 (cp_parser_assignment_expression): Likewise.
2957 (cp_parser_expression): Likewise.
2958 (cp_parser_postfix_open_square_expression): Take decltype_p.
2959 (cp_parser_builtin_offsetof): Adjust.
2960 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2961 * decl2.c (grok_array_decl): Add decltype_p parm.
2962 * cp-tree.h: Adjust prototype.
2963 * semantics.c (finish_unary_op_expr): Add complain parm.
2965 2013-04-11 Jakub Jelinek <jakub@redhat.com>
2968 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2969 calling maybe_constant_value for C++98.
2971 2013-04-11 Jason Merrill <jason@redhat.com>
2974 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2975 Strip references before checking WILDCARD_TYPE_P.
2977 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2979 * call.c (build_conditional_expr_1, build_over_call): Protect
2980 error calls with complain & tf_error.
2981 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2982 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2983 build_ptrmemfunc): Likewise.
2984 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2986 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2987 (convert_to_reference): Adjust.
2989 2013-04-11 Jason Merrill <jason@redhat.com>
2991 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2992 local variables, look them up instead.
2993 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2994 proxies and substitution in unevaluated context.
2995 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2996 before the iterators.
2999 * pt.c (uses_deducible_template_parms): New.
3000 (deducible_array_bound, deducible_expression): New.
3001 (deducible_template_args): New.
3002 (unify_one_argument): Call uses_deducible_template_parms.
3004 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
3007 * typeck2.c (build_m_component_ref): Protect error calls with
3008 (complain & tf_error).
3010 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
3013 * parser.c (cp_parser_enum_specifier): Check for empty
3014 anonymous enums and anonymous scoped enums.
3016 2013-04-10 Jakub Jelinek <jakub@redhat.com>
3019 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
3020 first before calling maybe_constant_value for warn_for_div_by_zero
3021 or invalid shift count warning purposes.
3023 2013-04-09 Jason Merrill <jason@redhat.com>
3026 * rtti.c (build_typeid): Check the address of the argument
3027 rather than looking for an INDIRECT_REF.
3029 2013-04-04 Jason Merrill <jason@redhat.com>
3033 * typeck2.c (abstract_virtuals_error_sfinae): Disable
3034 complete_type again.
3036 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
3039 * decl.c (validate_constexpr_redeclaration): Allow an explicit
3040 specialization to be different wrt the constexpr specifier.
3042 2013-04-06 Jason Merrill <jason@redhat.com>
3044 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
3047 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
3049 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
3050 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
3052 2013-04-03 Jason Merrill <jason@redhat.com>
3054 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
3055 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
3056 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
3058 * mangle.c (write_type): When writing a function type with
3059 function-cv-quals, don't add the unqualified type as a
3060 substitution candidate.
3062 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3065 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
3068 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3071 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
3072 from args to new_args.
3073 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
3074 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
3076 2013-04-02 Jason Merrill <jason@redhat.com>
3079 * mangle.c (write_function_type): Mangle ref-qualifier.
3080 (write_nested_name): Likewise.
3081 (canonicalize_for_substitution): Preserve ref-qualifier.
3082 (write_type): Likewise.
3085 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
3087 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
3089 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
3090 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
3091 (for_each_template_parm_r): Use TYPE_TI_ARGS.
3093 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
3095 * cp-tree.h (TAGGED_TYPE_P): Remove.
3096 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
3097 (TYPE_ANONYMOUS_P): Adjust.
3098 * call.c (build_new_op_1): Likewise.
3099 * class.c (find_abi_tags_r): Likewise.
3100 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
3101 type_is_deprecated): Likewise.
3102 * decl2.c (grokfield, min_vis_r): Likewise.
3103 * pt.c (get_template_info): Likewise.
3104 * tree.c (handle_abi_tag_attribute): Likewise.
3106 2013-04-01 Jason Merrill <jason@redhat.com>
3108 * semantics.c (maybe_constant_value): Check
3109 instantiation_dependent_expression_p.
3110 * pt.c (build_non_dependent_expr): Don't check it here.
3113 * init.c (build_new): Don't try to process an array initializer
3114 at template definition time.
3117 * typeck.c (finish_class_member_access_expr): Handle enum scope.
3120 * parser.c (cp_parser_range_for): Don't try to do auto deduction
3121 in a template if the type of the range is incomplete.
3123 * call.c (add_function_candidate): Take the address of 'this' here.
3124 (build_over_call): And here.
3125 (build_new_method_call_1, build_op_call_1): Not here.
3126 (build_user_type_conversion_1): Or here.
3127 (add_candidates): Adjust.
3129 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
3130 * class.c (same_signature_p): Use type_memfn_quals.
3131 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
3132 FUNCTION_OR_METHOD_TYPE_CHECK.
3133 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
3134 * pt.c (unify): Use static_fn_type.
3136 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
3137 Jason Merrill <jason@redhat.com>
3139 Implement N2439 (ref-qualifiers for 'this')
3140 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
3141 (FUNCTION_RVALUE_QUALIFIED): New.
3142 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
3143 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
3144 (cp_ref_qualifier): New enum.
3145 (cp_declarator): Add ref_qualifier.
3146 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
3147 (cp_parser_direct_declarator): Use it.
3148 (make_call_declarator): Adjust.
3149 (cp_parser_lambda_declarator_opt): Adjust.
3150 * call.c (add_function_candidate): Handle ref-qualifier overload
3151 resolution semantics.
3152 (standard_conversion): Adjust.
3153 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
3154 * decl.c (grokdeclarator): Handle ref-qualifiers.
3155 (grokfndecl): Check for invalid ref-qualifiers.
3156 (static_fn_type, revert_static_member_fn): Adjust.
3157 * decl2.c (build_memfn_type): Handle ref-qualifiers.
3158 (check_classfn): Check them.
3159 (cp_reconstruct_complex_type): Retain them.
3160 * error.c (dump_ref_qualifier): New.
3161 (dump_type_suffix, dump_function_decl): Use it.
3162 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
3163 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
3164 (unify): Retain them.
3165 * tree.c (cp_check_qualified_type): New.
3166 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
3167 (build_ref_qualified_type): New.
3168 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
3169 (cp_build_type_attribute_variant): Keep ref-qualifier.
3170 * typeck.c (merge_types): Keep ref-qualifier.
3171 (structural_comptypes): Compare ref-qualifier.
3172 (type_memfn_rqual): New.
3173 (apply_memfn_quals): Take ref-qual argument.
3174 * typeck2.c (build_m_component_ref): Check ref-qualifier.
3176 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
3178 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
3179 (DECL_FUNCTION_TEMPLATE_P): Adjust.
3181 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
3182 pp_cxx_qualified_id): Use get_containing_scope.
3183 * parser.c (cp_parser_class_head): Likewise.
3184 * pt.c (push_template_decl_real): Likewise.
3186 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
3187 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
3189 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
3191 * decl2.c (collect_candidates_for_java_method_aliases): Use
3193 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
3194 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
3195 * decl.c (duplicate_decls): Likewise.
3196 * parser.c (cp_parser_template_declaration_after_export): Likewise,
3197 also DECL_DECLARES_TYPE_P.
3198 * pt.c (instantiate_class_template_1): Likewise.
3199 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
3200 (lookup_field_r): Likewise.
3201 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
3202 (lookup_fnfields_slot_nolazy): Likewise.
3203 * semantics.c (finish_member_declaration): Likewise.
3204 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
3206 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3208 * pt.c (template_parms_to_args): Fix typo in comment.
3210 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
3212 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
3214 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
3216 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
3217 (build_op_call_1): Likewise.
3218 (build_over_call): Likewise.
3219 (compare_ics): Likewise.
3220 * class.c (build_base_path): Likewise.
3221 (resolve_address_of_overloaded_function): Likewise.
3222 * cp-tree.h: Likewise.
3223 * cvt.c (cp_convert_to_pointer): Likewise.
3224 (convert_to_reference): Likewise.
3225 (ocp_convert): Likewise.
3226 (convert_force): Likewise, tidy.
3227 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
3228 (pp_cxx_ptr_operator): Likewise.
3229 * decl.c (duplicate_decls): Likewise.
3230 (start_decl): Likewise.
3231 (grok_op_properties): Likewise.
3232 (start_preparsed_function): Likewise.
3233 (store_parm_decls): Likewise.
3234 (finish_function): Likewise.
3235 * decl2.c (delete_sanity): Likewise.
3236 (acceptable_java_type): Likewise.
3237 (grokbitfield): Likewise.
3238 (cp_reconstruct_complex_type): Likewise.
3239 * error.c (dump_type_prefix): Likewise.
3240 (dump_expr): Likewise.
3241 * except.c (push_eh_cleanup): Likewise.
3242 (complete_ptr_ref_or_void_ptr_p): Likewise.
3243 (can_convert_eh): Likewise.
3244 * init.c (build_new_1): Likewise.
3245 (build_delete): Likewise.
3246 (build_vec_delete): Likewise.
3247 * mangle.c (write_type): Likewise.
3248 * parser.c (lookup_literal_operator): Likewise.
3249 * pt.c (convert_nontype_argument_function): Likewise.
3250 (convert_nontype_argument): Likewise.
3253 (dependent_type_p_r): Likewise.
3254 * rtti.c (build_headof): Likewise.
3255 (build_typeid): Likewise.
3256 (build_dynamic_cast_1): Likewise.
3257 (target_incomplete_p): Likewise.
3258 (typeinfo_in_lib_p): Likewise.
3259 * semantics.c (finish_omp_for): Likewise.
3260 (cxx_eval_call_expression): Likewise.
3261 (maybe_resolve_dummy): Likewise.
3262 * tree.c (build_target_expr): Likewise.
3263 (cp_build_qualified_type_real): Likewise.
3264 * typeck.c (composite_pointer_type_r): Likewise.
3265 (composite_pointer_type): Likewise.
3266 (comp_except_types): Likewise.
3267 (cxx_sizeof_nowarn): Likewise.
3268 (string_conv_p): Likewise.
3269 (cp_build_array_ref): Likewise.
3270 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
3271 (pointer_diff): Likewise.
3272 (cp_build_addr_expr_1): Likewise.
3273 (cp_build_unary_op): Likewise.
3274 (build_static_cast_1): Likewise.
3275 (cp_build_c_cast): Likewise.
3276 (comp_ptr_ttypes_real): Likewise.
3277 (ptr_reasonably_similar): Likewise.
3278 (comp_ptr_ttypes_const): Likewise.
3279 (casts_away_constness): Likewise.
3280 (check_literal_operator_args): Likewise.
3281 * typeck2.c (build_x_arrow): Likewise.
3282 (add_exception_specifier): Likewise.
3284 2013-03-29 Jason Merrill <jason@redhat.com>
3287 * cp-tree.h (AUTO_IS_DECLTYPE): New.
3288 * parser.c (cp_parser_decltype): Handle decltype(auto).
3289 (cp_parser_type_id_1): Allow auto without a late-specified
3291 (cp_parser_primary_expression): Use the return value of
3292 finish_parenthesized_expr.
3293 (cp_parser_transaction_expression): Likewise.
3294 * semantics.c (force_paren_expr): New.
3295 (finish_parenthesized_expr): Use it.
3296 * call.c (build_conditional_expr_1): Likewise.
3297 * pt.c (do_auto_deduction): Handle decltype(auto).
3298 (tsubst_copy): Handle PAREN_EXPR.
3299 (tsubst_copy_and_build): Likewise.
3300 * error.c (dump_expr): Handle PAREN_EXPR.
3301 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
3302 * mangle.c (write_expression): Ignore PAREN_EXPR.
3304 * parser.c (cp_parser_decltype_expr): Split out...
3305 (cp_parser_decltype): ...from here.
3309 * pt.c (unify_pack_expansion): Fix indexing.
3311 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3313 * call.c (build_java_interface_fn_ref): Likewise.
3314 (make_temporary_var_for_ref_to_temp): Likewise.
3315 * class.c (check_field_decls): Likewise.
3316 (layout_class_type): Likewise.
3317 (finish_struct_1): Likewise.
3318 (fixed_type_or_null): Likewise.
3319 (get_vtbl_decl_for_binfo): Likewise.
3320 * cp-gimplify.c (omp_var_to_track): Likewise.
3321 (cp_genericize_r): Likewise.
3322 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
3323 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
3324 (DECL_DISCRIMINATOR_P): Likewise.
3325 * decl.c (poplevel): Likewise.
3326 (decls_match): Likewise.
3327 (duplicate_decls): Likewise.
3328 (decl_jump_unsafe): Likewise.
3329 (start_decl): Likewise.
3330 (check_for_uninitialized_const_var): Likewise.
3331 (make_rtl_for_nonlocal_decl): Likewise.
3332 (cp_finish_decl): Likewise.
3333 (expand_static_init): Likewise.
3334 (local_variable_p): Likewise.
3335 (maybe_register_incomplete_var): Likewise.
3336 * decl2.c (grokfield): Likewise.
3337 (comdat_linkage): Likewise.
3338 (determine_visibility): Likewise.
3339 (import_export_decl): Likewise.
3340 (prune_vars_needing_no_initialization): Likewise.
3341 (decl_maybe_constant_var_p): Likewise.
3342 * error.c (dump_simple_decl): Likewise.
3343 (dump_template_decl): Likewise.
3344 (cp_printer): Likewise.
3345 * except.c (build_throw): Likewise.
3346 * init.c (build_vtbl_address): Likewise.
3347 (member_init_ok_or_else): Likewise.
3348 (build_aggr_init): Likewise.
3349 (expand_aggr_init_1): Likewise.
3350 (build_offset_ref): Likewise.
3351 (constant_value_1): Likewise.
3352 * mangle.c (write_mangled_name): Likewise.
3353 (write_prefix): Likewise.
3354 * name-lookup.c (supplement_binding_1): Likewise.
3355 (add_decl_to_level): Likewise.
3356 (pushdecl_maybe_friend_1): Likewise.
3357 (check_for_out_of_scope_variable): Likewise.
3358 (validate_nonmember_using_decl): Likewise.
3359 (lookup_name_innermost_nonclass_level_1): Likewise.
3360 (lookup_arg_dependent_1): Likewise.
3361 * parser.c (cp_parser_lambda_introducer): Likewise.
3362 (cp_parser_template_argument): Likewise.
3363 (cp_parser_single_declaration): Likewise.
3364 * pt.c (convert_nontype_argument): Likewise.
3365 (instantiate_class_template_1): Likewise.
3366 (tsubst_decl): Likewise.
3367 (tsubst_expr): Likewise.
3368 (do_decl_instantiation): Likewise.
3369 (do_type_instantiation): Likewise.
3370 (regenerate_decl_from_template): Likewise.
3371 (always_instantiate_p): Likewise.
3372 (instantiate_decl): Likewise.
3373 (type_dependent_expression_p): Likewise.
3374 (build_non_dependent_expr): Likewise.
3375 * repo.c (repo_emit_p): Likewise.
3376 * rtti.c (build_dynamic_cast_1): Likewise.
3377 * search.c (shared_member_p): Likewise.
3378 * semantics.c (outer_var_p): Likewise.
3379 (finish_id_expression): Likewise.
3380 (finish_omp_clauses): Likewise.
3381 (finish_decltype_type): Likewise.
3382 (ensure_literal_type_for_constexpr_object): Likewise.
3383 * tree.c (lvalue_kind): Likewise.
3384 (bot_replace): Likewise.
3385 (cp_tree_equal): Likewise.
3386 (handle_init_priority_attribute): Likewise.
3387 (decl_storage_duration): Likewise.
3388 * typeck.c (cxx_sizeof_expr): Likewise.
3389 (cxx_alignof_expr): Likewise.
3390 (decay_conversion): Likewise.
3391 (build_class_member_access_expr): Likewise.
3392 (cp_build_array_ref): Likewise.
3393 (cxx_mark_addressable): Likewise.
3394 (maybe_warn_about_returning_address_of_local): Likewise.
3395 (check_return_expr): Likewise.
3396 * typeck2.c (cxx_readonly_error): Likewise.
3397 (abstract_virtuals_error_sfinae): Likewise.
3398 (cxx_incomplete_type_diagnostic): Likewise.
3400 2013-03-28 Lawrence Crowl <crowl@google.com>
3403 (CXX_PARSER_H): Add header dependence.
3405 (extern debug (cp_binding_level &)): New.
3406 (extern debug (cp_binding_level *)): New.
3408 (debug (cp_binding_level &)): New.
3409 (debug (cp_binding_level *)): New.
3411 (debug (cp_parser &)): New.
3412 (debug (cp_parser *)): New.
3413 (debug (cp_token &)): New.
3414 (debug (cp_token *)): New.
3415 (debug (vec<cp_token, va_gc> &)): New.
3416 (debug (vec<cp_token, va_gc> *)): New.
3417 * parser.c: Add header dependence.
3418 (extern debug (cp_parser &)): New.
3419 (extern debug (cp_parser *)): New.
3420 (extern debug (cp_token &)): New.
3421 (extern debug (cp_token *)): New.
3422 (extern debug (vec<cp_token, va_gc> &)): New.
3423 (extern debug (vec<cp_token, va_gc> *)): New.
3425 2013-03-28 Jason Merrill <jason@redhat.com>
3429 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
3430 the type if tf_decltype is set.
3431 * pt.c (fn_type_unification): Add decltype_p parm.
3432 (get_bindings): Adjust.
3433 * cp-tree.h: Adjust.
3434 * class.c (resolve_address_of_overloaded_function): Adjust.
3435 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
3438 * parser.c (cp_parser_sizeof_pack): Split out from...
3439 (cp_parser_sizeof_operand): ...here. Require (id).
3442 * semantics.c (finish_this_expr): 'this' is an rvalue.
3443 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
3446 * semantics.c (finish_member_declaration): Don't push closure
3449 * name-lookup.c (pushdecl_maybe_friend_1): Use
3450 nonlambda_method_basetype and current_nonlambda_class_type.
3453 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
3454 conversion from integer to pointer.
3455 (cxx_eval_constant_expression): Likewise.
3456 (cxx_eval_indirect_ref): Use the folded operand if we still think
3457 this might be constant.
3459 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3460 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3463 * call.c (convert_like_real): Change series of two permerrors
3464 to permerror + inform (and likewise for two errors).
3465 (build_new_method_call_1): Likewise.
3466 * typeck.c (convert_for_initialization): Change additional
3467 warning or error to inform.
3469 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3471 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
3472 (first_aggr_init_expr): Likewise.
3473 (more_aggr_init_expr_args_p): Likewise.
3474 (type_of_this_parm): Likewise.
3475 (class_of_this_parm): Likewise.
3476 * name-lookup.h (get_global_value_if_present): Likewise.
3477 (is_typename_at_global_scope): Likewise.
3479 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3481 * call.c (joust): Don't call inform for a permerror returning false.
3482 * parser.c (cp_parser_check_class_key): Likewise.
3483 * pt.c (tsubst_copy_and_build): Likewise.
3485 2013-03-27 Jason Merrill <jason@redhat.com>
3488 * semantics.c (finish_qualified_id_expr): Return early
3491 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3493 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
3494 * cvt.c (convert_to_void): Likewise.
3495 * error.c (dump_expr): Likewise.
3496 * mangle.c (write_expression): Likewise.
3497 * parser.c (cp_parser_template_argument): Likewise.
3498 * pt.c (convert_nontype_argument): Likewise.
3499 (tsubst_copy_and_build): Likewise.
3500 * rtti.c (build_typeid): Likewise.
3501 * semantics.c (finish_call_expr): Likewise.
3502 (finish_decltype_type): Likewise.
3503 (build_data_member_initialization): Likewise.
3504 * tree.c (is_dummy_object): Likewise.
3505 * typeck.c (decay_conversion): Likewise.
3506 (build_class_member_access_expr): Likewise.
3507 (cp_build_addr_expr_1): Likewise.
3508 (unary_complex_lvalue): Likewise.
3509 (check_return_expr): Likewise.
3510 * typeck2.c (cxx_readonly_error): Likewise.
3512 2013-03-26 Jason Merrill <jason@redhat.com>
3515 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
3516 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
3517 * cp-tree.h: Adjust prototype.
3520 * typeck2.c (build_m_component_ref): Handle prvalue object.
3522 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3524 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
3525 * decl.c (duplicate_decls): Likewise.
3526 (cp_finish_decl): Likewise.
3527 (check_class_member_definition_namespace): Likewise.
3528 * decl2.c (grokfield): Likewise.
3529 (decl_needed_p): Likewise.
3530 (import_export_decl): Likewise.
3531 (mark_used): Likewise.
3532 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
3533 * pt.c (push_access_scope): Likewise.
3534 (instantiate_decl): Likewise.
3535 * ptree.c (cxx_print_decl): Likewise.
3536 * repo.c (repo_emit_p): Likewise.
3537 * semantics.c (note_decl_for_pch): Likewise.
3538 * tree.c (decl_linkage): Likewise.
3540 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3543 * decl.c (check_array_designated_initializer): Handle CONST_DECL
3546 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3548 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
3551 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
3553 2013-03-25 Jason Merrill <jason@redhat.com>
3556 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
3557 class is derived from the type of the object.
3560 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
3561 unevaluated context.
3563 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
3566 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
3567 DECL_TEMPLATE_INSTANTIATION.
3569 2013-03-22 Jason Merrill <jason@redhat.com>
3572 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
3575 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3577 * cp-tree.h (identifier_p): New.
3578 * call.c: Throughout, call identifier_p insstead of direct
3579 comparaison of TREE_CODE against IDENTIFIER_NODE.
3580 * decl.c: Likewisse.
3581 * decl2.c: Likewise.
3583 * mangle.c: Likewise.
3584 * name-lookup.c: Likewise.
3585 * parser.c: Likewise.
3587 * search.c: Likewise.
3588 * semantics.c: Likewise.
3590 * typeck.c: Likewise.
3591 * typeck2.c: Likewise.
3593 2013-03-21 Jakub Jelinek <jakub@redhat.com>
3596 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
3597 * call.c (build_temp): Likewise.
3598 * method.c (synthesize_method): Likewise.
3599 * typeck.c (convert_for_initialization): Likewise.
3601 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
3603 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
3605 2013-03-21 Richard Biener <rguenther@suse.de>
3607 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
3608 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3610 2013-03-20 Jason Merrill <jason@redhat.com>
3613 * parser.c (cp_parser_late_return_type_opt): Save and restore
3614 current_class_ptr/ref.
3617 * expr.c (cplus_expand_constant): Do nothing if the class is
3619 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3620 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3621 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3622 (complete_vars): Likewise.
3624 * name-lookup.c (get_anonymous_namespace_name): Never use
3625 get_file_function_name.
3627 * pt.c (retrieve_specialization): Handle null tmpl argument.
3631 * pt.c (tsubst_decl): Check return value of register_specialization.
3632 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3635 2013-03-17 Jason Merrill <jason@redhat.com>
3639 * parser.c (cp_parser_direct_declarator): Bail if we see a
3640 qualified-id not at namespace scope.
3644 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3647 2013-03-16 Jason Merrill <jason@redhat.com>
3649 * decl.c (grokdeclarator): Assert that we won't see a pointer to
3653 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3654 (MAYBE_CLASS_TYPE_P): ...here.
3655 * semantics.c (lambda_capture_field_type): Only build a
3656 magic decltype for wildcard types.
3657 (lambda_proxy_type): Likewise.
3658 (finish_non_static_data_member): Get the quals from
3662 * parser.c (cp_parser_template_argument): Don't
3663 fold_non_dependent_expr.
3665 * parser.c (cp_parser_lambda_declarator_opt): Use
3666 cp_parser_trailing_type_id.
3669 * parser.c (cp_parser_template_id): Don't forget access checks.
3672 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3676 * name-lookup.h (tag_scope): Add ts_lambda.
3677 * semantics.c (begin_lambda_type): Use it.
3678 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3679 * pt.c (check_default_tmpl_args): Ignore lambdas.
3680 (push_template_decl_real): Handle lambdas.
3681 * tree.c (no_linkage_check): Adjust lambda check.
3684 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3687 * parser.c (cp_parser_direct_declarator): Fix late return
3688 for out-of-class defn of member function.
3691 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3692 parms to avoid duplicate -Wshadow warnings.
3694 * search.c (lookup_base): Handle NULL_TREE.
3697 * semantics.c (potential_constant_expression_1): Use of 'this' in
3698 a non-constexpr function makes the expression not potentially
3703 * cp-tree.h (tsubst_flags): Add tf_decltype.
3704 * call.c (build_cxx_call): Don't build a temporary if it's set.
3705 (build_over_call): Make sure it's only passed to build_cxx_call.
3706 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3707 (cp_parser_unary_expression): Likewise.
3708 (cp_parser_cast_expression): Likewise.
3709 (cp_parser_binary_expression): Likewise.
3710 (cp_parser_assignment_expression): Likewise.
3711 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
3712 (cp_parser_expression): Add decltype_p. Force a
3713 temporary for a call on the LHS of a comma.
3714 (cp_parser_decltype): Pass true to decltype_p parms.
3715 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3716 (tsubst_copy_and_build): Pass tf_decltype down only for
3717 CALL_EXPR and the RHS of COMPOUND_EXPR.
3718 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3720 * cp-tree.h (abstract_class_use): New enum.
3721 * typeck2.c (pending_abstract_type): Add use field.
3722 (abstract_virtuals_error_sfinae): Add overloads taking
3723 abstract_class_use instead of tree.
3724 * typeck.c (build_static_cast_1): Call it.
3725 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3726 * pt.c: Adjust calls.
3727 * decl.c (cp_finish_decl): Don't handle functions specially.
3728 (grokdeclarator): Always check return type.
3729 * init.c (build_new_1): Adjust call.
3733 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3734 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3737 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3738 (tsubst_arg_types): Likewise.
3742 * call.c (convert_like_real): Check for explicit constructors
3743 even for value-initialization.
3746 * pt.c (convert_nontype_argument): Handle invalid pointer.
3748 * parser.c (cp_parser_lambda_expression): Use nreverse.
3752 * pt.c (instantiate_class_template_1): Instantiate lambda capture
3754 (tsubst_copy_and_build): Not here.
3757 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3760 * parser.c (parsing_nsdmi): New.
3761 * semantics.c (outer_automatic_var_p): Check it.
3762 (finish_id_expression): Likewise.
3763 * cp-tree.h: Declare it.
3766 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3768 * parser.c (lookup_literal_operator): Correct parm/arg naming
3772 * pt.c (fold_non_dependent_expr_sfinae): Check
3773 instantiation_dependent_expression_p.
3776 * class.c (resolve_address_of_overloaded_function): Accept a
3777 reference to function for target_type.
3778 (instantiate_type): Likewise.
3779 * pt.c (convert_nontype_argument): Pass it to
3780 convert_nontype_argument_function.
3782 2013-03-16 Jakub Jelinek <jakub@redhat.com>
3784 * tree.c (cp_tree_equal): Fix a pasto.
3787 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3788 pass op1 through maybe_constant_value first.
3790 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
3793 * semantics.c (cxx_eval_array_reference): Check for negative index.
3795 2013-03-14 Jason Merrill <jason@redhat.com>
3798 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3801 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3802 dso_handle parm on targets without __cxa_atexit.
3804 2013-03-11 Jason Merrill <jason@redhat.com>
3807 * typeck.c (check_return_expr): Disallow returning init list here.
3808 * semantics.c (apply_deduced_return_type): Not here.
3810 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
3813 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3814 * error.c (dump_expr): Likewise.
3816 2013-03-08 Jason Merrill <jason@redhat.com>
3819 * class.c (modify_all_vtables): Mangle the vtable name before
3822 * semantics.c (lambda_expr_this_capture): In unevaluated context,
3823 just return the nearest 'this'.
3828 * tree.c (maybe_dummy_object): Don't capture 'this'.
3829 * semantics.c (maybe_resolve_dummy): New.
3830 (finish_non_static_data_member): Use it.
3831 (finish_qualified_id_expr): Don't test is_dummy_object.
3832 * cp-tree.h: Declare maybe_resolve_dummy.
3833 * call.c (build_new_method_call_1): Use it.
3836 * semantics.c (apply_deduced_return_type): Don't allow returning
3837 std::initializer_list.
3839 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3842 * parser.c (cp_parser_elaborated_type_specifier): Don't call
3843 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3844 * decl.c (check_elaborated_type_specifier): Tidy.
3846 2013-03-06 Jakub Jelinek <jakub@redhat.com>
3849 * tree.c (strip_typedefs): Don't copy args if they are NULL.
3851 2013-03-05 Jakub Jelinek <jakub@redhat.com>
3853 * parser.c (cp_parser_braced_list): For {} initialize
3854 *non_constant_p to false.
3856 2013-03-04 Jason Merrill <jason@redhat.com>
3860 * semantics.c (lambda_expr_this_capture): Handle NSDMI
3861 and non-class scopes.
3863 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3865 * decl.c (grokdeclarator): Remove dead code.
3867 2013-02-28 Jason Merrill <jason@redhat.com>
3870 * semantics.c (potential_constant_expression_1): Use
3871 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3874 * call.c (build_over_call): Avoid virtual lookup in a template.
3876 2013-02-27 Jason Merrill <jason@redhat.com>
3880 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3881 of the base name for inheriting ctors.
3882 (push_class_level_binding_1): Remove inheriting ctor handling.
3883 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3884 * class.c (add_implicitly_declared_members): Adjust.
3886 2013-02-26 David Binderman <dcb314@hotmail.com>
3889 * decl.c (grokdeclarator): Tidy publicp assignment.
3891 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
3894 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3895 (build_transaction_expr): Same.
3897 2013-02-25 Jason Merrill <jason@redhat.com>
3900 * pt.c (fn_type_unification): Wait to call push_tinst_level until
3901 we know what args we're looking at.
3904 * semantics.c (potential_constant_expression_1): In C++98, a cast
3905 to non-integral type can't be a constant expression.
3907 2013-02-24 Jakub Jelinek <jakub@redhat.com>
3910 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3913 2013-02-22 Jason Merrill <jason@redhat.com>
3916 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3917 if we got the wrong number of template parms.
3920 * pt.c (fn_type_unification): Use explicit args in template
3921 instantiation context.
3924 * call.c (can_convert_arg): Discard access checks.
3927 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3930 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
3933 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3934 * cvt.c (ocp_convert): Use the latter.
3935 (cp_convert_to_pointer): Likewise.
3936 * decl.c (check_default_argument): Likewise.
3937 * typeck.c (cp_build_binary_op): Likewise.
3938 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3940 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3941 Paolo Carlini <paolo.carlini@oracle.com>
3944 * decl2.c (grokbitfield): Allow scoped enumeration types.
3946 2013-02-15 Jason Merrill <jason@redhat.com>
3949 * semantics.c (finish_id_expression): Also return the identifier
3950 for an outer local static.
3953 * class.c (check_bases_and_members): Deduce noexcept after
3957 * semantics.c (finish_id_expression): In a template, return
3958 the identifier for a constant variable.
3960 2013-02-14 Jason Merrill <jason@redhat.com>
3963 * semantics.c (build_anon_member_initialization): New.
3964 (build_data_member_initialization): Use it.
3967 * decl.c (cp_finish_decl): Force instantiation of an
3968 auto static data member.
3971 * pt.c (unify): A pack expansion that is not the last template
3972 argument makes the entire template argument list non-deduced.
3975 * name-lookup.c (do_class_using_decl): Handle typedefs with
3976 inheriting constructors.
3977 (push_class_level_binding_1): Allow inheriting from template
3978 template parameter, too.
3979 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3982 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3983 default argument scope.
3984 * mangle.c (write_name): Likewise.
3987 * error.c (find_typenames_r): Don't walk into a pack expansion.
3989 2013-02-13 Jason Merrill <jason@redhat.com>
3992 * parser.c (cp_parser_member_declaration): Check the declarator
3993 form when detecting a function declaration via typedef.
3996 * pt.c (maybe_process_partial_specialization): A lambda
3997 isn't what's being specialized.
4000 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
4004 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
4007 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
4008 non-zero offsets, too.
4011 * decl.c (build_enumerator): Always convert the value to a
4012 fixed underlying type.
4015 * pt.c (tsubst_copy_and_build): Don't forget any new
4016 captures that arose from use of dependent names.
4018 2013-02-13 Jakub Jelinek <jakub@redhat.com>
4021 * semantics.c (finish_asm_stmt): If input constraints allow
4022 neither register nor memory, try maybe_constant_value to get
4023 a constant if possible.
4025 2013-02-12 Jason Merrill <jason@redhat.com>
4028 * method.c (add_one_base_init): Handle base constructor
4029 taking rvalue reference parm.
4032 * semantics.c (sort_constexpr_mem_initializers): Handle
4035 2013-02-09 Jason Merrill <jason@redhat.com>
4038 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
4039 maybe_instantiate_noexcept.
4042 * pt.c (eq_specializations): Set comparing_specializations.
4043 * tree.c (cp_tree_equal): Check it.
4044 * cp-tree.h: Declare it.
4046 * decl.c (decls_match): Check versions later.
4049 * pt.c (build_non_dependent_expr): Don't try to fold
4050 instantiation-dependent expressions.
4051 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
4052 [BIND_EXPR]: Treat as dependent.
4054 2013-02-07 Jakub Jelinek <jakub@redhat.com>
4057 * init.c (build_vec_init): Don't append NULL values into new_vec.
4058 (build_zero_init_1): Don't push anything into v if recursive call
4060 (build_value_init_noctor): Don't push anything into v if
4061 build_value_init call returned NULL_TREE.
4064 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
4065 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
4066 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
4067 return true only if 2nd token isn't CPP_CLOSE_PAREN.
4068 (cp_parser_cast_expression): Adjust caller.
4071 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
4072 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
4073 DECL_LANG_SPECIFIC (t).
4075 2013-02-07 Jason Merrill <jason@redhat.com>
4078 * method.c (do_build_copy_constructor): Don't bother turning
4079 scalars from lvalues to xvalues.
4080 (do_build_copy_assign): Likewise.
4082 2013-02-06 Jason Merrill <jason@redhat.com>
4084 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
4086 2013-02-05 Jason Merrill <jason@redhat.com>
4089 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
4093 * decl.c (start_preparsed_function): Update restype if we change
4097 * pt.c (fn_type_unification): Discard any access checks from
4098 substituting explicit args.
4100 2013-01-31 Jason Merrill <jason@redhat.com>
4104 * typeck.c (get_member_function_from_ptrfunc): Fix
4105 ptrmemfunc_vbit_in_delta case.
4107 2013-01-29 Jason Merrill <jason@redhat.com>
4110 * class.c (build_ctor_vtbl_group): Give construction vtables
4113 2013-01-25 Jason Merrill <jason@redhat.com>
4116 * pt.c (convert_nontype_argument_function): Handle invalid input.
4117 (convert_nontype_argument): Likewise.
4120 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
4121 dynamic type has no virtual functions.
4123 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
4126 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
4127 on TARGET_EXPR nodes.
4129 2013-01-22 Jason Merrill <jason@redhat.com>
4132 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
4134 2013-01-22 Dodji Seketeli <dodji@redhat.com>
4137 * pt.c (argument_pack_element_is_expansion_p)
4138 (make_argument_pack_select, use_pack_expansion_extra_args_p)
4139 (gen_elem_of_pack_expansion_instantiation): New static functions.
4140 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
4141 look through the possibly resulting pack expansion as well.
4142 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
4143 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
4144 Use gen_elem_of_pack_expansion_instantiation to build the
4145 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
4146 as gen_elem_of_pack_expansion_instantiation and the change in
4147 tsubst above generalize this particular case.
4148 (arg_from_parm_pack_p): Remove this for it's not used by
4149 tsubst_pack_expansion anymore.
4151 2013-01-21 Jason Merrill <jason@redhat.com>
4154 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
4155 template args count.
4157 2013-01-18 Jason Merrill <jason@redhat.com>
4160 * decl2.c (get_local_tls_init_fn): New.
4161 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
4162 with aliases for internal variables. Don't use weakrefs if
4163 the variable needs destruction.
4164 (generate_tls_wrapper): Mark the wrapper as const if no
4165 initialization is needed.
4166 (handle_tls_init): Don't require aliases.
4168 2013-01-15 Dodji Seketeli <dodji@redhat.com>
4171 * pt.c (coerce_innermost_template_parms): New static function.
4172 (instantiate_alias_template): Use it here.
4174 2013-01-09 Jason Merrill <jason@redhat.com>
4177 * rtti.c (build_typeid, get_typeid): Add complain parm.
4178 (get_tinfo_decl_dynamic): Likewise.
4179 * cp-tree.h, parser.c, pt.c: Adjust.
4182 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
4185 2013-01-09 Jakub Jelinek <jakub@redhat.com>
4188 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
4189 call maybe_constant_value for the negative or too big shift
4192 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
4195 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
4196 of the argument is true.
4198 2013-01-08 Joel Brobecker <brobecker@adacore.com>
4200 * parser.c (cp_parser_initializer_list): Move declaration
4201 of variable non_const to start of lexical block.
4203 2013-01-07 Jason Merrill <jason@redhat.com>
4206 * tree.c (build_aggr_init_expr): Do nothing in a template.
4207 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
4208 a FUNCTION_DECL before tsubsting.
4210 2013-01-04 Dodji Seketeli <dodji@redhat.com>
4213 * pt.c (check_instantiated_arg): Allow type template arguments.
4215 2013-01-04 Jason Merrill <jason@redhat.com>
4218 * decl.c (reset_type_linkage, bt_reset_linkage): New.
4219 (grokdeclarator): Use reset_type_linkage.
4220 * name-lookup.c (binding_table_foreach): Handle null table.
4221 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
4223 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
4225 PR c++/54526 (again)
4226 * parser.c (cp_parser_template_id): Revert core of previous change
4227 (keep adjusted inform message).
4229 2013-01-03 Jason Merrill <jason@redhat.com>
4233 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
4237 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
4240 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
4243 * call.c (type_has_extended_temps): New.
4244 * cp-tree.h: Declare it.
4245 * decl.c (check_initializer): Use build_aggr_init for arrays
4247 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
4249 2013-01-02 Jason Merrill <jason@redhat.com>
4252 * call.c (build_new_method_call_1): Don't use build_value_init for
4253 user-provided default constructors.
4255 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
4259 * tree.c (build_cplus_array_type): Copy layout information
4260 to main variant if necessary.
4262 Copyright (C) 2013 Free Software Foundation, Inc.
4264 Copying and distribution of this file, with or without modification,
4265 are permitted in any medium without royalty provided the copyright
4266 notice and this notice are preserved.