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