]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Factor unrelated declarations out of tree.h.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
386b1f1f
RS
12013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2
3 * decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
4 tree_low_cst.
5 (grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
6 than tree_low_cst.
7
ae7e9ddd
RS
82013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9
10 * call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
11 tree_to_uhwi throughout.
12
9439e9a1
RS
132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
14
15 * class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
16 Replace tree_low_cst (..., 0) with tree_to_shwi throughout.
17
cc269bb6
RS
182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
19
20 * decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
21 throughout.
22
9541ffee
RS
232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
24
25 * error.c, init.c, parser.c, semantics.c: Replace
26 host_integerp (..., 0) with tree_fits_shwi_p throughout.
27
cce9196f
PC
282013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
29
30 PR c++/59123
31 * decl.c (validate_constexpr_redeclaration): Redeclarations of
32 variables can differ in constexpr.
33
53677b17
PC
342013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
35
36 PR c++/29143
37 * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
38 '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
39
c02065fc
AH
402013-11-15 Aldy Hernandez <aldyh@redhat.com>
41
42 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
43 * cp-cilkplus.c: New file.
44 * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
45 * parser.c (cp_parser_cilk_simd): New.
46 (cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
47 (cp_parser_jump_statement): Same.
48 (cp_parser_omp_for_cond): Add new argument.
49 Add case for NE_EXPR.
50 (cp_parser_omp_for_loop): Pass new argument to
51 cp_parser_omp_for_cond.
52 Handle CILK_SIMD nodes.
53 Abstract initilization code to..
54 (cp_parser_omp_for_loop_init): ...here.
55 (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
56 (cp_parser_cilk_simd_vectorlength): New.
57 (cp_parser_cilk_simd_linear): New.
58 (cp_parser_cilk_simd_clause_name): New.
59 (cp_parser_cilk_simd_all_clauses): New.
60 (cp_parser_cilk_simd): New.
61 * parser.h (IN_CILK_SIMD_FOR): New macro.
62 * pt.c (tsubst_expr): Add case for CILK_SIMD.
63 * typeck2.c (cxx_readonly_error): Pass location argument to
64 readonly_error.
65
4699e99a
PC
662013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
67
68 PR c++/57887
69 * parser.c (cp_parser_late_parsing_nsdmi): Call
70 maybe_begin_member_template_processing.
71 * pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
72 (inline_needs_template_parms): Adjust.
73
18f429e2
AM
742013-11-14 Andrew MacLeod <amacleod@redhat.com>
75
76 * class.c: Include only gimplify.h and gimple.h as needed.
77 * cp-gimplify.c: Likewise.
78 * error.c: Likewise.
79 * init.c: Likewise.
80 * optimize.c: Likewise.
81 * pt.c: Likewise.
82 * semantics.c: Likewise.
83 * tree.c: Likewise.
84 * vtable-class-hierarchy.c: Likewise.
85
d8a2d370
DN
862013-11-14 Diego Novillo <dnovillo@google.com>
87
88 * call.c: Include stor-layout.h.
89 Include trans-mem.h.
90 Include stringpool.h.
91 * class.c: Include stringpool.h.
92 Include stor-layout.h.
93 Include attribs.h.
94 * cp-gimplify.c: Include stor-layout.h.
95 * cvt.c: Include stor-layout.h.
96 * decl.c: Include stringpool.h.
97 Include stor-layout.h.
98 Include varasm.h.
99 Include attribs.h.
100 Include calls.h.
101 * decl2.c: Include stringpool.h.
102 Include varasm.h.
103 Include attribs.h.
104 Include stor-layout.h.
105 Include calls.h.
106 * error.c: Include stringpool.h.
107 * except.c: Include stringpool.h.
108 Include trans-mem.h.
109 Include attribs.h.
110 * init.c: Include stringpool.h.
111 Include varasm.h.
112 * lambda.c: Include stringpool.h.
113 * lex.c: Include stringpool.h.
114 * mangle.c: Include stor-layout.h.
115 Include stringpool.h.
116 * method.c: Include stringpool.h.
117 Include varasm.h.
118 * name-lookup.c: Include stringpool.h.
119 Include print-tree.h.
120 Include attribs.h.
121 * optimize.c: Include stringpool.h.
122 * parser.c: Include print-tree.h.
123 Include stringpool.h.
124 Include attribs.h.
125 Include trans-mem.h.
126 * pt.c: Include stringpool.h.
127 Include varasm.h.
128 Include attribs.h.
129 Include stor-layout.h.
130 * ptree.c: Include print-tree.h.
131 * repo.c: Include stringpool.h.
132 * rtti.c: Include stringpool.h.
133 Include stor-layout.h.
134 * semantics.c: Include stmt.h.
135 Include varasm.h.
136 Include stor-layout.h.
137 Include stringpool.h.
138 * tree.c: Include stor-layout.h.
139 Include print-tree.h.
140 Include tree-iterator.h.
141 * typeck.c: Include stor-layout.h.
142 Include varasm.h.
143 * typeck2.c: Include stor-layout.h.
144 Include varasm.h.
145 * vtable-class-hierarchy.c: Include stringpool.h.
146 Include stor-layout.h.
147
45b0be94
AM
1482013-11-12 Andrew MacLeod <amacleod@redhat.com>
149
18f429e2
AM
150 * class.c: Include gimplify.h.
151 * cp-gimplify.c: Likewise.
152 * error.c: Likewise.
153 * init.c: Likewise.
154 * optimize.c: Likewise.
155 * pt.c: Likewise.
156 * semantics.c: Likewise.
157 * tree.c: Likewise.
158 * vtable-class-hierarchy.c: Likewise.
159 * decl2.c: Don't include gimple.h.
160 * except.c: Likewise.
161 * method.c: Include pointer-set.h instead of gimple.h.
45b0be94 162
91f1c208
AB
1632013-11-12 Adam Butcher <adam@jessamine.co.uk>
164
165 * pt.c (convert_generic_types_to_packs): New function to transform
166 a range of implicitly introduced non-pack template parms to be parameter
167 packs.
168 * cp-tree.h (convert_generic_types_to_packs): Declare.
169 * parser.c (cp_parser_parameter_declaration_list): If a function
170 parameter pack contains generic types, convert them to packs prior to
171 grokdeclarator.
172
0dca5025
AB
1732013-11-12 Adam Butcher <adam@jessamine.co.uk>
174
175 PR c++/58534
176 PR c++/58536
177 PR c++/58548
178 PR c++/58549
179 PR c++/58637
180 * parser.h (struct cp_parser): New members implicit_template_parms,
181 implicit_template_scope and auto_is_implicit_function_template_parm_p.
182 * parser.c (add_implicit_template_parms): Refactor as ...
183 (synthesize_implicit_template_parm): ... this to append a new template
184 type parm to the current template parameter list (introducing a new list
185 if necessary). Removed push_deferring_access_checks.
186 (finish_fully_implicit_template): Removed pop_deferring_access_checks.
187 (cp_parser_new): Initialize new cp_parser members.
188 (cp_parser_parameter_declaration_clause): Consider auto as implicit
189 template parm when parsing a parameter declaration (unless parsing an
190 explicit specialization).
191 (cp_parser_parameter_declaration_list): Remove local
192 implicit_template_parms counter and reset cp_parser implicit template
193 state when complete.
194 (cp_parser_lambda_expression): Reset implicit template cp_parser members
195 whilst generating lambda class.
196 (cp_parser_function_definition_after_declarator): Reset implicit
197 template cp_parser members whilst parsing function definition.
198 (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
199 better with template diagnostics.
200 (cp_parser_simple_type_specifier): Synthesize implicit template parm on
201 parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
202 diagnostics ...
203 * decl.c (grokdeclarator): ... that were previously done here.
204
e4c04ff0
PC
2052013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
206
207 PR c++/57734
208 * pt.c (lookup_template_class_1): Handle alias template declarations
209 of enumeration types.
210
f61af651
PC
2112013-11-10 Paolo Carlini <paolo.carlini@oracle.com>
212
213 * cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
214 maybe_warn_zero_as_null_pointer_constant to avoid duplicate
215 -Wzero-as-null-pointer-constant diagnostics.
216
217 * typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
218
71b71b96
PC
2192013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
220
221 PR c++/11006
222 * init.c (build_new_1): Don't call build_java_class_ref on non-class
223 types.
224
136d4b89
JM
2252013-11-05 Jason Merrill <jason@redhat.com>
226
227 PR c++/58868
228 * decl.c (check_initializer): Don't use build_vec_init for arrays
229 of trivial type.
230
33b5d6da
PC
2312013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
232
233 PR c++/58724
234 * name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
235
6d7f7e0a
TB
2362013-11-05 Tobias Burnus <burnus@net-b.de>
237
238 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
239 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
240 cp_parser_omp_declare): Handle -fopenmp-simd.
241
94159ecf
EB
2422013-11-04 Eric Botcazou <ebotcazou@adacore.com>
243
244 * decl2.c (cpp_check): Change type of first parameter and deal with
245 IS_TRIVIAL.
246
ba0f36b0
PC
2472013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
248
249 PR c++/38313
250 * parser.c (cp_parser_constructor_declarator_p): Check that the
251 class-name matches current_class_type.
252
b906f4ca
MP
2532013-11-03 Marek Polacek <polacek@redhat.com>
254
255 * decl.c (cp_finish_decl): Move C++1y bounds checking...
256 (compute_array_index_type): ...here. Add VLA instrumentation.
257 Call stabilize_vla_size.
258 (grokdeclarator): Don't call stabilize_vla_size here.
259
2afe0382
PC
2602013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
261
262 PR c++/29234
263 PR c++/56037
264 * parser.c (cp_parser_cast_expression): If we aren't looking at
265 a cast-expression don't call cp_parser_type_id.
266 (cp_parser_postfix_expression): Likewise for compound-literal.
267 (cp_parser_tokens_start_cast_expression): Adjust.
268
48cff4fa
ESR
2692013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
270
271 PR c++/58708
272 * parser.c (make_string_pack): Discover non-const type and size
273 of character and build parm pack with correct type and chars.
274
07687835
TS
2752013-11-01 Trevor Saunders <tsaunders@mozilla.com>
276
277 * semantics.c (build_anon_member_initialization): Convert fields to be
278 a stack_vec.
279
a7920263
MG
2802013-11-01 Marc Glisse <marc.glisse@inria.fr>
281
282 PR c++/58834
283 * pt.c (type_dependent_expression_p): Handle null argument.
284
ee1d5a02
JJ
2852013-11-01 Jakub Jelinek <jakub@redhat.com>
286
287 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
288 check_dup_generic at the end, unless remove is true.
289 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
290 remove = true;.
291
5a9785fb
JJ
2922013-10-31 Jakub Jelinek <jakub@redhat.com>
293
294 * semantics.c (finish_omp_clauses): Diagnose aligned clause
295 with decl that is not pointer nor array nor reference to those.
296
83f31d8d
JM
2972013-10-31 Jason Merrill <jason@redhat.com>
298
c1c2162e
JM
299 * semantics.c (cxx_eval_call_expression): Handle trivial
300 value-initialization.
301 * typeck2.c (store_init_value): Call maybe_constant_init after
302 cxx_constant_value.
303
b8aaa1a3
JM
304 * decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
305 * decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
306
1c79ebd5
JM
307 PR c++/58162
308 * parser.c (cp_parser_late_parse_one_default_arg): Set
309 TARGET_EXPR_DIRECT_INIT_P.
310
83f31d8d
JM
311 * class.c (type_build_ctor_call): Return early in C++98 mode.
312 (type_build_dtor_call): Likewise.
313
7dccc537
PC
3142013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
315
316 PR c++/58932
317 Revert:
318 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
319
320 PR c++/58466
321 * pt.c (most_specialized_class): Bump processing_template_decl for
322 get_class_bindings.
323
39344c99
PC
3242013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
325
326 PR c++/58581
327 * call.c (build_over_call): Check return value of mark_used.
328
04056396
JM
3292013-10-30 Jason Merrill <jason@redhat.com>
330
afbb631e
JM
331 * semantics.c (finish_compound_literal): Don't create a static variable
332 inside cp_unevaluated_operand.
333
04056396
JM
334 * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
335
c5028d80
TB
3362013-10-30 Tobias Burnus <burnus@net-b.de>
337
338 PR other/33426
339 * cp-tree.h (RANGE_FOR_IVDEP): Define.
340 (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
341 finish_for_cond): Take 'bool ivdep' parameter.
342 * cp-array-notation.c (create_an_loop): Update call.
343 * init.c (build_vec_init): Ditto.
344 * pt.c (tsubst_expr): Ditto.
345 * parser.c (cp_parser_iteration_statement, cp_parser_for,
346 cp_parser_range_for, cp_convert_range_for): Update calls.
347 (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
348 * semantics.c (finish_while_stmt_cond, finish_do_stmt,
349 finish_for_cond): Optionally build ivdep annotation.
350
3e4403a4
JM
3512013-10-30 Jason Merrill <jason@redhat.com>
352
353 * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
354
67348ccc
DM
3552013-10-29 David Malcolm <dmalcolm@redhat.com>
356
357 Patch autogenerated by refactor_symtab.py from
358 https://github.com/davidmalcolm/gcc-refactoring-scripts
359 revision 58bb219cc090b2f4516a9297d868c245495ee622
360
361 * call.c (mark_versions_used): Update for conversion of symtab types
362 to a true class hierarchy.
363 * decl2.c (cp_write_global_declarations): Likewise.
364 (clear_decl_external): Likewise.
365 (build_java_method_aliases): Likewise.
366 (collect_candidates_for_java_method_aliases): Likewise.
367 (mark_needed): Likewise.
368 (var_finalized_p): Likewise.
369 (maybe_make_one_only): Likewise.
370 (maybe_emit_vtables): Likewise.
371 * lambda.c (maybe_add_lambda_conv_op): Likewise.
372 * method.c (use_thunk): Likewise.
373 * optimize.c (maybe_clone_body): Likewise.
374 * tree.c (cp_fix_function_decl_p): Likewise.
375
5f546e16
PC
3762013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
377
378 PR c++/58888
379 * decl2.c (grokfield): Handle auto like NSDMI.
380
b02ef56d
PC
3812013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
382
383 PR c++/58878
384 * pt.c (check_template_shadow): Don't skip declarations in inline
385 member templates.
386
43ae206c
TB
3872013-10-25 Tobias Burnus <burnus@net-b.de>
388
389 PR other/33426
390 * parser.c (cp_parser_iteration_statement,
391 cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
392 IVDEP pragma.
393
320a9762
MP
3942013-10-24 Marek Polacek <polacek@redhat.com>
395
396 PR c++/58705
397 * typeck2.c (check_narrowing): Don't check narrowing when the scalar
398 initializer is empty.
399
eca7fc57
JM
4002013-10-23 Jason Merrill <jason@redhat.com>
401
e2fbf4c5
JM
402 LWG 2165
403 * method.c (defaulted_late_check): Delete on eh-spec mismatch.
404 (maybe_explain_implicit_delete): Explain it.
405
3f04b1bb
JM
406 * error.c (eh_spec_to_string): New.
407 (cp_printer): Use it for %X.
408
eca7fc57
JM
409 In C++11 a trivial [cd]tor might not be callable.
410 * class.c (user_provided_p): A function deleted on its declation
411 in the class is not user-provided.
412 (type_build_ctor_call): Also force a ctor call if we
413 might have a deleted or private trivial ctor.
414 (type_build_dtor_call): New.
415 (deduce_noexcept_on_destructors): Remove obsolete code.
416 * cp-tree.h: Declare type_build_dtor_call.
417 * decl.c (expand_static_init): Make sure trivial dtors are callable.
418 (cxx_maybe_build_cleanup): Likewise.
419 * except.c (build_throw): Likewise.
420 * init.c (build_value_init): Handle trivial but not callable ctors.
421 (perform_target_ctor): Make sure trivial dtor is callable.
422 (perform_member_init): Likewise.
423 (expand_cleanup_for_base): Likewise.
424 (build_vec_delete_1): Likewise.
425 (build_delete): Likewise.
426 (push_base_cleanups): Likewise.
427 (build_new_1): Avoid redundant error.
428 * method.c (synthesized_method_walk): Can't ever exit early in C++11.
429 Always process the subobject destructor.
430 * semantics.c (finish_compound_literal): Make sure trivial dtor is
431 callable.
432 * typeck2.c (split_nonconstant_init): Likewise.
433
fe15a1a7
ESR
4342013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
435
436 Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
437 * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
438 as [[gnu::deprecated]].
439
be194e0e
PC
4402013-10-22 Paolo Carlini <paolo.carlini@oracle.com>
441
442 PR c++/58816
443 * pt.c (apply_late_template_attributes): Use get_attribute_name,
444 not TREE_PURPOSE.
445
6e62a2b4
PC
4462013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
447
448 PR c++/58466
449 * pt.c (most_specialized_class): Bump processing_template_decl for
450 get_class_bindings.
451
4db45577
PC
4522013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
453
454 * parser.c (cp_parser_lookup_name): Tidy.
455
0645c1a2
AM
4562013-10-17 Andrew MacLeod <amacleod@redhat.com>
457
458 * parser.c: Include omp-low.h.
459 * semantics.c: Likewise.
460
206b48e4
PC
4612013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
462
463 PR c++/58596
464 * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
465 cp_unevaluated_operand case.
466
fac91973
JM
4672013-10-16 Jason Merrill <jason@redhat.com>
468
55ea5ddf
JM
469 * pt.c (apply_late_template_attributes): Use
470 attribute_takes_identifier_p.
471
1a1f2bc5
JM
472 * error.c (dump_exception_spec): Print "noexcept" rather than
473 "noexcept (true)".
474
06ea1376
JM
475 Core 1591
476 * pt.c (unify_array_domain): Split out from unify.
477 (unify): Use it for list deduction, too.
478
fac91973
JM
479 PR c++/57850
480 * decl2.c (dump_tu): Split out from...
481 (cp_write_global_declarations): ...here. Call it in PCH mode.
482
f93cbffc
PC
4832013-10-16 Paolo Carlini <paolo.carlini@oracle.com>
484
485 * pt.c (tsubst): Fix typo in last commit.
486
5806f481
PM
4872013-10-16 Paulo Matos <pmatos@broadcom.com>
488
489 * error.c (code_to_string): Use new wrapper get_tree_code_name.
490 * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
491 * pt.c (tsubst): Likewise.
492 * semantics.c (cxx_eval_constant_expression,
493 potential_constant_expression_1): Likewise.
494 * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
495 add_substitution, find_substitution): Likewise.
496
09560e7f
PC
4972013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
498
499 PR c++/58707
500 * parser.c (cp_parser_postfix_open_square_expression): Set
501 parser->greater_than_is_operator_p for the argument.
502
20e8fa53
PC
5032013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
504
505 PR c++/58633
506 * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
507 (cp_parser_pseudo_destructor_name): Use it.
508
ddc757fe
PC
5092013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
510
511 PR c++/31671
512 * pt.c (convert_nontype_argument): Set expr_type to
513 TREE_TYPE (probe_type).
514
acf0174b
JJ
5152013-10-11 Jakub Jelinek <jakub@redhat.com>
516
517 * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
518 (declare_simd_adjust_this): New function.
519 (grokfndecl): If "omp declare simd" attribute is present,
520 call declare_simd_adjust_this if needed and
521 c_omp_declare_simd_clauses_to_numbers.
522 * cp-array-notation.c (expand_array_notation_exprs): Handle
523 OMP_TASKGROUP.
524 * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
525 OMP_DISTRIBUTE. Handle is_invisiref_parm decls in
526 OMP_CLAUSE_REDUCTION.
527 (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
528 OMP_FOR.
529 (cxx_omp_privatize_by_reference): Return true for
530 is_invisiref_parm decls.
531 (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
532 caller.
533 * pt.c (apply_late_template_attributes): For "omp declare simd"
534 attribute call tsubst_omp_clauses,
535 c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
536 and c_omp_declare_simd_clauses_to_numbers.
537 (instantiate_class_template_1): Call cp_check_omp_declare_reduction
538 for UDRs.
539 (tsubst_decl): Handle UDRs.
540 (tsubst_omp_clauses): Add declare_simd argument, if true don't
541 call finish_omp_clauses. Handle new OpenMP 4.0 clauses.
542 Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
543 OMP_CLAUSE_REDUCTION.
544 (tsubst_expr): For UDRs call pushdecl and
545 cp_check_omp_declare_reduction. Adjust tsubst_omp_clauses
546 callers. Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
547 OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
548 Adjust finish_omp_atomic caller.
549 (tsubst_omp_udr): New function.
550 (instantiate_decl): For UDRs at block scope, don't call
551 start_preparsed_function/finish_function. Call tsubst_omp_udr.
552 * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
553 use it instead of need_default_ctor || need_copy_ctor.
554 (struct cp_check_omp_declare_reduction_data): New type.
555 (handle_omp_array_sections_1, handle_omp_array_sections,
556 omp_reduction_id, omp_reduction_lookup,
557 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
558 cp_check_omp_declare_reduction, clone_omp_udr,
559 find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
560 (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
561 reductions.
562 (finish_omp_for): Add CODE argument, use it instead of hardcoded
563 OMP_FOR. Adjust c_finish_omp_for caller.
564 (finish_omp_atomic): Add seq_cst argument, adjust
565 c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
566 atomic variants.
567 (finish_omp_cancel, finish_omp_cancellation_point): New functions.
568 * decl2.c (mark_used): Force immediate instantiation of
569 DECL_OMP_DECLARE_REDUCTION_P decls.
570 (is_late_template_attribute): Return true for "omp declare simd"
571 attribute.
572 (cp_omp_mappable_type): New function.
573 (cplus_decl_attributes): Add implicit "omp declare target" attribute
574 if requested.
575 * parser.c (cp_debug_parser): Print
576 parser->colon_doesnt_start_class_def_p.
577 (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
578 functions.
579 (enum pragma_context): Add pragma_member and pragma_objc_icode.
580 (cp_parser_binary_expression): Handle no_toplevel_fold_p
581 even for binary operations other than comparison.
582 (cp_parser_linkage_specification): Call
583 cp_ensure_no_omp_declare_simd if needed.
584 (cp_parser_namespace_definition): Likewise.
585 (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
586 (cp_parser_direct_declarator): Pass declarator to
587 cp_parser_late_return_type_opt.
588 (cp_parser_late_return_type_opt): Add declarator argument,
589 call cp_parser_late_parsing_omp_declare_simd for declare simd.
590 (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
591 Parse UDRs before all other methods.
592 (cp_parser_member_specification_opt): Use pragma_member instead of
593 pragma_external.
594 (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
595 (cp_parser_function_definition_from_specifiers_and_declarator,
596 cp_parser_save_member_function_body): Likewise.
597 (cp_parser_late_parsing_for_member): Handle UDRs specially.
598 (cp_parser_next_token_starts_class_definition_p): Don't allow
599 CPP_COLON if colon_doesnt_start_class_def_p flag is true.
600 (cp_parser_objc_interstitial_code): Use pragma_objc_icode
601 instead of pragma_external.
602 (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
603 (cp_parser_omp_var_list_no_open): Parse array sections for
604 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. Add COLON argument,
605 if non-NULL, allow parsing to end with a colon rather than close
606 paren.
607 (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
608 caller.
609 (cp_parser_omp_clause_reduction): Handle user defined reductions.
610 (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
611 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
612 cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
613 cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
614 cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
615 cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
616 cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
617 cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
618 functions.
619 (cp_parser_omp_all_clauses): Add finish_p argument. Don't call
620 finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
621 (cp_parser_omp_atomic): Parse seq_cst clause, pass
622 true if it is present to finish_omp_atomic. Handle new OpenMP 4.0
623 atomic forms.
624 (cp_parser_omp_for_loop): Add CODE argument, pass it through
625 to finish_omp_for. Change last argument to cclauses,
626 and adjust uses to grab parallel clauses from the array of all
627 the split clauses.
628 (cp_omp_split_clauses): New function.
629 (cp_parser_omp_simd): New function.
630 (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
631 Allow the function to be called also when parsing combined constructs,
632 and call c_parser_omp_simd when parsing for simd.
633 (cp_parser_omp_sections_scope): If section-sequence doesn't start with
634 #pragma omp section, require exactly one structured-block instead of
635 sequence of statements.
636 (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
637 Allow the function to be called also when parsing combined constructs.
638 (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
639 Allow the function to be called also when parsing combined
640 constructs.
641 (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
642 cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
643 cp_parser_omp_teams, cp_parser_omp_target_data,
644 cp_parser_omp_target_update, cp_parser_omp_target,
645 cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
646 cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
647 cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
648 cp_parser_omp_declare): New functions.
649 (cp_parser_omp_construct): Add p_name and mask vars. Handle
650 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
651 PRAGMA_OMP_TEAMS. Adjust cp_parser_omp_for, cp_parser_omp_parallel
652 and cp_parser_omp_sections callers.
653 (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
654 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
655 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
656 PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
657 Handle pragma_member and pragma_objc_icode like pragma_external.
658 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
659 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
660 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
661 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
662 OMP_CLAUSE_DEPEND.
663 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
664 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
665 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
666 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
667 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
668 * parser.h (struct cp_omp_declare_simd_data): New type.
669 (struct cp_parser): Add colon_doesnt_start_class_def_p and
670 omp_declare_simd fields.
671 * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
672 * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
673 bit.
674 (DECL_OMP_DECLARE_REDUCTION_P): Define.
675 (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
676 (struct saved_scope): Add omp_declare_target_attribute field.
677 (cp_omp_mappable_type, omp_reduction_id,
678 cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
679 finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
680 (finish_omp_for): Add CODE argument.
681 (finish_omp_atomic): Add seq_cst argument.
682 (cxx_omp_create_clause_info): Add need_dtor argument.
683
830ce0a2
MP
6842013-10-09 Marek Polacek <polacek@redhat.com>
685
686 PR c++/58635
687 * semantics.c (finish_return_stmt): Return error_mark_node
688 when error_operand_p of the expr is true.
689 (build_transaction_expr): Check for EXPR_P before setting the
690 expr location.
691
c80217c9
PC
6922013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
693
694 PR c++/58568
695 * lambda.c (begin_lambda_type): Check return value of xref_tag
696 for error_mark_node; tidy.
697 * decl.c (grokdeclarator): Tweak error message.
698
a330ff7f
PC
6992013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
700
701 PR c++/58665
702 Revert:
703 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
704
705 PR c++/58448
706 * pt.c (tsubst): Use error_operand_p on parameter t.
707
0e02d8e3
PC
7082013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
709
710 PR c++/58126
711 * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
712 and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
713 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
714 messages about uninitialized const and references members to mention
715 the base class.
716
fef7e16b
PC
7172013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
718
719 PR c++/56060
720 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
721
76b67a0a
PC
7222013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
723
724 PR c++/58560
725 * typeck2.c (build_functional_cast): Use error_operand_p on exp.
726
12f64ca5
PC
7272013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
728
729 PR c++/58503
730 * parser.c (cp_parser_perform_range_for_lookup): If eventually
731 either *begin or *end is type-dependent, return NULL_TREE.
732 (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
733 returns NULL_TREE, don't actually do_auto_deduction.
734
e36fae42
PC
7352013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
736
737 PR c++/58448
738 * pt.c (tsubst): Use error_operand_p on parameter t.
739
f0aaf8c1
MG
7402013-10-04 Marc Glisse <marc.glisse@inria.fr>
741
742 PR c++/19476
743 * decl.c (cxx_init_decl_processing): Set operator_new_flag.
744
2765f897
PC
7452013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
746
747 PR c++/58584
748 * decl2.c (save_template_attributes): Handle error_mark_node as
749 *attr_p argument.
750 (cp_check_const_attributes): Likewise for attributes.
751 * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
752 error_mark_node call cp_parser_skip_to_end_of_statement.
753
d1f11e2b
ER
7542013-10-03 Easwaran Raman <eraman@google.com>
755
756 PR c++/33911
757 * parser.c (cp_parser_init_declarator): Do not drop attributes
758 of template member functions.
759
2ef7251f
MP
7602013-10-03 Marek Polacek <polacek@redhat.com>
761
762 PR c++/58510
763 * init.c (sort_mem_initializers): Splice when giving an error.
764
6bd32cb2
PC
7652013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
766
767 PR c++/58535
768 * parser.c (cp_parser_function_specifier_opt): Upon error about
769 virtual templates don't set ds_virtual.
770 (finish_fully_implicit_template): Reject virtual implicit templates.
771
0eb3d6c6
PC
7722013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
773
774 PR c++/58565
775 * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
776
43939071
PC
7772013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
778
779 PR c++/58563
780 * parser.c (cp_parser_lookup_name): Check make_typename_type return
781 value for error_mark_node.
782
694e859a
TT
7832013-09-25 Tom Tromey <tromey@redhat.com>
784
785 * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
786 Remove.
787
84394ee1
TT
7882013-09-25 Tom Tromey <tromey@redhat.com>
789
790 * Make-lang.in (g++spec.o): Remove.
791 (CFLAGS-cp/g++spec.o): New variable.
792 (GXX_OBJS): Reference cp/g++spec.o.
793 (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
794 (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
795 (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
796 (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
797 (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
798 (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
799 (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
800 (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
801
f3bc55f0
TT
8022013-09-25 Tom Tromey <tromey@redhat.com>
803
804 * Make-lang.in (g++spec.o): Don't use subshell.
805
550dfe7f
MP
8062013-09-25 Marek Polacek <polacek@redhat.com>
807
808 PR c++/58516
809 * semantics.c (finish_transaction_stmt): Check for EXPR_P before
810 setting the expr location.
811
ef436967
AB
8122013-09-23 Adam Butcher <adam@jessamine.co.uk>
813
814 PR c++/58500
815 * type-utils.h (find_type_usage): Only traverse one type level into
816 member function pointers.
817
7a9a6e24
AB
8182013-09-23 Adam Butcher <adam@jessamine.co.uk>
819
820 * parser.c (cp_parser_init_declarator): Defer calling
821 finish_fully_implicit_template for forward declarations until after
822 other decl processing is complete. Cleanup for clarity: Extract 'else'
823 case after 'if' containing unconditional return.
824
1a4109b6
AB
8252013-09-23 Adam Butcher <adam@jessamine.co.uk>
826
827 * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
828 rather than '__GenN'.
829
162b25fa
AB
8302013-09-23 Adam Butcher <adam@jessamine.co.uk>
831
832 * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
833 callop in the case of generic lambdas.
834
707df8ad
AB
8352013-09-23 Adam Butcher <adam@jessamine.co.uk>
836
837 * parser.c (make_generic_type_name): Use global count rather than
838 parameter and ...
839 (add_implicit_template_parms): ... propagate interface change here.
840
950e6107
PC
8412013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
842
843 PR c++/58481
844 * pt.c (tsubst_copy): Use current_nonlambda_class_type to
845 call tsubst_baselink.
846
3f3fd87d
PC
8472013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
848
849 PR c++/58457
850 * class.c (instantiate_type): Loosen a bit the gcc_assert.
851
a24d975c
MP
8522013-09-18 Marek Polacek <polacek@redhat.com>
853
854 PR sanitize/58443
855 * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
856 Remove unnecessary check.
857
ce6923c5
MP
8582013-09-18 Marek Polacek <polacek@redhat.com>
859
860 PR sanitizer/58411
861 * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
862 no_sanitize_undefined attribute.
863
783f0cfc
PC
8642013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
865
866 PR c++/58435
867 * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
868 the cp_type_quals (r) too.
869
62e42210
AB
8702013-09-16 Adam Butcher <adam@jessamine.co.uk>
871
872 * cp-tree.h (type_uses_auto_or_concept): Declare.
873 (is_auto_or_concept): Declare.
874 * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
875 -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
876 * type-utils.h: New header defining ...
877 (find_type_usage): ... this new function based on pt.c (type_uses_auto)
878 for searching a type tree given a predicate.
879 * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
880 (is_auto_or_concept): New function.
881 (type_uses_auto_or_concept): New function.
882 * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
783f0cfc
PC
883 * parser.c (cp_parser_new): Initialize
884 fully_implicit_function_template_p.
62e42210
AB
885 (cp_parser_new): Initialize fully_implicit_function_template_p.
886 (cp_parser_lambda_expression): Copy and restore value of
887 fully_implicit_function_template_p as per other parser fields.
888 (cp_parser_parameter_declaration_list): Count generic
889 parameters and call ...
890 (add_implicit_template_parms): ... this new function to synthesize them
891 with help from type-utils.h (find_type_usage), ...
892 (tree_type_is_auto_or_concept): ... this new static function and ...
893 (make_generic_type_name): ... this new static function.
894 (cp_parser_direct_declarator): Account for implicit template parameters.
895 (cp_parser_lambda_declarator_opt): Finish fully implicit template if
896 necessary by calling ...
897 (finish_fully_implicit_template): ... this new function.
898 (cp_parser_init_declarator): Likewise.
899 (cp_parser_function_definition_after_declarator): Likewise.
900 (cp_parser_member_declaration): Likewise.
901 * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
902 (cp/parser.o): Likewise.
903
9042013-09-16 Adam Butcher <adam@jessamine.co.uk>
905
906 * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
907 list with std=c++1y or std=gnu++1y.
908 (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
909 operator template to avoid adding template result to symbol table.
910 * lambda.c (lambda_function): Return template result if call operator is
911 a template.
912 (maybe_add_lambda_conv_op): Move declarations to point of use. Refactor
913 operator call building in order to support conversion of a non-capturing
914 lambda template to a function pointer with help from ...
915 (prepare_op_call): ... this new function.
916 * decl2.c (check_member_template): Don't reject lambda call operator
917 template in local [lambda] class.
918 * pt.c (instantiate_class_template_1): Don't instantiate lambda call
919 operator template when instantiating lambda class.
920
9212013-09-16 Adam Butcher <adam@jessamine.co.uk>
922
923 * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
924
018795f4
JM
9252013-09-15 Jason Merrill <jason@redhat.com>
926
2993d08a
JM
927 Core DR 904
928 PR c++/41933
929 * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
930 * lambda.c (add_capture): Handle variadic capture.
931 (add_default_capture, lambda_capture_field_type): Likewise.
932 (build_capture_proxy, register_capture_members): Likewise.
933 * pt.c (register_specialization): Allow FIELD_DECL.
934 (retrieve_specialization): Likewise.
935 (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
936 (tsubst_pack_expansion): Handle FIELD_DECL packs.
937 (gen_elem_of_pack_expansion_instantiation): Likewise.
938 (instantiate_class_template_1): Likewise.
939 (tsubst_decl, tsubst_copy): Likewise.
940 (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
941 (tsubst_copy_and_build) [VAR_DECL]: Likewise.
942 * semantics.c (finish_non_static_data_member): Don't try to represent
943 the type of a COMPOUND_REF of a FIELD_DECL pack.
944
73f4e2d2
JM
945 PR c++/41933
946 * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
947 * cxx-pretty-print.c (direct_declarator): Adjust.
948 * decl2.c (cp_build_parm_decl): Adjust.
949 * pt.c (function_parameter_pack_p): Adjust.
950 (find_parameter_packs_r, push_template_decl_real): Adjust.
951 (tsubst_pack_expansion, tsubst_decl): Adjust.
952 (regenerate_decl_from_template, instantiate_decl): Adjust.
953
018795f4
JM
954 * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
955
2fce28ed
JM
9562013-09-13 Jason Merrill <jason@redhat.com>
957
958 PR c++/58273
959 * pt.c (any_type_dependent_elements_p): Actually check for
960 type-dependence, not value-dependence.
961
88b0e79e
JC
9622013-09-13 Jacek Caban <jacek@codeweavers.com>
963
964 * decl.c: Use new cxx_implicit_extern_c hook
965
90ae7019
BM
9662013-09-12 Brooks Moses <bmoses@google.com>
967
968 PR driver/42955
969 * Make-lang.in: Do not install driver binaries in $(target)/bin.
970
1c1880fc
AB
9712013-09-12 Adam Butcher <adam@jessamine.co.uk>
972
973 * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
974 c_inhibit_evaluation_warnings. Reset if instantiating within a
975 function-local template.
976
2dc6ed87
PC
9772013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
978
979 * semantics.c (finish_pseudo_destructor_expr): Add location_t
980 parameter.
981 * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
982 (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
983 calls.
984 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
985 (cp_parser_postfix_expression): Pass the proper location to
986 cp_parser_postfix_dot_deref_expression.
7480a018 987 * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
2dc6ed87 988
4f90d3e0
JH
9892013-09-10 Jan Hubicka <jh@suse.cz>
990 Paolo Carlini <paolo.carlini@oracle.com>
991
992 * error.c (print_instantiation_partial_context_line): If
993 loc == UNKNOWN_LOCATION return immediately.
994
3c784bca
JJ
9952013-09-09 Jakub Jelinek <jakub@redhat.com>
996
997 PR c++/58325
998 * init.c (build_vec_delete): Call mark_rvalue_use on base.
999
c9b0866a
PC
10002013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1001
1002 PR c++/43452
1003 * init.c (build_vec_delete_1): When the type is incomplete emit a
1004 warning, enabled by default (not an error).
1005 (build_delete): Adjust to use OPT_Wdelete_incomplete.
1006
aeda100f
PC
10072013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1008
1009 PR c++/58362
1010 * error.c (location_of): Don't handle PARM_DECLs specially.
1011
c0c66032
PC
10122013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
1013
1014 * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
1015 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1016 Tweak, TREE_OPERAND (t, 1) may be null.
1017
f085f27e
CT
10182013-09-08 Caroline Tice <cmtice@google.com>
1019
1020 PR c++/58300
1021 * vtable-class-hierarchy.c (vtv_generate_init_routine): In
1022 preinit case, move call to assemble_vtv_preinit_initializer to
1023 after call to cgraph_process_new_functions.
c0c66032 1024
97f1f314
PC
10252013-09-08 Tom de Vries <tom@codesourcery.com>
1026
1027 PR c++/58282
1028 * except.c (build_must_not_throw_expr): Handle
1029 flag_exceptions.
1030
0af94e6f
JR
10312013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1032
1033 * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
1034
096a4865
PC
10352013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
1036
1037 PR c++/24926
1038 * class.c (finish_struct_anon_r): New.
1039 (finish_struct_anon): Use it.
1040
7c26172c
GDR
10412013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1042
1043 * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
1044 Declare as overrider.
1045 * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
1046 Rename from pp_cxx_simple_type_specifier.
1047 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1048 simple_type_specifier.
1049
0fbf4384
PC
10502013-09-03 Paolo Carlini <paolo.carlini@oracle.com>
1051
1052 PR c++/58305
1053 * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
1054
13ed1c03
MS
10552013-09-03 Mike Stump <mikestump@comcast.net>
1056
1057 * Make-lang.in (cp/lambda.o): Add dependencies.
1058
20059c8b
GDR
10592013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1060
1061 * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
1062 overrider.
1063 * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
1064 (pp_cxx_userdef_literal): Tidy.
1065 (pp_cxx_template_argument_list): Likewise.
1066 (pp_cxx_typeid_expression): Likewise.
1067 (pp_cxx_offsetof_expression_1): Likewise.
1068 (cxx_pretty_printer::postfix_expression): Likewise.
1069 (cxx_pretty_printer::unary_expression): Likewise.
1070 (cxx_pretty_printer::statement): Likewise.
1071 (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
1072 (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
1073 * error.c (dump_decl): Tidy.
1074 (dump_expr): Likewise.
1075
fde6f97e
PC
10762013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1077
1078 PR c++/21682, implement DR 565
1079 * name-lookup.c (compparms_for_decl_and_using_decl): New.
1080 (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
1081
de5a5fa1
MP
10822013-08-30 Marek Polacek <polacek@redhat.com>
1083
1084 * typeck.c (cp_build_binary_op): Add division by zero and shift
1085 instrumentation.
1086 * error.c (dump_expr): Special-case ubsan builtins.
1087
a624d5fe
PC
10882013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
1089
1090 PR c++/51424
1091 * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
1092 * init.c (perform_target_ctor): Use it.
1093 * call.c (build_special_member_call): Diagnose self-delegating
1094 constructors.
1095
8f0e4d72
GDR
10962013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
1097
1098 * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
1099 overrider.
1100 (cxx_pretty_printer::declaration_specifiers): Likewise.
1101 (cxx_pretty_printer::function_specifier): Likewise.
1102 (cxx_pretty_printer::declarator): Likewise.
1103 (cxx_pretty_printer::direct_declarator): Likewise.
1104 (cxx_pretty_printer::abstract_declarator): Likewise.
1105 (cxx_pretty_printer::direct_abstract_declarator): Likewise.
1106 (pp_cxx_declaration): Remove.
1107 * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
1108 Rename from pp_cxx_function_specifier. Adjust.
1109 (cxx_pretty_printer::declaration_specifiers): Rename from
1110 pp_cxx_decl_specifier_seq. Adjust.
1111 (cxx_pretty_printer::direct_declarator): Rename from
1112 pp_cxx_direct_declarator. Adjust.
1113 (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
1114 Adjust.
1115 (cxx_pretty_printer::abstract_declarator): Rename from
1116 pp_cxx_abstract_declarator. Adjust.
1117 (cxx_pretty_printer::direct_abstract_declarator): Rename from
1118 pp_cxx_direct_abstract_declarator. Adjust.
1119 (cxx_pretty_printer::declaration): Rename from
1120 pp_cxx_declaration. Adjust.
1121 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1122 declaration, declaration_specifiers, function_specifier,
1123 declarator, direct_declarator, abstract_declarator,
1124 direct_abstract_declarator.
1125 * error.c (dump_decl): Adjust.
1126
8595a07d
JH
11272013-08-29 Jan Hubicka <jh@suse.cz>
1128
1129 Correct previous patch to not mark terminate as LEAF.
1130 * class.c (build_vtbl_initializer): Drop LEAF
1131 * decl.c (cxx_init_decl_processing): Likewise.
1132 (push_throw_library_fn): Likewise.
1133 * except.c (init_exception_processing): Likewise.
1134 (do_begin_catch): Likewise.
1135 (do_end_catch): Likewise.
1136 (do_allocate_exception): Likewise.
1137
fafa0521
JH
11382013-08-29 Jan Hubicka <jh@suse.cz>
1139
1140 * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
1141 ECF_NORETURN | ECF_LEAF
1142 * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
1143 push_library_fn, push_void_library_fn): Update prototype.
1144 * decl.c (build_library_fn_1): Remove.
1145 (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
1146 (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
1147 __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
1148 (build_library_fn_1): Add ecf_flags argument; rename to ...
1149 (build_library_fn): ... this one.
1150 (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
1151 (build_library_fn_ptr): Take ecf_flags.
1152 (build_cp_library_fn_ptr): Likewise.
1153 (push_library_fn): Likewise.
1154 (push_cp_library_fn): Likewise.
1155 (push_void_library_fn): Likewise.
1156 (push_throw_library_fn): All throws are ECF_NORETURN.
1157 (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
1158 (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
1159 __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
1160 * except.c (init_exception_processing): terminate is
1161 ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
1162 (declare_nothrow_library_fn): Add ecf_flags parameter.
1163 (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
1164 ECF_TM_PURE.
1165 (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
1166 are ECF_NOTHROW | ECF_LEAF.
1167 (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
1168 ECF_LEAF.
1169 (do_allocate_exception): _cxa_allocate_exception
1170 and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
1171 | ECF_LEAF
1172 (do_free_exception): __cxa_free_exception is
1173 ECF_NOTHROW | ECF_LEAF.
1174 * rtti.c (build_dynamic_cast_1): __dynamic_cast
1175 is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
1176
753c4989
AB
11772013-08-29 Adam Butcher <adam@jessamine.co.uk>
1178
1179 * error.c (dump_lambda_function): New function, dependent on ...
1180 (dump_substitution): ... this new function, factored out of ...
1181 (subst_to_string): ... here and ...
1182 (dump_function_decl): ... here. Updated to early-out with call to
1183 dump_lambda_function after determining template bindings.
1184
1ca66f7e
PC
11852013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
1186
1187 PR c++/58255
1188 * init.c (build_aggr_init): When init == void_type_node do not
1189 set LOOKUP_ONLYCONVERTING.
1190
b208ba40
CT
11912013-08-27 Caroline Tice <cmtice@google.com>
1192
1193 * vtable-class-hierarchy.c: Remove unnecessary include statements.
1194 (MAX_SET_SIZE): Remove unnecessary constant.
1195 (register_construction_vtables): Make vtable_ptr_array parameter
1196 into a vector; remove num_args parameter. Change array accesses to
1197 vector accesses.
1198 (register_other_binfo_vtables): Ditto.
1199 (insert_call_to_register_set): Ditto.
1200 (insert_call_to_register_pair): Ditto.
1201 (output_set_info): Ditto. Also change warning calls to warning_at
1202 calls, and fix format of warning messages.
1203 (register_all_pairs): Change vtbl_ptr_array from an array into a
1204 vector. Remove num_vtable_args (replace with calls to vector length).
1205 Change array stores & accesses to vector functions. Change calls to
1206 register_construction_vtables, register_other_binfo_vtables,
1207 insert_call_to_register_set, insert_call_to_register_pair and
1208 output_set_info to match their new signatures. Change warning to
1209 warning_at and fix the format of the warning message.
1210
74bf76ed
JJ
12112013-08-27 Jakub Jelinek <jakub@redhat.com>
1212 Aldy Hernandez <aldyh@redhat.com>
1213
1214 * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
1215
11729fa7
PC
12162013-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1217
1218 * decl.c (grokfndecl): Remove old bison hack.
1219
0f9aaac7
JH
12202013-08-26 Jan Hubicka <jh@suse.cz>
1221
1222 * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
1223 middle-end flag.
1224
00d34d3a
GDR
12252013-08-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1226
1227 * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
1228 Declare as overrider.
1229 (cxx_pretty_printer::multiplicative_expression): Likewise.
1230 (cxx_pretty_printer::conditional_expression): Likewise.
1231 (cxx_pretty_printer::assignment_expression): Likewise.
1232 (cxx_pretty_printer::expression): Likewise.
1233 * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
1234 Rename from pp_cxx_unary_expression. Adjust.
1235 (cxx_pretty_printer::multiplicative_expression): Rename from
1236 pp_cxx_multiplicative_expression. Adjust.
1237 (cxx_pretty_printer::conditional_expression): Rename from
1238 pp_cxx_conditional_expression. Adjust.
1239 (cxx_pretty_printer::assignment_expression): Rename from
1240 pp_cxx_assignment_expression. Adjust.
1241 (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
1242 Adjust.
1243 (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
1244 unary_expression, multiplicative_expression,
1245 conditional_expression, assignment_expression, expression.
1246
fb22178f
GDR
12472013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1248
1249 * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
1250 Declare as overrider.
1251 * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1252 Rename from pp_cxx_postfix_expression. Adjust.
1253 (pp_cxx_expression): Use pp_postfix_expression.
1254 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1255 postfix_expression.
1256
12572013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7ecc2600
GDR
1258
1259 * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
1260 an overrider of c_pretty_printer::primary_expression.
1261 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
1262 Rename from pp_cxx_primary_expression. Adjust.
1263 (pp_cxx_postfix_expression): Use pp_primary_expression.
1264 (pp_cxx_ctor_initializer): Likewise.
1265 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1266 primary_expression.
1267
5b1e7435
JH
12682013-08-23 Jan Hubicka <jh@suse.cz>
1269
1270 * cp-tree.h (struct lang_type_class): Free is_final bit.
1271 (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
1272 (DECL_FINAL_P): Remove.
1273 * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
1274 is called on CLASS_TYPE_P.
1275
0691175f
GDR
12762013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1277
1278 * cxx-pretty-print.c (M_): Remove.
1279 (pp_cxx_unqualified_id): Use translate_string instead of M_.
1280 (pp_cxx_canonical_template_parameter): Likewise.
1281
66dfe4c4
GDR
12822013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1283
1284 * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
1285 * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
1286 from pp_cxx_id_expression. Adjust.
1287 (pp_cxx_userdef_literal): Use pp_id_expression.
1288 (pp_cxx_primary_expression): Likewise.
1289 (pp_cxx_direct_declarator): Likewise.
1290 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1291 id_expression.
1292
ca43e9d5
GDR
12932013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1294
1295 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
1296 function, overriding c_pretty_printer::constant.
1297 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
1298 pp_cxx_constant. Adjust.
1299 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
1300
025311c4
GDR
13012013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
1302
1303 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
1304 destructor for the early printer.
1305 * error.c (type_to_string): Use pp_buffer.
1306
42306d73
PC
13072013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
1308
1309 PR c++/56380
1310 * class.c (check_field_decls): Check for const mutable and const
1311 reference data members.
1312
da6ca2b5
GDR
13132013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1314
1315 * error.c (init_error): Remove calls to pp_construct and
1316 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
1317 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1318 (cxx_pretty_printer_init): Remove.
1319 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1320 Rename from cxx_pretty_printer_init. Adjust.
1321 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1322 initialization of C++ diagnostics pretty printer.
1323
98cf9ac9
PC
13242013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1325
1326 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1327 * cp-tree.h (REFERENCE_REF_P): Likewise.
1328 * semantics.c (finish_offsetof): Likewise.
1329
13302013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
1331
1332 PR c++/56130
1333 * semantics.c (finish_id_expression): Handle deprecated references.
1334
c5918c21
JM
13352013-08-20 Jason Merrill <jason@redhat.com>
1336
1337 PR c++/58119
1338 * cvt.c (build_expr_type_conversion): Don't complain about a
1339 template that can't match the desired type category.
1340
8ccb81bd
GDR
13412013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
1342
1343 * error.c (pp_ggc_formatted_text): New.
1344 (type_as_string): Use it in lieu of pp_formatted_text.
1345 (type_as_string_translate): Likewise.
1346 (expr_as_string): Likewise.
1347 (decl_as_string): Likewise.
1348 (decl_as_string_translate): Likewise.
1349 (lang_decl_name): Likewise.
1350 (decl_to_string): Likewise.
1351 (expr_to_string): Likewise.
1352 (fndecl_to_string): Likewise.
1353 (parm_to_string): Likewise.
1354 (type_to_string): Likewise.
1355 (args_to_string): Likewise.
1356 (subst_to_string): Likewise.
1357
318cda85
BI
13582013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1359
1360 PR c/57490
1361 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1362 check for truth values.
1363 (expand_array_notation_exprs): Added truth values case. Removed an
1364 unwanted else. Added for-loop to walk through subtrees in default
1365 case.
1366 * call.c (build_cxx_call): Inherited the type of the array notation for
1367 certain built-in array notation functions.
1368
9485d254
PC
13692013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1370
1371 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1372 Use cp_parser_lookup_name_simple.
1373
13742013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
1375
1376 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1377 * name-lookup.c (pop_bindings_and_leave_scope): Define.
1378 * parser.c (cp_parser_lambda_declarator_opt,
1379 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1380
34fdd6b3
JM
13812013-08-17 Jason Merrill <jason@redhat.com>
1382
1383 PR c++/58083
1384 * name-lookup.c (push_class_level_binding_1): It's OK to push a
1385 lambda type after the enclosing type is complete.
1386
3c1ab1ab
GDR
13872013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1388
1389 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1390 Adjust callers.
1391 (dump_template_argument): Likewise.
1392 (dump_template_argument_list): Likewise.
1393 (dump_template_parameter): Likewise.
1394 (dump_template_bindings): Likewise.
1395 (dump_alias_template_specialization): Likewise.
1396 (dump_type): Likewise.
1397 (dump_typename): Likewise.
1398 (dump_aggr_type): Likewise.
1399 (dump_type_prefix): Likewise.
1400 (dump_type_suffix): Likewise.
1401 (dump_global_iord): Likewise.
1402 (dump_simple_decl): Likewise.
1403 (dump_decl): Likewise.
1404 (dump_template_decl): Likewise.
1405 (dump_function_decl): Likewise.
1406 (dump_parameters): Likewise.
1407 (dump_ref_qualifier): Likewise.
1408 (dump_exception_spec): Likewise.
1409 (dump_function_name): Likewise.
1410 (dump_template_parms): Likewise.
1411 (dump_call_expr_args): Likewise.
1412 (dump_aggr_init_expr_args): Likewise.
1413 (dump_expr_list): Likewise.
1414 (dump_expr_init_vec): Likewise.
1415 (dump_expr): Likewise.
1416 (dump_binary_op): Likewise.
1417 (dump_unary_op): Likewise.
1418
715a572a
PC
14192013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1420
1421 PR c++/51912
1422 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1423 * decl.c (case_conversion): Use it.
1424 * call.c (standard_conversion): Likewise.
1425 (implicit_conversion): Adjust.
1426
faca0670
AB
14272013-08-13 Adam Butcher <adam@jessamine.co.uk>
1428
1429 * pt.c: Grammar fix in comments ("it's" to "its").
1430
2e507b9a
PC
14312013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
1432
1433 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1434 check_elaborated_type_specifier): Use error + inform.
1435 * friend.c (make_friend_class): Likewise.
1436 * semantics.c (finish_id_expression): Likewise.
1437
6efa6002
PC
14382013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1439
1440 Revert:
1441 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1442
1443 PR c++/46206
1444 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1445 iter->value.
1446
dd81965b
PC
14472013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1448
1449 PR c++/46206
1450 * name-lookup.c (lookup_name_real_1): Handle iter->type before
1451 iter->value.
1452
2077db1b
CT
14532013-08-06 Caroline Tice <cmtice@google.com>
1454
1455 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
1456 list.
1457 (vtable-class-hierarchy.o): Add build rule.
1458 * cp-tree.h (vtv_start_verification_constructor_init_function): New
1459 extern function decl.
1460 (vtv_finish_verification_constructor_init_function): New extern
1461 function decl.
1462 (build_vtbl_address): New extern function decl.
1463 (get_mangled_vtable_map_var_name): New extern function decl.
1464 (vtv_compute_class_hierarchy_transitive_closure): New extern function
1465 decl.
1466 (vtv_generate_init_routine): New extern function decl.
1467 (vtv_save_class_info): New extern function decl.
1468 (vtv_recover_class_info): New extern function decl.
1469 (vtv_build_vtable_verify_fndecl): New extern function decl.
1470 * class.c (finish_struct_1): Add call to vtv_save_class_info if
1471 flag_vtable_verify is true.
1472 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1473 * vtable-class-hierarchy.c: New file.
1474 * mangle.c (get_mangled_vtable_map_var_name): New function.
1475 * decl2.c (start_objects): Update function comment.
1476 (cp_write_global_declarations): Call vtv_recover_class_info,
1477 vtv_compute_class_hierarchy_transitive_closure and
1478 vtv_build_vtable_verify_fndecl, before calling
1479 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1480 flag_vtable_verify is true.
1481 (vtv_start_verification_constructor_init_function): New function.
1482 (vtv_finish_verification_constructor_init_function): New function.
1483 * init.c (build_vtbl_address): Remove static qualifier from function.
1484
f585f69b
JM
14852013-08-06 Jason Merrill <jason@redhat.com>
1486
1487 PR c++/57825
1488 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1489
fd9b0f32
PC
14902013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
1491
1492 PR c++/58080
1493 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1494 (cp_build_binary_op): Adjust.
1495
b066401f
GDR
14962013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1497
1498 * cxx-pretty-print.h (pp_c_base): Remove.
1499 (cxx_pretty_printer): Derive from c_pretty_printer.
1500 Adjust macros using pp_c_base.
1501 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1502 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1503 (pp_cxx_colon_colon): Likewise.
1504 (pp_cxx_separate_with): Likewise.
1505 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1506 (pp_cxx_expression_list): Likewise.
1507 (pp_cxx_space_for_pointer_operator): Likewise.
1508 (pp_cxx_init_declarator): Likewise.
1509 (pp_cxx_call_argument_list): Likewise.
1510 (pp_cxx_constant): Likewise.
1511 (pp_cxx_postfix_expression): Likewise.
1512 (pp_cxx_new_expression): Likewise.
1513 (pp_cxx_unary_expression): Likewise.
1514 (pp_cxx_cast_expression): Likewise.
1515 (pp_cxx_conditional_expression): Likewise.
1516 (pp_cxx_assignment_expression): Likewise.
1517 (pp_cxx_expression): Likewise.
1518 (pp_cxx_function_specifier): Likewise.
1519 (pp_cxx_decl_specifier_seq): Likewise.
1520 (pp_cxx_simple_type_specifier): Likewise.
1521 (pp_cxx_type_specifier_seq): Likewise.
1522 (pp_cxx_ptr_operator): Likewise.
1523 (pp_cxx_parameter_declaration_clause): Likewise.
1524 (pp_cxx_direct_declarator): Likewise.
1525 (pp_cxx_direct_abstract_declarator): Likewise.
1526 (pp_cxx_type_id): Likewise.
1527 (pp_cxx_statement): Likewise.
1528 (pp_cxx_pretty_printer_init): Tidy.
1529 * error.c (init_error): Do not use pp_base.
1530 (dump_aggr_type): Likewise.
1531 (dump_type_prefix): Likewise.
1532 (dump_type_suffix): Likewise.
1533 (dump_global_iord): Likewise.
1534 (dump_decl): Likewise.
1535 (dump_function_decl): Likewise.
1536 (dump_ref_qualifier): Likewise.
1537 (reinit_cxx_pp): Likewise.
1538 (decl_as_dwarf_string): Likewise.
1539 (lang_decl_dwarf_name): Likewise.
1540 (type_to_string): Likewise.
1541 (cv_to_string): Likewise.
1542 (cxx_print_error_function): Likewise.
1543 (cp_diagnostic_starter): Likewise.
1544 (cp_diagnostic_finalizer): Likewise.
1545 (cp_print_error_function): Likewise.
1546 (print_instantiation_context): Likewise.
1547 (cp_printer): Likewise.
1548
137a1a27
GDR
15492013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1550
1551 * error.c (dump_type_prefix): Use specialized pretty printer
1552 functions instead of pp_string or operators and punctuators.
1553 (dump_decl): Likewise.
1554 (dump_expr): Likewise.
1555
9e356571
JM
15562013-08-03 Jason Merrill <jason@redhat.com>
1557
45d76587
JM
1558 DR 1286
1559 * pt.c (get_underlying_template): New.
1560 (convert_template_argument, lookup_template_class_1): Use it.
1561
9e356571
JM
1562 DR 1430
1563 PR c++/51239
1564 * pt.c (pack_expansion_args_count): Rename from
1565 any_pack_expanson_args_p.
1566 (coerce_template_parms): Reject pack expansion to
1567 non-pack template parameter of alias template.
1568
07838b13
GDR
15692013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1570
1571 * error.c (dump_aggr_type): Use specialized pretty printer
1572 functions instead of pp_character.
1573 (dump_type_prefix): Likewise.
1574 (dump_simple_decl): Likewise.
1575 (type_to_string): Likewise.
1576
ab0bc602
PC
15772013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1578
1579 * cp-tree.h (finish_stmt): Do not declare.
1580 * decl.c (finish_stmt): Do not define.
1581 * parser.c (cp_parser_expression_statement,
1582 cp_parser_declaration_statement,
1583 cp_parser_transaction_cancel): Don't call finish_stmt.
1584 * semantics.c (finish_expr_stmt, finish_if_stmt,
1585 finish_while_stmt, finish_do_stmt, finish_return_stmt,
1586 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1587 finish_transaction_stmt): Likewise.
1588
fb23b69e
FC
15892013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
1590
1591 PR c++/54537
1592 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1593 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1594 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1595 instead of issuing an error without mentioning the conflicting
1596 declaration.
1597
0b57d5fa
PC
15982013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
1599
1600 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1601 return value for error_mark_node.
1602
e77da14a
PC
16032013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1604
1605 PR c++/57673
1606 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1607 token->type == CPP_ELLIPSIS.
1608
bd459a61
PC
16092013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1610
1611 PR c++/57947
1612 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1613
b6d846de
JM
16142013-07-29 Jason Merrill <jason@redhat.com>
1615
1616 PR c++/57901
1617 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1618 Use break_out_target_exprs instead of unshare_expr.
1619
3ea1e328
PC
16202013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
1621
1622 PR c++/57948
1623 * call.c (initialize_reference): Don't crash when reference_binding
1624 returns a conv with conv->kind == ck_ambig.
1625
88e594b6
JM
16262013-07-29 Jason Merrill <jason@redhat.com>
1627
1628 * mangle.c (write_name): Check for null context.
1629 (write_unscoped_name): Allow PARM_DECL context.
1630
4004afb3
PC
16312013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1632
1633 PR c++/57981
1634 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1635 (grokparms): Adjust.
1636 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1637 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1638 a tsubst_flags_t parameter.
1639 (tsubst_decl): Adjust.
1640 * call.c (convert_default_arg): Likewise.
1641 * cp-tree.h (check_default_argument, tsubst_default_argument):
1642 Update declarations.
1643
16442013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
1645
1646 PR c++/57880
1647 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1648 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1649 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1650 Fix string_len management, tidy.
1651
3f2d352c
PC
16522013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
1653
1654 PR c++/57942
c9150e8b
PC
1655 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1656 target type is incomplete; return a bool, not an int.
3f2d352c
PC
1657 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1658
fb414939
PC
16592013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
1660
1661 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1662 tf_warning_or_error.
1663
c65cb8d1
OB
16642013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1665
1666 * class.c: Fix typos.
1667 * cp-array-notation.c: Likewise.
1668 * cp-objcp-common.c: Likewise.
1669 * decl.c: Likewise.
1670 * init.c: Likewise.
1671 * mangle.c: Likewise.
1672 * parser.c: Likewise.
1673 * pt.c: Likewise.
1674 * semantics.c: Likewise.
1675
a960e808
AB
16762013-07-14 Adam Butcher <adam@jessamine.co.uk>
1677
1678 * semantics.c (build_lambda_expr),
1679 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1680 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1681 (is_normal_capture_proxy), (insert_capture_proxy),
1682 (insert_pending_capture_proxies), (lambda_proxy_type),
1683 (build_capture_proxy), (vla_capture_type),
1684 (register_capture_members), (add_default_capture),
1685 (lambda_expr_this_capture), (maybe_resolve_dummy),
1686 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1687 (is_lambda_ignored_entity): Moved definitions into ...
1688 * lambda.c: ... this new file.
1689
07298ffd
MG
16902013-07-14 Marc Glisse <marc.glisse@inria.fr>
1691
1692 * call.c (build_conditional_expr_1): Handle the case with 1 vector
1693 and 2 scalars. Call save_expr before building a vector.
1694 * typeck.c (cp_build_binary_op): Check complain before complaining.
1695
2a99e5e6
LL
16962013-07-13 Lubos Lunak <l.lunak@suse.cz>
1697
1698 PR c++/55203
1699 * init.c (build_aggr_init): Check for warn_unused attribute.
1700 * decl.c (poplevel): Likewise.
1701
53db1bc0
JM
17022013-07-13 Jason Merrill <jason@redhat.com>
1703
16b53405
JM
1704 PR c++/57402
1705 * init.c (build_vec_init): Use {} for arrays of class type.
1706 (build_vec_delete): Don't take the address of the array.
1707
26d40c3d
JM
1708 PR c++/57793
1709 * class.c (layout_class_type): Check for too-large class.
1710
53db1bc0
JM
1711 * call.c (can_convert): Allow user-defined conversions.
1712 (can_convert_standard): New.
1713 * cp-tree.h: Declare it.
1714 * cvt.c (convert_to_reference): Use it.
1715 * pt.c (convert_nontype_argument): Likewise.
1716 * search.c (check_final_overrider): Likewise.
1717 Don't worry about user-defined conversions.
1718
dfeadaa0
PC
17192013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
1720
1721 PR c++/57869
1722 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1723 warn about casting between pointer-to-function and pointer-to-object.
1724
1d0859d8
JM
17252013-07-09 Jason Merrill <jason@redhat.com>
1726
06b76c7f
JM
1727 PR c++/57402
1728 * init.c (build_vec_init): Don't take shortcuts when initializing
1729 a VLA.
1730
d966b274
JM
1731 PR c++/57471
1732 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1733
ce901100
JM
1734 PR c++/57658
1735 * semantics.c (finish_id_expression): Return the id for an
1736 unevaluated outer variable.
1737
d9fac9dd
JM
1738 PR c++/57526
1739 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1740 if the variable type uses 'auto'.
1741
f9f91ddc
JM
1742 PR c++/57437
1743 * typeck.c (check_return_expr): Lambda proxies aren't eligible
1744 for nrv or return by move.
1745
9a3970dd
JM
1746 PR c++/57532
1747 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1748 a ref-qualifier in C++98 mode.
1749
cb5f47b6
JM
1750 PR c++/57545
1751 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1752 argument to have the exact type of the parameter.
1753
7eb48705
JM
1754 PR c++/57551
1755 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1756 a POINTER_PLUS_EXPR for type punning diagnostic.
1757
1d0859d8
JM
1758 PR c++/57831
1759 * pt.c (tsubst_copy): Handle USING_DECL.
1760
40e0364c
MG
17612013-07-09 Marc Glisse <marc.glisse@inria.fr>
1762
1763 PR c++/53094
1764 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1765
76c7bf65
MG
17662013-07-09 Marc Glisse <marc.glisse@inria.fr>
1767
1768 PR c++/53000
1769 * call.c (build_conditional_expr_1): Preserve xvalues.
1770
22adf7b5
PC
17712013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1772
1773 PR c++/51786
1774 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1775 also check declares_class_or_enum.
1776
0ef08a81
JM
17772013-07-08 Jason Merrill <jason@redhat.com>
1778
1779 PR c++/57550
1780 * pt.c (fn_type_unification): Only defer during substitution.
1781 (type_unification_real): Defer during defarg substitution,
1782 add checks parm to pass back deferred checks.
1783 (unify, do_auto_deduction): Adjust.
1784 * semantics.c (reopen_deferring_access_checks): New.
1785 * cp-tree.h: Declare it.
1786
5504e5d8
PC
17872013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
1788
1789 PR c++/28262
1790 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1791 set parser->default_arg_ok_p to false before cp_parser_declarator.
1792
128be7f9
PC
17932013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1794
1795 PR c++/14263
1796 * class.c (build_base_path): Improve diagnostic.
1797
5fde62e2
PC
17982013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
1799
1800 PR c++/38634
1801 * decl.c (start_preparsed_function): Return a bool, false if
1802 push_template_decl fails.
1803 (start_function): Adjust.
1804 * cp-tree.h: Update.
1805
2febd877
JJ
18062013-07-03 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR c++/57771
1809 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1810 Temporarily set parser->greater_than_is_operator_p for
1811 cp_parser_expression and restore from saved value afterwards.
1812
c865f923
ESR
18132013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
1814
1815 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1816 * parser.c (cp_parser_operator()): Parse user-defined string
1817 literal as literal operator.
1818
a5e90b2a
PC
18192013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1820
1821 PR c++/57645
1822 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1823 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1824 destructors.
1825
1141ed3f
BI
18262013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1827
1828 * parser.c (cp_parser_array_notation): Removed rejection array notation
1829 of type function pointers. Added handling of array expressions when
1830 Cilk Plus is enabled. Took out type-checking.
1831 (cp_parser_postfix_open_square_expression): Moved normal array expr.
1832 parsing into cp_parser_array_notation when cilkplus is enabled.
1833 (cp_parser_compound_statement): Removed expansion of array notations.
1834 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1835 (cp_parser_function_definition_after_declarator): Likewise.
1836 (cp_parser_selection_statement): Removed error reporting.
1837 (cp_parser_iteration_statement): Likewise.
1838 (cp_parser_direct_declarator): Removed error checking/reporting if
1839 array notations are used in the declarator.
1840 * pt.c (instantiate_decl): Likewise.
1841 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1842 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1843 (potential_constant_expression_1): Returned false for
1844 ARRAY_NOTATION_REF case.
1845 * cp-gimplify.c (cp_genericize): Added expansion of array notation
1846 expressions here.
1847 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
1848 parameters. Replaced build_decls with get_temp_regvar with type as
1849 ptrdiff.
1850 (create_array_refs): Made the type-casting to ptrdiff_type.
1851 (replace_invariant_var): Added a check for void return type before
1852 creating new var. Replaced build_decl and build_min_nt_loc with
1853 get_temp_regvar.
1854 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
1855 with gcc_unreachable. Removed few unwanted checks. Made induction
1856 variable type as ptrdiff_type. Removed loc and complain arguments
1857 passed into make_triplet_val_inv. Replaced all modify expression's
1858 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
1859 into stmt. list with the non-forceful one. Replaced some integer
1860 conversion and equality-checking to using tree_int_cst_equal.
1861 (expand_sec_reduce_builtin): All changes mentioned in above function
1862 expand_an_in_modify_expr. Made the new variable type of
1863 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1864 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
1865 the error reporting from parser to this function. Removed unwanted
1866 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1867 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1868 in function pointers.
1869 (cp_expand_cond_array_notations): Added a new if statements to check
1870 if condition has a zero rank. If so, then just return.
1871 (expand_return_expr): Added a check for return expressions with a rank.
1872 Replaced get_tmp_regvar with a create_temporary_var.
1873 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1874 Moved common code outside if-statements. Moved type-checking from
1875 parser to here.
1876 * semantics.c (finish_return_stmt): Removed a check for return exprs.
1877 with a rank.
1878 * call.c (convert_like_real): Removed a check for array notation
1879 expression in a function.
1880 (build_over_call): Likewise.
1881 (magic_varargs_p): Added a check for builtin array notation function.
1882 Made this function non-static and removed its prototype.
1883 * cp-tree.h (magic_varargs_p): New prototype.
1884 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1885 nargs to the param->length when builtin reduction function is used.
1886 (convert_arguments): Replaced check for a constant_p function with
1887 margic_varargs_p function call.
1888 (cp_build_binary_op): Removed calling of the function
1889 find_correct_array_notation_type.
1890 (cp_build_addr_expr_1): Removed an unwanted if-statement.
1891 (convert_for_assignment): Removed automatic return of rhs when array
1892 notation builtin function is used.
1893
7350faad
PC
18942013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
1895
1896 PR c++/57682
1897 * parser.c (cp_parser_save_member_function_body): Handle correctly
1898 curly braces in function-try-block mem-initializers.
1899
bedc293e
MG
19002013-06-27 Marc Glisse <marc.glisse@inria.fr>
1901
1902 PR c++/57509
1903 * typeck.c (cp_build_vec_perm_expr): New function.
1904 * cp-tree.h: Declare it.
1905 * parser.c (cp_parser_postfix_expression): Call it.
1906 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1907 (tsubst_copy_and_build): Likewise.
1908
85afa075
MG
19092013-06-27 Marc Glisse <marc.glisse@inria.fr>
1910
1911 PR c++/57172
1912 * pt.c (more_specialized_fn): If both arguments are references,
1913 give priority to an lvalue.
1914
46812ec2
JM
19152013-06-26 Jason Merrill <jason@redhat.com>
1916
1917 * typeck2.c (store_init_value): Diagnose a non-constant
1918 initializer for in-class static.
447cf554
JM
1919
1920 PR c++/57408
1921 * semantics.c (add_capture): Set type to error_mark_node after
1922 error.
1923
1a3fab15
ESR
19242013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
1925
1926 PR c++/57640
1927 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1928 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1929
604b2bfc
GDR
19302013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1931
1932 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1933 * class.c (add_implicitly_declared_members): Likewise.
1934 (check_field_decl): Likewise.
1935 (finalize_literal_type_property): Likewise.
1936 (check_bases_and_members): Likewise.
1937 * decl.c (poplevel): Likewise.
1938 (case_conversion): Likewise.
1939 (check_initializer): Likewise.
1940 (grokfndecl): Likewise.
1941 (check_static_variable_definition): Likewise.
1942 (compute_array_index_type): Likewise.
1943 (grokdeclarator): Likewise.
1944 (build_enumerator): Likewise.
1945 * friend.c (make_friend_class): Likewise.
1946 * lex.c (init_reswords): Likewise.
1947 * method.c (synthesized_method_walk): Likewise.
1948 (implicitly_declare_fn): Likewise.
1949 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1950 (cp_parser_constant_expression): Likewise.
1951 (cp_parser_for_init_statement): Likewise.
1952 (cp_parser_block_declaration): Likewise.
1953 (cp_parser_type_name): Likewise.
1954 (cp_parser_enum_specifier): Likewise.
1955 (cp_parser_enumerator_list): Likewise.
1956 (cp_parser_member_declaration): Likewise.
1957 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1958 (cp_parser_template_declaration_after_export): Likewise.
1959 * pt.c (convert_nontype_argument_function): Likewise.
1960 (convert_nontype_argument): Likewise.
1961 (convert_template_argument): Likewise.
1962 (tsubst_copy_and_build): Likewise.
1963 (build_non_dependent_expr): Likewise.
1964 * semantics.c (non_const_var_error): Likewise.
1965 (potential_constant_expression_1): Likewise.
1966 * tree.c (lvalue_kind): Likewise.
1967 (build_vec_init_expr): Likewise.
1968 (cast_valid_in_integral_constant_expression_p): Likewise.
1969 * typeck.c (build_x_conditional_expr): Likewise.
1970 * typeck2.c (check_narrowing): Likewise.
1971
713b46fa
BI
19722013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1973
1974 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1975 (expand_an_in_modify_expr): Changed a function call from the above
1976 removed function to length_mismatch_in_expr_p.
1977
2ce86d2e
BI
19782013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1979
1980 * call.c (convert_like_real): Added a check if array notation is present
1981 in expression. If so, then no conversion of arguments is necessary.
1982 (build_over_call): Likewise.
1983 * typeck.c (cp_build_function_call_vec): Likewise.
1984 (convert_for_assignment): Likewise.
1985 (cp_build_array_ref): Reject array notations with a rank greater than 1
1986 as an array's index.
1987 (cp_build_binary_op): If array notations are preent in op, then call
1988 find_correct_array_notation_type.
1989 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1990 * cp-array-notation.c: New file.
1991 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1992 as typed.
1993 * cp-tree.h (fix_array_notation_exprs): New prototype.
1994 * semantics.c (finish_return_stmt): Reject array notations as
1995 return value.
1996 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1997 (potential_constant_expression_1): Likewise.
1998 * tree.c (lvalue_kind): Likewise.
1999 * error.c (dump_decl): Likewise.
2000 (dump_expr): Likewise.
2001 * pt.c (ARRAY_NOTATION_REF): Likewise.
2002 (type_unification_real): Do not unify any arguments if array notations
2003 are found in arg.
2004 (instantiate_decl): Added a check for array notaitons inside the
2005 function body. If so, then expand them.
2006 * parser.c (cp_parser_array_notation): New function.
2007 (cp_parser_postfix_open_square_expression): Added a check for colons
2008 inside square braces. If found, then handle the array access as an
2009 array notation access. Also, disable auto-correction from a single
2010 colon to scope when Cilk Plus is enabled.
2011 (cp_parser_compound_statement): Added a check for array notations
2012 inside the statement. If found, then expand them.
2013 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
2014 (cp_parser_function_definition_after_declarator): Likewise.
2015 (cp_parser_selection_statement): Searched for array notations inside
2016 condition. If so, then emit an error.
2017 (cp_parser_iteration_statement): Likewise.
2018 (cp_parser_direct_declarator): Reject array notations inside a
2019 variable or array declaration.
2020 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
2021
4ab013d9
JM
20222013-06-20 Jason Merrill <jason@redhat.com>
2023
593bcbb8
JM
2024 PR c++/55149
2025 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
2026 context if we're in C++14 mode.
2027 * tree.c (array_of_runtime_bound_p): Return true for a dependent
2028 bound that is not potentually constant.
2029 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
2030 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
2031 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
2032 (build_capture_proxy): Set REFERENCE_VLA_OK.
2033 (vla_capture_type): Make it a proper C++ class.
2034 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
2035 initializer.
2036
8fc95c05
JM
2037 * decl.c (compute_array_index_type): Use size_one_node.
2038
4ca5c232
JM
2039 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
2040 a partial specialization.
2041 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
2042 specialization.
2043 (most_specialized_class): Adjust.
2044
4ab013d9
JM
2045 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
2046 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
2047 TEMPLATE_DECL_CHECK.
2048
6be8258d
MLI
20492013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2050
2051 PR c++/57638
2052 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
2053 TREE_TYPE (arg), not arg itself.
2054
3dd55b2f
PC
20552013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
2056
2057 PR c++/53211
2058 * pt.c (type_dependent_expression_p): Handle an array of unknown
2059 bound depending on a variadic parameter.
2060 * parser.c (cp_parser_range_for): Revert PR56794 changes.
2061
ee03e71d
RB
20622013-06-17 Richard Biener <rguenther@suse.de>
2063
2064 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
2065
a0e33cbc
PC
20662013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
2067
2068 PR c++/16128
2069 * parser.c (cp_parser_expression_statement): Check whether
2070 cp_parser_expression returns error_mark_node.
2071
929f647a
PC
20722013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2073
2074 PR c++/51413
2075 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
2076
ffe7516f
PC
20772013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2078
2079 PR c++/57599
2080 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
2081 accessible base simply forward to build_static_cast.
2082
6a026364
PC
20832013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2084
2085 PR c++/38958
2086 * decl.c (poplevel): For the benefit of -Wunused-variable see
2087 through references.
2088
5c3decfd
PC
20892013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2090
2091 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2092
e20eae6a
PC
20932013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
2094
2095 PR c++/42021
2096 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
2097 again diagnostic already emitted by cp_parser_lookup_name.
2098
dca61c7e
JH
20992013-06-11 Jan Hubicka <jh@suse.cz>
2100
2101 PR c++/57551
e20eae6a
PC
2102 * cp/pt.c (mark_decl_instantiated): Do not export explicit
2103 instantiations of anonymous namespace templates.
dca61c7e 2104
5ee712eb
JM
21052013-06-10 Jason Merrill <jason@redhat.com>
2106
2107 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
2108 namespace to static_decls.
2109
1c59edcc
ST
21102013-06-07 Sriraman Tallam <tmsriram@google.com>
2111
2112 PR c++/57548
2113 * call.c (build_over_call): Check if current_function_decl is
2114 NULL.
2115
657fb0c6
PC
21162013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
2117
2118 PR c++/53658
2119 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
2120 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2121
e765a228
JM
21222013-06-06 Jason Merrill <jason@redhat.com>
2123
a9429737
JM
2124 PR c++/55520
2125 * semantics.c (add_capture): Diagnose capture of variable-size
2126 type that is not a C++1y array of runtime bound.
2127
e765a228
JM
2128 * decl.c (grokdeclarator): Keep a decl with error type.
2129 (grokfield, grokbitfield): Likewise.
2130 * pt.c (instantiate_class_template_1): Likewise.
2131 (tsubst_decl): Drop redundant error.
2132 * class.c (walk_subobject_offsets): Handle erroneous fields.
2133 * typeck2.c (process_init_constructor_record): Likewise.
2134
67f01839
PC
21352013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
2136
2137 PR c++/51908
2138 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
2139 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2140
edb983b2
JH
21412013-06-03 Jan Hubicka <jh@suse.cz>
2142
67f01839 2143 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
edb983b2
JH
2144 mark_decl_referenced.
2145 (mark_needed): Likewise.
2146
3800c010 21472013-06-03 Jason Merrill <jason@redhat.com>
3aaaa103
JM
2148
2149 * class.c (mark_type_abi_tags): New.
2150 (check_abi_tags): Use it.
2151
2e649151
PC
21522013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2153
2154 PR c++/57419
2155 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
2156 * semantics.c (finish_qualified_id_expr): Use it.
2157 * cp-tree.h: Update.
2158
40a7fe1e
JH
21592013-06-01 Jan Hubicka <jh@suse.cz>
2160
2161 * decl2.c (cp_write_global_declarations): Replace same_body_alias
2162 by symbol.cpp_implicit_alias.
2163
3a6a88c8
JM
21642013-05-30 Jason Merrill <jason@redhat.com>
2165
cc059bdd
JM
2166 PR c++/57404
2167 * cp-lang.c (cp_classify_record): Handle structs without
2168 TYPE_LANG_SPECIFIC.
2169
3a6a88c8
JM
2170 PR c++/52377
2171 * class.c (common_enclosing_class): New.
2172 * cp-tree.h: Declare it.
2173 * init.c (sort_mem_initializers): Don't splice out a union member
2174 with an NSDMI.
2175
e70670cf
JH
21762013-05-29 Jan Hubicka <jh@suse.cz>
2177
2178 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
2179 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2180
a544998e
PC
21812013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
2182
2183 PR c++/25666
2184 * decl2.c (check_classfn): Check for destructors declared as member
2185 templates.
2186
9f57f76a
JM
21872013-05-24 Jason Merrill <jason@redhat.com>
2188
2189 PR c++/56971
2190 * pt.c (any_template_arguments_need_structural_equality_p): A
2191 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2192
7f5d76fb
PC
21932013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
2194
2195 PR c++/19618
2196 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
2197 with width exceeding the type.
2198
f746a029
JM
21992013-05-24 Jason Merrill <jason@redhat.com>
2200
2201 PR c++/57391
2202 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
2203 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2204
39bde5ea
JM
22052013-05-23 Jason Merrill <jason@redhat.com>
2206
2207 PR c++/57388
2208 * tree.c (build_ref_qualified_type): Clear
2209 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2210
2701664a
JM
22112013-05-22 Jason Merrill <jason@redhat.com>
2212
da834cfc
JM
2213 PR c++/56930
2214 * call.c (convert_like_real): Use cp_convert_and_check.
2215 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
2216 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
2217 (potential_constant_expression_1): Handle OMP_ATOMIC*.
2218
2701664a
JM
2219 PR c++/56915
2220 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
2221 isn't defined.
2222
3d09a9fd
PC
22232013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2224
2225 PR c++/57352
2226 * parser.c (cp_parser_conversion_type_id): Set up
2227 parser->type_definition_forbidden_message before calling
2228 cp_parser_type_specifier_seq.
2229
2ac2f83d
PC
22302013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2231
2232 PR c++/57211
2233 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
2234 warnings about defaulted functions.
2235
4cbc4bd7
PC
22362013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
2237
2238 * call.c (build_conditional_expr_1): Add location_t parameter.
2239 (build_conditional_expr): Likewise.
2240 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
2241 get_member_function_from_ptrfunc, build_x_conditional_expr,
2242 cp_build_modify_expr): Update.
2243 * init.c (build_new_1): Likewise.
2244 * cp-tree.h: Update declaration.
2245
6e5fba0e
JM
22462013-05-20 Jason Merrill <jason@redhat.com>
2247
a31ed47c
JM
2248 PR c++/57016
2249 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
2250 if there is one.
2251
6e5fba0e
JM
2252 PR c++/57102
2253 * decl.c (fndecl_declared_return_type): Also look in
2254 DECL_SAVED_FUNCTION_DATA.
2255
9bbc9565
PC
22562013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2257
2258 PR c++/12288
2259 * parser.c (cp_parser_parameter_declaration): Check return value
2260 of cp_parser_parse_and_diagnose_invalid_type_name.
2261
9f0bdc93
JM
22622013-05-20 Jason Merrill <jason@redhat.com>
2263
32bfcf80
JM
2264 PR c++/57319
2265 * class.c (vbase_has_user_provided_move_assign): New.
2266 * method.c (synthesized_method_walk): Check it.
2267 * cp-tree.h: Declare it.
2268
9f0bdc93
JM
2269 PR c++/57325
2270 * tree.c (build_cplus_array_type): Copy layout info if element
2271 type is complete.
2272
3c1247f0
PC
22732013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2274
2275 PR c++/23608
2276 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2277
8f1352c4
JM
22782013-05-20 Jason Merrill <jason@redhat.com>
2279
2280 PR c++/57317
2281 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
2282 whether a template has its own args.
2283
a293ed6e
PC
22842013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2285
2286 PR c++/57327
2287 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2288
de4317cc
PC
22892013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2290
2291 PR c++/10207
2292 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
2293 instead of cp_parser_initializer_list for compound-literals.
2294
5657d966
MG
22952013-05-20 Marc Glisse <marc.glisse@inria.fr>
2296
2297 PR c++/57175
2298 * typeck.c (check_return_expr): Reverse the alignment comparison.
2299
38050e90
PC
23002013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
2301
2302 PR c++/18126
2303 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
2304 correctly sizeof compound-literal; update comments.
2305
749dee7e
MG
23062013-05-16 Marc Glisse <marc.glisse@inria.fr>
2307
2308 * call.c (build_conditional_expr_1): Use cp_build_binary_op
2309 instead of directly calling fold_build2.
2310
11678eb3
JM
23112013-05-16 Jason Merrill <jason@redhat.com>
2312
427b248d
JM
2313 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2314
11678eb3
JM
2315 PR c++/57279
2316 * decl.c (grokdeclarator): Allow member function qualifiers in
2317 TYPENAME context in C++11 mode.
2318
f5b6d0d1
DS
23192013-05-16 Dodji Seketeli <dodji@redhat.com>
2320
2321 PR c++/56782 - Regression with empty pack expansions
2322 * pt.c (use_pack_expansion_extra_args_p): When at least a
2323 parameter pack has an empty argument pack, and another parameter
2324 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2325 mechanism.
2326
1e6cf26e
PC
23272013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2328
2329 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2330 warning_at and permerror with warning_at/inform and permerror/
2331 inform, respectively.
2332
8ff25a22
PC
23332013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
2334
2335 PR c++/31952
2336 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2337 redeclarations.
2338
adce5cdf
JM
23392013-05-14 Jason Merrill <jason@redhat.com>
2340
71b04de2
JM
2341 PR c++/57243
2342 * parser.c (cp_parser_range_for): Call complete_type.
2343
adce5cdf
JM
2344 PR c++/57041
2345 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2346
fc7721ee
PC
23472013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2348
2349 PR c++/53903
2350 * method.c (defaulted_late_check): Check for compatible exception
2351 specification out of class explicitly defaulted functions too.
2352
1a288768
JM
23532013-05-14 Jason Merrill <jason@redhat.com>
2354
2355 PR c++/56998
2356 * semantics.c (potential_constant_expression_1): Make sure the
2357 called function is potentially constant.
2358 * call.c (null_ptr_cst_p): Revert earlier change.
2359
fab8f0b6
JM
23602013-05-13 Jason Merrill <jason@redhat.com>
2361
7c0b157d
JM
2362 PR c++/56998
2363 * call.c (null_ptr_cst_p): An expression with side-effects can't
2364 be a C++03 null pointer constant.
2365
783faa47
JM
2366 PR c++/57041
2367 * decl.c (reshape_init_class): Handle error_mark_node.
2368
51543dc7
JM
2369 PR c++/57254
2370 * typeck.c (merge_types): Propagate ref-qualifier
2371 in METHOD_TYPE case.
2372
18dc5657
JM
2373 PR c++/57253
2374 * decl.c (grokdeclarator): Apply ref-qualifier
2375 in the TYPENAME case.
2376
fab8f0b6
JM
2377 PR c++/57252
2378 * decl.c (decls_match): Compare ref-qualifiers.
2379
5ced939e
JM
23802013-05-10 Jason Merrill <jason@redhat.com>
2381
4ed024b6
JM
2382 PR c++/57196
2383 * pt.c (convert_template_argument): Use dependent_template_arg_p,
2384 not uses_template_parms.
2385
616eece3
JM
2386 PR c++/57047
2387 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2388
5ced939e
JM
2389 PR c++/55149
2390 * semantics.c (add_capture): Error rather than abort on copy
2391 capture of VLA.
2392 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2393 warn about capture proxy.
2394
0138d6b2
JM
23952013-05-09 Jason Merrill <jason@redhat.com>
2396
392807f0
JM
2397 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2398
26863a32
JM
2399 PR c++/57222
2400 * pt.c (lookup_template_class_1): Handle getting a template
2401 template parameter as D1.
2402
a57dbdaa
JM
2403 N3639 C++1y VLA diagnostics
2404 * decl.c (grokdeclarator): Complain about reference, pointer, or
2405 typedef to VLA.
2406 (create_array_type_for_decl): Complain about array of VLA.
2407 * pt.c (tsubst): Likewise.
2408 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2409 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2410 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2411 (cxx_sizeof_or_alignof_type): Likewise.
2412
0138d6b2
JM
2413 N3639 C++1y VLA support
2414 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2415 (check_array_initializer): Allow VLA init.
2416 (reshape_init_array_1): Adjust.
2417 (cp_finish_decl): Check for invalid VLA length.
2418 * typeck2.c (process_init_constructor_array): Adjust.
2419 (store_init_value): Use build_vec_init for VLAs.
2420 * semantics.c (add_capture): Capture VLA as ptr+len.
2421 (vla_capture_type): New.
2422 (build_capture_proxy): Rebuild the VLA.
2423 * typeck.c (build_simple_component_ref): Split out from...
2424 (build_ptrmemfunc_access_expr): ...here.
2425 * tree.c (array_of_runtime_bound_p): New.
2426 * init.c (throw_bad_array_length): New.
2427 (build_vec_init): Use it.
2428 * parser.c (cp_convert_range_for): When iterating over a VLA,
2429 use it directly rather than bind a reference.
2430 * cp-tree.h: Declare new functions.
2431
b0f36e5e
JM
24322013-05-08 Jason Merrill <jason@redhat.com>
2433
785b887e
JM
2434 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2435 variably_modified_type_p.
2436 (expand_start_catch_block): Mark the typeinfo used here.
2437 * semantics.c (finish_handler_parms): Not here.
2438
2439 * error.c (dump_type_suffix): Try harder on VLA length.
2440
7d5e76c8
JM
2441 Core 624/N2932
2442 * init.c (throw_bad_array_new_length): New.
2443 (build_new_1): Use it. Don't warn about braced-init-list.
2444 (build_vec_init): Use it.
2445 * call.c (build_operator_new_call): Use it.
2446
b0f36e5e
JM
2447 PR c++/57068
2448 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2449 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2450 * error.c (maybe_warn_cpp0x): s/0x/11/.
2451
b0cda57f
PC
24522013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2453
2454 PR c++/51226
2455 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2456 == error_mark_node.
2457
6698175d
MG
24582013-05-06 Marc Glisse <marc.glisse@inria.fr>
2459
2460 * typeck.c (cp_build_binary_op): Call save_expr before
2461 build_vector_from_val.
2462
6555abe0
PC
24632013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2464
2465 PR c++/57183
2466 * decl.c (cp_finish_decl): After do_auto_deduction copy the
2467 qualifers with cp_apply_type_quals_to_decl.
2468
3a1ee99e
PC
24692013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
2470
2471 * pt.c (convert_nontype_argument): Add missing whitespace in
2472 error message.
2473
5d5006cc
PC
24742013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2475
2476 PR c++/53745
2477 * decl.c (build_enumerator): Improve error message.
2478
c067d9fe
PC
24792013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2480
2481 PR c++/14283
2482 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2483 messages for template types and fix column numbers.
2484
1a989b61
PC
24852013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2486
2487 PR c++/57132
2488 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2489 c_inhibit_evaluation_warnings around build_x_modify_expr call.
2490
57c16a5e
PC
24912013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
2492
2493 PR c++/57092
2494 * semantics.c (finish_decltype_type): Handle instantiated template
2495 non-type arguments.
2496
4882d82a
PC
24972013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2498
2499 PR c++/56450
2500 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2501
e78e8a0b
JJ
25022013-04-26 Jakub Jelinek <jakub@redhat.com>
2503
2504 * error.c (cp_print_error_function): Adjust file_name_as_prefix
2505 caller.
2506
4794d4b5
JM
25072013-04-25 Jason Merrill <jason@redhat.com>
2508
17365662
JM
2509 PR c++/56859
2510 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2511
4794d4b5
JM
2512 PR c++/50261
2513 * init.c (perform_member_init): Call reshape_init.
2514
afbce7b7
JM
25152013-04-24 Jason Merrill <jason@redhat.com>
2516
2517 PR c++/53721
2518 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2519
44d90fe1
PC
25202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2521
2522 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2523 pedwarn to simply use OPT_Wpointer_arith.
2524 (cp_build_unary_op): Likewise.
2525
399bb2da
JM
25262013-04-24 Jason Merrill <jason@redhat.com>
2527
76089b28
JM
2528 N3648: init-captures are named.
2529 * semantics.c (add_capture): Don't prepend "__" to init-captures.
2530 (build_capture_proxy): Adjust.
2531 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2532
399bb2da
JM
2533 N3648: Allow braced and parenthesized initializers.
2534 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2535 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2536 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2537 (add_capture): Collapse a parenthesized initializer into a single
2538 expression.
2539 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2540
a378996b
PC
25412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2542
2543 PR c++/56970
2544 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2545 * semantics.c (finish_qualified_id_expr): Likewise.
2546 (finish_id_expression): Update.
2547 * typeck.c (cp_build_addr_expr_1): Likewise.
2548 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2549 * cp-tree.h: Update declarations.
2550
a7ddca92
JM
25512013-04-22 Jason Merrill <jason@redhat.com>
2552
3df70c62
JM
2553 Core 1586
2554 * parser.c (cp_parser_unqualified_id): Handle ~auto.
2555 (cp_parser_pseudo_destructor_name): Likewise.
2556 (cp_parser_postfix_dot_deref_expression): Adjust.
2557 (cp_lexer_nth_token_is_keyword): New.
2558 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2559 * typeck.c (lookup_destructor): Handle ~auto.
2560
3579964b
JM
2561 * pt.c (fn_type_unification): Push tinst level around
2562 type_unification_real if we aren't explaining.
2563 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2564 * error.c (dump_function_decl): Respect it.
2565 (subst_to_string): Pass it.
2566
80f7a782
JM
2567 PR c++/48665
2568 * rtti.c (get_typeid): Diagnose qualified function type.
2569 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2570
af580858
JM
2571 * error.c (dump_aggr_type): Fix lambda detection.
2572 (dump_simple_decl): Pretty-print capture field.
2573
ca45eca1
JM
2574 N3323
2575 * cvt.c (build_expr_type_conversion): Two conversions that return
2576 the same type aren't necessarily ambiguous.
2577
d3d50a61
JM
2578 N3648
2579 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2580 pedwarn unconditional except in C++1y mode.
2581
cefb0898
JM
2582 * semantics.c (potential_constant_expression_1): Don't crash on
2583 'this' in NSDMI.
2584
08afbd3b
JM
2585 Core 1612
2586 * semantics.c (finish_id_expression): Reject capture of anonymous
2587 union member.
2588
c10f4193
JM
2589 Core 1609
2590 * decl2.c (check_default_args): Check for pack expansion.
2591
a7ddca92
JM
2592 * mangle.c (write_type): Mangle decltype(auto).
2593
86c0810c
JM
25942013-04-19 Jason Merrill <jason@redhat.com>
2595
79d8a272
JM
2596 N3638 changes to return type deduction
2597 * decl.c (undeduced_auto_decl): New.
2598 (require_deduced_type): New.
2599 (fndecl_declared_return_type): New.
2600 (decls_match): Use it.
2601 (duplicate_decls): Don't check for auto return.
2602 (grokdeclarator): Reject virtual auto.
2603 * class.c (resolve_address_of_overloaded_function): Handle
2604 auto function templates.
2605 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2606 * cp-tree.h: Declare new fns.
2607 * error.c (dump_function_decl): Use fndecl_declared_return_type.
2608 * search.c (check_final_overrider): Likewise.
2609 * pt.c (make_decltype_auto): New.
2610 (do_auto_deduction): Require plain decltype(auto).
2611 (is_auto): Adjust.
2612
86c0810c
JM
2613 DR 941
2614 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2615 template specializations.
2616
3a8d9ab1
ESR
26172013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
2618
2619 Implement n3599 - Literal operator templates for strings.
2620 * parser.c (make_string_pack (tree value)): New function.
2621 (cp_parser_userdef_string_literal (cp_token *)): Use it
2622 to construct calls to character string literal operator templates.
2623 (cp_parser_template_declaration_after_export): Check for new string
2624 literal operator template parameter form.
2625
a68329c2
JM
26262013-04-15 Jason Merrill <jason@redhat.com>
2627
099b9334
JM
2628 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2629
4da97565
JM
2630 PR c++/52748
2631 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2632 rather than a destructor name, it isn't an unqualified-name.
2633 (tsubst_copy_and_build): Pass down decltype_flag to operator
2634 handling code, too.
2635
a68329c2
JM
2636 PR c++/56388
2637 * semantics.c (insert_capture_proxy): Just use index 1 in the
2638 stmt_list_stack.
2639
4b84d650
JJ
26402013-04-12 Jakub Jelinek <jakub@redhat.com>
2641
2642 * error.c (cp_print_error_function,
2643 print_instantiation_partial_context_line,
2644 maybe_print_constexpr_context): Colorize locus strings.
2645
e59baf05
JM
26462013-04-11 Jason Merrill <jason@redhat.com>
2647
2648 PR c++/52748
2649 * parser.c (complain_flags): New.
2650 (cp_parser_postfix_expression): Use it.
2651 (cp_parser_unary_expression): Likewise.
2652 (cp_parser_binary_expression): Likewise.
2653 (cp_parser_assignment_expression): Likewise.
2654 (cp_parser_expression): Likewise.
2655 (cp_parser_postfix_open_square_expression): Take decltype_p.
2656 (cp_parser_builtin_offsetof): Adjust.
2657 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
b45dc549
JM
2658 * decl2.c (grok_array_decl): Add decltype_p parm.
2659 * cp-tree.h: Adjust prototype.
e59baf05
JM
2660 * semantics.c (finish_unary_op_expr): Add complain parm.
2661
43a8d6cc
JJ
26622013-04-11 Jakub Jelinek <jakub@redhat.com>
2663
2664 PR c++/56895
2665 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2666 calling maybe_constant_value for C++98.
2667
a2a5f18e
JM
26682013-04-11 Jason Merrill <jason@redhat.com>
2669
2670 PR c++/56901
2671 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2672 Strip references before checking WILDCARD_TYPE_P.
2673
76545796
PC
26742013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2675
2676 * call.c (build_conditional_expr_1, build_over_call): Protect
2677 error calls with complain & tf_error.
2678 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2679 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2680 build_ptrmemfunc): Likewise.
2681 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2682
2683 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2684 (convert_to_reference): Adjust.
2685
a26780a3
JM
26862013-04-11 Jason Merrill <jason@redhat.com>
2687
ffe0f557
JM
2688 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2689 local variables, look them up instead.
2690 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2691 proxies and substitution in unevaluated context.
2692 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2693 before the iterators.
2694
a26780a3
JM
2695 PR c++/23055
2696 * pt.c (uses_deducible_template_parms): New.
2697 (deducible_array_bound, deducible_expression): New.
2698 (deducible_template_args): New.
2699 (unify_one_argument): Call uses_deducible_template_parms.
2700
7c55f410
PC
27012013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2702
2703 PR c++/56913
2704 * typeck2.c (build_m_component_ref): Protect error calls with
2705 (complain & tf_error).
2706
f06a1142
PC
27072013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2708
2709 PR c++/54216
2710 * parser.c (cp_parser_enum_specifier): Check for empty
2711 anonymous enums and anonymous scoped enums.
2712
f7e8cd25
JJ
27132013-04-10 Jakub Jelinek <jakub@redhat.com>
2714
2715 PR c++/56895
2716 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2717 first before calling maybe_constant_value for warn_for_div_by_zero
2718 or invalid shift count warning purposes.
2719
c87e82a6
JM
27202013-04-09 Jason Merrill <jason@redhat.com>
2721
2722 PR c++/25466
2723 * rtti.c (build_typeid): Check the address of the argument
2724 rather than looking for an INDIRECT_REF.
2725
a0c06853
JM
27262013-04-04 Jason Merrill <jason@redhat.com>
2727
2728 PR c++/56838
2729 PR c++/17232
2730 * typeck2.c (abstract_virtuals_error_sfinae): Disable
2731 complete_type again.
2732
0c3f68a0
PC
27332013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2734
2735 PR c++/56871
2736 * decl.c (validate_constexpr_redeclaration): Allow an explicit
2737 specialization to be different wrt the constexpr specifier.
2738
91392840
JM
27392013-04-06 Jason Merrill <jason@redhat.com>
2740
2741 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2742 noreturn attribute.
2743
45416e08
ESR
27442013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
2745
2746 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2747 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
2748
0861bec8
JM
27492013-04-03 Jason Merrill <jason@redhat.com>
2750
7d27c734
JM
2751 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2752 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2753 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2754
0861bec8
JM
2755 * mangle.c (write_type): When writing a function type with
2756 function-cv-quals, don't add the unqualified type as a
2757 substitution candidate.
2758
c42a832a
PC
27592013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
2760
2761 PR c++/56815
2762 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2763 pedwarn.
2764
7349ed05
JJ
27652013-04-03 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR debug/56819
2768 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2769 from args to new_args.
2770 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2771 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2772
8b00b643
JM
27732013-04-02 Jason Merrill <jason@redhat.com>
2774
e0f0935b
JM
2775 PR c++/56821
2776 * mangle.c (write_function_type): Mangle ref-qualifier.
2777 (write_nested_name): Likewise.
2778 (canonicalize_for_substitution): Preserve ref-qualifier.
2779 (write_type): Likewise.
2780
8b00b643
JM
2781 PR c++/34949
2782 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2783
ae34ce04
PC
27842013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2785
2786 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2787 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2788 (for_each_template_parm_r): Use TYPE_TI_ARGS.
2789
73243d63
PC
27902013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
2791
2792 * cp-tree.h (TAGGED_TYPE_P): Remove.
2793 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2794 (TYPE_ANONYMOUS_P): Adjust.
2795 * call.c (build_new_op_1): Likewise.
2796 * class.c (find_abi_tags_r): Likewise.
2797 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2798 type_is_deprecated): Likewise.
2799 * decl2.c (grokfield, min_vis_r): Likewise.
2800 * pt.c (get_template_info): Likewise.
2801 * tree.c (handle_abi_tag_attribute): Likewise.
2802
c4101929
JM
28032013-04-01 Jason Merrill <jason@redhat.com>
2804
2ad8cf26
JM
2805 * semantics.c (maybe_constant_value): Check
2806 instantiation_dependent_expression_p.
2807 * pt.c (build_non_dependent_expr): Don't check it here.
2808
879b0a1d
JM
2809 PR c++/56772
2810 * init.c (build_new): Don't try to process an array initializer
2811 at template definition time.
2812
c53d966d
JM
2813 PR c++/56793
2814 * typeck.c (finish_class_member_access_expr): Handle enum scope.
2815
570e2ca0
JM
2816 PR c++/56794
2817 * parser.c (cp_parser_range_for): Don't try to do auto deduction
2818 in a template if the type of the range is incomplete.
2819
a7175123
JM
2820 * call.c (add_function_candidate): Take the address of 'this' here.
2821 (build_over_call): And here.
2822 (build_new_method_call_1, build_op_call_1): Not here.
2823 (build_user_type_conversion_1): Or here.
2824 (add_candidates): Adjust.
2825
c4101929
JM
2826 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2827 * class.c (same_signature_p): Use type_memfn_quals.
2828 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2829 FUNCTION_OR_METHOD_TYPE_CHECK.
2830 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2831 * pt.c (unify): Use static_fn_type.
2832
2eed8e37
BK
28332013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
2834 Jason Merrill <jason@redhat.com>
2835
2836 Implement N2439 (ref-qualifiers for 'this')
2837 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2838 (FUNCTION_RVALUE_QUALIFIED): New.
2839 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2840 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2841 (cp_ref_qualifier): New enum.
2842 (cp_declarator): Add ref_qualifier.
2843 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2844 (cp_parser_direct_declarator): Use it.
2845 (make_call_declarator): Adjust.
2846 (cp_parser_lambda_declarator_opt): Adjust.
2847 * call.c (add_function_candidate): Handle ref-qualifier overload
2848 resolution semantics.
2849 (standard_conversion): Adjust.
2850 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2851 * decl.c (grokdeclarator): Handle ref-qualifiers.
2852 (grokfndecl): Check for invalid ref-qualifiers.
2853 (static_fn_type, revert_static_member_fn): Adjust.
2854 * decl2.c (build_memfn_type): Handle ref-qualifiers.
2855 (check_classfn): Check them.
2856 (cp_reconstruct_complex_type): Retain them.
2857 * error.c (dump_ref_qualifier): New.
2858 (dump_type_suffix, dump_function_decl): Use it.
2859 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2860 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2861 (unify): Retain them.
2862 * tree.c (cp_check_qualified_type): New.
2863 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2864 (build_ref_qualified_type): New.
2865 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2866 (cp_build_type_attribute_variant): Keep ref-qualifier.
2867 * typeck.c (merge_types): Keep ref-qualifier.
2868 (structural_comptypes): Compare ref-qualifier.
2869 (type_memfn_rqual): New.
2870 (apply_memfn_quals): Take ref-qual argument.
2871 * typeck2.c (build_m_component_ref): Check ref-qualifier.
2872
5bc08e85
PC
28732013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
2874
2875 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2876 (DECL_FUNCTION_TEMPLATE_P): Adjust.
2877
2878 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2879 pp_cxx_qualified_id): Use get_containing_scope.
2880 * parser.c (cp_parser_class_head): Likewise.
2881 * pt.c (push_template_decl_real): Likewise.
2882
2883 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2884 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2885
9ededfc5
PC
28862013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
2887
2888 * decl2.c (collect_candidates_for_java_method_aliases): Use
2889 DECL_CLASS_SCOPE_P.
2890 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2891 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2892 * decl.c (duplicate_decls): Likewise.
2893 * parser.c (cp_parser_template_declaration_after_export): Likewise,
2894 also DECL_DECLARES_TYPE_P.
2895 * pt.c (instantiate_class_template_1): Likewise.
2896 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2897 (lookup_field_r): Likewise.
2898 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2899 (lookup_fnfields_slot_nolazy): Likewise.
2900 * semantics.c (finish_member_declaration): Likewise.
2901 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2902
03295121
GDR
29032013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2904
2905 * pt.c (template_parms_to_args): Fix typo in comment.
2906
5950480c
PC
29072013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2908
2909 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2910
50e10fa8
PC
29112013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
2912
2913 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2914 (build_op_call_1): Likewise.
2915 (build_over_call): Likewise.
2916 (compare_ics): Likewise.
2917 * class.c (build_base_path): Likewise.
2918 (resolve_address_of_overloaded_function): Likewise.
2919 * cp-tree.h: Likewise.
2920 * cvt.c (cp_convert_to_pointer): Likewise.
2921 (convert_to_reference): Likewise.
2922 (ocp_convert): Likewise.
2923 (convert_force): Likewise, tidy.
2924 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2925 (pp_cxx_ptr_operator): Likewise.
2926 * decl.c (duplicate_decls): Likewise.
2927 (start_decl): Likewise.
2928 (grok_op_properties): Likewise.
2929 (start_preparsed_function): Likewise.
2930 (store_parm_decls): Likewise.
2931 (finish_function): Likewise.
2932 * decl2.c (delete_sanity): Likewise.
2933 (acceptable_java_type): Likewise.
2934 (grokbitfield): Likewise.
2935 (cp_reconstruct_complex_type): Likewise.
2936 * error.c (dump_type_prefix): Likewise.
2937 (dump_expr): Likewise.
2938 * except.c (push_eh_cleanup): Likewise.
2939 (complete_ptr_ref_or_void_ptr_p): Likewise.
2940 (can_convert_eh): Likewise.
2941 * init.c (build_new_1): Likewise.
2942 (build_delete): Likewise.
2943 (build_vec_delete): Likewise.
2944 * mangle.c (write_type): Likewise.
2945 * parser.c (lookup_literal_operator): Likewise.
2946 * pt.c (convert_nontype_argument_function): Likewise.
2947 (convert_nontype_argument): Likewise.
2948 (tsubst): Likewise.
2949 (unify): Likewise.
2950 (dependent_type_p_r): Likewise.
2951 * rtti.c (build_headof): Likewise.
2952 (build_typeid): Likewise.
2953 (build_dynamic_cast_1): Likewise.
2954 (target_incomplete_p): Likewise.
2955 (typeinfo_in_lib_p): Likewise.
2956 * semantics.c (finish_omp_for): Likewise.
2957 (cxx_eval_call_expression): Likewise.
2958 (maybe_resolve_dummy): Likewise.
2959 * tree.c (build_target_expr): Likewise.
2960 (cp_build_qualified_type_real): Likewise.
2961 * typeck.c (composite_pointer_type_r): Likewise.
2962 (composite_pointer_type): Likewise.
2963 (comp_except_types): Likewise.
2964 (cxx_sizeof_nowarn): Likewise.
2965 (string_conv_p): Likewise.
2966 (cp_build_array_ref): Likewise.
2967 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2968 (pointer_diff): Likewise.
2969 (cp_build_addr_expr_1): Likewise.
2970 (cp_build_unary_op): Likewise.
2971 (build_static_cast_1): Likewise.
2972 (cp_build_c_cast): Likewise.
2973 (comp_ptr_ttypes_real): Likewise.
2974 (ptr_reasonably_similar): Likewise.
2975 (comp_ptr_ttypes_const): Likewise.
2976 (casts_away_constness): Likewise.
2977 (check_literal_operator_args): Likewise.
2978 * typeck2.c (build_x_arrow): Likewise.
2979 (add_exception_specifier): Likewise.
2980
4185fb73
JM
29812013-03-29 Jason Merrill <jason@redhat.com>
2982
10c6dc8e
JM
2983 N3582
2984 * cp-tree.h (AUTO_IS_DECLTYPE): New.
2985 * parser.c (cp_parser_decltype): Handle decltype(auto).
2986 (cp_parser_type_id_1): Allow auto without a late-specified
2987 return in C++1y.
2988 (cp_parser_primary_expression): Use the return value of
2989 finish_parenthesized_expr.
2990 (cp_parser_transaction_expression): Likewise.
2991 * semantics.c (force_paren_expr): New.
2992 (finish_parenthesized_expr): Use it.
2993 * call.c (build_conditional_expr_1): Likewise.
2994 * pt.c (do_auto_deduction): Handle decltype(auto).
2995 (tsubst_copy): Handle PAREN_EXPR.
2996 (tsubst_copy_and_build): Likewise.
2997 * error.c (dump_expr): Handle PAREN_EXPR.
2998 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2999 * mangle.c (write_expression): Ignore PAREN_EXPR.
3000
15914ac8
JM
3001 * parser.c (cp_parser_decltype_expr): Split out...
3002 (cp_parser_decltype): ...from here.
3003
4185fb73
JM
3004 PR c++/56774
3005 PR c++/35722
3006 * pt.c (unify_pack_expansion): Fix indexing.
3007
5a6ccc94
GDR
30082013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3009
3010 * call.c (build_java_interface_fn_ref): Likewise.
3011 (make_temporary_var_for_ref_to_temp): Likewise.
3012 * class.c (check_field_decls): Likewise.
3013 (layout_class_type): Likewise.
3014 (finish_struct_1): Likewise.
3015 (fixed_type_or_null): Likewise.
3016 (get_vtbl_decl_for_binfo): Likewise.
3017 * cp-gimplify.c (omp_var_to_track): Likewise.
3018 (cp_genericize_r): Likewise.
3019 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
3020 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
3021 (DECL_DISCRIMINATOR_P): Likewise.
3022 * decl.c (poplevel): Likewise.
3023 (decls_match): Likewise.
3024 (duplicate_decls): Likewise.
3025 (decl_jump_unsafe): Likewise.
3026 (start_decl): Likewise.
3027 (check_for_uninitialized_const_var): Likewise.
3028 (make_rtl_for_nonlocal_decl): Likewise.
3029 (cp_finish_decl): Likewise.
3030 (expand_static_init): Likewise.
3031 (local_variable_p): Likewise.
3032 (maybe_register_incomplete_var): Likewise.
3033 * decl2.c (grokfield): Likewise.
3034 (comdat_linkage): Likewise.
3035 (determine_visibility): Likewise.
3036 (import_export_decl): Likewise.
3037 (prune_vars_needing_no_initialization): Likewise.
3038 (decl_maybe_constant_var_p): Likewise.
3039 * error.c (dump_simple_decl): Likewise.
3040 (dump_template_decl): Likewise.
3041 (cp_printer): Likewise.
3042 * except.c (build_throw): Likewise.
3043 * init.c (build_vtbl_address): Likewise.
3044 (member_init_ok_or_else): Likewise.
3045 (build_aggr_init): Likewise.
3046 (expand_aggr_init_1): Likewise.
3047 (build_offset_ref): Likewise.
3048 (constant_value_1): Likewise.
3049 * mangle.c (write_mangled_name): Likewise.
3050 (write_prefix): Likewise.
3051 * name-lookup.c (supplement_binding_1): Likewise.
3052 (add_decl_to_level): Likewise.
3053 (pushdecl_maybe_friend_1): Likewise.
3054 (check_for_out_of_scope_variable): Likewise.
3055 (validate_nonmember_using_decl): Likewise.
3056 (lookup_name_innermost_nonclass_level_1): Likewise.
3057 (lookup_arg_dependent_1): Likewise.
3058 * parser.c (cp_parser_lambda_introducer): Likewise.
3059 (cp_parser_template_argument): Likewise.
3060 (cp_parser_single_declaration): Likewise.
3061 * pt.c (convert_nontype_argument): Likewise.
3062 (instantiate_class_template_1): Likewise.
3063 (tsubst_decl): Likewise.
3064 (tsubst_expr): Likewise.
3065 (do_decl_instantiation): Likewise.
3066 (do_type_instantiation): Likewise.
3067 (regenerate_decl_from_template): Likewise.
3068 (always_instantiate_p): Likewise.
3069 (instantiate_decl): Likewise.
3070 (type_dependent_expression_p): Likewise.
3071 (build_non_dependent_expr): Likewise.
3072 * repo.c (repo_emit_p): Likewise.
3073 * rtti.c (build_dynamic_cast_1): Likewise.
3074 * search.c (shared_member_p): Likewise.
3075 * semantics.c (outer_var_p): Likewise.
3076 (finish_id_expression): Likewise.
3077 (finish_omp_clauses): Likewise.
3078 (finish_decltype_type): Likewise.
3079 (ensure_literal_type_for_constexpr_object): Likewise.
3080 * tree.c (lvalue_kind): Likewise.
3081 (bot_replace): Likewise.
3082 (cp_tree_equal): Likewise.
3083 (handle_init_priority_attribute): Likewise.
3084 (decl_storage_duration): Likewise.
3085 * typeck.c (cxx_sizeof_expr): Likewise.
3086 (cxx_alignof_expr): Likewise.
3087 (decay_conversion): Likewise.
3088 (build_class_member_access_expr): Likewise.
3089 (cp_build_array_ref): Likewise.
3090 (cxx_mark_addressable): Likewise.
3091 (maybe_warn_about_returning_address_of_local): Likewise.
3092 (check_return_expr): Likewise.
3093 * typeck2.c (cxx_readonly_error): Likewise.
3094 (abstract_virtuals_error_sfinae): Likewise.
3095 (cxx_incomplete_type_diagnostic): Likewise.
3096
7b3b6ae4
LC
30972013-03-28 Lawrence Crowl <crowl@google.com>
3098
3099 * Make-lang.in
3100 (CXX_PARSER_H): Add header dependence.
3101 * cp-tree.h
3102 (extern debug (cp_binding_level &)): New.
3103 (extern debug (cp_binding_level *)): New.
3104 * name-lookup.h
3105 (debug (cp_binding_level &)): New.
3106 (debug (cp_binding_level *)): New.
3107 * parser.c
3108 (debug (cp_parser &)): New.
3109 (debug (cp_parser *)): New.
3110 (debug (cp_token &)): New.
3111 (debug (cp_token *)): New.
3112 (debug (vec<cp_token, va_gc> &)): New.
3113 (debug (vec<cp_token, va_gc> *)): New.
3114 * parser.c: Add header dependence.
3115 (extern debug (cp_parser &)): New.
3116 (extern debug (cp_parser *)): New.
3117 (extern debug (cp_token &)): New.
3118 (extern debug (cp_token *)): New.
3119 (extern debug (vec<cp_token, va_gc> &)): New.
3120 (extern debug (vec<cp_token, va_gc> *)): New.
3121
477e1843
JM
31222013-03-28 Jason Merrill <jason@redhat.com>
3123
2b24855e
JM
3124 PR c++/17232
3125 PR c++/52748
3126 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
3127 the type if tf_decltype is set.
3128 * pt.c (fn_type_unification): Add decltype_p parm.
3129 (get_bindings): Adjust.
3130 * cp-tree.h: Adjust.
3131 * class.c (resolve_address_of_overloaded_function): Adjust.
3132 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
3133
f5e44182
JM
3134 PR c++/56679
3135 * parser.c (cp_parser_sizeof_pack): Split out from...
3136 (cp_parser_sizeof_operand): ...here. Require (id).
3137
374b2837
JM
3138 PR c++/56701
3139 * semantics.c (finish_this_expr): 'this' is an rvalue.
3140 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
3141
fad882c6
JM
3142 PR c++/56710
3143 * semantics.c (finish_member_declaration): Don't push closure
3144 members.
3145
c561e952
JM
3146 * name-lookup.c (pushdecl_maybe_friend_1): Use
3147 nonlambda_method_basetype and current_nonlambda_class_type.
3148
477e1843
JM
3149 PR c++/56728
3150 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
3151 conversion from integer to pointer.
3152 (cxx_eval_constant_expression): Likewise.
3153 (cxx_eval_indirect_ref): Use the folded operand if we still think
3154 this might be constant.
3155
7abebba7
PC
31562013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3157 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3158
3159 PR c++/56725
3160 * call.c (convert_like_real): Change series of two permerrors
3161 to permerror + inform (and likewise for two errors).
3162 (build_new_method_call_1): Likewise.
3163 * typeck.c (convert_for_initialization): Change additional
3164 warning or error to inform.
3165
9173cf24
GDR
31662013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3167
3168 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
3169 (first_aggr_init_expr): Likewise.
3170 (more_aggr_init_expr_args_p): Likewise.
3171 (type_of_this_parm): Likewise.
3172 (class_of_this_parm): Likewise.
3173 * name-lookup.h (get_global_value_if_present): Likewise.
3174 (is_typename_at_global_scope): Likewise.
3175
129677c1
PC
31762013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
3177
3178 * call.c (joust): Don't call inform for a permerror returning false.
3179 * parser.c (cp_parser_check_class_key): Likewise.
3180 * pt.c (tsubst_copy_and_build): Likewise.
3181
d348f172
JM
31822013-03-27 Jason Merrill <jason@redhat.com>
3183
3184 PR c++/56749
3185 * semantics.c (finish_qualified_id_expr): Return early
3186 for enum scope.
3187
591cb3cf
GDR
31882013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3189
3190 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
3191 * cvt.c (convert_to_void): Likewise.
3192 * error.c (dump_expr): Likewise.
3193 * mangle.c (write_expression): Likewise.
3194 * parser.c (cp_parser_template_argument): Likewise.
3195 * pt.c (convert_nontype_argument): Likewise.
3196 (tsubst_copy_and_build): Likewise.
3197 * rtti.c (build_typeid): Likewise.
3198 * semantics.c (finish_call_expr): Likewise.
3199 (finish_decltype_type): Likewise.
3200 (build_data_member_initialization): Likewise.
3201 * tree.c (is_dummy_object): Likewise.
3202 * typeck.c (decay_conversion): Likewise.
3203 (build_class_member_access_expr): Likewise.
3204 (cp_build_addr_expr_1): Likewise.
3205 (unary_complex_lvalue): Likewise.
3206 (check_return_expr): Likewise.
3207 * typeck2.c (cxx_readonly_error): Likewise.
3208
845367eb
JM
32092013-03-26 Jason Merrill <jason@redhat.com>
3210
6c74ff23
JM
3211 PR c++/52597
3212 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
3213 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
3214 * cp-tree.h: Adjust prototype.
3215
845367eb
JM
3216 PR c++/45282
3217 * typeck2.c (build_m_component_ref): Handle prvalue object.
3218
cb6da767
GDR
32192013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
3220
3221 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
3222 * decl.c (duplicate_decls): Likewise.
3223 (cp_finish_decl): Likewise.
3224 (check_class_member_definition_namespace): Likewise.
3225 * decl2.c (grokfield): Likewise.
3226 (decl_needed_p): Likewise.
3227 (import_export_decl): Likewise.
3228 (mark_used): Likewise.
3229 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
3230 * pt.c (push_access_scope): Likewise.
3231 (instantiate_decl): Likewise.
3232 * ptree.c (cxx_print_decl): Likewise.
3233 * repo.c (repo_emit_p): Likewise.
3234 * semantics.c (note_decl_for_pch): Likewise.
3235 * tree.c (decl_linkage): Likewise.
3236
515e4d1d
PC
32372013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3238
3239 PR c++/55951
3240 * decl.c (check_array_designated_initializer): Handle CONST_DECL
3241 as ce->index.
3242
5cf2a084
PC
32432013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
3244
3245 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
3246 error messages.
3247
3248 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
3249
f02296dd
JM
32502013-03-25 Jason Merrill <jason@redhat.com>
3251
3252 PR c++/56699
3253 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
3254 class is derived from the type of the object.
963afe1b
JM
3255
3256 PR c++/52014
3257 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
3258 unevaluated context.
3259
bbce8a8a
PC
32602013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
3261
3262 PR c++/56722
3263 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
3264 DECL_TEMPLATE_INSTANTIATION.
3265
e0ef0af5
JM
32662013-03-22 Jason Merrill <jason@redhat.com>
3267
3268 PR c++/56684
3269 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
3270 and CONST_DECL.
3271
9dc6f476
GDR
32722013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3273
3274 * cp-tree.h (identifier_p): New.
3275 * call.c: Throughout, call identifier_p insstead of direct
3276 comparaison of TREE_CODE against IDENTIFIER_NODE.
3277 * decl.c: Likewisse.
3278 * decl2.c: Likewise.
3279 * init.c: Likewise.
3280 * mangle.c: Likewise.
3281 * name-lookup.c: Likewise.
3282 * parser.c: Likewise.
3283 * pt.c: Likewise.
3284 * search.c: Likewise.
3285 * semantics.c: Likewise.
3286 * tree.c: Likewise.
3287 * typeck.c: Likewise.
3288 * typeck2.c: Likewise.
3289
37e99116
JJ
32902013-03-21 Jakub Jelinek <jakub@redhat.com>
3291
3292 PR middle-end/48087
3293 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
3294 * call.c (build_temp): Likewise.
3295 * method.c (synthesize_method): Likewise.
3296 * typeck.c (convert_for_initialization): Likewise.
3297
08e0cda6
MG
32982013-03-21 Marc Glisse <marc.glisse@inria.fr>
3299
3300 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
3301
839b422f
RB
33022013-03-21 Richard Biener <rguenther@suse.de>
3303
3304 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
3305 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3306
9f5d44f4
JM
33072013-03-20 Jason Merrill <jason@redhat.com>
3308
efcf217b
JM
3309 PR c++/56646
3310 * parser.c (cp_parser_late_return_type_opt): Save and restore
3311 current_class_ptr/ref.
3312
deaae9d7
JM
3313 PR c++/54532
3314 * expr.c (cplus_expand_constant): Do nothing if the class is
3315 incomplete.
3316 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3317 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3318 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3319 (complete_vars): Likewise.
3320
766053b3
JM
3321 * name-lookup.c (get_anonymous_namespace_name): Never use
3322 get_file_function_name.
3323
c77f56bb
JM
3324 * pt.c (retrieve_specialization): Handle null tmpl argument.
3325
9f5d44f4
JM
3326 PR c++/17232
3327 PR c++/56642
3328 * pt.c (tsubst_decl): Check return value of register_specialization.
3329 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3330 change.
3331
df5c5f78
JM
33322013-03-17 Jason Merrill <jason@redhat.com>
3333
136357ac
JM
3334 PR c++/54359
3335 PR c++/56639
3336 * parser.c (cp_parser_direct_declarator): Bail if we see a
3337 qualified-id not at namespace scope.
3338
df5c5f78
JM
3339 PR c++/17232
3340 PR c++/56642
3341 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3342 change for now.
3343
6721db5d
JM
33442013-03-16 Jason Merrill <jason@redhat.com>
3345
d1f45df5
JM
3346 * decl.c (grokdeclarator): Assert that we won't see a pointer to
3347 METHOD_TYPE.
3348
bab5167f
JM
3349 PR c++/54277
3350 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3351 (MAYBE_CLASS_TYPE_P): ...here.
3352 * semantics.c (lambda_capture_field_type): Only build a
3353 magic decltype for wildcard types.
3354 (lambda_proxy_type): Likewise.
3355 (finish_non_static_data_member): Get the quals from
3356 the object.
3357
d14d53ad
JM
3358 PR c++/55931
3359 * parser.c (cp_parser_template_argument): Don't
3360 fold_non_dependent_expr.
3361
bc0c6b15
JM
3362 * parser.c (cp_parser_lambda_declarator_opt): Use
3363 cp_parser_trailing_type_id.
3364
cae7d264
JM
3365 PR c++/45917
3366 * parser.c (cp_parser_template_id): Don't forget access checks.
3367
7805032d
JM
3368 PR c++/52374
3369 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3370
c7335680
JM
3371 PR c++/54764
3372 PR c++/55972
3373 * name-lookup.h (tag_scope): Add ts_lambda.
3374 * semantics.c (begin_lambda_type): Use it.
3375 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3376 * pt.c (check_default_tmpl_args): Ignore lambdas.
3377 (push_template_decl_real): Handle lambdas.
3378 * tree.c (no_linkage_check): Adjust lambda check.
3379
8e519a8b
JM
3380 PR c++/56039
3381 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3382
bf7292fc
JM
3383 PR c++/54359
3384 * parser.c (cp_parser_direct_declarator): Fix late return
3385 for out-of-class defn of member function.
3386
b4c7ce54
JM
3387 PR c++/55357
3388 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3389 parms to avoid duplicate -Wshadow warnings.
3390
ca2e264d
JM
3391 * search.c (lookup_base): Handle NULL_TREE.
3392
b7df43cd
JM
3393 PR c++/56481
3394 * semantics.c (potential_constant_expression_1): Use of 'this' in
3395 a non-constexpr function makes the expression not potentially
3396 constant.
3397
57fcd4f4
JM
3398 N3276
3399 PR c++/52748
3400 * cp-tree.h (tsubst_flags): Add tf_decltype.
3401 * call.c (build_cxx_call): Don't build a temporary if it's set.
3402 (build_over_call): Make sure it's only passed to build_cxx_call.
3403 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3404 (cp_parser_unary_expression): Likewise.
3405 (cp_parser_cast_expression): Likewise.
3406 (cp_parser_binary_expression): Likewise.
3407 (cp_parser_assignment_expression): Likewise.
3408 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
4a5e2469 3409 (cp_parser_expression): Add decltype_p. Force a
57fcd4f4
JM
3410 temporary for a call on the LHS of a comma.
3411 (cp_parser_decltype): Pass true to decltype_p parms.
3412 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3413 (tsubst_copy_and_build): Pass tf_decltype down only for
3414 CALL_EXPR and the RHS of COMPOUND_EXPR.
3415 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3416
2df663cc
JM
3417 * cp-tree.h (abstract_class_use): New enum.
3418 * typeck2.c (pending_abstract_type): Add use field.
3419 (abstract_virtuals_error_sfinae): Add overloads taking
3420 abstract_class_use instead of tree.
3421 * typeck.c (build_static_cast_1): Call it.
3422 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3423 * pt.c: Adjust calls.
3424 * decl.c (cp_finish_decl): Don't handle functions specially.
3425 (grokdeclarator): Always check return type.
3426 * init.c (build_new_1): Adjust call.
3427
95ffad49
JM
3428 DR 337
3429 PR c++/17232
3430 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3431 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3432
346928a2
JM
3433 DR 657
3434 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3435 (tsubst_arg_types): Likewise.
3436
0cc5ae8d
JM
3437 DR 1518
3438 PR c++/54835
3439 * call.c (convert_like_real): Check for explicit constructors
3440 even for value-initialization.
3441
cb3c050e
JM
3442 PR c++/54946
3443 * pt.c (convert_nontype_argument): Handle invalid pointer.
3444
e9f3968b
JM
3445 * parser.c (cp_parser_lambda_expression): Use nreverse.
3446
e2adfdad
JM
3447 PR c++/56447
3448 PR c++/55532
3449 * pt.c (instantiate_class_template_1): Instantiate lambda capture
3450 list here.
3451 (tsubst_copy_and_build): Not here.
3452
5275b2c7
JM
3453 PR c++/55017
3454 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3455
cdf47df0
JM
3456 PR c++/55240
3457 * parser.c (parsing_nsdmi): New.
3458 * semantics.c (outer_automatic_var_p): Check it.
3459 (finish_id_expression): Likewise.
3460 * cp-tree.h: Declare it.
3461
a1e03bc5
JM
3462 PR c++/55241
3463 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3464
d09b76f1
JM
3465 * parser.c (lookup_literal_operator): Correct parm/arg naming
3466 mixup.
3467
011ce3f3
JM
3468 PR c++/56238
3469 * pt.c (fold_non_dependent_expr_sfinae): Check
3470 instantiation_dependent_expression_p.
3471
6721db5d
JM
3472 PR c++/56095
3473 * class.c (resolve_address_of_overloaded_function): Accept a
3474 reference to function for target_type.
3475 (instantiate_type): Likewise.
3476 * pt.c (convert_nontype_argument): Pass it to
3477 convert_nontype_argument_function.
3478
87eb16a1
JJ
34792013-03-16 Jakub Jelinek <jakub@redhat.com>
3480
b722c9a2
JJ
3481 * tree.c (cp_tree_equal): Fix a pasto.
3482
87eb16a1
JJ
3483 PR c++/56607
3484 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3485 pass op1 through maybe_constant_value first.
3486
9a54d96a
PC
34872013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
3488
3489 PR c++/56582
3490 * semantics.c (cxx_eval_array_reference): Check for negative index.
3491
e9d5a271
JM
34922013-03-14 Jason Merrill <jason@redhat.com>
3493
a7137ee1
JM
3494 PR c++/56614
3495 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3496
e9d5a271
JM
3497 PR c++/56346
3498 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3499 dso_handle parm on targets without __cxa_atexit.
3500
2aa953d0
JM
35012013-03-11 Jason Merrill <jason@redhat.com>
3502
3503 PR c++/56567
3504 * typeck.c (check_return_expr): Disallow returning init list here.
3505 * semantics.c (apply_deduced_return_type): Not here.
3506
f030a1dc
PC
35072013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
3508
3509 PR c++/51412
3510 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3511 * error.c (dump_expr): Likewise.
3512
e48243d8
JM
35132013-03-08 Jason Merrill <jason@redhat.com>
3514
9d13a069
JM
3515 PR c++/51884
3516 * class.c (modify_all_vtables): Mangle the vtable name before
3517 entering dfs_walk.
3518
37fb0a98
JM
3519 * semantics.c (lambda_expr_this_capture): In unevaluated context,
3520 just return the nearest 'this'.
3521
0ef811d7 3522 PR c++/51494
19831b08 3523 PR c++/52183
0ef811d7
JM
3524 PR c++/56222
3525 * tree.c (maybe_dummy_object): Don't capture 'this'.
3526 * semantics.c (maybe_resolve_dummy): New.
3527 (finish_non_static_data_member): Use it.
3528 (finish_qualified_id_expr): Don't test is_dummy_object.
3529 * cp-tree.h: Declare maybe_resolve_dummy.
3530 * call.c (build_new_method_call_1): Use it.
3531
e48243d8
JM
3532 PR c++/56567
3533 * semantics.c (apply_deduced_return_type): Don't allow returning
3534 std::initializer_list.
3535
5fdbceff
PC
35362013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3537
3538 PR c++/56534
3539 * parser.c (cp_parser_elaborated_type_specifier): Don't call
3540 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3541 * decl.c (check_elaborated_type_specifier): Tidy.
3542
9ebced77
JJ
35432013-03-06 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR c++/56543
3546 * tree.c (strip_typedefs): Don't copy args if they are NULL.
3547
574f9d7e
JJ
35482013-03-05 Jakub Jelinek <jakub@redhat.com>
3549
3550 * parser.c (cp_parser_braced_list): For {} initialize
3551 *non_constant_p to false.
3552
4b16f9c8
JM
35532013-03-04 Jason Merrill <jason@redhat.com>
3554
3555 PR c++/56464
3556 PR c++/54383
3557 * semantics.c (lambda_expr_this_capture): Handle NSDMI
3558 and non-class scopes.
3559
48a30e28
PC
35602013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3561
3562 * decl.c (grokdeclarator): Remove dead code.
3563
c966f2de
JM
35642013-02-28 Jason Merrill <jason@redhat.com>
3565
728761be
JM
3566 PR c++/56481
3567 * semantics.c (potential_constant_expression_1): Use
3568 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3569
c966f2de
JM
3570 PR c++/56243
3571 * call.c (build_over_call): Avoid virtual lookup in a template.
3572
140bec21
JM
35732013-02-27 Jason Merrill <jason@redhat.com>
3574
3575 PR c++/56358
3576 PR c++/56323
3577 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3578 of the base name for inheriting ctors.
3579 (push_class_level_binding_1): Remove inheriting ctor handling.
3580 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3581 * class.c (add_implicitly_declared_members): Adjust.
3582
ecf3abb9
DB
35832013-02-26 David Binderman <dcb314@hotmail.com>
3584
3585 PR c++/55632
3586 * decl.c (grokdeclarator): Tidy publicp assignment.
3587
6f2d959b
AH
35882013-02-25 Aldy Hernandez <aldyh@redhat.com>
3589
3590 PR c++/56419
3591 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3592 (build_transaction_expr): Same.
3593
70e9ab23
JM
35942013-02-25 Jason Merrill <jason@redhat.com>
3595
9bcb18f6
JM
3596 PR c++/56377
3597 * pt.c (fn_type_unification): Wait to call push_tinst_level until
3598 we know what args we're looking at.
3599
70e9ab23
JM
3600 PR c++/56438
3601 * semantics.c (potential_constant_expression_1): In C++98, a cast
3602 to non-integral type can't be a constant expression.
3603
5621a5d7
JJ
36042013-02-24 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR c++/56403
3607 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3608 of CLASS_TYPE_P.
3609
5b5d851e
JM
36102013-02-22 Jason Merrill <jason@redhat.com>
3611
5c505cba
JM
3612 PR c++/40405
3613 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3614 if we got the wrong number of template parms.
3615
82a1326b
JM
3616 PR c++/56377
3617 * pt.c (fn_type_unification): Use explicit args in template
3618 instantiation context.
3619
3ced2284
JM
3620 PR c++/56359
3621 * call.c (can_convert_arg): Discard access checks.
3622
5b5d851e
JM
3623 PR c++/56395
3624 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3625 args.
3626
30b07d03
PC
36272013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
3628
3629 PR c++/56373
3630 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3631 * cvt.c (ocp_convert): Use the latter.
3632 (cp_convert_to_pointer): Likewise.
3633 * decl.c (check_default_argument): Likewise.
3634 * typeck.c (cp_build_binary_op): Likewise.
3635 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3636
4d0648ac
JW
36372013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
3638 Paolo Carlini <paolo.carlini@oracle.com>
3639
3640 PR c++/51242
3641 * decl2.c (grokbitfield): Allow scoped enumeration types.
3642
30fa2a51
JM
36432013-02-15 Jason Merrill <jason@redhat.com>
3644
9fd30fec
JM
3645 PR c++/54276
3646 * semantics.c (finish_id_expression): Also return the identifier
3647 for an outer local static.
3648
52d95c21
JM
3649 PR c++/56343
3650 * class.c (check_bases_and_members): Deduce noexcept after
3651 checking bases.
3652
30fa2a51
JM
3653 PR c++/52026
3654 * semantics.c (finish_id_expression): In a template, return
3655 the identifier for a constant variable.
3656
ff9b4073
JM
36572013-02-14 Jason Merrill <jason@redhat.com>
3658
9b2f0394
JM
3659 PR c++/54922
3660 * semantics.c (build_anon_member_initialization): New.
3661 (build_data_member_initialization): Use it.
3662
b24cd3d1
JM
3663 PR c++/55003
3664 * decl.c (cp_finish_decl): Force instantiation of an
3665 auto static data member.
3666
d132b74a
JM
3667 PR c++/55220
3668 * pt.c (unify): A pack expansion that is not the last template
3669 argument makes the entire template argument list non-deduced.
3670
06449b40
JM
3671 PR c++/56323
3672 * name-lookup.c (do_class_using_decl): Handle typedefs with
3673 inheriting constructors.
3674 (push_class_level_binding_1): Allow inheriting from template
3675 template parameter, too.
3676 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3677
622aac0b
JM
3678 PR c++/55223
3679 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3680 default argument scope.
3681 * mangle.c (write_name): Likewise.
3682
ff9b4073
JM
3683 PR c++/55232
3684 * error.c (find_typenames_r): Don't walk into a pack expansion.
3685
78a2ea41
JM
36862013-02-13 Jason Merrill <jason@redhat.com>
3687
28d5c777
JM
3688 PR c++/55670
3689 * parser.c (cp_parser_member_declaration): Check the declarator
3690 form when detecting a function declaration via typedef.
3691
e75e98f2
JM
3692 PR c++/55680
3693 * pt.c (maybe_process_partial_specialization): A lambda
3694 isn't what's being specialized.
3695
43c2d791
JM
3696 PR c++/55710
3697 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3698 TREE_USED.
3699
70fc7c6c
JM
3700 PR c++/55879
3701 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3702
58b922f8
JM
3703 PR c++/55993
3704 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3705 non-zero offsets, too.
3706
d0d9cf0e
JM
3707 PR c++/56155
3708 * decl.c (build_enumerator): Always convert the value to a
3709 fixed underlying type.
3710
78a2ea41
JM
3711 PR c++/56135
3712 * pt.c (tsubst_copy_and_build): Don't forget any new
3713 captures that arose from use of dependent names.
3714
6760071f
JJ
37152013-02-13 Jakub Jelinek <jakub@redhat.com>
3716
3717 PR c++/56302
3718 * semantics.c (finish_asm_stmt): If input constraints allow
3719 neither register nor memory, try maybe_constant_value to get
3720 a constant if possible.
3721
1f8aec00
JM
37222013-02-12 Jason Merrill <jason@redhat.com>
3723
d8af1a55
JM
3724 PR c++/56285
3725 * method.c (add_one_base_init): Handle base constructor
3726 taking rvalue reference parm.
3727
1f8aec00
JM
3728 PR c++/56291
3729 * semantics.c (sort_constexpr_mem_initializers): Handle
3730 vptr out of order.
3731
d982e024
JM
37322013-02-09 Jason Merrill <jason@redhat.com>
3733
ba9146c1
JM
3734 PR c++/56268
3735 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3736 maybe_instantiate_noexcept.
3737
25976b7f
JM
3738 PR c++/56247
3739 * pt.c (eq_specializations): Set comparing_specializations.
3740 * tree.c (cp_tree_equal): Check it.
3741 * cp-tree.h: Declare it.
3742
8d40d877
JM
3743 * decl.c (decls_match): Check versions later.
3744
d982e024
JM
3745 PR c++/56238
3746 * pt.c (build_non_dependent_expr): Don't try to fold
3747 instantiation-dependent expressions.
3748 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3749 [BIND_EXPR]: Treat as dependent.
3750
e6d7b956
JJ
37512013-02-07 Jakub Jelinek <jakub@redhat.com>
3752
f11c7048
JJ
3753 PR c++/56241
3754 * init.c (build_vec_init): Don't append NULL values into new_vec.
3755 (build_zero_init_1): Don't push anything into v if recursive call
3756 returned NULL_TREE.
3757 (build_value_init_noctor): Don't push anything into v if
3758 build_value_init call returned NULL_TREE.
3759
2052ce24
JJ
3760 PR c++/56239
3761 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3762 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
3763 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
3764 return true only if 2nd token isn't CPP_CLOSE_PAREN.
3765 (cp_parser_cast_expression): Adjust caller.
3766
e6d7b956
JJ
3767 PR c++/56237
3768 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3769 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3770 DECL_LANG_SPECIFIC (t).
3771
702f9fe5
JM
37722013-02-07 Jason Merrill <jason@redhat.com>
3773
3774 PR c++/56235
3775 * method.c (do_build_copy_constructor): Don't bother turning
3776 scalars from lvalues to xvalues.
3777 (do_build_copy_assign): Likewise.
3778
ceb86495
JM
37792013-02-06 Jason Merrill <jason@redhat.com>
3780
3781 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3782
29ef6cd0
JM
37832013-02-05 Jason Merrill <jason@redhat.com>
3784
ea48c8a0
JM
3785 PR c++/54122
3786 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3787 METHOD_TYPE.
3788
a283c407
JM
3789 PR c++/56177
3790 * decl.c (start_preparsed_function): Update restype if we change
3791 decl1.
3792
29ef6cd0
JM
3793 PR c++/56208
3794 * pt.c (fn_type_unification): Discard any access checks from
3795 substituting explicit args.
3796
b5fbde92
JM
37972013-01-31 Jason Merrill <jason@redhat.com>
3798
3799 PR c++/56162
3800 PR c++/56104
3801 * typeck.c (get_member_function_from_ptrfunc): Fix
3802 ptrmemfunc_vbit_in_delta case.
3803
2ee8a2d5
JM
38042013-01-29 Jason Merrill <jason@redhat.com>
3805
3806 PR libstdc++/54314
3807 * class.c (build_ctor_vtbl_group): Give construction vtables
3808 hidden visibility.
3809
e18724aa
JM
38102013-01-25 Jason Merrill <jason@redhat.com>
3811
d4a18018
JM
3812 PR c++/56095
3813 * pt.c (convert_nontype_argument_function): Handle invalid input.
3814 (convert_nontype_argument): Likewise.
3815
e18724aa
JM
3816 PR c++/56104
3817 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3818 dynamic type has no virtual functions.
3819
723889fa
PC
38202013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
3821
3822 PR c++/55944
3823 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3824 on TARGET_EXPR nodes.
3825
90481257
JM
38262013-01-22 Jason Merrill <jason@redhat.com>
3827
3828 PR c++/56071
3829 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3830
b0ffaa36
DS
38312013-01-22 Dodji Seketeli <dodji@redhat.com>
3832
3833 PR c++/53609
3834 * pt.c (argument_pack_element_is_expansion_p)
3835 (make_argument_pack_select, use_pack_expansion_extra_args_p)
3836 (gen_elem_of_pack_expansion_instantiation): New static functions.
3837 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3838 look through the possibly resulting pack expansion as well.
3839 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3840 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3841 Use gen_elem_of_pack_expansion_instantiation to build the
3842 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
3843 as gen_elem_of_pack_expansion_instantiation and the change in
3844 tsubst above generalize this particular case.
3845 (arg_from_parm_pack_p): Remove this for it's not used by
3846 tsubst_pack_expansion anymore.
3847
dcdb8613
JM
38482013-01-21 Jason Merrill <jason@redhat.com>
3849
3850 PR c++/56059
3851 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3852 template args count.
3853
5af057d8
JM
38542013-01-18 Jason Merrill <jason@redhat.com>
3855
3856 PR target/54908
3857 * decl2.c (get_local_tls_init_fn): New.
3858 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
3859 with aliases for internal variables. Don't use weakrefs if
3860 the variable needs destruction.
3861 (generate_tls_wrapper): Mark the wrapper as const if no
3862 initialization is needed.
3863 (handle_tls_init): Don't require aliases.
3864
cd61690f
DS
38652013-01-15 Dodji Seketeli <dodji@redhat.com>
3866
3867 PR c++/55663
3868 * pt.c (coerce_innermost_template_parms): New static function.
3869 (instantiate_alias_template): Use it here.
3870
96924e7e
JM
38712013-01-09 Jason Merrill <jason@redhat.com>
3872
795801d6
JM
3873 PR c++/55878
3874 * rtti.c (build_typeid, get_typeid): Add complain parm.
3875 (get_tinfo_decl_dynamic): Likewise.
3876 * cp-tree.h, parser.c, pt.c: Adjust.
3877
96924e7e
JM
3878 PR c++/55893
3879 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3880 needs destruction.
3881
cc83c823
JJ
38822013-01-09 Jakub Jelinek <jakub@redhat.com>
3883
3884 PR c/48418
3885 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3886 call maybe_constant_value for the negative or too big shift
3887 count warnings.
3888
fdbff37f
PC
38892013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
3890
3891 PR c++/55801
3892 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3893 of the argument is true.
3894
80a8d521
JB
38952013-01-08 Joel Brobecker <brobecker@adacore.com>
3896
3897 * parser.c (cp_parser_initializer_list): Move declaration
3898 of variable non_const to start of lexical block.
3899
e4d7d8cb
JM
39002013-01-07 Jason Merrill <jason@redhat.com>
3901
3902 PR c++/55753
3903 * tree.c (build_aggr_init_expr): Do nothing in a template.
3904 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3905 a FUNCTION_DECL before tsubsting.
3906
36b21740
DS
39072013-01-04 Dodji Seketeli <dodji@redhat.com>
3908
3909 PR c++/52343
3910 * pt.c (check_instantiated_arg): Allow type template arguments.
3911
82f2836c
JM
39122013-01-04 Jason Merrill <jason@redhat.com>
3913
3914 PR c++/55877
3915 * decl.c (reset_type_linkage, bt_reset_linkage): New.
3916 (grokdeclarator): Use reset_type_linkage.
3917 * name-lookup.c (binding_table_foreach): Handle null table.
3918 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3919
1582c677
PC
39202013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
3921
3922 PR c++/54526 (again)
3923 * parser.c (cp_parser_template_id): Revert core of previous change
3924 (keep adjusted inform message).
3925
99c4346a
JM
39262013-01-03 Jason Merrill <jason@redhat.com>
3927
20644725
JM
3928 PR c++/55419
3929 PR c++/55753
3930 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3931 TREE_CONSTANT.
3932
ffabb761
JM
3933 PR c++/55842
3934 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3935
b53e0533
JM
3936 PR c++/55856
3937 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3938
99c4346a
JM
3939 PR c++/53650
3940 * call.c (type_has_extended_temps): New.
3941 * cp-tree.h: Declare it.
3942 * decl.c (check_initializer): Use build_aggr_init for arrays
3943 if it is false.
3944 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3945
e78167f2
JM
39462013-01-02 Jason Merrill <jason@redhat.com>
3947
3a322efd
JM
3948 PR c++/54325
3949 * call.c (build_new_method_call_1): Don't use build_value_init for
3950 user-provided default constructors.
3951
5f942422
JM
3952 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3953
e78167f2
JM
3954 PR c++/55032
3955 PR c++/55245
3956 * tree.c (build_cplus_array_type): Copy layout information
3957 to main variant if necessary.
ad41bd84 3958\f
86a2db33 3959Copyright (C) 2013 Free Software Foundation, Inc.
ad41bd84
JM
3960
3961Copying and distribution of this file, with or without modification,
3962are permitted in any medium without royalty provided the copyright
3963notice and this notice are preserved.