comparison gcc/cp/ChangeLog-2013 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 2013-12-23 Jason Merrill <jason@redhat.com>
2
3 PR c++/59271
4 * lambda.c (build_capture_proxy): Use build_cplus_array_type.
5
6 PR c++/59349
7 * parser.c (cp_parser_lambda_introducer): Handle empty init.
8
9 2013-12-23 Stuart Hastings <stuart@apple.com>
10 Bill Maddox <maddox@google.com>
11 Jason Merrill <jason@redhat.com>
12
13 PR c++/41090
14 * optimize.c (can_alias_cdtor, populate_clone_array): Split out
15 from maybe_clone_body.
16 (maybe_thunk_body): New function.
17 (maybe_clone_body): Call it.
18 * mangle.c (write_mangled_name): Remove code to suppress
19 writing of mangled name for cloned constructor or destructor.
20 (write_special_name_constructor): Handle decloned constructor.
21 (write_special_name_destructor): Handle decloned destructor.
22 * method.c (trivial_fn_p): Handle decloning.
23 * semantics.c (expand_or_defer_fn_1): Clone after setting linkage.
24
25 2013-12-23 Marek Polacek <polacek@redhat.com>
26
27 PR c++/59111
28 * search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P.
29
30 2013-12-20 Trevor saunders <tsaunders@mozilla.com>
31
32 * semantics.c (build_anon_member_initialization): Replace
33 stack_vec<T, N> with auto_vec<T, N>.
34
35 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
36
37 * parser.c (cp_parser_cilk_simd_clause_name): Changed cilk_clause_name
38 to omp_clause_name.
39
40 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
41
42 * parser.c (cp_parser_omp_parallel): Fix description.
43
44 2013-12-12 Jason Merrill <jason@redhat.com>
45
46 PR c++/58954
47 * pt.c (resolve_overloaded_unification): Use instantiate_template.
48
49 2013-12-12 Jakub Jelinek <jakub@redhat.com>
50
51 PR c++/58627
52 * class.c (resolve_address_of_overloaded_function): Don't call ggc_free
53 on targs.
54
55 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
56
57 * cp-tree.h (cilk_valid_spawn): New prototype.
58 (gimplify_cilk_spawn): Likewise.
59 (create_try_catch_expr): Likewise.
60 * decl.c (finish_function): Insert Cilk function-calls when a
61 _Cilk_spawn is used in a function.
62 * parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and
63 RID_CILK_SYNC cases.
64 * cp-cilkplus.c (set_cilk_except_flag): New function.
65 (set_cilk_except_data): Likewise.
66 (cilk_install_body_with_frame_cleanup): Likewise.
67 * except.c (create_try_catch_expr): Likewise.
68 * parser.h (IN_CILK_SPAWN): New #define.
69 * pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases.
70 * semantics.c (potential_constant_expression_1): Likewise.
71 * typeck.c (cp_build_compound_expr): Reject a spawned function in a
72 compound expression.
73 (check_return_expr): Reject a spawned function in a return expression.
74 * cp-gimplify.c (cp_gimplify_expr): Added a CILK_SPAWN_STMT and
75 CALL_EXPR case. Added handling of spawned function in MODIFY_EXPR
76 and INIT_EXPR.
77
78 2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
79
80 PR c++/59435
81 * parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
82 occur in a default argument too.
83
84 2013-12-06 Caroline Tice <cmtice@google.com>
85
86 Submitting patch from Stephen Checkoway, s@cs.jhu.edu
87 * vtable-class-hierarchy.c (init_functions): Make the libvtv
88 function decls externally visible.
89
90 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
91
92 * decl2.c: Remove struct tags when referring to class varpool_node.
93
94 2013-12-05 Jason Merrill <jason@redhat.com>
95
96 PR c++/59044
97 PR c++/59052
98 * pt.c (most_specialized_class): Use the partially instantiated
99 template for deduction. Drop the TMPL parameter.
100
101 2013-12-05 Paolo Carlini <paolo.carlini@oracle.com>
102
103 * decl.c (duplicate_decls): Replace pairs of errors and permerrors
104 with error + inform (permerror + inform, respectively).
105
106 2013-12-04 Joseph Myers <joseph@codesourcery.com>
107
108 PR c/52023
109 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
110 c_sizeof_or_alignof_type.
111
112 2013-12-04 Jakub Jelinek <jakub@redhat.com>
113
114 PR c++/59268
115 * pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
116
117 2013-11-29 Marek Polacek <polacek@redhat.com>
118
119 PR sanitizer/59331
120 * decl.c (compute_array_index_type): Don't build COMPOUND_EXPR for
121 instrumentation.
122
123 2013-11-28 Jakub Jelinek <jakub@redhat.com>
124
125 PR c++/59297
126 * semantics.c (finish_omp_atomic): Call finish_expr_stmt
127 rather than add_stmt.
128
129 2013-11-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
130
131 * g++spec.c (TIMELIB): Define.
132 (WITHLIBC, SKIPOPT): Adjust values.
133 (lang_specific_driver): Add TIME_LIBRARY if not passed explicitly.
134
135 2013-11-28 Jakub Jelinek <jakub@redhat.com>
136
137 PR c/59310
138 * parser.c (cp_parser_omp_target): Call keep_next_level only
139 if flag_openmp.
140
141 2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
142
143 PR c++/58647
144 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
145 Handle function COMPONENT_REFs.
146
147 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
148 Jakub Jelinek <jakub@redhat.com>
149
150 * semantics.c (finish_omp_clauses): For #pragma omp declare simd
151 linear clause step call maybe_constant_value.
152
153 2013-11-27 Tom de Vries <tom@codesourcery.com>
154 Marc Glisse <marc.glisse@inria.fr>
155
156 PR c++/59032
157 * typeck.c (cp_build_unary_op): Allow vector increment and decrement.
158
159 2013-11-27 Tom de Vries <tom@codesourcery.com>
160 Marc Glisse <marc.glisse@inria.fr>
161
162 PR middle-end/59037
163 * semantics.c (cxx_fold_indirect_ref): Don't create out-of-bounds
164 BIT_FIELD_REF.
165
166 2013-11-26 Jakub Jelinek <jakub@redhat.com>
167
168 PR c++/58874
169 * parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
170 pass 2 instead of 0 to finish_function.
171
172 2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
173
174 PR c++/58700
175 * decl.c (grokdeclarator): Don't try to pass declarator->id_loc
176 to build_lang_decl_loc when declarator is null.
177
178 2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
179
180 * cvt.c (cp_convert_and_check): Avoid calling cp_convert
181 unnecessarily.
182
183 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
184
185 PR c++/54485
186 * decl.c (duplicate_decls): Enforce 8.3.6/6 about default arguments
187 for member functions of class templates.
188
189 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
190
191 PR c++/58607
192 * semantics.c (check_constexpr_ctor_body): Check for BIND_EXPR_VARS.
193
194 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
195
196 PR c++/58810
197 * decl.c (grokdeclarator): Don't handle qualified free functions here,
198 leave the diagnostic to grokfndecl.
199
200 2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
201
202 PR c++/59080
203 * pt.c (unify): Don't call unify_array_domain with a NULL_TREE
204 third argument.
205
206 PR c++/59096
207 * pt.c (apply_late_template_attributes): Check that TREE_VALUE
208 isn't NULL_TREE in the attribute_takes_identifier_p case.
209
210 2013-11-25 Adam Butcher <adam@jessamine.co.uk>
211
212 PR c++/59112
213 PR c++/59113
214 * parser.c (cp_parser_parameter_declaration_clause): Disallow implicit
215 function templates in local functions unless defining a lambda.
216
217 2013-11-23 Easwaran Raman <eraman@google.com>
218
219 PR c++/59031
220 * call.c (build_new_method_call_1): Comnpare function context
221 with BASELINK_BINFO type rather than instance type before
222 marking the call with LOOKUP_NONVIRTUAL.
223
224 2013-11-23 Jason Merrill <jason@redhat.com>
225
226 PR c++/58868
227 * init.c (build_aggr_init): Don't clobber the type of init
228 if we got an INIT_EXPR back from build_vec_init.
229 (build_vec_init): Do digest_init on trivial initialization.
230
231 2013-11-23 Alexander Ivchenko <alexander.ivchenko@intel.com>
232
233 PR c++/58525
234 * call.c (build_operator_new_call): Add flag_exceptions check.
235 * decl.c (compute_array_index_type): Ditto.
236 * init.c (build_new_1): Ditto.
237 (build_vec_init): Ditto.
238
239 2013-11-22 Jakub Jelinek <jakub@redhat.com>
240
241 * cp-gimplify.c: Include target.h and c-family/c-ubsan.h.
242 (cp_ubsan_maybe_instrument_return): New function.
243 (cp_genericize): Call it if -fsanitize=return.
244
245 * decl2.c: Include asan.h.
246 (one_static_initialization_or_destruction): If -fsanitize=address,
247 init is non-NULL and guard is NULL, set
248 vnode->dynamically_initialized.
249 (do_static_initialization_or_destruction): Call
250 __asan_{before,after}_dynamic_init around the static initialization.
251
252 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
253
254 * class.c: Add required include files from gimple.h.
255 * cp-gimplify.c: Likewise
256 * decl2.c: Likewise
257 * init.c: Likewise
258 * optimize.c: Likewise
259 * pt.c: Likewise
260 * semantics.c: Likewise
261 * tree.c: Likewise
262 * typeck.c: Likewise
263 * vtable-class-hierarchy.c: Likewise
264
265 2013-11-22 David Malcolm <dmalcolm@redhat.com>
266
267 * call.c (build_integral_nontype_arg_conv): Remove use of
268 EXPR_LOC_OR_HERE macro.
269 (convert_like_real): Likewise.
270 (convert_arg_to_ellipsis): Likewise.
271 (build_cxx_call): Likewise.
272 (perform_implicit_conversion_flags): Likewise.
273 (initialize_reference): Likewise.
274 * cvt.c (cp_convert_to_pointer): Likewise.
275 (convert_to_reference): Likewise.
276 (ocp_convert): Likewise.
277 (convert_to_void): Likewise.
278 * decl.c (pop_label): Update comment.
279 (pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
280 (check_tag_decl): Remove use of in_system_header macro.
281 (make_rtl_for_nonlocal_decl): Remove use of input_filename
282 macro.
283 (compute_array_index_type): Remove use of in_system_header
284 macro.
285 (grokdeclarator): Likewise.
286 * error.c (dump_global_iord): Remove use of input_filename
287 macro.
288 (location_of): Remove use of EXPR_LOC_OR_HERE macro.
289 (maybe_warn_cpp0x): Remove use of in_system_header macro.
290 * init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
291 * lex.c (handle_pragma_interface): Remove use of input_filename
292 macro.
293 (handle_pragma_implementation): Likewise.
294 (cxx_make_type): Likewise.
295 (in_main_input_context): Likewise.
296 * name-lookup.c (push_binding_level): Remove use of
297 input_line macro.
298 (leave_scope): Likewise.
299 (resume_scope): Likewise.
300 * parser.c (cp_parser_unqualified_id): Remove use of
301 in_system_header macro.
302 (cp_parser_cast_expression): Likewise.
303 (cp_parser_declaration_seq_opt): Likewise.
304 (cp_parser_enumerator_list): Likewise.
305 (cp_parser_parameter_declaration_clause): Likewise.
306 (cp_parser_exception_specification_opt): Likewise.
307 * pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
308 macro.
309 (convert_nontype_argument): Likewise.
310 (push_tinst_level): Remove use of in_system_header macro.
311 (tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
312 macros.
313 (do_decl_instantiation): Remove use of in_system_header macro.
314 (do_type_instantiation): Likewise.
315 * semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
316 macro.
317 (begin_class_definition): Remove use of input_filename macro.
318 (cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
319 macro.
320 (cxx_eval_constant_expression): Likewise.
321 (potential_constant_expression_1): Likewise.
322 * typeck.c (decay_conversion): Likewise.
323 (rationalize_conditional_expr): Likewise.
324 (build_x_compound_expr_from_list): Likewise.
325 (convert_for_assignment): Likewise.
326 * typeck2.c (check_narrowing): Likewise.
327
328 2013-11-22 Trevor Saunders <tsaunders@mozilla.com>
329
330 * parser.c, semantics.c: Change some local variables from vec to
331 auto_vec or stack_vec.
332
333 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
334
335 * decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
336 tree_low_cst.
337 (grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
338 than tree_low_cst.
339
340 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
341
342 * call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
343 tree_to_uhwi throughout.
344
345 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
346
347 * class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
348 Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
349
350 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
351
352 * decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
353 throughout.
354
355 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
356
357 * error.c, init.c, parser.c, semantics.c: Replace
358 host_integerp (..., 0) with tree_fits_shwi_p throughout.
359
360 2013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
361
362 PR c++/59123
363 * decl.c (validate_constexpr_redeclaration): Redeclarations of
364 variables can differ in constexpr.
365
366 2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
367
368 PR c++/29143
369 * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
370 '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
371
372 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
373
374 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
375 * cp-cilkplus.c: New file.
376 * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
377 * parser.c (cp_parser_cilk_simd): New.
378 (cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
379 (cp_parser_jump_statement): Same.
380 (cp_parser_omp_for_cond): Add new argument.
381 Add case for NE_EXPR.
382 (cp_parser_omp_for_loop): Pass new argument to
383 cp_parser_omp_for_cond.
384 Handle CILK_SIMD nodes.
385 Abstract initilization code to..
386 (cp_parser_omp_for_loop_init): ...here.
387 (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
388 (cp_parser_cilk_simd_vectorlength): New.
389 (cp_parser_cilk_simd_linear): New.
390 (cp_parser_cilk_simd_clause_name): New.
391 (cp_parser_cilk_simd_all_clauses): New.
392 (cp_parser_cilk_simd): New.
393 * parser.h (IN_CILK_SIMD_FOR): New macro.
394 * pt.c (tsubst_expr): Add case for CILK_SIMD.
395 * typeck2.c (cxx_readonly_error): Pass location argument to
396 readonly_error.
397
398 2013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
399
400 PR c++/57887
401 * parser.c (cp_parser_late_parsing_nsdmi): Call
402 maybe_begin_member_template_processing.
403 * pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
404 (inline_needs_template_parms): Adjust.
405
406 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
407
408 * class.c: Include only gimplify.h and gimple.h as needed.
409 * cp-gimplify.c: Likewise.
410 * error.c: Likewise.
411 * init.c: Likewise.
412 * optimize.c: Likewise.
413 * pt.c: Likewise.
414 * semantics.c: Likewise.
415 * tree.c: Likewise.
416 * vtable-class-hierarchy.c: Likewise.
417
418 2013-11-14 Diego Novillo <dnovillo@google.com>
419
420 * call.c: Include stor-layout.h.
421 Include trans-mem.h.
422 Include stringpool.h.
423 * class.c: Include stringpool.h.
424 Include stor-layout.h.
425 Include attribs.h.
426 * cp-gimplify.c: Include stor-layout.h.
427 * cvt.c: Include stor-layout.h.
428 * decl.c: Include stringpool.h.
429 Include stor-layout.h.
430 Include varasm.h.
431 Include attribs.h.
432 Include calls.h.
433 * decl2.c: Include stringpool.h.
434 Include varasm.h.
435 Include attribs.h.
436 Include stor-layout.h.
437 Include calls.h.
438 * error.c: Include stringpool.h.
439 * except.c: Include stringpool.h.
440 Include trans-mem.h.
441 Include attribs.h.
442 * init.c: Include stringpool.h.
443 Include varasm.h.
444 * lambda.c: Include stringpool.h.
445 * lex.c: Include stringpool.h.
446 * mangle.c: Include stor-layout.h.
447 Include stringpool.h.
448 * method.c: Include stringpool.h.
449 Include varasm.h.
450 * name-lookup.c: Include stringpool.h.
451 Include print-tree.h.
452 Include attribs.h.
453 * optimize.c: Include stringpool.h.
454 * parser.c: Include print-tree.h.
455 Include stringpool.h.
456 Include attribs.h.
457 Include trans-mem.h.
458 * pt.c: Include stringpool.h.
459 Include varasm.h.
460 Include attribs.h.
461 Include stor-layout.h.
462 * ptree.c: Include print-tree.h.
463 * repo.c: Include stringpool.h.
464 * rtti.c: Include stringpool.h.
465 Include stor-layout.h.
466 * semantics.c: Include stmt.h.
467 Include varasm.h.
468 Include stor-layout.h.
469 Include stringpool.h.
470 * tree.c: Include stor-layout.h.
471 Include print-tree.h.
472 Include tree-iterator.h.
473 * typeck.c: Include stor-layout.h.
474 Include varasm.h.
475 * typeck2.c: Include stor-layout.h.
476 Include varasm.h.
477 * vtable-class-hierarchy.c: Include stringpool.h.
478 Include stor-layout.h.
479
480 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
481
482 * class.c: Include gimplify.h.
483 * cp-gimplify.c: Likewise.
484 * error.c: Likewise.
485 * init.c: Likewise.
486 * optimize.c: Likewise.
487 * pt.c: Likewise.
488 * semantics.c: Likewise.
489 * tree.c: Likewise.
490 * vtable-class-hierarchy.c: Likewise.
491 * decl2.c: Don't include gimple.h.
492 * except.c: Likewise.
493 * method.c: Include pointer-set.h instead of gimple.h.
494
495 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
496
497 * pt.c (convert_generic_types_to_packs): New function to transform
498 a range of implicitly introduced non-pack template parms to be parameter
499 packs.
500 * cp-tree.h (convert_generic_types_to_packs): Declare.
501 * parser.c (cp_parser_parameter_declaration_list): If a function
502 parameter pack contains generic types, convert them to packs prior to
503 grokdeclarator.
504
505 2013-11-12 Adam Butcher <adam@jessamine.co.uk>
506
507 PR c++/58534
508 PR c++/58536
509 PR c++/58548
510 PR c++/58549
511 PR c++/58637
512 * parser.h (struct cp_parser): New members implicit_template_parms,
513 implicit_template_scope and auto_is_implicit_function_template_parm_p.
514 * parser.c (add_implicit_template_parms): Refactor as ...
515 (synthesize_implicit_template_parm): ... this to append a new template
516 type parm to the current template parameter list (introducing a new list
517 if necessary). Removed push_deferring_access_checks.
518 (finish_fully_implicit_template): Removed pop_deferring_access_checks.
519 (cp_parser_new): Initialize new cp_parser members.
520 (cp_parser_parameter_declaration_clause): Consider auto as implicit
521 template parm when parsing a parameter declaration (unless parsing an
522 explicit specialization).
523 (cp_parser_parameter_declaration_list): Remove local
524 implicit_template_parms counter and reset cp_parser implicit template
525 state when complete.
526 (cp_parser_lambda_expression): Reset implicit template cp_parser members
527 whilst generating lambda class.
528 (cp_parser_function_definition_after_declarator): Reset implicit
529 template cp_parser members whilst parsing function definition.
530 (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
531 better with template diagnostics.
532 (cp_parser_simple_type_specifier): Synthesize implicit template parm on
533 parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
534 diagnostics ...
535 * decl.c (grokdeclarator): ... that were previously done here.
536
537 2013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
538
539 PR c++/57734
540 * pt.c (lookup_template_class_1): Handle alias template declarations
541 of enumeration types.
542
543 2013-11-10 Paolo Carlini <paolo.carlini@oracle.com>
544
545 * cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
546 maybe_warn_zero_as_null_pointer_constant to avoid duplicate
547 -Wzero-as-null-pointer-constant diagnostics.
548
549 * typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
550
551 2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
552
553 PR c++/11006
554 * init.c (build_new_1): Don't call build_java_class_ref on non-class
555 types.
556
557 2013-11-05 Jason Merrill <jason@redhat.com>
558
559 PR c++/58868
560 * decl.c (check_initializer): Don't use build_vec_init for arrays
561 of trivial type.
562
563 2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
564
565 PR c++/58724
566 * name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
567
568 2013-11-05 Tobias Burnus <burnus@net-b.de>
569
570 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
571 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
572 cp_parser_omp_declare): Handle -fopenmp-simd.
573
574 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
575
576 * decl2.c (cpp_check): Change type of first parameter and deal with
577 IS_TRIVIAL.
578
579 2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
580
581 PR c++/38313
582 * parser.c (cp_parser_constructor_declarator_p): Check that the
583 class-name matches current_class_type.
584
585 2013-11-03 Marek Polacek <polacek@redhat.com>
586
587 * decl.c (cp_finish_decl): Move C++1y bounds checking...
588 (compute_array_index_type): ...here. Add VLA instrumentation.
589 Call stabilize_vla_size.
590 (grokdeclarator): Don't call stabilize_vla_size here.
591
592 2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
593
594 PR c++/29234
595 PR c++/56037
596 * parser.c (cp_parser_cast_expression): If we aren't looking at
597 a cast-expression don't call cp_parser_type_id.
598 (cp_parser_postfix_expression): Likewise for compound-literal.
599 (cp_parser_tokens_start_cast_expression): Adjust.
600
601 2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
602
603 PR c++/58708
604 * parser.c (make_string_pack): Discover non-const type and size
605 of character and build parm pack with correct type and chars.
606
607 2013-11-01 Trevor Saunders <tsaunders@mozilla.com>
608
609 * semantics.c (build_anon_member_initialization): Convert fields to be
610 a stack_vec.
611
612 2013-11-01 Marc Glisse <marc.glisse@inria.fr>
613
614 PR c++/58834
615 * pt.c (type_dependent_expression_p): Handle null argument.
616
617 2013-11-01 Jakub Jelinek <jakub@redhat.com>
618
619 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
620 check_dup_generic at the end, unless remove is true.
621 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
622 remove = true;.
623
624 2013-10-31 Jakub Jelinek <jakub@redhat.com>
625
626 * semantics.c (finish_omp_clauses): Diagnose aligned clause
627 with decl that is not pointer nor array nor reference to those.
628
629 2013-10-31 Jason Merrill <jason@redhat.com>
630
631 * semantics.c (cxx_eval_call_expression): Handle trivial
632 value-initialization.
633 * typeck2.c (store_init_value): Call maybe_constant_init after
634 cxx_constant_value.
635
636 * decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
637 * decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
638
639 PR c++/58162
640 * parser.c (cp_parser_late_parse_one_default_arg): Set
641 TARGET_EXPR_DIRECT_INIT_P.
642
643 * class.c (type_build_ctor_call): Return early in C++98 mode.
644 (type_build_dtor_call): Likewise.
645
646 2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
647
648 PR c++/58932
649 Revert:
650 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
651
652 PR c++/58466
653 * pt.c (most_specialized_class): Bump processing_template_decl for
654 get_class_bindings.
655
656 2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
657
658 PR c++/58581
659 * call.c (build_over_call): Check return value of mark_used.
660
661 2013-10-30 Jason Merrill <jason@redhat.com>
662
663 * semantics.c (finish_compound_literal): Don't create a static variable
664 inside cp_unevaluated_operand.
665
666 * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
667
668 2013-10-30 Tobias Burnus <burnus@net-b.de>
669
670 PR other/33426
671 * cp-tree.h (RANGE_FOR_IVDEP): Define.
672 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
673 finish_for_cond): Take 'bool ivdep' parameter.
674 * cp-array-notation.c (create_an_loop): Update call.
675 * init.c (build_vec_init): Ditto.
676 * pt.c (tsubst_expr): Ditto.
677 * parser.c (cp_parser_iteration_statement, cp_parser_for,
678 cp_parser_range_for, cp_convert_range_for): Update calls.
679 (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
680 * semantics.c (finish_while_stmt_cond, finish_do_stmt,
681 finish_for_cond): Optionally build ivdep annotation.
682
683 2013-10-30 Jason Merrill <jason@redhat.com>
684
685 * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
686
687 2013-10-29 David Malcolm <dmalcolm@redhat.com>
688
689 Patch autogenerated by refactor_symtab.py from
690 https://github.com/davidmalcolm/gcc-refactoring-scripts
691 revision 58bb219cc090b2f4516a9297d868c245495ee622
692
693 * call.c (mark_versions_used): Update for conversion of symtab types
694 to a true class hierarchy.
695 * decl2.c (cp_write_global_declarations): Likewise.
696 (clear_decl_external): Likewise.
697 (build_java_method_aliases): Likewise.
698 (collect_candidates_for_java_method_aliases): Likewise.
699 (mark_needed): Likewise.
700 (var_finalized_p): Likewise.
701 (maybe_make_one_only): Likewise.
702 (maybe_emit_vtables): Likewise.
703 * lambda.c (maybe_add_lambda_conv_op): Likewise.
704 * method.c (use_thunk): Likewise.
705 * optimize.c (maybe_clone_body): Likewise.
706 * tree.c (cp_fix_function_decl_p): Likewise.
707
708 2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
709
710 PR c++/58888
711 * decl2.c (grokfield): Handle auto like NSDMI.
712
713 2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
714
715 PR c++/58878
716 * pt.c (check_template_shadow): Don't skip declarations in inline
717 member templates.
718
719 2013-10-25 Tobias Burnus <burnus@net-b.de>
720
721 PR other/33426
722 * parser.c (cp_parser_iteration_statement,
723 cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
724 IVDEP pragma.
725
726 2013-10-24 Marek Polacek <polacek@redhat.com>
727
728 PR c++/58705
729 * typeck2.c (check_narrowing): Don't check narrowing when the scalar
730 initializer is empty.
731
732 2013-10-23 Jason Merrill <jason@redhat.com>
733
734 LWG 2165
735 * method.c (defaulted_late_check): Delete on eh-spec mismatch.
736 (maybe_explain_implicit_delete): Explain it.
737
738 * error.c (eh_spec_to_string): New.
739 (cp_printer): Use it for %X.
740
741 In C++11 a trivial [cd]tor might not be callable.
742 * class.c (user_provided_p): A function deleted on its declation
743 in the class is not user-provided.
744 (type_build_ctor_call): Also force a ctor call if we
745 might have a deleted or private trivial ctor.
746 (type_build_dtor_call): New.
747 (deduce_noexcept_on_destructors): Remove obsolete code.
748 * cp-tree.h: Declare type_build_dtor_call.
749 * decl.c (expand_static_init): Make sure trivial dtors are callable.
750 (cxx_maybe_build_cleanup): Likewise.
751 * except.c (build_throw): Likewise.
752 * init.c (build_value_init): Handle trivial but not callable ctors.
753 (perform_target_ctor): Make sure trivial dtor is callable.
754 (perform_member_init): Likewise.
755 (expand_cleanup_for_base): Likewise.
756 (build_vec_delete_1): Likewise.
757 (build_delete): Likewise.
758 (push_base_cleanups): Likewise.
759 (build_new_1): Avoid redundant error.
760 * method.c (synthesized_method_walk): Can't ever exit early in C++11.
761 Always process the subobject destructor.
762 * semantics.c (finish_compound_literal): Make sure trivial dtor is
763 callable.
764 * typeck2.c (split_nonconstant_init): Likewise.
765
766 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
767
768 Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
769 * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
770 as [[gnu::deprecated]].
771
772 2013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
773
774 PR c++/58816
775 * pt.c (apply_late_template_attributes): Use get_attribute_name,
776 not TREE_PURPOSE.
777
778 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
779
780 PR c++/58466
781 * pt.c (most_specialized_class): Bump processing_template_decl for
782 get_class_bindings.
783
784 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
785
786 * parser.c (cp_parser_lookup_name): Tidy.
787
788 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
789
790 * parser.c: Include omp-low.h.
791 * semantics.c: Likewise.
792
793 2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
794
795 PR c++/58596
796 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
797 cp_unevaluated_operand case.
798
799 2013-10-16 Jason Merrill <jason@redhat.com>
800
801 * pt.c (apply_late_template_attributes): Use
802 attribute_takes_identifier_p.
803
804 * error.c (dump_exception_spec): Print "noexcept" rather than
805 "noexcept (true)".
806
807 Core 1591
808 * pt.c (unify_array_domain): Split out from unify.
809 (unify): Use it for list deduction, too.
810
811 PR c++/57850
812 * decl2.c (dump_tu): Split out from...
813 (cp_write_global_declarations): ...here. Call it in PCH mode.
814
815 2013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
816
817 * pt.c (tsubst): Fix typo in last commit.
818
819 2013-10-16 Paulo Matos <pmatos@broadcom.com>
820
821 * error.c (code_to_string): Use new wrapper get_tree_code_name.
822 * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
823 * pt.c (tsubst): Likewise.
824 * semantics.c (cxx_eval_constant_expression,
825 potential_constant_expression_1): Likewise.
826 * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
827 add_substitution, find_substitution): Likewise.
828
829 2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
830
831 PR c++/58707
832 * parser.c (cp_parser_postfix_open_square_expression): Set
833 parser->greater_than_is_operator_p for the argument.
834
835 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
836
837 PR c++/58633
838 * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
839 (cp_parser_pseudo_destructor_name): Use it.
840
841 2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
842
843 PR c++/31671
844 * pt.c (convert_nontype_argument): Set expr_type to
845 TREE_TYPE (probe_type).
846
847 2013-10-11 Jakub Jelinek <jakub@redhat.com>
848
849 * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
850 (declare_simd_adjust_this): New function.
851 (grokfndecl): If "omp declare simd" attribute is present,
852 call declare_simd_adjust_this if needed and
853 c_omp_declare_simd_clauses_to_numbers.
854 * cp-array-notation.c (expand_array_notation_exprs): Handle
855 OMP_TASKGROUP.
856 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
857 OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
858 OMP_CLAUSE_REDUCTION.
859 (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
860 OMP_FOR.
861 (cxx_omp_privatize_by_reference): Return true for
862 is_invisiref_parm decls.
863 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
864 caller.
865 * pt.c (apply_late_template_attributes): For "omp declare simd"
866 attribute call tsubst_omp_clauses,
867 c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
868 and c_omp_declare_simd_clauses_to_numbers.
869 (instantiate_class_template_1): Call cp_check_omp_declare_reduction
870 for UDRs.
871 (tsubst_decl): Handle UDRs.
872 (tsubst_omp_clauses): Add declare_simd argument, if true don't
873 call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
874 Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
875 OMP_CLAUSE_REDUCTION.
876 (tsubst_expr): For UDRs call pushdecl and
877 cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
878 callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
879 OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
880 Adjust finish_omp_atomic caller.
881 (tsubst_omp_udr): New function.
882 (instantiate_decl): For UDRs at block scope, don't call
883 start_preparsed_function/finish_function. Call tsubst_omp_udr.
884 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
885 use it instead of need_default_ctor || need_copy_ctor.
886 (struct cp_check_omp_declare_reduction_data): New type.
887 (handle_omp_array_sections_1, handle_omp_array_sections,
888 omp_reduction_id, omp_reduction_lookup,
889 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
890 cp_check_omp_declare_reduction, clone_omp_udr,
891 find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
892 (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
893 reductions.
894 (finish_omp_for): Add CODE argument, use it instead of hardcoded
895 OMP_FOR. Adjust c_finish_omp_for caller.
896 (finish_omp_atomic): Add seq_cst argument, adjust
897 c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
898 atomic variants.
899 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
900 * decl2.c (mark_used): Force immediate instantiation of
901 DECL_OMP_DECLARE_REDUCTION_P decls.
902 (is_late_template_attribute): Return true for "omp declare simd"
903 attribute.
904 (cp_omp_mappable_type): New function.
905 (cplus_decl_attributes): Add implicit "omp declare target" attribute
906 if requested.
907 * parser.c (cp_debug_parser): Print
908 parser->colon_doesnt_start_class_def_p.
909 (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
910 functions.
911 (enum pragma_context): Add pragma_member and pragma_objc_icode.
912 (cp_parser_binary_expression): Handle no_toplevel_fold_p
913 even for binary operations other than comparison.
914 (cp_parser_linkage_specification): Call
915 cp_ensure_no_omp_declare_simd if needed.
916 (cp_parser_namespace_definition): Likewise.
917 (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
918 (cp_parser_direct_declarator): Pass declarator to
919 cp_parser_late_return_type_opt.
920 (cp_parser_late_return_type_opt): Add declarator argument,
921 call cp_parser_late_parsing_omp_declare_simd for declare simd.
922 (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
923 Parse UDRs before all other methods.
924 (cp_parser_member_specification_opt): Use pragma_member instead of
925 pragma_external.
926 (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
927 (cp_parser_function_definition_from_specifiers_and_declarator,
928 cp_parser_save_member_function_body): Likewise.
929 (cp_parser_late_parsing_for_member): Handle UDRs specially.
930 (cp_parser_next_token_starts_class_definition_p): Don't allow
931 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
932 (cp_parser_objc_interstitial_code): Use pragma_objc_icode
933 instead of pragma_external.
934 (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
935 (cp_parser_omp_var_list_no_open): Parse array sections for
936 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
937 if non-NULL, allow parsing to end with a colon rather than close
938 paren.
939 (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
940 caller.
941 (cp_parser_omp_clause_reduction): Handle user defined reductions.
942 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
943 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
944 cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
945 cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
946 cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
947 cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
948 cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
949 cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
950 functions.
951 (cp_parser_omp_all_clauses): Add finish_p argument. Don't call
952 finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
953 (cp_parser_omp_atomic): Parse seq_cst clause, pass
954 true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
955 atomic forms.
956 (cp_parser_omp_for_loop): Add CODE argument, pass it through
957 to finish_omp_for. Change last argument to cclauses,
958 and adjust uses to grab parallel clauses from the array of all
959 the split clauses.
960 (cp_omp_split_clauses): New function.
961 (cp_parser_omp_simd): New function.
962 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
963 Allow the function to be called also when parsing combined constructs,
964 and call c_parser_omp_simd when parsing for simd.
965 (cp_parser_omp_sections_scope): If section-sequence doesn't start with
966 #pragma omp section, require exactly one structured-block instead of
967 sequence of statements.
968 (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
969 Allow the function to be called also when parsing combined constructs.
970 (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
971 Allow the function to be called also when parsing combined
972 constructs.
973 (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
974 cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
975 cp_parser_omp_teams, cp_parser_omp_target_data,
976 cp_parser_omp_target_update, cp_parser_omp_target,
977 cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
978 cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
979 cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
980 cp_parser_omp_declare): New functions.
981 (cp_parser_omp_construct): Add p_name and mask vars. Handle
982 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
983 PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
984 and cp_parser_omp_sections callers.
985 (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
986 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
987 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
988 PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
989 Handle pragma_member and pragma_objc_icode like pragma_external.
990 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
991 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
992 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
993 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
994 OMP_CLAUSE_DEPEND.
995 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
996 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
997 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
998 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
999 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1000 * parser.h (struct cp_omp_declare_simd_data): New type.
1001 (struct cp_parser): Add colon_doesnt_start_class_def_p and
1002 omp_declare_simd fields.
1003 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
1004 * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
1005 bit.
1006 (DECL_OMP_DECLARE_REDUCTION_P): Define.
1007 (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
1008 (struct saved_scope): Add omp_declare_target_attribute field.
1009 (cp_omp_mappable_type, omp_reduction_id,
1010 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
1011 finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
1012 (finish_omp_for): Add CODE argument.
1013 (finish_omp_atomic): Add seq_cst argument.
1014 (cxx_omp_create_clause_info): Add need_dtor argument.
1015
1016 2013-10-09 Marek Polacek <polacek@redhat.com>
1017
1018 PR c++/58635
1019 * semantics.c (finish_return_stmt): Return error_mark_node
1020 when error_operand_p of the expr is true.
1021 (build_transaction_expr): Check for EXPR_P before setting the
1022 expr location.
1023
1024 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
1025
1026 PR c++/58568
1027 * lambda.c (begin_lambda_type): Check return value of xref_tag
1028 for error_mark_node; tidy.
1029 * decl.c (grokdeclarator): Tweak error message.
1030
1031 2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
1032
1033 PR c++/58665
1034 Revert:
1035 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1036
1037 PR c++/58448
1038 * pt.c (tsubst): Use error_operand_p on parameter t.
1039
1040 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
1041
1042 PR c++/58126
1043 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
1044 and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
1045 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
1046 messages about uninitialized const and references members to mention
1047 the base class.
1048
1049 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
1050
1051 PR c++/56060
1052 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
1053
1054 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1055
1056 PR c++/58560
1057 * typeck2.c (build_functional_cast): Use error_operand_p on exp.
1058
1059 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1060
1061 PR c++/58503
1062 * parser.c (cp_parser_perform_range_for_lookup): If eventually
1063 either *begin or *end is type-dependent, return NULL_TREE.
1064 (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
1065 returns NULL_TREE, don't actually do_auto_deduction.
1066
1067 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1068
1069 PR c++/58448
1070 * pt.c (tsubst): Use error_operand_p on parameter t.
1071
1072 2013-10-04 Marc Glisse <marc.glisse@inria.fr>
1073
1074 PR c++/19476
1075 * decl.c (cxx_init_decl_processing): Set operator_new_flag.
1076
1077 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
1078
1079 PR c++/58584
1080 * decl2.c (save_template_attributes): Handle error_mark_node as
1081 *attr_p argument.
1082 (cp_check_const_attributes): Likewise for attributes.
1083 * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
1084 error_mark_node call cp_parser_skip_to_end_of_statement.
1085
1086 2013-10-03 Easwaran Raman <eraman@google.com>
1087
1088 PR c++/33911
1089 * parser.c (cp_parser_init_declarator): Do not drop attributes
1090 of template member functions.
1091
1092 2013-10-03 Marek Polacek <polacek@redhat.com>
1093
1094 PR c++/58510
1095 * init.c (sort_mem_initializers): Splice when giving an error.
1096
1097 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
1098
1099 PR c++/58535
1100 * parser.c (cp_parser_function_specifier_opt): Upon error about
1101 virtual templates don't set ds_virtual.
1102 (finish_fully_implicit_template): Reject virtual implicit templates.
1103
1104 2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
1105
1106 PR c++/58565
1107 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
1108
1109 2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
1110
1111 PR c++/58563
1112 * parser.c (cp_parser_lookup_name): Check make_typename_type return
1113 value for error_mark_node.
1114
1115 2013-09-25 Tom Tromey <tromey@redhat.com>
1116
1117 * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
1118 Remove.
1119
1120 2013-09-25 Tom Tromey <tromey@redhat.com>
1121
1122 * Make-lang.in (g++spec.o): Remove.
1123 (CFLAGS-cp/g++spec.o): New variable.
1124 (GXX_OBJS): Reference cp/g++spec.o.
1125 (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
1126 (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
1127 (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
1128 (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
1129 (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
1130 (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
1131 (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
1132 (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
1133
1134 2013-09-25 Tom Tromey <tromey@redhat.com>
1135
1136 * Make-lang.in (g++spec.o): Don't use subshell.
1137
1138 2013-09-25 Marek Polacek <polacek@redhat.com>
1139
1140 PR c++/58516
1141 * semantics.c (finish_transaction_stmt): Check for EXPR_P before
1142 setting the expr location.
1143
1144 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1145
1146 PR c++/58500
1147 * type-utils.h (find_type_usage): Only traverse one type level into
1148 member function pointers.
1149
1150 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1151
1152 * parser.c (cp_parser_init_declarator): Defer calling
1153 finish_fully_implicit_template for forward declarations until after
1154 other decl processing is complete. Cleanup for clarity: Extract 'else'
1155 case after 'if' containing unconditional return.
1156
1157 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1158
1159 * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
1160 rather than '__GenN'.
1161
1162 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1163
1164 * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
1165 callop in the case of generic lambdas.
1166
1167 2013-09-23 Adam Butcher <adam@jessamine.co.uk>
1168
1169 * parser.c (make_generic_type_name): Use global count rather than
1170 parameter and ...
1171 (add_implicit_template_parms): ... propagate interface change here.
1172
1173 2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
1174
1175 PR c++/58481
1176 * pt.c (tsubst_copy): Use current_nonlambda_class_type to
1177 call tsubst_baselink.
1178
1179 2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1180
1181 PR c++/58457
1182 * class.c (instantiate_type): Loosen a bit the gcc_assert.
1183
1184 2013-09-18 Marek Polacek <polacek@redhat.com>
1185
1186 PR sanitize/58443
1187 * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
1188 Remove unnecessary check.
1189
1190 2013-09-18 Marek Polacek <polacek@redhat.com>
1191
1192 PR sanitizer/58411
1193 * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
1194 no_sanitize_undefined attribute.
1195
1196 2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
1197
1198 PR c++/58435
1199 * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
1200 the cp_type_quals (r) too.
1201
1202 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1203
1204 * cp-tree.h (type_uses_auto_or_concept): Declare.
1205 (is_auto_or_concept): Declare.
1206 * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
1207 -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
1208 * type-utils.h: New header defining ...
1209 (find_type_usage): ... this new function based on pt.c (type_uses_auto)
1210 for searching a type tree given a predicate.
1211 * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
1212 (is_auto_or_concept): New function.
1213 (type_uses_auto_or_concept): New function.
1214 * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
1215 * parser.c (cp_parser_new): Initialize
1216 fully_implicit_function_template_p.
1217 (cp_parser_new): Initialize fully_implicit_function_template_p.
1218 (cp_parser_lambda_expression): Copy and restore value of
1219 fully_implicit_function_template_p as per other parser fields.
1220 (cp_parser_parameter_declaration_list): Count generic
1221 parameters and call ...
1222 (add_implicit_template_parms): ... this new function to synthesize them
1223 with help from type-utils.h (find_type_usage), ...
1224 (tree_type_is_auto_or_concept): ... this new static function and ...
1225 (make_generic_type_name): ... this new static function.
1226 (cp_parser_direct_declarator): Account for implicit template parameters.
1227 (cp_parser_lambda_declarator_opt): Finish fully implicit template if
1228 necessary by calling ...
1229 (finish_fully_implicit_template): ... this new function.
1230 (cp_parser_init_declarator): Likewise.
1231 (cp_parser_function_definition_after_declarator): Likewise.
1232 (cp_parser_member_declaration): Likewise.
1233 * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
1234 (cp/parser.o): Likewise.
1235
1236 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1237
1238 * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
1239 list with std=c++1y or std=gnu++1y.
1240 (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
1241 operator template to avoid adding template result to symbol table.
1242 * lambda.c (lambda_function): Return template result if call operator is
1243 a template.
1244 (maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
1245 operator call building in order to support conversion of a non-capturing
1246 lambda template to a function pointer with help from ...
1247 (prepare_op_call): ... this new function.
1248 * decl2.c (check_member_template): Don't reject lambda call operator
1249 template in local [lambda] class.
1250 * pt.c (instantiate_class_template_1): Don't instantiate lambda call
1251 operator template when instantiating lambda class.
1252
1253 2013-09-16 Adam Butcher <adam@jessamine.co.uk>
1254
1255 * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
1256
1257 2013-09-15 Jason Merrill <jason@redhat.com>
1258
1259 Core DR 904
1260 PR c++/41933
1261 * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
1262 * lambda.c (add_capture): Handle variadic capture.
1263 (add_default_capture, lambda_capture_field_type): Likewise.
1264 (build_capture_proxy, register_capture_members): Likewise.
1265 * pt.c (register_specialization): Allow FIELD_DECL.
1266 (retrieve_specialization): Likewise.
1267 (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
1268 (tsubst_pack_expansion): Handle FIELD_DECL packs.
1269 (gen_elem_of_pack_expansion_instantiation): Likewise.
1270 (instantiate_class_template_1): Likewise.
1271 (tsubst_decl, tsubst_copy): Likewise.
1272 (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
1273 (tsubst_copy_and_build) [VAR_DECL]: Likewise.
1274 * semantics.c (finish_non_static_data_member): Don't try to represent
1275 the type of a COMPOUND_REF of a FIELD_DECL pack.
1276
1277 PR c++/41933
1278 * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
1279 * cxx-pretty-print.c (direct_declarator): Adjust.
1280 * decl2.c (cp_build_parm_decl): Adjust.
1281 * pt.c (function_parameter_pack_p): Adjust.
1282 (find_parameter_packs_r, push_template_decl_real): Adjust.
1283 (tsubst_pack_expansion, tsubst_decl): Adjust.
1284 (regenerate_decl_from_template, instantiate_decl): Adjust.
1285
1286 * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
1287
1288 2013-09-13 Jason Merrill <jason@redhat.com>
1289
1290 PR c++/58273
1291 * pt.c (any_type_dependent_elements_p): Actually check for
1292 type-dependence, not value-dependence.
1293
1294 2013-09-13 Jacek Caban <jacek@codeweavers.com>
1295
1296 * decl.c: Use new cxx_implicit_extern_c hook
1297
1298 2013-09-12 Brooks Moses <bmoses@google.com>
1299
1300 PR driver/42955
1301 * Make-lang.in: Do not install driver binaries in $(target)/bin.
1302
1303 2013-09-12 Adam Butcher <adam@jessamine.co.uk>
1304
1305 * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
1306 c_inhibit_evaluation_warnings. Reset if instantiating within a
1307 function-local template.
1308
1309 2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
1310
1311 * semantics.c (finish_pseudo_destructor_expr): Add location_t
1312 parameter.
1313 * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
1314 (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
1315 calls.
1316 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1317 (cp_parser_postfix_expression): Pass the proper location to
1318 cp_parser_postfix_dot_deref_expression.
1319 * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
1320
1321 2013-09-10 Jan Hubicka <jh@suse.cz>
1322 Paolo Carlini <paolo.carlini@oracle.com>
1323
1324 * error.c (print_instantiation_partial_context_line): If
1325 loc == UNKNOWN_LOCATION return immediately.
1326
1327 2013-09-09 Jakub Jelinek <jakub@redhat.com>
1328
1329 PR c++/58325
1330 * init.c (build_vec_delete): Call mark_rvalue_use on base.
1331
1332 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1333
1334 PR c++/43452
1335 * init.c (build_vec_delete_1): When the type is incomplete emit a
1336 warning, enabled by default (not an error).
1337 (build_delete): Adjust to use OPT_Wdelete_incomplete.
1338
1339 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1340
1341 PR c++/58362
1342 * error.c (location_of): Don't handle PARM_DECLs specially.
1343
1344 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1345
1346 * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
1347 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1348 Tweak, TREE_OPERAND (t, 1) may be null.
1349
1350 2013-09-08 Caroline Tice <cmtice@google.com>
1351
1352 PR c++/58300
1353 * vtable-class-hierarchy.c (vtv_generate_init_routine): In
1354 preinit case, move call to assemble_vtv_preinit_initializer to
1355 after call to cgraph_process_new_functions.
1356
1357 2013-09-08 Tom de Vries <tom@codesourcery.com>
1358
1359 PR c++/58282
1360 * except.c (build_must_not_throw_expr): Handle
1361 flag_exceptions.
1362
1363 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1364
1365 * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
1366
1367 2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
1368
1369 PR c++/24926
1370 * class.c (finish_struct_anon_r): New.
1371 (finish_struct_anon): Use it.
1372
1373 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1374
1375 * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
1376 Declare as overrider.
1377 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
1378 Rename from pp_cxx_simple_type_specifier.
1379 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1380 simple_type_specifier.
1381
1382 2013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
1383
1384 PR c++/58305
1385 * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
1386
1387 2013-09-03 Mike Stump <mikestump@comcast.net>
1388
1389 * Make-lang.in (cp/lambda.o): Add dependencies.
1390
1391 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1392
1393 * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
1394 overrider.
1395 * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
1396 (pp_cxx_userdef_literal): Tidy.
1397 (pp_cxx_template_argument_list): Likewise.
1398 (pp_cxx_typeid_expression): Likewise.
1399 (pp_cxx_offsetof_expression_1): Likewise.
1400 (cxx_pretty_printer::postfix_expression): Likewise.
1401 (cxx_pretty_printer::unary_expression): Likewise.
1402 (cxx_pretty_printer::statement): Likewise.
1403 (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
1404 (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
1405 * error.c (dump_decl): Tidy.
1406 (dump_expr): Likewise.
1407
1408 2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1409
1410 PR c++/21682, implement DR 565
1411 * name-lookup.c (compparms_for_decl_and_using_decl): New.
1412 (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
1413
1414 2013-08-30 Marek Polacek <polacek@redhat.com>
1415
1416 * typeck.c (cp_build_binary_op): Add division by zero and shift
1417 instrumentation.
1418 * error.c (dump_expr): Special-case ubsan builtins.
1419
1420 2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1421
1422 PR c++/51424
1423 * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
1424 * init.c (perform_target_ctor): Use it.
1425 * call.c (build_special_member_call): Diagnose self-delegating
1426 constructors.
1427
1428 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1429
1430 * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
1431 overrider.
1432 (cxx_pretty_printer::declaration_specifiers): Likewise.
1433 (cxx_pretty_printer::function_specifier): Likewise.
1434 (cxx_pretty_printer::declarator): Likewise.
1435 (cxx_pretty_printer::direct_declarator): Likewise.
1436 (cxx_pretty_printer::abstract_declarator): Likewise.
1437 (cxx_pretty_printer::direct_abstract_declarator): Likewise.
1438 (pp_cxx_declaration): Remove.
1439 * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
1440 Rename from pp_cxx_function_specifier. Adjust.
1441 (cxx_pretty_printer::declaration_specifiers): Rename from
1442 pp_cxx_decl_specifier_seq. Adjust.
1443 (cxx_pretty_printer::direct_declarator): Rename from
1444 pp_cxx_direct_declarator. Adjust.
1445 (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
1446 Adjust.
1447 (cxx_pretty_printer::abstract_declarator): Rename from
1448 pp_cxx_abstract_declarator. Adjust.
1449 (cxx_pretty_printer::direct_abstract_declarator): Rename from
1450 pp_cxx_direct_abstract_declarator. Adjust.
1451 (cxx_pretty_printer::declaration): Rename from
1452 pp_cxx_declaration. Adjust.
1453 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1454 declaration, declaration_specifiers, function_specifier,
1455 declarator, direct_declarator, abstract_declarator,
1456 direct_abstract_declarator.
1457 * error.c (dump_decl): Adjust.
1458
1459 2013-08-29 Jan Hubicka <jh@suse.cz>
1460
1461 Correct previous patch to not mark terminate as LEAF.
1462 * class.c (build_vtbl_initializer): Drop LEAF
1463 * decl.c (cxx_init_decl_processing): Likewise.
1464 (push_throw_library_fn): Likewise.
1465 * except.c (init_exception_processing): Likewise.
1466 (do_begin_catch): Likewise.
1467 (do_end_catch): Likewise.
1468 (do_allocate_exception): Likewise.
1469
1470 2013-08-29 Jan Hubicka <jh@suse.cz>
1471
1472 * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
1473 ECF_NORETURN | ECF_LEAF
1474 * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
1475 push_library_fn, push_void_library_fn): Update prototype.
1476 * decl.c (build_library_fn_1): Remove.
1477 (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
1478 (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
1479 __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
1480 (build_library_fn_1): Add ecf_flags argument; rename to ...
1481 (build_library_fn): ... this one.
1482 (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
1483 (build_library_fn_ptr): Take ecf_flags.
1484 (build_cp_library_fn_ptr): Likewise.
1485 (push_library_fn): Likewise.
1486 (push_cp_library_fn): Likewise.
1487 (push_void_library_fn): Likewise.
1488 (push_throw_library_fn): All throws are ECF_NORETURN.
1489 (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
1490 (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
1491 __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
1492 * except.c (init_exception_processing): terminate is
1493 ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
1494 (declare_nothrow_library_fn): Add ecf_flags parameter.
1495 (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
1496 ECF_TM_PURE.
1497 (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
1498 are ECF_NOTHROW | ECF_LEAF.
1499 (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
1500 ECF_LEAF.
1501 (do_allocate_exception): _cxa_allocate_exception
1502 and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
1503 | ECF_LEAF
1504 (do_free_exception): __cxa_free_exception is
1505 ECF_NOTHROW | ECF_LEAF.
1506 * rtti.c (build_dynamic_cast_1): __dynamic_cast
1507 is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
1508
1509 2013-08-29 Adam Butcher <adam@jessamine.co.uk>
1510
1511 * error.c (dump_lambda_function): New function, dependent on ...
1512 (dump_substitution): ... this new function, factored out of ...
1513 (subst_to_string): ... here and ...
1514 (dump_function_decl): ... here. Updated to early-out with call to
1515 dump_lambda_function after determining template bindings.
1516
1517 2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1518
1519 PR c++/58255
1520 * init.c (build_aggr_init): When init == void_type_node do not
1521 set LOOKUP_ONLYCONVERTING.
1522
1523 2013-08-27 Caroline Tice <cmtice@google.com>
1524
1525 * vtable-class-hierarchy.c: Remove unnecessary include statements.
1526 (MAX_SET_SIZE): Remove unnecessary constant.
1527 (register_construction_vtables): Make vtable_ptr_array parameter
1528 into a vector; remove num_args parameter. Change array accesses to
1529 vector accesses.
1530 (register_other_binfo_vtables): Ditto.
1531 (insert_call_to_register_set): Ditto.
1532 (insert_call_to_register_pair): Ditto.
1533 (output_set_info): Ditto. Also change warning calls to warning_at
1534 calls, and fix format of warning messages.
1535 (register_all_pairs): Change vtbl_ptr_array from an array into a
1536 vector. Remove num_vtable_args (replace with calls to vector length).
1537 Change array stores & accesses to vector functions. Change calls to
1538 register_construction_vtables, register_other_binfo_vtables,
1539 insert_call_to_register_set, insert_call_to_register_pair and
1540 output_set_info to match their new signatures. Change warning to
1541 warning_at and fix the format of the warning message.
1542
1543 2013-08-27 Jakub Jelinek <jakub@redhat.com>
1544 Aldy Hernandez <aldyh@redhat.com>
1545
1546 * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
1547
1548 2013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1549
1550 * decl.c (grokfndecl): Remove old bison hack.
1551
1552 2013-08-26 Jan Hubicka <jh@suse.cz>
1553
1554 * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
1555 middle-end flag.
1556
1557 2013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1558
1559 * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
1560 Declare as overrider.
1561 (cxx_pretty_printer::multiplicative_expression): Likewise.
1562 (cxx_pretty_printer::conditional_expression): Likewise.
1563 (cxx_pretty_printer::assignment_expression): Likewise.
1564 (cxx_pretty_printer::expression): Likewise.
1565 * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
1566 Rename from pp_cxx_unary_expression. Adjust.
1567 (cxx_pretty_printer::multiplicative_expression): Rename from
1568 pp_cxx_multiplicative_expression. Adjust.
1569 (cxx_pretty_printer::conditional_expression): Rename from
1570 pp_cxx_conditional_expression. Adjust.
1571 (cxx_pretty_printer::assignment_expression): Rename from
1572 pp_cxx_assignment_expression. Adjust.
1573 (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
1574 Adjust.
1575 (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
1576 unary_expression, multiplicative_expression,
1577 conditional_expression, assignment_expression, expression.
1578
1579 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1580
1581 * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
1582 Declare as overrider.
1583 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1584 Rename from pp_cxx_postfix_expression. Adjust.
1585 (pp_cxx_expression): Use pp_postfix_expression.
1586 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1587 postfix_expression.
1588
1589 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1590
1591 * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
1592 an overrider of c_pretty_printer::primary_expression.
1593 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
1594 Rename from pp_cxx_primary_expression. Adjust.
1595 (pp_cxx_postfix_expression): Use pp_primary_expression.
1596 (pp_cxx_ctor_initializer): Likewise.
1597 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1598 primary_expression.
1599
1600 2013-08-23 Jan Hubicka <jh@suse.cz>
1601
1602 * cp-tree.h (struct lang_type_class): Free is_final bit.
1603 (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
1604 (DECL_FINAL_P): Remove.
1605 * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
1606 is called on CLASS_TYPE_P.
1607
1608 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1609
1610 * cxx-pretty-print.c (M_): Remove.
1611 (pp_cxx_unqualified_id): Use translate_string instead of M_.
1612 (pp_cxx_canonical_template_parameter): Likewise.
1613
1614 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1615
1616 * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
1617 * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
1618 from pp_cxx_id_expression. Adjust.
1619 (pp_cxx_userdef_literal): Use pp_id_expression.
1620 (pp_cxx_primary_expression): Likewise.
1621 (pp_cxx_direct_declarator): Likewise.
1622 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1623 id_expression.
1624
1625 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1626
1627 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
1628 function, overriding c_pretty_printer::constant.
1629 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
1630 pp_cxx_constant. Adjust.
1631 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
1632
1633 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
1634
1635 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
1636 destructor for the early printer.
1637 * error.c (type_to_string): Use pp_buffer.
1638
1639 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1640
1641 PR c++/56380
1642 * class.c (check_field_decls): Check for const mutable and const
1643 reference data members.
1644
1645 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1646
1647 * error.c (init_error): Remove calls to pp_construct and
1648 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
1649 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1650 (cxx_pretty_printer_init): Remove.
1651 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1652 Rename from cxx_pretty_printer_init. Adjust.
1653 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1654 initialization of C++ diagnostics pretty printer.
1655
1656 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1657
1658 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1659 * cp-tree.h (REFERENCE_REF_P): Likewise.
1660 * semantics.c (finish_offsetof): Likewise.
1661
1662 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1663
1664 PR c++/56130
1665 * semantics.c (finish_id_expression): Handle deprecated references.
1666
1667 2013-08-20 Jason Merrill <jason@redhat.com>
1668
1669 PR c++/58119
1670 * cvt.c (build_expr_type_conversion): Don't complain about a
1671 template that can't match the desired type category.
1672
1673 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
1674
1675 * error.c (pp_ggc_formatted_text): New.
1676 (type_as_string): Use it in lieu of pp_formatted_text.
1677 (type_as_string_translate): Likewise.
1678 (expr_as_string): Likewise.
1679 (decl_as_string): Likewise.
1680 (decl_as_string_translate): Likewise.
1681 (lang_decl_name): Likewise.
1682 (decl_to_string): Likewise.
1683 (expr_to_string): Likewise.
1684 (fndecl_to_string): Likewise.
1685 (parm_to_string): Likewise.
1686 (type_to_string): Likewise.
1687 (args_to_string): Likewise.
1688 (subst_to_string): Likewise.
1689
1690 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1691
1692 PR c/57490
1693 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1694 check for truth values.
1695 (expand_array_notation_exprs): Added truth values case. Removed an
1696 unwanted else. Added for-loop to walk through subtrees in default
1697 case.
1698 * call.c (build_cxx_call): Inherited the type of the array notation for
1699 certain built-in array notation functions.
1700
1701 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1702
1703 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1704 Use cp_parser_lookup_name_simple.
1705
1706 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1707
1708 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1709 * name-lookup.c (pop_bindings_and_leave_scope): Define.
1710 * parser.c (cp_parser_lambda_declarator_opt,
1711 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1712
1713 2013-08-17 Jason Merrill <jason@redhat.com>
1714
1715 PR c++/58083
1716 * name-lookup.c (push_class_level_binding_1): It's OK to push a
1717 lambda type after the enclosing type is complete.
1718
1719 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1720
1721 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1722 Adjust callers.
1723 (dump_template_argument): Likewise.
1724 (dump_template_argument_list): Likewise.
1725 (dump_template_parameter): Likewise.
1726 (dump_template_bindings): Likewise.
1727 (dump_alias_template_specialization): Likewise.
1728 (dump_type): Likewise.
1729 (dump_typename): Likewise.
1730 (dump_aggr_type): Likewise.
1731 (dump_type_prefix): Likewise.
1732 (dump_type_suffix): Likewise.
1733 (dump_global_iord): Likewise.
1734 (dump_simple_decl): Likewise.
1735 (dump_decl): Likewise.
1736 (dump_template_decl): Likewise.
1737 (dump_function_decl): Likewise.
1738 (dump_parameters): Likewise.
1739 (dump_ref_qualifier): Likewise.
1740 (dump_exception_spec): Likewise.
1741 (dump_function_name): Likewise.
1742 (dump_template_parms): Likewise.
1743 (dump_call_expr_args): Likewise.
1744 (dump_aggr_init_expr_args): Likewise.
1745 (dump_expr_list): Likewise.
1746 (dump_expr_init_vec): Likewise.
1747 (dump_expr): Likewise.
1748 (dump_binary_op): Likewise.
1749 (dump_unary_op): Likewise.
1750
1751 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1752
1753 PR c++/51912
1754 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1755 * decl.c (case_conversion): Use it.
1756 * call.c (standard_conversion): Likewise.
1757 (implicit_conversion): Adjust.
1758
1759 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
1760
1761 * pt.c: Grammar fix in comments ("it's" to "its").
1762
1763 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1764
1765 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1766 check_elaborated_type_specifier): Use error + inform.
1767 * friend.c (make_friend_class): Likewise.
1768 * semantics.c (finish_id_expression): Likewise.
1769
1770 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1771
1772 Revert:
1773 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1774
1775 PR c++/46206
1776 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1777 iter->value.
1778
1779 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1780
1781 PR c++/46206
1782 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1783 iter->value.
1784
1785 2013-08-06 Caroline Tice <cmtice@google.com>
1786
1787 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
1788 list.
1789 (vtable-class-hierarchy.o): Add build rule.
1790 * cp-tree.h (vtv_start_verification_constructor_init_function): New
1791 extern function decl.
1792 (vtv_finish_verification_constructor_init_function): New extern
1793 function decl.
1794 (build_vtbl_address): New extern function decl.
1795 (get_mangled_vtable_map_var_name): New extern function decl.
1796 (vtv_compute_class_hierarchy_transitive_closure): New extern function
1797 decl.
1798 (vtv_generate_init_routine): New extern function decl.
1799 (vtv_save_class_info): New extern function decl.
1800 (vtv_recover_class_info): New extern function decl.
1801 (vtv_build_vtable_verify_fndecl): New extern function decl.
1802 * class.c (finish_struct_1): Add call to vtv_save_class_info if
1803 flag_vtable_verify is true.
1804 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1805 * vtable-class-hierarchy.c: New file.
1806 * mangle.c (get_mangled_vtable_map_var_name): New function.
1807 * decl2.c (start_objects): Update function comment.
1808 (cp_write_global_declarations): Call vtv_recover_class_info,
1809 vtv_compute_class_hierarchy_transitive_closure and
1810 vtv_build_vtable_verify_fndecl, before calling
1811 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1812 flag_vtable_verify is true.
1813 (vtv_start_verification_constructor_init_function): New function.
1814 (vtv_finish_verification_constructor_init_function): New function.
1815 * init.c (build_vtbl_address): Remove static qualifier from function.
1816
1817 2013-08-06 Jason Merrill <jason@redhat.com>
1818
1819 PR c++/57825
1820 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1821
1822 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
1823
1824 PR c++/58080
1825 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1826 (cp_build_binary_op): Adjust.
1827
1828 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1829
1830 * cxx-pretty-print.h (pp_c_base): Remove.
1831 (cxx_pretty_printer): Derive from c_pretty_printer.
1832 Adjust macros using pp_c_base.
1833 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1834 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1835 (pp_cxx_colon_colon): Likewise.
1836 (pp_cxx_separate_with): Likewise.
1837 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1838 (pp_cxx_expression_list): Likewise.
1839 (pp_cxx_space_for_pointer_operator): Likewise.
1840 (pp_cxx_init_declarator): Likewise.
1841 (pp_cxx_call_argument_list): Likewise.
1842 (pp_cxx_constant): Likewise.
1843 (pp_cxx_postfix_expression): Likewise.
1844 (pp_cxx_new_expression): Likewise.
1845 (pp_cxx_unary_expression): Likewise.
1846 (pp_cxx_cast_expression): Likewise.
1847 (pp_cxx_conditional_expression): Likewise.
1848 (pp_cxx_assignment_expression): Likewise.
1849 (pp_cxx_expression): Likewise.
1850 (pp_cxx_function_specifier): Likewise.
1851 (pp_cxx_decl_specifier_seq): Likewise.
1852 (pp_cxx_simple_type_specifier): Likewise.
1853 (pp_cxx_type_specifier_seq): Likewise.
1854 (pp_cxx_ptr_operator): Likewise.
1855 (pp_cxx_parameter_declaration_clause): Likewise.
1856 (pp_cxx_direct_declarator): Likewise.
1857 (pp_cxx_direct_abstract_declarator): Likewise.
1858 (pp_cxx_type_id): Likewise.
1859 (pp_cxx_statement): Likewise.
1860 (pp_cxx_pretty_printer_init): Tidy.
1861 * error.c (init_error): Do not use pp_base.
1862 (dump_aggr_type): Likewise.
1863 (dump_type_prefix): Likewise.
1864 (dump_type_suffix): Likewise.
1865 (dump_global_iord): Likewise.
1866 (dump_decl): Likewise.
1867 (dump_function_decl): Likewise.
1868 (dump_ref_qualifier): Likewise.
1869 (reinit_cxx_pp): Likewise.
1870 (decl_as_dwarf_string): Likewise.
1871 (lang_decl_dwarf_name): Likewise.
1872 (type_to_string): Likewise.
1873 (cv_to_string): Likewise.
1874 (cxx_print_error_function): Likewise.
1875 (cp_diagnostic_starter): Likewise.
1876 (cp_diagnostic_finalizer): Likewise.
1877 (cp_print_error_function): Likewise.
1878 (print_instantiation_context): Likewise.
1879 (cp_printer): Likewise.
1880
1881 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1882
1883 * error.c (dump_type_prefix): Use specialized pretty printer
1884 functions instead of pp_string or operators and punctuators.
1885 (dump_decl): Likewise.
1886 (dump_expr): Likewise.
1887
1888 2013-08-03 Jason Merrill <jason@redhat.com>
1889
1890 DR 1286
1891 * pt.c (get_underlying_template): New.
1892 (convert_template_argument, lookup_template_class_1): Use it.
1893
1894 DR 1430
1895 PR c++/51239
1896 * pt.c (pack_expansion_args_count): Rename from
1897 any_pack_expanson_args_p.
1898 (coerce_template_parms): Reject pack expansion to
1899 non-pack template parameter of alias template.
1900
1901 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1902
1903 * error.c (dump_aggr_type): Use specialized pretty printer
1904 functions instead of pp_character.
1905 (dump_type_prefix): Likewise.
1906 (dump_simple_decl): Likewise.
1907 (type_to_string): Likewise.
1908
1909 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1910
1911 * cp-tree.h (finish_stmt): Do not declare.
1912 * decl.c (finish_stmt): Do not define.
1913 * parser.c (cp_parser_expression_statement,
1914 cp_parser_declaration_statement,
1915 cp_parser_transaction_cancel): Don't call finish_stmt.
1916 * semantics.c (finish_expr_stmt, finish_if_stmt,
1917 finish_while_stmt, finish_do_stmt, finish_return_stmt,
1918 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1919 finish_transaction_stmt): Likewise.
1920
1921 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
1922
1923 PR c++/54537
1924 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1925 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1926 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1927 instead of issuing an error without mentioning the conflicting
1928 declaration.
1929
1930 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1931
1932 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1933 return value for error_mark_node.
1934
1935 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1936
1937 PR c++/57673
1938 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1939 token->type == CPP_ELLIPSIS.
1940
1941 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1942
1943 PR c++/57947
1944 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1945
1946 2013-07-29 Jason Merrill <jason@redhat.com>
1947
1948 PR c++/57901
1949 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1950 Use break_out_target_exprs instead of unshare_expr.
1951
1952 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
1953
1954 PR c++/57948
1955 * call.c (initialize_reference): Don't crash when reference_binding
1956 returns a conv with conv->kind == ck_ambig.
1957
1958 2013-07-29 Jason Merrill <jason@redhat.com>
1959
1960 * mangle.c (write_name): Check for null context.
1961 (write_unscoped_name): Allow PARM_DECL context.
1962
1963 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1964
1965 PR c++/57981
1966 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1967 (grokparms): Adjust.
1968 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1969 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1970 a tsubst_flags_t parameter.
1971 (tsubst_decl): Adjust.
1972 * call.c (convert_default_arg): Likewise.
1973 * cp-tree.h (check_default_argument, tsubst_default_argument):
1974 Update declarations.
1975
1976 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1977
1978 PR c++/57880
1979 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1980 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1981 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1982 Fix string_len management, tidy.
1983
1984 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1985
1986 PR c++/57942
1987 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1988 target type is incomplete; return a bool, not an int.
1989 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1990
1991 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
1992
1993 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1994 tf_warning_or_error.
1995
1996 2013-07-21 Ondřej Bílka <neleai@seznam.cz>
1997
1998 * class.c: Fix typos.
1999 * cp-array-notation.c: Likewise.
2000 * cp-objcp-common.c: Likewise.
2001 * decl.c: Likewise.
2002 * init.c: Likewise.
2003 * mangle.c: Likewise.
2004 * parser.c: Likewise.
2005 * pt.c: Likewise.
2006 * semantics.c: Likewise.
2007
2008 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
2009
2010 * semantics.c (build_lambda_expr),
2011 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
2012 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
2013 (is_normal_capture_proxy), (insert_capture_proxy),
2014 (insert_pending_capture_proxies), (lambda_proxy_type),
2015 (build_capture_proxy), (vla_capture_type),
2016 (register_capture_members), (add_default_capture),
2017 (lambda_expr_this_capture), (maybe_resolve_dummy),
2018 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
2019 (is_lambda_ignored_entity): Moved definitions into ...
2020 * lambda.c: ... this new file.
2021
2022 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
2023
2024 * call.c (build_conditional_expr_1): Handle the case with 1 vector
2025 and 2 scalars. Call save_expr before building a vector.
2026 * typeck.c (cp_build_binary_op): Check complain before complaining.
2027
2028 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
2029
2030 PR c++/55203
2031 * init.c (build_aggr_init): Check for warn_unused attribute.
2032 * decl.c (poplevel): Likewise.
2033
2034 2013-07-13 Jason Merrill <jason@redhat.com>
2035
2036 PR c++/57402
2037 * init.c (build_vec_init): Use {} for arrays of class type.
2038 (build_vec_delete): Don't take the address of the array.
2039
2040 PR c++/57793
2041 * class.c (layout_class_type): Check for too-large class.
2042
2043 * call.c (can_convert): Allow user-defined conversions.
2044 (can_convert_standard): New.
2045 * cp-tree.h: Declare it.
2046 * cvt.c (convert_to_reference): Use it.
2047 * pt.c (convert_nontype_argument): Likewise.
2048 * search.c (check_final_overrider): Likewise.
2049 Don't worry about user-defined conversions.
2050
2051 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
2052
2053 PR c++/57869
2054 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
2055 warn about casting between pointer-to-function and pointer-to-object.
2056
2057 2013-07-09 Jason Merrill <jason@redhat.com>
2058
2059 PR c++/57402
2060 * init.c (build_vec_init): Don't take shortcuts when initializing
2061 a VLA.
2062
2063 PR c++/57471
2064 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
2065
2066 PR c++/57658
2067 * semantics.c (finish_id_expression): Return the id for an
2068 unevaluated outer variable.
2069
2070 PR c++/57526
2071 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
2072 if the variable type uses 'auto'.
2073
2074 PR c++/57437
2075 * typeck.c (check_return_expr): Lambda proxies aren't eligible
2076 for nrv or return by move.
2077
2078 PR c++/57532
2079 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
2080 a ref-qualifier in C++98 mode.
2081
2082 PR c++/57545
2083 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
2084 argument to have the exact type of the parameter.
2085
2086 PR c++/57551
2087 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
2088 a POINTER_PLUS_EXPR for type punning diagnostic.
2089
2090 PR c++/57831
2091 * pt.c (tsubst_copy): Handle USING_DECL.
2092
2093 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
2094
2095 PR c++/53094
2096 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
2097
2098 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
2099
2100 PR c++/53000
2101 * call.c (build_conditional_expr_1): Preserve xvalues.
2102
2103 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
2104
2105 PR c++/51786
2106 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
2107 also check declares_class_or_enum.
2108
2109 2013-07-08 Jason Merrill <jason@redhat.com>
2110
2111 PR c++/57550
2112 * pt.c (fn_type_unification): Only defer during substitution.
2113 (type_unification_real): Defer during defarg substitution,
2114 add checks parm to pass back deferred checks.
2115 (unify, do_auto_deduction): Adjust.
2116 * semantics.c (reopen_deferring_access_checks): New.
2117 * cp-tree.h: Declare it.
2118
2119 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
2120
2121 PR c++/28262
2122 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
2123 set parser->default_arg_ok_p to false before cp_parser_declarator.
2124
2125 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
2126
2127 PR c++/14263
2128 * class.c (build_base_path): Improve diagnostic.
2129
2130 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
2131
2132 PR c++/38634
2133 * decl.c (start_preparsed_function): Return a bool, false if
2134 push_template_decl fails.
2135 (start_function): Adjust.
2136 * cp-tree.h: Update.
2137
2138 2013-07-03 Jakub Jelinek <jakub@redhat.com>
2139
2140 PR c++/57771
2141 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
2142 Temporarily set parser->greater_than_is_operator_p for
2143 cp_parser_expression and restore from saved value afterwards.
2144
2145 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
2146
2147 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
2148 * parser.c (cp_parser_operator()): Parse user-defined string
2149 literal as literal operator.
2150
2151 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
2152
2153 PR c++/57645
2154 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
2155 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
2156 destructors.
2157
2158 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2159
2160 * parser.c (cp_parser_array_notation): Removed rejection array notation
2161 of type function pointers. Added handling of array expressions when
2162 Cilk Plus is enabled. Took out type-checking.
2163 (cp_parser_postfix_open_square_expression): Moved normal array expr.
2164 parsing into cp_parser_array_notation when cilkplus is enabled.
2165 (cp_parser_compound_statement): Removed expansion of array notations.
2166 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
2167 (cp_parser_function_definition_after_declarator): Likewise.
2168 (cp_parser_selection_statement): Removed error reporting.
2169 (cp_parser_iteration_statement): Likewise.
2170 (cp_parser_direct_declarator): Removed error checking/reporting if
2171 array notations are used in the declarator.
2172 * pt.c (instantiate_decl): Likewise.
2173 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
2174 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
2175 (potential_constant_expression_1): Returned false for
2176 ARRAY_NOTATION_REF case.
2177 * cp-gimplify.c (cp_genericize): Added expansion of array notation
2178 expressions here.
2179 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
2180 parameters. Replaced build_decls with get_temp_regvar with type as
2181 ptrdiff.
2182 (create_array_refs): Made the type-casting to ptrdiff_type.
2183 (replace_invariant_var): Added a check for void return type before
2184 creating new var. Replaced build_decl and build_min_nt_loc with
2185 get_temp_regvar.
2186 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
2187 with gcc_unreachable. Removed few unwanted checks. Made induction
2188 variable type as ptrdiff_type. Removed loc and complain arguments
2189 passed into make_triplet_val_inv. Replaced all modify expression's
2190 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
2191 into stmt. list with the non-forceful one. Replaced some integer
2192 conversion and equality-checking to using tree_int_cst_equal.
2193 (expand_sec_reduce_builtin): All changes mentioned in above function
2194 expand_an_in_modify_expr. Made the new variable type of
2195 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
2196 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
2197 the error reporting from parser to this function. Removed unwanted
2198 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
2199 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
2200 in function pointers.
2201 (cp_expand_cond_array_notations): Added a new if statements to check
2202 if condition has a zero rank. If so, then just return.
2203 (expand_return_expr): Added a check for return expressions with a rank.
2204 Replaced get_tmp_regvar with a create_temporary_var.
2205 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
2206 Moved common code outside if-statements. Moved type-checking from
2207 parser to here.
2208 * semantics.c (finish_return_stmt): Removed a check for return exprs.
2209 with a rank.
2210 * call.c (convert_like_real): Removed a check for array notation
2211 expression in a function.
2212 (build_over_call): Likewise.
2213 (magic_varargs_p): Added a check for builtin array notation function.
2214 Made this function non-static and removed its prototype.
2215 * cp-tree.h (magic_varargs_p): New prototype.
2216 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
2217 nargs to the param->length when builtin reduction function is used.
2218 (convert_arguments): Replaced check for a constant_p function with
2219 margic_varargs_p function call.
2220 (cp_build_binary_op): Removed calling of the function
2221 find_correct_array_notation_type.
2222 (cp_build_addr_expr_1): Removed an unwanted if-statement.
2223 (convert_for_assignment): Removed automatic return of rhs when array
2224 notation builtin function is used.
2225
2226 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
2227
2228 PR c++/57682
2229 * parser.c (cp_parser_save_member_function_body): Handle correctly
2230 curly braces in function-try-block mem-initializers.
2231
2232 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
2233
2234 PR c++/57509
2235 * typeck.c (cp_build_vec_perm_expr): New function.
2236 * cp-tree.h: Declare it.
2237 * parser.c (cp_parser_postfix_expression): Call it.
2238 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
2239 (tsubst_copy_and_build): Likewise.
2240
2241 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
2242
2243 PR c++/57172
2244 * pt.c (more_specialized_fn): If both arguments are references,
2245 give priority to an lvalue.
2246
2247 2013-06-26 Jason Merrill <jason@redhat.com>
2248
2249 * typeck2.c (store_init_value): Diagnose a non-constant
2250 initializer for in-class static.
2251
2252 PR c++/57408
2253 * semantics.c (add_capture): Set type to error_mark_node after
2254 error.
2255
2256 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
2257
2258 PR c++/57640
2259 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
2260 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
2261
2262 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2263
2264 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
2265 * class.c (add_implicitly_declared_members): Likewise.
2266 (check_field_decl): Likewise.
2267 (finalize_literal_type_property): Likewise.
2268 (check_bases_and_members): Likewise.
2269 * decl.c (poplevel): Likewise.
2270 (case_conversion): Likewise.
2271 (check_initializer): Likewise.
2272 (grokfndecl): Likewise.
2273 (check_static_variable_definition): Likewise.
2274 (compute_array_index_type): Likewise.
2275 (grokdeclarator): Likewise.
2276 (build_enumerator): Likewise.
2277 * friend.c (make_friend_class): Likewise.
2278 * lex.c (init_reswords): Likewise.
2279 * method.c (synthesized_method_walk): Likewise.
2280 (implicitly_declare_fn): Likewise.
2281 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
2282 (cp_parser_constant_expression): Likewise.
2283 (cp_parser_for_init_statement): Likewise.
2284 (cp_parser_block_declaration): Likewise.
2285 (cp_parser_type_name): Likewise.
2286 (cp_parser_enum_specifier): Likewise.
2287 (cp_parser_enumerator_list): Likewise.
2288 (cp_parser_member_declaration): Likewise.
2289 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
2290 (cp_parser_template_declaration_after_export): Likewise.
2291 * pt.c (convert_nontype_argument_function): Likewise.
2292 (convert_nontype_argument): Likewise.
2293 (convert_template_argument): Likewise.
2294 (tsubst_copy_and_build): Likewise.
2295 (build_non_dependent_expr): Likewise.
2296 * semantics.c (non_const_var_error): Likewise.
2297 (potential_constant_expression_1): Likewise.
2298 * tree.c (lvalue_kind): Likewise.
2299 (build_vec_init_expr): Likewise.
2300 (cast_valid_in_integral_constant_expression_p): Likewise.
2301 * typeck.c (build_x_conditional_expr): Likewise.
2302 * typeck2.c (check_narrowing): Likewise.
2303
2304 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2305
2306 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
2307 (expand_an_in_modify_expr): Changed a function call from the above
2308 removed function to length_mismatch_in_expr_p.
2309
2310 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2311
2312 * call.c (convert_like_real): Added a check if array notation is present
2313 in expression. If so, then no conversion of arguments is necessary.
2314 (build_over_call): Likewise.
2315 * typeck.c (cp_build_function_call_vec): Likewise.
2316 (convert_for_assignment): Likewise.
2317 (cp_build_array_ref): Reject array notations with a rank greater than 1
2318 as an array's index.
2319 (cp_build_binary_op): If array notations are preent in op, then call
2320 find_correct_array_notation_type.
2321 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
2322 * cp-array-notation.c: New file.
2323 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
2324 as typed.
2325 * cp-tree.h (fix_array_notation_exprs): New prototype.
2326 * semantics.c (finish_return_stmt): Reject array notations as
2327 return value.
2328 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
2329 (potential_constant_expression_1): Likewise.
2330 * tree.c (lvalue_kind): Likewise.
2331 * error.c (dump_decl): Likewise.
2332 (dump_expr): Likewise.
2333 * pt.c (ARRAY_NOTATION_REF): Likewise.
2334 (type_unification_real): Do not unify any arguments if array notations
2335 are found in arg.
2336 (instantiate_decl): Added a check for array notaitons inside the
2337 function body. If so, then expand them.
2338 * parser.c (cp_parser_array_notation): New function.
2339 (cp_parser_postfix_open_square_expression): Added a check for colons
2340 inside square braces. If found, then handle the array access as an
2341 array notation access. Also, disable auto-correction from a single
2342 colon to scope when Cilk Plus is enabled.
2343 (cp_parser_compound_statement): Added a check for array notations
2344 inside the statement. If found, then expand them.
2345 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
2346 (cp_parser_function_definition_after_declarator): Likewise.
2347 (cp_parser_selection_statement): Searched for array notations inside
2348 condition. If so, then emit an error.
2349 (cp_parser_iteration_statement): Likewise.
2350 (cp_parser_direct_declarator): Reject array notations inside a
2351 variable or array declaration.
2352 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
2353
2354 2013-06-20 Jason Merrill <jason@redhat.com>
2355
2356 PR c++/55149
2357 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
2358 context if we're in C++14 mode.
2359 * tree.c (array_of_runtime_bound_p): Return true for a dependent
2360 bound that is not potentually constant.
2361 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
2362 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
2363 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
2364 (build_capture_proxy): Set REFERENCE_VLA_OK.
2365 (vla_capture_type): Make it a proper C++ class.
2366 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
2367 initializer.
2368
2369 * decl.c (compute_array_index_type): Use size_one_node.
2370
2371 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
2372 a partial specialization.
2373 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
2374 specialization.
2375 (most_specialized_class): Adjust.
2376
2377 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
2378 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
2379 TEMPLATE_DECL_CHECK.
2380
2381 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2382
2383 PR c++/57638
2384 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
2385 TREE_TYPE (arg), not arg itself.
2386
2387 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
2388
2389 PR c++/53211
2390 * pt.c (type_dependent_expression_p): Handle an array of unknown
2391 bound depending on a variadic parameter.
2392 * parser.c (cp_parser_range_for): Revert PR56794 changes.
2393
2394 2013-06-17 Richard Biener <rguenther@suse.de>
2395
2396 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
2397
2398 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
2399
2400 PR c++/16128
2401 * parser.c (cp_parser_expression_statement): Check whether
2402 cp_parser_expression returns error_mark_node.
2403
2404 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2405
2406 PR c++/51413
2407 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
2408
2409 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2410
2411 PR c++/57599
2412 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
2413 accessible base simply forward to build_static_cast.
2414
2415 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2416
2417 PR c++/38958
2418 * decl.c (poplevel): For the benefit of -Wunused-variable see
2419 through references.
2420
2421 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2422
2423 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2424
2425 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2426
2427 PR c++/42021
2428 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
2429 again diagnostic already emitted by cp_parser_lookup_name.
2430
2431 2013-06-11 Jan Hubicka <jh@suse.cz>
2432
2433 PR c++/57551
2434 * cp/pt.c (mark_decl_instantiated): Do not export explicit
2435 instantiations of anonymous namespace templates.
2436
2437 2013-06-10 Jason Merrill <jason@redhat.com>
2438
2439 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
2440 namespace to static_decls.
2441
2442 2013-06-07 Sriraman Tallam <tmsriram@google.com>
2443
2444 PR c++/57548
2445 * call.c (build_over_call): Check if current_function_decl is
2446 NULL.
2447
2448 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
2449
2450 PR c++/53658
2451 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
2452 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2453
2454 2013-06-06 Jason Merrill <jason@redhat.com>
2455
2456 PR c++/55520
2457 * semantics.c (add_capture): Diagnose capture of variable-size
2458 type that is not a C++1y array of runtime bound.
2459
2460 * decl.c (grokdeclarator): Keep a decl with error type.
2461 (grokfield, grokbitfield): Likewise.
2462 * pt.c (instantiate_class_template_1): Likewise.
2463 (tsubst_decl): Drop redundant error.
2464 * class.c (walk_subobject_offsets): Handle erroneous fields.
2465 * typeck2.c (process_init_constructor_record): Likewise.
2466
2467 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
2468
2469 PR c++/51908
2470 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
2471 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2472
2473 2013-06-03 Jan Hubicka <jh@suse.cz>
2474
2475 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
2476 mark_decl_referenced.
2477 (mark_needed): Likewise.
2478
2479 2013-06-03 Jason Merrill <jason@redhat.com>
2480
2481 * class.c (mark_type_abi_tags): New.
2482 (check_abi_tags): Use it.
2483
2484 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2485
2486 PR c++/57419
2487 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
2488 * semantics.c (finish_qualified_id_expr): Use it.
2489 * cp-tree.h: Update.
2490
2491 2013-06-01 Jan Hubicka <jh@suse.cz>
2492
2493 * decl2.c (cp_write_global_declarations): Replace same_body_alias
2494 by symbol.cpp_implicit_alias.
2495
2496 2013-05-30 Jason Merrill <jason@redhat.com>
2497
2498 PR c++/57404
2499 * cp-lang.c (cp_classify_record): Handle structs without
2500 TYPE_LANG_SPECIFIC.
2501
2502 PR c++/52377
2503 * class.c (common_enclosing_class): New.
2504 * cp-tree.h: Declare it.
2505 * init.c (sort_mem_initializers): Don't splice out a union member
2506 with an NSDMI.
2507
2508 2013-05-29 Jan Hubicka <jh@suse.cz>
2509
2510 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
2511 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2512
2513 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
2514
2515 PR c++/25666
2516 * decl2.c (check_classfn): Check for destructors declared as member
2517 templates.
2518
2519 2013-05-24 Jason Merrill <jason@redhat.com>
2520
2521 PR c++/56971
2522 * pt.c (any_template_arguments_need_structural_equality_p): A
2523 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2524
2525 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
2526
2527 PR c++/19618
2528 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
2529 with width exceeding the type.
2530
2531 2013-05-24 Jason Merrill <jason@redhat.com>
2532
2533 PR c++/57391
2534 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
2535 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2536
2537 2013-05-23 Jason Merrill <jason@redhat.com>
2538
2539 PR c++/57388
2540 * tree.c (build_ref_qualified_type): Clear
2541 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2542
2543 2013-05-22 Jason Merrill <jason@redhat.com>
2544
2545 PR c++/56930
2546 * call.c (convert_like_real): Use cp_convert_and_check.
2547 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
2548 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
2549 (potential_constant_expression_1): Handle OMP_ATOMIC*.
2550
2551 PR c++/56915
2552 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
2553 isn't defined.
2554
2555 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2556
2557 PR c++/57352
2558 * parser.c (cp_parser_conversion_type_id): Set up
2559 parser->type_definition_forbidden_message before calling
2560 cp_parser_type_specifier_seq.
2561
2562 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2563
2564 PR c++/57211
2565 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
2566 warnings about defaulted functions.
2567
2568 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
2569
2570 * call.c (build_conditional_expr_1): Add location_t parameter.
2571 (build_conditional_expr): Likewise.
2572 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
2573 get_member_function_from_ptrfunc, build_x_conditional_expr,
2574 cp_build_modify_expr): Update.
2575 * init.c (build_new_1): Likewise.
2576 * cp-tree.h: Update declaration.
2577
2578 2013-05-20 Jason Merrill <jason@redhat.com>
2579
2580 PR c++/57016
2581 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
2582 if there is one.
2583
2584 PR c++/57102
2585 * decl.c (fndecl_declared_return_type): Also look in
2586 DECL_SAVED_FUNCTION_DATA.
2587
2588 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2589
2590 PR c++/12288
2591 * parser.c (cp_parser_parameter_declaration): Check return value
2592 of cp_parser_parse_and_diagnose_invalid_type_name.
2593
2594 2013-05-20 Jason Merrill <jason@redhat.com>
2595
2596 PR c++/57319
2597 * class.c (vbase_has_user_provided_move_assign): New.
2598 * method.c (synthesized_method_walk): Check it.
2599 * cp-tree.h: Declare it.
2600
2601 PR c++/57325
2602 * tree.c (build_cplus_array_type): Copy layout info if element
2603 type is complete.
2604
2605 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2606
2607 PR c++/23608
2608 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2609
2610 2013-05-20 Jason Merrill <jason@redhat.com>
2611
2612 PR c++/57317
2613 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
2614 whether a template has its own args.
2615
2616 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2617
2618 PR c++/57327
2619 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2620
2621 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2622
2623 PR c++/10207
2624 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
2625 instead of cp_parser_initializer_list for compound-literals.
2626
2627 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
2628
2629 PR c++/57175
2630 * typeck.c (check_return_expr): Reverse the alignment comparison.
2631
2632 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
2633
2634 PR c++/18126
2635 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
2636 correctly sizeof compound-literal; update comments.
2637
2638 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
2639
2640 * call.c (build_conditional_expr_1): Use cp_build_binary_op
2641 instead of directly calling fold_build2.
2642
2643 2013-05-16 Jason Merrill <jason@redhat.com>
2644
2645 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2646
2647 PR c++/57279
2648 * decl.c (grokdeclarator): Allow member function qualifiers in
2649 TYPENAME context in C++11 mode.
2650
2651 2013-05-16 Dodji Seketeli <dodji@redhat.com>
2652
2653 PR c++/56782 - Regression with empty pack expansions
2654 * pt.c (use_pack_expansion_extra_args_p): When at least a
2655 parameter pack has an empty argument pack, and another parameter
2656 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2657 mechanism.
2658
2659 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2660
2661 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2662 warning_at and permerror with warning_at/inform and permerror/
2663 inform, respectively.
2664
2665 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2666
2667 PR c++/31952
2668 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2669 redeclarations.
2670
2671 2013-05-14 Jason Merrill <jason@redhat.com>
2672
2673 PR c++/57243
2674 * parser.c (cp_parser_range_for): Call complete_type.
2675
2676 PR c++/57041
2677 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2678
2679 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2680
2681 PR c++/53903
2682 * method.c (defaulted_late_check): Check for compatible exception
2683 specification out of class explicitly defaulted functions too.
2684
2685 2013-05-14 Jason Merrill <jason@redhat.com>
2686
2687 PR c++/56998
2688 * semantics.c (potential_constant_expression_1): Make sure the
2689 called function is potentially constant.
2690 * call.c (null_ptr_cst_p): Revert earlier change.
2691
2692 2013-05-13 Jason Merrill <jason@redhat.com>
2693
2694 PR c++/56998
2695 * call.c (null_ptr_cst_p): An expression with side-effects can't
2696 be a C++03 null pointer constant.
2697
2698 PR c++/57041
2699 * decl.c (reshape_init_class): Handle error_mark_node.
2700
2701 PR c++/57254
2702 * typeck.c (merge_types): Propagate ref-qualifier
2703 in METHOD_TYPE case.
2704
2705 PR c++/57253
2706 * decl.c (grokdeclarator): Apply ref-qualifier
2707 in the TYPENAME case.
2708
2709 PR c++/57252
2710 * decl.c (decls_match): Compare ref-qualifiers.
2711
2712 2013-05-10 Jason Merrill <jason@redhat.com>
2713
2714 PR c++/57196
2715 * pt.c (convert_template_argument): Use dependent_template_arg_p,
2716 not uses_template_parms.
2717
2718 PR c++/57047
2719 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2720
2721 PR c++/55149
2722 * semantics.c (add_capture): Error rather than abort on copy
2723 capture of VLA.
2724 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2725 warn about capture proxy.
2726
2727 2013-05-09 Jason Merrill <jason@redhat.com>
2728
2729 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2730
2731 PR c++/57222
2732 * pt.c (lookup_template_class_1): Handle getting a template
2733 template parameter as D1.
2734
2735 N3639 C++1y VLA diagnostics
2736 * decl.c (grokdeclarator): Complain about reference, pointer, or
2737 typedef to VLA.
2738 (create_array_type_for_decl): Complain about array of VLA.
2739 * pt.c (tsubst): Likewise.
2740 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2741 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2742 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2743 (cxx_sizeof_or_alignof_type): Likewise.
2744
2745 N3639 C++1y VLA support
2746 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2747 (check_array_initializer): Allow VLA init.
2748 (reshape_init_array_1): Adjust.
2749 (cp_finish_decl): Check for invalid VLA length.
2750 * typeck2.c (process_init_constructor_array): Adjust.
2751 (store_init_value): Use build_vec_init for VLAs.
2752 * semantics.c (add_capture): Capture VLA as ptr+len.
2753 (vla_capture_type): New.
2754 (build_capture_proxy): Rebuild the VLA.
2755 * typeck.c (build_simple_component_ref): Split out from...
2756 (build_ptrmemfunc_access_expr): ...here.
2757 * tree.c (array_of_runtime_bound_p): New.
2758 * init.c (throw_bad_array_length): New.
2759 (build_vec_init): Use it.
2760 * parser.c (cp_convert_range_for): When iterating over a VLA,
2761 use it directly rather than bind a reference.
2762 * cp-tree.h: Declare new functions.
2763
2764 2013-05-08 Jason Merrill <jason@redhat.com>
2765
2766 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2767 variably_modified_type_p.
2768 (expand_start_catch_block): Mark the typeinfo used here.
2769 * semantics.c (finish_handler_parms): Not here.
2770
2771 * error.c (dump_type_suffix): Try harder on VLA length.
2772
2773 Core 624/N2932
2774 * init.c (throw_bad_array_new_length): New.
2775 (build_new_1): Use it. Don't warn about braced-init-list.
2776 (build_vec_init): Use it.
2777 * call.c (build_operator_new_call): Use it.
2778
2779 PR c++/57068
2780 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2781 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2782 * error.c (maybe_warn_cpp0x): s/0x/11/.
2783
2784 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2785
2786 PR c++/51226
2787 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2788 == error_mark_node.
2789
2790 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
2791
2792 * typeck.c (cp_build_binary_op): Call save_expr before
2793 build_vector_from_val.
2794
2795 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2796
2797 PR c++/57183
2798 * decl.c (cp_finish_decl): After do_auto_deduction copy the
2799 qualifers with cp_apply_type_quals_to_decl.
2800
2801 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
2802
2803 * pt.c (convert_nontype_argument): Add missing whitespace in
2804 error message.
2805
2806 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2807
2808 PR c++/53745
2809 * decl.c (build_enumerator): Improve error message.
2810
2811 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2812
2813 PR c++/14283
2814 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2815 messages for template types and fix column numbers.
2816
2817 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2818
2819 PR c++/57132
2820 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2821 c_inhibit_evaluation_warnings around build_x_modify_expr call.
2822
2823 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2824
2825 PR c++/57092
2826 * semantics.c (finish_decltype_type): Handle instantiated template
2827 non-type arguments.
2828
2829 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2830
2831 PR c++/56450
2832 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2833
2834 2013-04-26 Jakub Jelinek <jakub@redhat.com>
2835
2836 * error.c (cp_print_error_function): Adjust file_name_as_prefix
2837 caller.
2838
2839 2013-04-25 Jason Merrill <jason@redhat.com>
2840
2841 PR c++/56859
2842 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2843
2844 PR c++/50261
2845 * init.c (perform_member_init): Call reshape_init.
2846
2847 2013-04-24 Jason Merrill <jason@redhat.com>
2848
2849 PR c++/53721
2850 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2851
2852 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2853
2854 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2855 pedwarn to simply use OPT_Wpointer_arith.
2856 (cp_build_unary_op): Likewise.
2857
2858 2013-04-24 Jason Merrill <jason@redhat.com>
2859
2860 N3648: init-captures are named.
2861 * semantics.c (add_capture): Don't prepend "__" to init-captures.
2862 (build_capture_proxy): Adjust.
2863 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2864
2865 N3648: Allow braced and parenthesized initializers.
2866 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2867 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2868 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2869 (add_capture): Collapse a parenthesized initializer into a single
2870 expression.
2871 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2872
2873 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2874
2875 PR c++/56970
2876 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2877 * semantics.c (finish_qualified_id_expr): Likewise.
2878 (finish_id_expression): Update.
2879 * typeck.c (cp_build_addr_expr_1): Likewise.
2880 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2881 * cp-tree.h: Update declarations.
2882
2883 2013-04-22 Jason Merrill <jason@redhat.com>
2884
2885 Core 1586
2886 * parser.c (cp_parser_unqualified_id): Handle ~auto.
2887 (cp_parser_pseudo_destructor_name): Likewise.
2888 (cp_parser_postfix_dot_deref_expression): Adjust.
2889 (cp_lexer_nth_token_is_keyword): New.
2890 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2891 * typeck.c (lookup_destructor): Handle ~auto.
2892
2893 * pt.c (fn_type_unification): Push tinst level around
2894 type_unification_real if we aren't explaining.
2895 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2896 * error.c (dump_function_decl): Respect it.
2897 (subst_to_string): Pass it.
2898
2899 PR c++/48665
2900 * rtti.c (get_typeid): Diagnose qualified function type.
2901 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2902
2903 * error.c (dump_aggr_type): Fix lambda detection.
2904 (dump_simple_decl): Pretty-print capture field.
2905
2906 N3323
2907 * cvt.c (build_expr_type_conversion): Two conversions that return
2908 the same type aren't necessarily ambiguous.
2909
2910 N3648
2911 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2912 pedwarn unconditional except in C++1y mode.
2913
2914 * semantics.c (potential_constant_expression_1): Don't crash on
2915 'this' in NSDMI.
2916
2917 Core 1612
2918 * semantics.c (finish_id_expression): Reject capture of anonymous
2919 union member.
2920
2921 Core 1609
2922 * decl2.c (check_default_args): Check for pack expansion.
2923
2924 * mangle.c (write_type): Mangle decltype(auto).
2925
2926 2013-04-19 Jason Merrill <jason@redhat.com>
2927
2928 N3638 changes to return type deduction
2929 * decl.c (undeduced_auto_decl): New.
2930 (require_deduced_type): New.
2931 (fndecl_declared_return_type): New.
2932 (decls_match): Use it.
2933 (duplicate_decls): Don't check for auto return.
2934 (grokdeclarator): Reject virtual auto.
2935 * class.c (resolve_address_of_overloaded_function): Handle
2936 auto function templates.
2937 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2938 * cp-tree.h: Declare new fns.
2939 * error.c (dump_function_decl): Use fndecl_declared_return_type.
2940 * search.c (check_final_overrider): Likewise.
2941 * pt.c (make_decltype_auto): New.
2942 (do_auto_deduction): Require plain decltype(auto).
2943 (is_auto): Adjust.
2944
2945 DR 941
2946 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2947 template specializations.
2948
2949 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
2950
2951 Implement n3599 - Literal operator templates for strings.
2952 * parser.c (make_string_pack (tree value)): New function.
2953 (cp_parser_userdef_string_literal (cp_token *)): Use it
2954 to construct calls to character string literal operator templates.
2955 (cp_parser_template_declaration_after_export): Check for new string
2956 literal operator template parameter form.
2957
2958 2013-04-15 Jason Merrill <jason@redhat.com>
2959
2960 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2961
2962 PR c++/52748
2963 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2964 rather than a destructor name, it isn't an unqualified-name.
2965 (tsubst_copy_and_build): Pass down decltype_flag to operator
2966 handling code, too.
2967
2968 PR c++/56388
2969 * semantics.c (insert_capture_proxy): Just use index 1 in the
2970 stmt_list_stack.
2971
2972 2013-04-12 Jakub Jelinek <jakub@redhat.com>
2973
2974 * error.c (cp_print_error_function,
2975 print_instantiation_partial_context_line,
2976 maybe_print_constexpr_context): Colorize locus strings.
2977
2978 2013-04-11 Jason Merrill <jason@redhat.com>
2979
2980 PR c++/52748
2981 * parser.c (complain_flags): New.
2982 (cp_parser_postfix_expression): Use it.
2983 (cp_parser_unary_expression): Likewise.
2984 (cp_parser_binary_expression): Likewise.
2985 (cp_parser_assignment_expression): Likewise.
2986 (cp_parser_expression): Likewise.
2987 (cp_parser_postfix_open_square_expression): Take decltype_p.
2988 (cp_parser_builtin_offsetof): Adjust.
2989 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2990 * decl2.c (grok_array_decl): Add decltype_p parm.
2991 * cp-tree.h: Adjust prototype.
2992 * semantics.c (finish_unary_op_expr): Add complain parm.
2993
2994 2013-04-11 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR c++/56895
2997 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2998 calling maybe_constant_value for C++98.
2999
3000 2013-04-11 Jason Merrill <jason@redhat.com>
3001
3002 PR c++/56901
3003 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
3004 Strip references before checking WILDCARD_TYPE_P.
3005
3006 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
3007
3008 * call.c (build_conditional_expr_1, build_over_call): Protect
3009 error calls with complain & tf_error.
3010 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
3011 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
3012 build_ptrmemfunc): Likewise.
3013 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
3014
3015 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
3016 (convert_to_reference): Adjust.
3017
3018 2013-04-11 Jason Merrill <jason@redhat.com>
3019
3020 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
3021 local variables, look them up instead.
3022 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
3023 proxies and substitution in unevaluated context.
3024 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
3025 before the iterators.
3026
3027 PR c++/23055
3028 * pt.c (uses_deducible_template_parms): New.
3029 (deducible_array_bound, deducible_expression): New.
3030 (deducible_template_args): New.
3031 (unify_one_argument): Call uses_deducible_template_parms.
3032
3033 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
3034
3035 PR c++/56913
3036 * typeck2.c (build_m_component_ref): Protect error calls with
3037 (complain & tf_error).
3038
3039 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
3040
3041 PR c++/54216
3042 * parser.c (cp_parser_enum_specifier): Check for empty
3043 anonymous enums and anonymous scoped enums.
3044
3045 2013-04-10 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR c++/56895
3048 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
3049 first before calling maybe_constant_value for warn_for_div_by_zero
3050 or invalid shift count warning purposes.
3051
3052 2013-04-09 Jason Merrill <jason@redhat.com>
3053
3054 PR c++/25466
3055 * rtti.c (build_typeid): Check the address of the argument
3056 rather than looking for an INDIRECT_REF.
3057
3058 2013-04-04 Jason Merrill <jason@redhat.com>
3059
3060 PR c++/56838
3061 PR c++/17232
3062 * typeck2.c (abstract_virtuals_error_sfinae): Disable
3063 complete_type again.
3064
3065 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
3066
3067 PR c++/56871
3068 * decl.c (validate_constexpr_redeclaration): Allow an explicit
3069 specialization to be different wrt the constexpr specifier.
3070
3071 2013-04-06 Jason Merrill <jason@redhat.com>
3072
3073 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
3074 noreturn attribute.
3075
3076 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
3077
3078 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
3079 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
3080
3081 2013-04-03 Jason Merrill <jason@redhat.com>
3082
3083 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
3084 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
3085 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
3086
3087 * mangle.c (write_type): When writing a function type with
3088 function-cv-quals, don't add the unqualified type as a
3089 substitution candidate.
3090
3091 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
3092
3093 PR c++/56815
3094 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
3095 pedwarn.
3096
3097 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3098
3099 PR debug/56819
3100 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
3101 from args to new_args.
3102 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
3103 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
3104
3105 2013-04-02 Jason Merrill <jason@redhat.com>
3106
3107 PR c++/56821
3108 * mangle.c (write_function_type): Mangle ref-qualifier.
3109 (write_nested_name): Likewise.
3110 (canonicalize_for_substitution): Preserve ref-qualifier.
3111 (write_type): Likewise.
3112
3113 PR c++/34949
3114 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
3115
3116 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
3117
3118 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
3119 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
3120 (for_each_template_parm_r): Use TYPE_TI_ARGS.
3121
3122 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
3123
3124 * cp-tree.h (TAGGED_TYPE_P): Remove.
3125 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
3126 (TYPE_ANONYMOUS_P): Adjust.
3127 * call.c (build_new_op_1): Likewise.
3128 * class.c (find_abi_tags_r): Likewise.
3129 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
3130 type_is_deprecated): Likewise.
3131 * decl2.c (grokfield, min_vis_r): Likewise.
3132 * pt.c (get_template_info): Likewise.
3133 * tree.c (handle_abi_tag_attribute): Likewise.
3134
3135 2013-04-01 Jason Merrill <jason@redhat.com>
3136
3137 * semantics.c (maybe_constant_value): Check
3138 instantiation_dependent_expression_p.
3139 * pt.c (build_non_dependent_expr): Don't check it here.
3140
3141 PR c++/56772
3142 * init.c (build_new): Don't try to process an array initializer
3143 at template definition time.
3144
3145 PR c++/56793
3146 * typeck.c (finish_class_member_access_expr): Handle enum scope.
3147
3148 PR c++/56794
3149 * parser.c (cp_parser_range_for): Don't try to do auto deduction
3150 in a template if the type of the range is incomplete.
3151
3152 * call.c (add_function_candidate): Take the address of 'this' here.
3153 (build_over_call): And here.
3154 (build_new_method_call_1, build_op_call_1): Not here.
3155 (build_user_type_conversion_1): Or here.
3156 (add_candidates): Adjust.
3157
3158 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
3159 * class.c (same_signature_p): Use type_memfn_quals.
3160 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
3161 FUNCTION_OR_METHOD_TYPE_CHECK.
3162 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
3163 * pt.c (unify): Use static_fn_type.
3164
3165 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
3166 Jason Merrill <jason@redhat.com>
3167
3168 Implement N2439 (ref-qualifiers for 'this')
3169 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
3170 (FUNCTION_RVALUE_QUALIFIED): New.
3171 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
3172 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
3173 (cp_ref_qualifier): New enum.
3174 (cp_declarator): Add ref_qualifier.
3175 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
3176 (cp_parser_direct_declarator): Use it.
3177 (make_call_declarator): Adjust.
3178 (cp_parser_lambda_declarator_opt): Adjust.
3179 * call.c (add_function_candidate): Handle ref-qualifier overload
3180 resolution semantics.
3181 (standard_conversion): Adjust.
3182 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
3183 * decl.c (grokdeclarator): Handle ref-qualifiers.
3184 (grokfndecl): Check for invalid ref-qualifiers.
3185 (static_fn_type, revert_static_member_fn): Adjust.
3186 * decl2.c (build_memfn_type): Handle ref-qualifiers.
3187 (check_classfn): Check them.
3188 (cp_reconstruct_complex_type): Retain them.
3189 * error.c (dump_ref_qualifier): New.
3190 (dump_type_suffix, dump_function_decl): Use it.
3191 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
3192 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
3193 (unify): Retain them.
3194 * tree.c (cp_check_qualified_type): New.
3195 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
3196 (build_ref_qualified_type): New.
3197 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
3198 (cp_build_type_attribute_variant): Keep ref-qualifier.
3199 * typeck.c (merge_types): Keep ref-qualifier.
3200 (structural_comptypes): Compare ref-qualifier.
3201 (type_memfn_rqual): New.
3202 (apply_memfn_quals): Take ref-qual argument.
3203 * typeck2.c (build_m_component_ref): Check ref-qualifier.
3204
3205 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
3206
3207 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
3208 (DECL_FUNCTION_TEMPLATE_P): Adjust.
3209
3210 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
3211 pp_cxx_qualified_id): Use get_containing_scope.
3212 * parser.c (cp_parser_class_head): Likewise.
3213 * pt.c (push_template_decl_real): Likewise.
3214
3215 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
3216 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
3217
3218 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
3219
3220 * decl2.c (collect_candidates_for_java_method_aliases): Use
3221 DECL_CLASS_SCOPE_P.
3222 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
3223 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
3224 * decl.c (duplicate_decls): Likewise.
3225 * parser.c (cp_parser_template_declaration_after_export): Likewise,
3226 also DECL_DECLARES_TYPE_P.
3227 * pt.c (instantiate_class_template_1): Likewise.
3228 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
3229 (lookup_field_r): Likewise.
3230 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
3231 (lookup_fnfields_slot_nolazy): Likewise.
3232 * semantics.c (finish_member_declaration): Likewise.
3233 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
3234
3235 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3236
3237 * pt.c (template_parms_to_args): Fix typo in comment.
3238
3239 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
3240
3241 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
3242
3243 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
3244
3245 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
3246 (build_op_call_1): Likewise.
3247 (build_over_call): Likewise.
3248 (compare_ics): Likewise.
3249 * class.c (build_base_path): Likewise.
3250 (resolve_address_of_overloaded_function): Likewise.
3251 * cp-tree.h: Likewise.
3252 * cvt.c (cp_convert_to_pointer): Likewise.
3253 (convert_to_reference): Likewise.
3254 (ocp_convert): Likewise.
3255 (convert_force): Likewise, tidy.
3256 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
3257 (pp_cxx_ptr_operator): Likewise.
3258 * decl.c (duplicate_decls): Likewise.
3259 (start_decl): Likewise.
3260 (grok_op_properties): Likewise.
3261 (start_preparsed_function): Likewise.
3262 (store_parm_decls): Likewise.
3263 (finish_function): Likewise.
3264 * decl2.c (delete_sanity): Likewise.
3265 (acceptable_java_type): Likewise.
3266 (grokbitfield): Likewise.
3267 (cp_reconstruct_complex_type): Likewise.
3268 * error.c (dump_type_prefix): Likewise.
3269 (dump_expr): Likewise.
3270 * except.c (push_eh_cleanup): Likewise.
3271 (complete_ptr_ref_or_void_ptr_p): Likewise.
3272 (can_convert_eh): Likewise.
3273 * init.c (build_new_1): Likewise.
3274 (build_delete): Likewise.
3275 (build_vec_delete): Likewise.
3276 * mangle.c (write_type): Likewise.
3277 * parser.c (lookup_literal_operator): Likewise.
3278 * pt.c (convert_nontype_argument_function): Likewise.
3279 (convert_nontype_argument): Likewise.
3280 (tsubst): Likewise.
3281 (unify): Likewise.
3282 (dependent_type_p_r): Likewise.
3283 * rtti.c (build_headof): Likewise.
3284 (build_typeid): Likewise.
3285 (build_dynamic_cast_1): Likewise.
3286 (target_incomplete_p): Likewise.
3287 (typeinfo_in_lib_p): Likewise.
3288 * semantics.c (finish_omp_for): Likewise.
3289 (cxx_eval_call_expression): Likewise.
3290 (maybe_resolve_dummy): Likewise.
3291 * tree.c (build_target_expr): Likewise.
3292 (cp_build_qualified_type_real): Likewise.
3293 * typeck.c (composite_pointer_type_r): Likewise.
3294 (composite_pointer_type): Likewise.
3295 (comp_except_types): Likewise.
3296 (cxx_sizeof_nowarn): Likewise.
3297 (string_conv_p): Likewise.
3298 (cp_build_array_ref): Likewise.
3299 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
3300 (pointer_diff): Likewise.
3301 (cp_build_addr_expr_1): Likewise.
3302 (cp_build_unary_op): Likewise.
3303 (build_static_cast_1): Likewise.
3304 (cp_build_c_cast): Likewise.
3305 (comp_ptr_ttypes_real): Likewise.
3306 (ptr_reasonably_similar): Likewise.
3307 (comp_ptr_ttypes_const): Likewise.
3308 (casts_away_constness): Likewise.
3309 (check_literal_operator_args): Likewise.
3310 * typeck2.c (build_x_arrow): Likewise.
3311 (add_exception_specifier): Likewise.
3312
3313 2013-03-29 Jason Merrill <jason@redhat.com>
3314
3315 N3582
3316 * cp-tree.h (AUTO_IS_DECLTYPE): New.
3317 * parser.c (cp_parser_decltype): Handle decltype(auto).
3318 (cp_parser_type_id_1): Allow auto without a late-specified
3319 return in C++1y.
3320 (cp_parser_primary_expression): Use the return value of
3321 finish_parenthesized_expr.
3322 (cp_parser_transaction_expression): Likewise.
3323 * semantics.c (force_paren_expr): New.
3324 (finish_parenthesized_expr): Use it.
3325 * call.c (build_conditional_expr_1): Likewise.
3326 * pt.c (do_auto_deduction): Handle decltype(auto).
3327 (tsubst_copy): Handle PAREN_EXPR.
3328 (tsubst_copy_and_build): Likewise.
3329 * error.c (dump_expr): Handle PAREN_EXPR.
3330 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
3331 * mangle.c (write_expression): Ignore PAREN_EXPR.
3332
3333 * parser.c (cp_parser_decltype_expr): Split out...
3334 (cp_parser_decltype): ...from here.
3335
3336 PR c++/56774
3337 PR c++/35722
3338 * pt.c (unify_pack_expansion): Fix indexing.
3339
3340 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3341
3342 * call.c (build_java_interface_fn_ref): Likewise.
3343 (make_temporary_var_for_ref_to_temp): Likewise.
3344 * class.c (check_field_decls): Likewise.
3345 (layout_class_type): Likewise.
3346 (finish_struct_1): Likewise.
3347 (fixed_type_or_null): Likewise.
3348 (get_vtbl_decl_for_binfo): Likewise.
3349 * cp-gimplify.c (omp_var_to_track): Likewise.
3350 (cp_genericize_r): Likewise.
3351 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
3352 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
3353 (DECL_DISCRIMINATOR_P): Likewise.
3354 * decl.c (poplevel): Likewise.
3355 (decls_match): Likewise.
3356 (duplicate_decls): Likewise.
3357 (decl_jump_unsafe): Likewise.
3358 (start_decl): Likewise.
3359 (check_for_uninitialized_const_var): Likewise.
3360 (make_rtl_for_nonlocal_decl): Likewise.
3361 (cp_finish_decl): Likewise.
3362 (expand_static_init): Likewise.
3363 (local_variable_p): Likewise.
3364 (maybe_register_incomplete_var): Likewise.
3365 * decl2.c (grokfield): Likewise.
3366 (comdat_linkage): Likewise.
3367 (determine_visibility): Likewise.
3368 (import_export_decl): Likewise.
3369 (prune_vars_needing_no_initialization): Likewise.
3370 (decl_maybe_constant_var_p): Likewise.
3371 * error.c (dump_simple_decl): Likewise.
3372 (dump_template_decl): Likewise.
3373 (cp_printer): Likewise.
3374 * except.c (build_throw): Likewise.
3375 * init.c (build_vtbl_address): Likewise.
3376 (member_init_ok_or_else): Likewise.
3377 (build_aggr_init): Likewise.
3378 (expand_aggr_init_1): Likewise.
3379 (build_offset_ref): Likewise.
3380 (constant_value_1): Likewise.
3381 * mangle.c (write_mangled_name): Likewise.
3382 (write_prefix): Likewise.
3383 * name-lookup.c (supplement_binding_1): Likewise.
3384 (add_decl_to_level): Likewise.
3385 (pushdecl_maybe_friend_1): Likewise.
3386 (check_for_out_of_scope_variable): Likewise.
3387 (validate_nonmember_using_decl): Likewise.
3388 (lookup_name_innermost_nonclass_level_1): Likewise.
3389 (lookup_arg_dependent_1): Likewise.
3390 * parser.c (cp_parser_lambda_introducer): Likewise.
3391 (cp_parser_template_argument): Likewise.
3392 (cp_parser_single_declaration): Likewise.
3393 * pt.c (convert_nontype_argument): Likewise.
3394 (instantiate_class_template_1): Likewise.
3395 (tsubst_decl): Likewise.
3396 (tsubst_expr): Likewise.
3397 (do_decl_instantiation): Likewise.
3398 (do_type_instantiation): Likewise.
3399 (regenerate_decl_from_template): Likewise.
3400 (always_instantiate_p): Likewise.
3401 (instantiate_decl): Likewise.
3402 (type_dependent_expression_p): Likewise.
3403 (build_non_dependent_expr): Likewise.
3404 * repo.c (repo_emit_p): Likewise.
3405 * rtti.c (build_dynamic_cast_1): Likewise.
3406 * search.c (shared_member_p): Likewise.
3407 * semantics.c (outer_var_p): Likewise.
3408 (finish_id_expression): Likewise.
3409 (finish_omp_clauses): Likewise.
3410 (finish_decltype_type): Likewise.
3411 (ensure_literal_type_for_constexpr_object): Likewise.
3412 * tree.c (lvalue_kind): Likewise.
3413 (bot_replace): Likewise.
3414 (cp_tree_equal): Likewise.
3415 (handle_init_priority_attribute): Likewise.
3416 (decl_storage_duration): Likewise.
3417 * typeck.c (cxx_sizeof_expr): Likewise.
3418 (cxx_alignof_expr): Likewise.
3419 (decay_conversion): Likewise.
3420 (build_class_member_access_expr): Likewise.
3421 (cp_build_array_ref): Likewise.
3422 (cxx_mark_addressable): Likewise.
3423 (maybe_warn_about_returning_address_of_local): Likewise.
3424 (check_return_expr): Likewise.
3425 * typeck2.c (cxx_readonly_error): Likewise.
3426 (abstract_virtuals_error_sfinae): Likewise.
3427 (cxx_incomplete_type_diagnostic): Likewise.
3428
3429 2013-03-28 Lawrence Crowl <crowl@google.com>
3430
3431 * Make-lang.in
3432 (CXX_PARSER_H): Add header dependence.
3433 * cp-tree.h
3434 (extern debug (cp_binding_level &)): New.
3435 (extern debug (cp_binding_level *)): New.
3436 * name-lookup.h
3437 (debug (cp_binding_level &)): New.
3438 (debug (cp_binding_level *)): New.
3439 * parser.c
3440 (debug (cp_parser &)): New.
3441 (debug (cp_parser *)): New.
3442 (debug (cp_token &)): New.
3443 (debug (cp_token *)): New.
3444 (debug (vec<cp_token, va_gc> &)): New.
3445 (debug (vec<cp_token, va_gc> *)): New.
3446 * parser.c: Add header dependence.
3447 (extern debug (cp_parser &)): New.
3448 (extern debug (cp_parser *)): New.
3449 (extern debug (cp_token &)): New.
3450 (extern debug (cp_token *)): New.
3451 (extern debug (vec<cp_token, va_gc> &)): New.
3452 (extern debug (vec<cp_token, va_gc> *)): New.
3453
3454 2013-03-28 Jason Merrill <jason@redhat.com>
3455
3456 PR c++/17232
3457 PR c++/52748
3458 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
3459 the type if tf_decltype is set.
3460 * pt.c (fn_type_unification): Add decltype_p parm.
3461 (get_bindings): Adjust.
3462 * cp-tree.h: Adjust.
3463 * class.c (resolve_address_of_overloaded_function): Adjust.
3464 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
3465
3466 PR c++/56679
3467 * parser.c (cp_parser_sizeof_pack): Split out from...
3468 (cp_parser_sizeof_operand): ...here. Require (id).
3469
3470 PR c++/56701
3471 * semantics.c (finish_this_expr): 'this' is an rvalue.
3472 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
3473
3474 PR c++/56710
3475 * semantics.c (finish_member_declaration): Don't push closure
3476 members.
3477
3478 * name-lookup.c (pushdecl_maybe_friend_1): Use
3479 nonlambda_method_basetype and current_nonlambda_class_type.
3480
3481 PR c++/56728
3482 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
3483 conversion from integer to pointer.
3484 (cxx_eval_constant_expression): Likewise.
3485 (cxx_eval_indirect_ref): Use the folded operand if we still think
3486 this might be constant.
3487
3488 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3489 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3490
3491 PR c++/56725
3492 * call.c (convert_like_real): Change series of two permerrors
3493 to permerror + inform (and likewise for two errors).
3494 (build_new_method_call_1): Likewise.
3495 * typeck.c (convert_for_initialization): Change additional
3496 warning or error to inform.
3497
3498 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3499
3500 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
3501 (first_aggr_init_expr): Likewise.
3502 (more_aggr_init_expr_args_p): Likewise.
3503 (type_of_this_parm): Likewise.
3504 (class_of_this_parm): Likewise.
3505 * name-lookup.h (get_global_value_if_present): Likewise.
3506 (is_typename_at_global_scope): Likewise.
3507
3508 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3509
3510 * call.c (joust): Don't call inform for a permerror returning false.
3511 * parser.c (cp_parser_check_class_key): Likewise.
3512 * pt.c (tsubst_copy_and_build): Likewise.
3513
3514 2013-03-27 Jason Merrill <jason@redhat.com>
3515
3516 PR c++/56749
3517 * semantics.c (finish_qualified_id_expr): Return early
3518 for enum scope.
3519
3520 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3521
3522 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
3523 * cvt.c (convert_to_void): Likewise.
3524 * error.c (dump_expr): Likewise.
3525 * mangle.c (write_expression): Likewise.
3526 * parser.c (cp_parser_template_argument): Likewise.
3527 * pt.c (convert_nontype_argument): Likewise.
3528 (tsubst_copy_and_build): Likewise.
3529 * rtti.c (build_typeid): Likewise.
3530 * semantics.c (finish_call_expr): Likewise.
3531 (finish_decltype_type): Likewise.
3532 (build_data_member_initialization): Likewise.
3533 * tree.c (is_dummy_object): Likewise.
3534 * typeck.c (decay_conversion): Likewise.
3535 (build_class_member_access_expr): Likewise.
3536 (cp_build_addr_expr_1): Likewise.
3537 (unary_complex_lvalue): Likewise.
3538 (check_return_expr): Likewise.
3539 * typeck2.c (cxx_readonly_error): Likewise.
3540
3541 2013-03-26 Jason Merrill <jason@redhat.com>
3542
3543 PR c++/52597
3544 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
3545 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
3546 * cp-tree.h: Adjust prototype.
3547
3548 PR c++/45282
3549 * typeck2.c (build_m_component_ref): Handle prvalue object.
3550
3551 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3552
3553 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
3554 * decl.c (duplicate_decls): Likewise.
3555 (cp_finish_decl): Likewise.
3556 (check_class_member_definition_namespace): Likewise.
3557 * decl2.c (grokfield): Likewise.
3558 (decl_needed_p): Likewise.
3559 (import_export_decl): Likewise.
3560 (mark_used): Likewise.
3561 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
3562 * pt.c (push_access_scope): Likewise.
3563 (instantiate_decl): Likewise.
3564 * ptree.c (cxx_print_decl): Likewise.
3565 * repo.c (repo_emit_p): Likewise.
3566 * semantics.c (note_decl_for_pch): Likewise.
3567 * tree.c (decl_linkage): Likewise.
3568
3569 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3570
3571 PR c++/55951
3572 * decl.c (check_array_designated_initializer): Handle CONST_DECL
3573 as ce->index.
3574
3575 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3576
3577 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
3578 error messages.
3579
3580 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
3581
3582 2013-03-25 Jason Merrill <jason@redhat.com>
3583
3584 PR c++/56699
3585 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
3586 class is derived from the type of the object.
3587
3588 PR c++/52014
3589 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
3590 unevaluated context.
3591
3592 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
3593
3594 PR c++/56722
3595 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
3596 DECL_TEMPLATE_INSTANTIATION.
3597
3598 2013-03-22 Jason Merrill <jason@redhat.com>
3599
3600 PR c++/56684
3601 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
3602 and CONST_DECL.
3603
3604 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3605
3606 * cp-tree.h (identifier_p): New.
3607 * call.c: Throughout, call identifier_p insstead of direct
3608 comparaison of TREE_CODE against IDENTIFIER_NODE.
3609 * decl.c: Likewisse.
3610 * decl2.c: Likewise.
3611 * init.c: Likewise.
3612 * mangle.c: Likewise.
3613 * name-lookup.c: Likewise.
3614 * parser.c: Likewise.
3615 * pt.c: Likewise.
3616 * search.c: Likewise.
3617 * semantics.c: Likewise.
3618 * tree.c: Likewise.
3619 * typeck.c: Likewise.
3620 * typeck2.c: Likewise.
3621
3622 2013-03-21 Jakub Jelinek <jakub@redhat.com>
3623
3624 PR middle-end/48087
3625 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
3626 * call.c (build_temp): Likewise.
3627 * method.c (synthesize_method): Likewise.
3628 * typeck.c (convert_for_initialization): Likewise.
3629
3630 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
3631
3632 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
3633
3634 2013-03-21 Richard Biener <rguenther@suse.de>
3635
3636 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
3637 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3638
3639 2013-03-20 Jason Merrill <jason@redhat.com>
3640
3641 PR c++/56646
3642 * parser.c (cp_parser_late_return_type_opt): Save and restore
3643 current_class_ptr/ref.
3644
3645 PR c++/54532
3646 * expr.c (cplus_expand_constant): Do nothing if the class is
3647 incomplete.
3648 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3649 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3650 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3651 (complete_vars): Likewise.
3652
3653 * name-lookup.c (get_anonymous_namespace_name): Never use
3654 get_file_function_name.
3655
3656 * pt.c (retrieve_specialization): Handle null tmpl argument.
3657
3658 PR c++/17232
3659 PR c++/56642
3660 * pt.c (tsubst_decl): Check return value of register_specialization.
3661 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3662 change.
3663
3664 2013-03-17 Jason Merrill <jason@redhat.com>
3665
3666 PR c++/54359
3667 PR c++/56639
3668 * parser.c (cp_parser_direct_declarator): Bail if we see a
3669 qualified-id not at namespace scope.
3670
3671 PR c++/17232
3672 PR c++/56642
3673 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3674 change for now.
3675
3676 2013-03-16 Jason Merrill <jason@redhat.com>
3677
3678 * decl.c (grokdeclarator): Assert that we won't see a pointer to
3679 METHOD_TYPE.
3680
3681 PR c++/54277
3682 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3683 (MAYBE_CLASS_TYPE_P): ...here.
3684 * semantics.c (lambda_capture_field_type): Only build a
3685 magic decltype for wildcard types.
3686 (lambda_proxy_type): Likewise.
3687 (finish_non_static_data_member): Get the quals from
3688 the object.
3689
3690 PR c++/55931
3691 * parser.c (cp_parser_template_argument): Don't
3692 fold_non_dependent_expr.
3693
3694 * parser.c (cp_parser_lambda_declarator_opt): Use
3695 cp_parser_trailing_type_id.
3696
3697 PR c++/45917
3698 * parser.c (cp_parser_template_id): Don't forget access checks.
3699
3700 PR c++/52374
3701 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3702
3703 PR c++/54764
3704 PR c++/55972
3705 * name-lookup.h (tag_scope): Add ts_lambda.
3706 * semantics.c (begin_lambda_type): Use it.
3707 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3708 * pt.c (check_default_tmpl_args): Ignore lambdas.
3709 (push_template_decl_real): Handle lambdas.
3710 * tree.c (no_linkage_check): Adjust lambda check.
3711
3712 PR c++/56039
3713 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3714
3715 PR c++/54359
3716 * parser.c (cp_parser_direct_declarator): Fix late return
3717 for out-of-class defn of member function.
3718
3719 PR c++/55357
3720 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3721 parms to avoid duplicate -Wshadow warnings.
3722
3723 * search.c (lookup_base): Handle NULL_TREE.
3724
3725 PR c++/56481
3726 * semantics.c (potential_constant_expression_1): Use of 'this' in
3727 a non-constexpr function makes the expression not potentially
3728 constant.
3729
3730 N3276
3731 PR c++/52748
3732 * cp-tree.h (tsubst_flags): Add tf_decltype.
3733 * call.c (build_cxx_call): Don't build a temporary if it's set.
3734 (build_over_call): Make sure it's only passed to build_cxx_call.
3735 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3736 (cp_parser_unary_expression): Likewise.
3737 (cp_parser_cast_expression): Likewise.
3738 (cp_parser_binary_expression): Likewise.
3739 (cp_parser_assignment_expression): Likewise.
3740 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
3741 (cp_parser_expression): Add decltype_p. Force a
3742 temporary for a call on the LHS of a comma.
3743 (cp_parser_decltype): Pass true to decltype_p parms.
3744 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3745 (tsubst_copy_and_build): Pass tf_decltype down only for
3746 CALL_EXPR and the RHS of COMPOUND_EXPR.
3747 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3748
3749 * cp-tree.h (abstract_class_use): New enum.
3750 * typeck2.c (pending_abstract_type): Add use field.
3751 (abstract_virtuals_error_sfinae): Add overloads taking
3752 abstract_class_use instead of tree.
3753 * typeck.c (build_static_cast_1): Call it.
3754 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3755 * pt.c: Adjust calls.
3756 * decl.c (cp_finish_decl): Don't handle functions specially.
3757 (grokdeclarator): Always check return type.
3758 * init.c (build_new_1): Adjust call.
3759
3760 DR 337
3761 PR c++/17232
3762 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3763 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3764
3765 DR 657
3766 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3767 (tsubst_arg_types): Likewise.
3768
3769 DR 1518
3770 PR c++/54835
3771 * call.c (convert_like_real): Check for explicit constructors
3772 even for value-initialization.
3773
3774 PR c++/54946
3775 * pt.c (convert_nontype_argument): Handle invalid pointer.
3776
3777 * parser.c (cp_parser_lambda_expression): Use nreverse.
3778
3779 PR c++/56447
3780 PR c++/55532
3781 * pt.c (instantiate_class_template_1): Instantiate lambda capture
3782 list here.
3783 (tsubst_copy_and_build): Not here.
3784
3785 PR c++/55017
3786 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3787
3788 PR c++/55240
3789 * parser.c (parsing_nsdmi): New.
3790 * semantics.c (outer_automatic_var_p): Check it.
3791 (finish_id_expression): Likewise.
3792 * cp-tree.h: Declare it.
3793
3794 PR c++/55241
3795 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3796
3797 * parser.c (lookup_literal_operator): Correct parm/arg naming
3798 mixup.
3799
3800 PR c++/56238
3801 * pt.c (fold_non_dependent_expr_sfinae): Check
3802 instantiation_dependent_expression_p.
3803
3804 PR c++/56095
3805 * class.c (resolve_address_of_overloaded_function): Accept a
3806 reference to function for target_type.
3807 (instantiate_type): Likewise.
3808 * pt.c (convert_nontype_argument): Pass it to
3809 convert_nontype_argument_function.
3810
3811 2013-03-16 Jakub Jelinek <jakub@redhat.com>
3812
3813 * tree.c (cp_tree_equal): Fix a pasto.
3814
3815 PR c++/56607
3816 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3817 pass op1 through maybe_constant_value first.
3818
3819 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
3820
3821 PR c++/56582
3822 * semantics.c (cxx_eval_array_reference): Check for negative index.
3823
3824 2013-03-14 Jason Merrill <jason@redhat.com>
3825
3826 PR c++/56614
3827 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3828
3829 PR c++/56346
3830 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3831 dso_handle parm on targets without __cxa_atexit.
3832
3833 2013-03-11 Jason Merrill <jason@redhat.com>
3834
3835 PR c++/56567
3836 * typeck.c (check_return_expr): Disallow returning init list here.
3837 * semantics.c (apply_deduced_return_type): Not here.
3838
3839 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
3840
3841 PR c++/51412
3842 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3843 * error.c (dump_expr): Likewise.
3844
3845 2013-03-08 Jason Merrill <jason@redhat.com>
3846
3847 PR c++/51884
3848 * class.c (modify_all_vtables): Mangle the vtable name before
3849 entering dfs_walk.
3850
3851 * semantics.c (lambda_expr_this_capture): In unevaluated context,
3852 just return the nearest 'this'.
3853
3854 PR c++/51494
3855 PR c++/52183
3856 PR c++/56222
3857 * tree.c (maybe_dummy_object): Don't capture 'this'.
3858 * semantics.c (maybe_resolve_dummy): New.
3859 (finish_non_static_data_member): Use it.
3860 (finish_qualified_id_expr): Don't test is_dummy_object.
3861 * cp-tree.h: Declare maybe_resolve_dummy.
3862 * call.c (build_new_method_call_1): Use it.
3863
3864 PR c++/56567
3865 * semantics.c (apply_deduced_return_type): Don't allow returning
3866 std::initializer_list.
3867
3868 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3869
3870 PR c++/56534
3871 * parser.c (cp_parser_elaborated_type_specifier): Don't call
3872 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3873 * decl.c (check_elaborated_type_specifier): Tidy.
3874
3875 2013-03-06 Jakub Jelinek <jakub@redhat.com>
3876
3877 PR c++/56543
3878 * tree.c (strip_typedefs): Don't copy args if they are NULL.
3879
3880 2013-03-05 Jakub Jelinek <jakub@redhat.com>
3881
3882 * parser.c (cp_parser_braced_list): For {} initialize
3883 *non_constant_p to false.
3884
3885 2013-03-04 Jason Merrill <jason@redhat.com>
3886
3887 PR c++/56464
3888 PR c++/54383
3889 * semantics.c (lambda_expr_this_capture): Handle NSDMI
3890 and non-class scopes.
3891
3892 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3893
3894 * decl.c (grokdeclarator): Remove dead code.
3895
3896 2013-02-28 Jason Merrill <jason@redhat.com>
3897
3898 PR c++/56481
3899 * semantics.c (potential_constant_expression_1): Use
3900 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3901
3902 PR c++/56243
3903 * call.c (build_over_call): Avoid virtual lookup in a template.
3904
3905 2013-02-27 Jason Merrill <jason@redhat.com>
3906
3907 PR c++/56358
3908 PR c++/56323
3909 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3910 of the base name for inheriting ctors.
3911 (push_class_level_binding_1): Remove inheriting ctor handling.
3912 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3913 * class.c (add_implicitly_declared_members): Adjust.
3914
3915 2013-02-26 David Binderman <dcb314@hotmail.com>
3916
3917 PR c++/55632
3918 * decl.c (grokdeclarator): Tidy publicp assignment.
3919
3920 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
3921
3922 PR c++/56419
3923 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3924 (build_transaction_expr): Same.
3925
3926 2013-02-25 Jason Merrill <jason@redhat.com>
3927
3928 PR c++/56377
3929 * pt.c (fn_type_unification): Wait to call push_tinst_level until
3930 we know what args we're looking at.
3931
3932 PR c++/56438
3933 * semantics.c (potential_constant_expression_1): In C++98, a cast
3934 to non-integral type can't be a constant expression.
3935
3936 2013-02-24 Jakub Jelinek <jakub@redhat.com>
3937
3938 PR c++/56403
3939 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3940 of CLASS_TYPE_P.
3941
3942 2013-02-22 Jason Merrill <jason@redhat.com>
3943
3944 PR c++/40405
3945 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3946 if we got the wrong number of template parms.
3947
3948 PR c++/56377
3949 * pt.c (fn_type_unification): Use explicit args in template
3950 instantiation context.
3951
3952 PR c++/56359
3953 * call.c (can_convert_arg): Discard access checks.
3954
3955 PR c++/56395
3956 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3957 args.
3958
3959 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
3960
3961 PR c++/56373
3962 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3963 * cvt.c (ocp_convert): Use the latter.
3964 (cp_convert_to_pointer): Likewise.
3965 * decl.c (check_default_argument): Likewise.
3966 * typeck.c (cp_build_binary_op): Likewise.
3967 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3968
3969 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3970 Paolo Carlini <paolo.carlini@oracle.com>
3971
3972 PR c++/51242
3973 * decl2.c (grokbitfield): Allow scoped enumeration types.
3974
3975 2013-02-15 Jason Merrill <jason@redhat.com>
3976
3977 PR c++/54276
3978 * semantics.c (finish_id_expression): Also return the identifier
3979 for an outer local static.
3980
3981 PR c++/56343
3982 * class.c (check_bases_and_members): Deduce noexcept after
3983 checking bases.
3984
3985 PR c++/52026
3986 * semantics.c (finish_id_expression): In a template, return
3987 the identifier for a constant variable.
3988
3989 2013-02-14 Jason Merrill <jason@redhat.com>
3990
3991 PR c++/54922
3992 * semantics.c (build_anon_member_initialization): New.
3993 (build_data_member_initialization): Use it.
3994
3995 PR c++/55003
3996 * decl.c (cp_finish_decl): Force instantiation of an
3997 auto static data member.
3998
3999 PR c++/55220
4000 * pt.c (unify): A pack expansion that is not the last template
4001 argument makes the entire template argument list non-deduced.
4002
4003 PR c++/56323
4004 * name-lookup.c (do_class_using_decl): Handle typedefs with
4005 inheriting constructors.
4006 (push_class_level_binding_1): Allow inheriting from template
4007 template parameter, too.
4008 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
4009
4010 PR c++/55223
4011 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
4012 default argument scope.
4013 * mangle.c (write_name): Likewise.
4014
4015 PR c++/55232
4016 * error.c (find_typenames_r): Don't walk into a pack expansion.
4017
4018 2013-02-13 Jason Merrill <jason@redhat.com>
4019
4020 PR c++/55670
4021 * parser.c (cp_parser_member_declaration): Check the declarator
4022 form when detecting a function declaration via typedef.
4023
4024 PR c++/55680
4025 * pt.c (maybe_process_partial_specialization): A lambda
4026 isn't what's being specialized.
4027
4028 PR c++/55710
4029 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
4030 TREE_USED.
4031
4032 PR c++/55879
4033 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
4034
4035 PR c++/55993
4036 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
4037 non-zero offsets, too.
4038
4039 PR c++/56155
4040 * decl.c (build_enumerator): Always convert the value to a
4041 fixed underlying type.
4042
4043 PR c++/56135
4044 * pt.c (tsubst_copy_and_build): Don't forget any new
4045 captures that arose from use of dependent names.
4046
4047 2013-02-13 Jakub Jelinek <jakub@redhat.com>
4048
4049 PR c++/56302
4050 * semantics.c (finish_asm_stmt): If input constraints allow
4051 neither register nor memory, try maybe_constant_value to get
4052 a constant if possible.
4053
4054 2013-02-12 Jason Merrill <jason@redhat.com>
4055
4056 PR c++/56285
4057 * method.c (add_one_base_init): Handle base constructor
4058 taking rvalue reference parm.
4059
4060 PR c++/56291
4061 * semantics.c (sort_constexpr_mem_initializers): Handle
4062 vptr out of order.
4063
4064 2013-02-09 Jason Merrill <jason@redhat.com>
4065
4066 PR c++/56268
4067 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
4068 maybe_instantiate_noexcept.
4069
4070 PR c++/56247
4071 * pt.c (eq_specializations): Set comparing_specializations.
4072 * tree.c (cp_tree_equal): Check it.
4073 * cp-tree.h: Declare it.
4074
4075 * decl.c (decls_match): Check versions later.
4076
4077 PR c++/56238
4078 * pt.c (build_non_dependent_expr): Don't try to fold
4079 instantiation-dependent expressions.
4080 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
4081 [BIND_EXPR]: Treat as dependent.
4082
4083 2013-02-07 Jakub Jelinek <jakub@redhat.com>
4084
4085 PR c++/56241
4086 * init.c (build_vec_init): Don't append NULL values into new_vec.
4087 (build_zero_init_1): Don't push anything into v if recursive call
4088 returned NULL_TREE.
4089 (build_value_init_noctor): Don't push anything into v if
4090 build_value_init call returned NULL_TREE.
4091
4092 PR c++/56239
4093 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
4094 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
4095 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
4096 return true only if 2nd token isn't CPP_CLOSE_PAREN.
4097 (cp_parser_cast_expression): Adjust caller.
4098
4099 PR c++/56237
4100 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
4101 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
4102 DECL_LANG_SPECIFIC (t).
4103
4104 2013-02-07 Jason Merrill <jason@redhat.com>
4105
4106 PR c++/56235
4107 * method.c (do_build_copy_constructor): Don't bother turning
4108 scalars from lvalues to xvalues.
4109 (do_build_copy_assign): Likewise.
4110
4111 2013-02-06 Jason Merrill <jason@redhat.com>
4112
4113 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
4114
4115 2013-02-05 Jason Merrill <jason@redhat.com>
4116
4117 PR c++/54122
4118 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
4119 METHOD_TYPE.
4120
4121 PR c++/56177
4122 * decl.c (start_preparsed_function): Update restype if we change
4123 decl1.
4124
4125 PR c++/56208
4126 * pt.c (fn_type_unification): Discard any access checks from
4127 substituting explicit args.
4128
4129 2013-01-31 Jason Merrill <jason@redhat.com>
4130
4131 PR c++/56162
4132 PR c++/56104
4133 * typeck.c (get_member_function_from_ptrfunc): Fix
4134 ptrmemfunc_vbit_in_delta case.
4135
4136 2013-01-29 Jason Merrill <jason@redhat.com>
4137
4138 PR libstdc++/54314
4139 * class.c (build_ctor_vtbl_group): Give construction vtables
4140 hidden visibility.
4141
4142 2013-01-25 Jason Merrill <jason@redhat.com>
4143
4144 PR c++/56095
4145 * pt.c (convert_nontype_argument_function): Handle invalid input.
4146 (convert_nontype_argument): Likewise.
4147
4148 PR c++/56104
4149 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
4150 dynamic type has no virtual functions.
4151
4152 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
4153
4154 PR c++/55944
4155 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
4156 on TARGET_EXPR nodes.
4157
4158 2013-01-22 Jason Merrill <jason@redhat.com>
4159
4160 PR c++/56071
4161 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
4162
4163 2013-01-22 Dodji Seketeli <dodji@redhat.com>
4164
4165 PR c++/53609
4166 * pt.c (argument_pack_element_is_expansion_p)
4167 (make_argument_pack_select, use_pack_expansion_extra_args_p)
4168 (gen_elem_of_pack_expansion_instantiation): New static functions.
4169 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
4170 look through the possibly resulting pack expansion as well.
4171 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
4172 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
4173 Use gen_elem_of_pack_expansion_instantiation to build the
4174 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
4175 as gen_elem_of_pack_expansion_instantiation and the change in
4176 tsubst above generalize this particular case.
4177 (arg_from_parm_pack_p): Remove this for it's not used by
4178 tsubst_pack_expansion anymore.
4179
4180 2013-01-21 Jason Merrill <jason@redhat.com>
4181
4182 PR c++/56059
4183 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
4184 template args count.
4185
4186 2013-01-18 Jason Merrill <jason@redhat.com>
4187
4188 PR target/54908
4189 * decl2.c (get_local_tls_init_fn): New.
4190 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
4191 with aliases for internal variables. Don't use weakrefs if
4192 the variable needs destruction.
4193 (generate_tls_wrapper): Mark the wrapper as const if no
4194 initialization is needed.
4195 (handle_tls_init): Don't require aliases.
4196
4197 2013-01-15 Dodji Seketeli <dodji@redhat.com>
4198
4199 PR c++/55663
4200 * pt.c (coerce_innermost_template_parms): New static function.
4201 (instantiate_alias_template): Use it here.
4202
4203 2013-01-09 Jason Merrill <jason@redhat.com>
4204
4205 PR c++/55878
4206 * rtti.c (build_typeid, get_typeid): Add complain parm.
4207 (get_tinfo_decl_dynamic): Likewise.
4208 * cp-tree.h, parser.c, pt.c: Adjust.
4209
4210 PR c++/55893
4211 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
4212 needs destruction.
4213
4214 2013-01-09 Jakub Jelinek <jakub@redhat.com>
4215
4216 PR c/48418
4217 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
4218 call maybe_constant_value for the negative or too big shift
4219 count warnings.
4220
4221 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
4222
4223 PR c++/55801
4224 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
4225 of the argument is true.
4226
4227 2013-01-08 Joel Brobecker <brobecker@adacore.com>
4228
4229 * parser.c (cp_parser_initializer_list): Move declaration
4230 of variable non_const to start of lexical block.
4231
4232 2013-01-07 Jason Merrill <jason@redhat.com>
4233
4234 PR c++/55753
4235 * tree.c (build_aggr_init_expr): Do nothing in a template.
4236 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
4237 a FUNCTION_DECL before tsubsting.
4238
4239 2013-01-04 Dodji Seketeli <dodji@redhat.com>
4240
4241 PR c++/52343
4242 * pt.c (check_instantiated_arg): Allow type template arguments.
4243
4244 2013-01-04 Jason Merrill <jason@redhat.com>
4245
4246 PR c++/55877
4247 * decl.c (reset_type_linkage, bt_reset_linkage): New.
4248 (grokdeclarator): Use reset_type_linkage.
4249 * name-lookup.c (binding_table_foreach): Handle null table.
4250 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
4251
4252 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
4253
4254 PR c++/54526 (again)
4255 * parser.c (cp_parser_template_id): Revert core of previous change
4256 (keep adjusted inform message).
4257
4258 2013-01-03 Jason Merrill <jason@redhat.com>
4259
4260 PR c++/55419
4261 PR c++/55753
4262 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
4263 TREE_CONSTANT.
4264
4265 PR c++/55842
4266 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
4267
4268 PR c++/55856
4269 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
4270
4271 PR c++/53650
4272 * call.c (type_has_extended_temps): New.
4273 * cp-tree.h: Declare it.
4274 * decl.c (check_initializer): Use build_aggr_init for arrays
4275 if it is false.
4276 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
4277
4278 2013-01-02 Jason Merrill <jason@redhat.com>
4279
4280 PR c++/54325
4281 * call.c (build_new_method_call_1): Don't use build_value_init for
4282 user-provided default constructors.
4283
4284 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
4285
4286 PR c++/55032
4287 PR c++/55245
4288 * tree.c (build_cplus_array_type): Copy layout information
4289 to main variant if necessary.
4290
4291 Copyright (C) 2013 Free Software Foundation, Inc.
4292
4293 Copying and distribution of this file, with or without modification,
4294 are permitted in any medium without royalty provided the copyright
4295 notice and this notice are preserved.