]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
c-pretty-print.h (c_pretty_printer::constant): Now a virtual member function.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
2
3 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
4 function, overriding c_pretty_printer::constant.
5 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
6 pp_cxx_constant. Adjust.
7 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
8
9 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
10
11 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
12 destructor for the early printer.
13 * error.c (type_to_string): Use pp_buffer.
14
15 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
16
17 PR c++/56380
18 * class.c (check_field_decls): Check for const mutable and const
19 reference data members.
20
21 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
22
23 * error.c (init_error): Remove calls to pp_construct and
24 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
25 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
26 (cxx_pretty_printer_init): Remove.
27 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
28 Rename from cxx_pretty_printer_init. Adjust.
29 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
30 initialization of C++ diagnostics pretty printer.
31
32 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
33
34 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
35 * cp-tree.h (REFERENCE_REF_P): Likewise.
36 * semantics.c (finish_offsetof): Likewise.
37
38 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
39
40 PR c++/56130
41 * semantics.c (finish_id_expression): Handle deprecated references.
42
43 2013-08-20 Jason Merrill <jason@redhat.com>
44
45 PR c++/58119
46 * cvt.c (build_expr_type_conversion): Don't complain about a
47 template that can't match the desired type category.
48
49 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
50
51 * error.c (pp_ggc_formatted_text): New.
52 (type_as_string): Use it in lieu of pp_formatted_text.
53 (type_as_string_translate): Likewise.
54 (expr_as_string): Likewise.
55 (decl_as_string): Likewise.
56 (decl_as_string_translate): Likewise.
57 (lang_decl_name): Likewise.
58 (decl_to_string): Likewise.
59 (expr_to_string): Likewise.
60 (fndecl_to_string): Likewise.
61 (parm_to_string): Likewise.
62 (type_to_string): Likewise.
63 (args_to_string): Likewise.
64 (subst_to_string): Likewise.
65
66 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
67
68 PR c/57490
69 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
70 check for truth values.
71 (expand_array_notation_exprs): Added truth values case. Removed an
72 unwanted else. Added for-loop to walk through subtrees in default
73 case.
74 * call.c (build_cxx_call): Inherited the type of the array notation for
75 certain built-in array notation functions.
76
77 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
78
79 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
80 Use cp_parser_lookup_name_simple.
81
82 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
83
84 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
85 * name-lookup.c (pop_bindings_and_leave_scope): Define.
86 * parser.c (cp_parser_lambda_declarator_opt,
87 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
88
89 2013-08-17 Jason Merrill <jason@redhat.com>
90
91 PR c++/58083
92 * name-lookup.c (push_class_level_binding_1): It's OK to push a
93 lambda type after the enclosing type is complete.
94
95 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
96
97 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
98 Adjust callers.
99 (dump_template_argument): Likewise.
100 (dump_template_argument_list): Likewise.
101 (dump_template_parameter): Likewise.
102 (dump_template_bindings): Likewise.
103 (dump_alias_template_specialization): Likewise.
104 (dump_type): Likewise.
105 (dump_typename): Likewise.
106 (dump_aggr_type): Likewise.
107 (dump_type_prefix): Likewise.
108 (dump_type_suffix): Likewise.
109 (dump_global_iord): Likewise.
110 (dump_simple_decl): Likewise.
111 (dump_decl): Likewise.
112 (dump_template_decl): Likewise.
113 (dump_function_decl): Likewise.
114 (dump_parameters): Likewise.
115 (dump_ref_qualifier): Likewise.
116 (dump_exception_spec): Likewise.
117 (dump_function_name): Likewise.
118 (dump_template_parms): Likewise.
119 (dump_call_expr_args): Likewise.
120 (dump_aggr_init_expr_args): Likewise.
121 (dump_expr_list): Likewise.
122 (dump_expr_init_vec): Likewise.
123 (dump_expr): Likewise.
124 (dump_binary_op): Likewise.
125 (dump_unary_op): Likewise.
126
127 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
128
129 PR c++/51912
130 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
131 * decl.c (case_conversion): Use it.
132 * call.c (standard_conversion): Likewise.
133 (implicit_conversion): Adjust.
134
135 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
136
137 * pt.c: Grammar fix in comments ("it's" to "its").
138
139 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
140
141 * decl.c (warn_extern_redeclared_static, duplicate_decls,
142 check_elaborated_type_specifier): Use error + inform.
143 * friend.c (make_friend_class): Likewise.
144 * semantics.c (finish_id_expression): Likewise.
145
146 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
147
148 Revert:
149 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
150
151 PR c++/46206
152 * name-lookup.c (lookup_name_real_1): Handle iter->type before
153 iter->value.
154
155 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
156
157 PR c++/46206
158 * name-lookup.c (lookup_name_real_1): Handle iter->type before
159 iter->value.
160
161 2013-08-06 Caroline Tice <cmtice@google.com>
162
163 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
164 list.
165 (vtable-class-hierarchy.o): Add build rule.
166 * cp-tree.h (vtv_start_verification_constructor_init_function): New
167 extern function decl.
168 (vtv_finish_verification_constructor_init_function): New extern
169 function decl.
170 (build_vtbl_address): New extern function decl.
171 (get_mangled_vtable_map_var_name): New extern function decl.
172 (vtv_compute_class_hierarchy_transitive_closure): New extern function
173 decl.
174 (vtv_generate_init_routine): New extern function decl.
175 (vtv_save_class_info): New extern function decl.
176 (vtv_recover_class_info): New extern function decl.
177 (vtv_build_vtable_verify_fndecl): New extern function decl.
178 * class.c (finish_struct_1): Add call to vtv_save_class_info if
179 flag_vtable_verify is true.
180 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
181 * vtable-class-hierarchy.c: New file.
182 * mangle.c (get_mangled_vtable_map_var_name): New function.
183 * decl2.c (start_objects): Update function comment.
184 (cp_write_global_declarations): Call vtv_recover_class_info,
185 vtv_compute_class_hierarchy_transitive_closure and
186 vtv_build_vtable_verify_fndecl, before calling
187 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
188 flag_vtable_verify is true.
189 (vtv_start_verification_constructor_init_function): New function.
190 (vtv_finish_verification_constructor_init_function): New function.
191 * init.c (build_vtbl_address): Remove static qualifier from function.
192
193 2013-08-06 Jason Merrill <jason@redhat.com>
194
195 PR c++/57825
196 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
197
198 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
199
200 PR c++/58080
201 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
202 (cp_build_binary_op): Adjust.
203
204 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
205
206 * cxx-pretty-print.h (pp_c_base): Remove.
207 (cxx_pretty_printer): Derive from c_pretty_printer.
208 Adjust macros using pp_c_base.
209 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
210 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
211 (pp_cxx_colon_colon): Likewise.
212 (pp_cxx_separate_with): Likewise.
213 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
214 (pp_cxx_expression_list): Likewise.
215 (pp_cxx_space_for_pointer_operator): Likewise.
216 (pp_cxx_init_declarator): Likewise.
217 (pp_cxx_call_argument_list): Likewise.
218 (pp_cxx_constant): Likewise.
219 (pp_cxx_postfix_expression): Likewise.
220 (pp_cxx_new_expression): Likewise.
221 (pp_cxx_unary_expression): Likewise.
222 (pp_cxx_cast_expression): Likewise.
223 (pp_cxx_conditional_expression): Likewise.
224 (pp_cxx_assignment_expression): Likewise.
225 (pp_cxx_expression): Likewise.
226 (pp_cxx_function_specifier): Likewise.
227 (pp_cxx_decl_specifier_seq): Likewise.
228 (pp_cxx_simple_type_specifier): Likewise.
229 (pp_cxx_type_specifier_seq): Likewise.
230 (pp_cxx_ptr_operator): Likewise.
231 (pp_cxx_parameter_declaration_clause): Likewise.
232 (pp_cxx_direct_declarator): Likewise.
233 (pp_cxx_direct_abstract_declarator): Likewise.
234 (pp_cxx_type_id): Likewise.
235 (pp_cxx_statement): Likewise.
236 (pp_cxx_pretty_printer_init): Tidy.
237 * error.c (init_error): Do not use pp_base.
238 (dump_aggr_type): Likewise.
239 (dump_type_prefix): Likewise.
240 (dump_type_suffix): Likewise.
241 (dump_global_iord): Likewise.
242 (dump_decl): Likewise.
243 (dump_function_decl): Likewise.
244 (dump_ref_qualifier): Likewise.
245 (reinit_cxx_pp): Likewise.
246 (decl_as_dwarf_string): Likewise.
247 (lang_decl_dwarf_name): Likewise.
248 (type_to_string): Likewise.
249 (cv_to_string): Likewise.
250 (cxx_print_error_function): Likewise.
251 (cp_diagnostic_starter): Likewise.
252 (cp_diagnostic_finalizer): Likewise.
253 (cp_print_error_function): Likewise.
254 (print_instantiation_context): Likewise.
255 (cp_printer): Likewise.
256
257 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
258
259 * error.c (dump_type_prefix): Use specialized pretty printer
260 functions instead of pp_string or operators and punctuators.
261 (dump_decl): Likewise.
262 (dump_expr): Likewise.
263
264 2013-08-03 Jason Merrill <jason@redhat.com>
265
266 DR 1286
267 * pt.c (get_underlying_template): New.
268 (convert_template_argument, lookup_template_class_1): Use it.
269
270 DR 1430
271 PR c++/51239
272 * pt.c (pack_expansion_args_count): Rename from
273 any_pack_expanson_args_p.
274 (coerce_template_parms): Reject pack expansion to
275 non-pack template parameter of alias template.
276
277 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
278
279 * error.c (dump_aggr_type): Use specialized pretty printer
280 functions instead of pp_character.
281 (dump_type_prefix): Likewise.
282 (dump_simple_decl): Likewise.
283 (type_to_string): Likewise.
284
285 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
286
287 * cp-tree.h (finish_stmt): Do not declare.
288 * decl.c (finish_stmt): Do not define.
289 * parser.c (cp_parser_expression_statement,
290 cp_parser_declaration_statement,
291 cp_parser_transaction_cancel): Don't call finish_stmt.
292 * semantics.c (finish_expr_stmt, finish_if_stmt,
293 finish_while_stmt, finish_do_stmt, finish_return_stmt,
294 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
295 finish_transaction_stmt): Likewise.
296
297 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
298
299 PR c++/54537
300 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
301 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
302 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
303 instead of issuing an error without mentioning the conflicting
304 declaration.
305
306 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
307
308 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
309 return value for error_mark_node.
310
311 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
312
313 PR c++/57673
314 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
315 token->type == CPP_ELLIPSIS.
316
317 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
318
319 PR c++/57947
320 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
321
322 2013-07-29 Jason Merrill <jason@redhat.com>
323
324 PR c++/57901
325 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
326 Use break_out_target_exprs instead of unshare_expr.
327
328 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
329
330 PR c++/57948
331 * call.c (initialize_reference): Don't crash when reference_binding
332 returns a conv with conv->kind == ck_ambig.
333
334 2013-07-29 Jason Merrill <jason@redhat.com>
335
336 * mangle.c (write_name): Check for null context.
337 (write_unscoped_name): Allow PARM_DECL context.
338
339 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
340
341 PR c++/57981
342 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
343 (grokparms): Adjust.
344 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
345 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
346 a tsubst_flags_t parameter.
347 (tsubst_decl): Adjust.
348 * call.c (convert_default_arg): Likewise.
349 * cp-tree.h (check_default_argument, tsubst_default_argument):
350 Update declarations.
351
352 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
353
354 PR c++/57880
355 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
356 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
357 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
358 Fix string_len management, tidy.
359
360 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
361
362 PR c++/57942
363 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
364 target type is incomplete; return a bool, not an int.
365 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
366
367 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
368
369 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
370 tf_warning_or_error.
371
372 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
373
374 * class.c: Fix typos.
375 * cp-array-notation.c: Likewise.
376 * cp-objcp-common.c: Likewise.
377 * decl.c: Likewise.
378 * init.c: Likewise.
379 * mangle.c: Likewise.
380 * parser.c: Likewise.
381 * pt.c: Likewise.
382 * semantics.c: Likewise.
383
384 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
385
386 * semantics.c (build_lambda_expr),
387 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
388 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
389 (is_normal_capture_proxy), (insert_capture_proxy),
390 (insert_pending_capture_proxies), (lambda_proxy_type),
391 (build_capture_proxy), (vla_capture_type),
392 (register_capture_members), (add_default_capture),
393 (lambda_expr_this_capture), (maybe_resolve_dummy),
394 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
395 (is_lambda_ignored_entity): Moved definitions into ...
396 * lambda.c: ... this new file.
397
398 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
399
400 * call.c (build_conditional_expr_1): Handle the case with 1 vector
401 and 2 scalars. Call save_expr before building a vector.
402 * typeck.c (cp_build_binary_op): Check complain before complaining.
403
404 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
405
406 PR c++/55203
407 * init.c (build_aggr_init): Check for warn_unused attribute.
408 * decl.c (poplevel): Likewise.
409
410 2013-07-13 Jason Merrill <jason@redhat.com>
411
412 PR c++/57402
413 * init.c (build_vec_init): Use {} for arrays of class type.
414 (build_vec_delete): Don't take the address of the array.
415
416 PR c++/57793
417 * class.c (layout_class_type): Check for too-large class.
418
419 * call.c (can_convert): Allow user-defined conversions.
420 (can_convert_standard): New.
421 * cp-tree.h: Declare it.
422 * cvt.c (convert_to_reference): Use it.
423 * pt.c (convert_nontype_argument): Likewise.
424 * search.c (check_final_overrider): Likewise.
425 Don't worry about user-defined conversions.
426
427 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
428
429 PR c++/57869
430 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
431 warn about casting between pointer-to-function and pointer-to-object.
432
433 2013-07-09 Jason Merrill <jason@redhat.com>
434
435 PR c++/57402
436 * init.c (build_vec_init): Don't take shortcuts when initializing
437 a VLA.
438
439 PR c++/57471
440 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
441
442 PR c++/57658
443 * semantics.c (finish_id_expression): Return the id for an
444 unevaluated outer variable.
445
446 PR c++/57526
447 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
448 if the variable type uses 'auto'.
449
450 PR c++/57437
451 * typeck.c (check_return_expr): Lambda proxies aren't eligible
452 for nrv or return by move.
453
454 PR c++/57532
455 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
456 a ref-qualifier in C++98 mode.
457
458 PR c++/57545
459 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
460 argument to have the exact type of the parameter.
461
462 PR c++/57551
463 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
464 a POINTER_PLUS_EXPR for type punning diagnostic.
465
466 PR c++/57831
467 * pt.c (tsubst_copy): Handle USING_DECL.
468
469 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
470
471 PR c++/53094
472 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
473
474 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
475
476 PR c++/53000
477 * call.c (build_conditional_expr_1): Preserve xvalues.
478
479 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
480
481 PR c++/51786
482 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
483 also check declares_class_or_enum.
484
485 2013-07-08 Jason Merrill <jason@redhat.com>
486
487 PR c++/57550
488 * pt.c (fn_type_unification): Only defer during substitution.
489 (type_unification_real): Defer during defarg substitution,
490 add checks parm to pass back deferred checks.
491 (unify, do_auto_deduction): Adjust.
492 * semantics.c (reopen_deferring_access_checks): New.
493 * cp-tree.h: Declare it.
494
495 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
496
497 PR c++/28262
498 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
499 set parser->default_arg_ok_p to false before cp_parser_declarator.
500
501 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
502
503 PR c++/14263
504 * class.c (build_base_path): Improve diagnostic.
505
506 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
507
508 PR c++/38634
509 * decl.c (start_preparsed_function): Return a bool, false if
510 push_template_decl fails.
511 (start_function): Adjust.
512 * cp-tree.h: Update.
513
514 2013-07-03 Jakub Jelinek <jakub@redhat.com>
515
516 PR c++/57771
517 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
518 Temporarily set parser->greater_than_is_operator_p for
519 cp_parser_expression and restore from saved value afterwards.
520
521 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
522
523 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
524 * parser.c (cp_parser_operator()): Parse user-defined string
525 literal as literal operator.
526
527 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
528
529 PR c++/57645
530 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
531 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
532 destructors.
533
534 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
535
536 * parser.c (cp_parser_array_notation): Removed rejection array notation
537 of type function pointers. Added handling of array expressions when
538 Cilk Plus is enabled. Took out type-checking.
539 (cp_parser_postfix_open_square_expression): Moved normal array expr.
540 parsing into cp_parser_array_notation when cilkplus is enabled.
541 (cp_parser_compound_statement): Removed expansion of array notations.
542 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
543 (cp_parser_function_definition_after_declarator): Likewise.
544 (cp_parser_selection_statement): Removed error reporting.
545 (cp_parser_iteration_statement): Likewise.
546 (cp_parser_direct_declarator): Removed error checking/reporting if
547 array notations are used in the declarator.
548 * pt.c (instantiate_decl): Likewise.
549 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
550 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
551 (potential_constant_expression_1): Returned false for
552 ARRAY_NOTATION_REF case.
553 * cp-gimplify.c (cp_genericize): Added expansion of array notation
554 expressions here.
555 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
556 parameters. Replaced build_decls with get_temp_regvar with type as
557 ptrdiff.
558 (create_array_refs): Made the type-casting to ptrdiff_type.
559 (replace_invariant_var): Added a check for void return type before
560 creating new var. Replaced build_decl and build_min_nt_loc with
561 get_temp_regvar.
562 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
563 with gcc_unreachable. Removed few unwanted checks. Made induction
564 variable type as ptrdiff_type. Removed loc and complain arguments
565 passed into make_triplet_val_inv. Replaced all modify expression's
566 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
567 into stmt. list with the non-forceful one. Replaced some integer
568 conversion and equality-checking to using tree_int_cst_equal.
569 (expand_sec_reduce_builtin): All changes mentioned in above function
570 expand_an_in_modify_expr. Made the new variable type of
571 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
572 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
573 the error reporting from parser to this function. Removed unwanted
574 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
575 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
576 in function pointers.
577 (cp_expand_cond_array_notations): Added a new if statements to check
578 if condition has a zero rank. If so, then just return.
579 (expand_return_expr): Added a check for return expressions with a rank.
580 Replaced get_tmp_regvar with a create_temporary_var.
581 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
582 Moved common code outside if-statements. Moved type-checking from
583 parser to here.
584 * semantics.c (finish_return_stmt): Removed a check for return exprs.
585 with a rank.
586 * call.c (convert_like_real): Removed a check for array notation
587 expression in a function.
588 (build_over_call): Likewise.
589 (magic_varargs_p): Added a check for builtin array notation function.
590 Made this function non-static and removed its prototype.
591 * cp-tree.h (magic_varargs_p): New prototype.
592 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
593 nargs to the param->length when builtin reduction function is used.
594 (convert_arguments): Replaced check for a constant_p function with
595 margic_varargs_p function call.
596 (cp_build_binary_op): Removed calling of the function
597 find_correct_array_notation_type.
598 (cp_build_addr_expr_1): Removed an unwanted if-statement.
599 (convert_for_assignment): Removed automatic return of rhs when array
600 notation builtin function is used.
601
602 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
603
604 PR c++/57682
605 * parser.c (cp_parser_save_member_function_body): Handle correctly
606 curly braces in function-try-block mem-initializers.
607
608 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
609
610 PR c++/57509
611 * typeck.c (cp_build_vec_perm_expr): New function.
612 * cp-tree.h: Declare it.
613 * parser.c (cp_parser_postfix_expression): Call it.
614 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
615 (tsubst_copy_and_build): Likewise.
616
617 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
618
619 PR c++/57172
620 * pt.c (more_specialized_fn): If both arguments are references,
621 give priority to an lvalue.
622
623 2013-06-26 Jason Merrill <jason@redhat.com>
624
625 * typeck2.c (store_init_value): Diagnose a non-constant
626 initializer for in-class static.
627
628 PR c++/57408
629 * semantics.c (add_capture): Set type to error_mark_node after
630 error.
631
632 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
633
634 PR c++/57640
635 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
636 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
637
638 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
639
640 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
641 * class.c (add_implicitly_declared_members): Likewise.
642 (check_field_decl): Likewise.
643 (finalize_literal_type_property): Likewise.
644 (check_bases_and_members): Likewise.
645 * decl.c (poplevel): Likewise.
646 (case_conversion): Likewise.
647 (check_initializer): Likewise.
648 (grokfndecl): Likewise.
649 (check_static_variable_definition): Likewise.
650 (compute_array_index_type): Likewise.
651 (grokdeclarator): Likewise.
652 (build_enumerator): Likewise.
653 * friend.c (make_friend_class): Likewise.
654 * lex.c (init_reswords): Likewise.
655 * method.c (synthesized_method_walk): Likewise.
656 (implicitly_declare_fn): Likewise.
657 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
658 (cp_parser_constant_expression): Likewise.
659 (cp_parser_for_init_statement): Likewise.
660 (cp_parser_block_declaration): Likewise.
661 (cp_parser_type_name): Likewise.
662 (cp_parser_enum_specifier): Likewise.
663 (cp_parser_enumerator_list): Likewise.
664 (cp_parser_member_declaration): Likewise.
665 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
666 (cp_parser_template_declaration_after_export): Likewise.
667 * pt.c (convert_nontype_argument_function): Likewise.
668 (convert_nontype_argument): Likewise.
669 (convert_template_argument): Likewise.
670 (tsubst_copy_and_build): Likewise.
671 (build_non_dependent_expr): Likewise.
672 * semantics.c (non_const_var_error): Likewise.
673 (potential_constant_expression_1): Likewise.
674 * tree.c (lvalue_kind): Likewise.
675 (build_vec_init_expr): Likewise.
676 (cast_valid_in_integral_constant_expression_p): Likewise.
677 * typeck.c (build_x_conditional_expr): Likewise.
678 * typeck2.c (check_narrowing): Likewise.
679
680 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
681
682 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
683 (expand_an_in_modify_expr): Changed a function call from the above
684 removed function to length_mismatch_in_expr_p.
685
686 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
687
688 * call.c (convert_like_real): Added a check if array notation is present
689 in expression. If so, then no conversion of arguments is necessary.
690 (build_over_call): Likewise.
691 * typeck.c (cp_build_function_call_vec): Likewise.
692 (convert_for_assignment): Likewise.
693 (cp_build_array_ref): Reject array notations with a rank greater than 1
694 as an array's index.
695 (cp_build_binary_op): If array notations are preent in op, then call
696 find_correct_array_notation_type.
697 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
698 * cp-array-notation.c: New file.
699 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
700 as typed.
701 * cp-tree.h (fix_array_notation_exprs): New prototype.
702 * semantics.c (finish_return_stmt): Reject array notations as
703 return value.
704 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
705 (potential_constant_expression_1): Likewise.
706 * tree.c (lvalue_kind): Likewise.
707 * error.c (dump_decl): Likewise.
708 (dump_expr): Likewise.
709 * pt.c (ARRAY_NOTATION_REF): Likewise.
710 (type_unification_real): Do not unify any arguments if array notations
711 are found in arg.
712 (instantiate_decl): Added a check for array notaitons inside the
713 function body. If so, then expand them.
714 * parser.c (cp_parser_array_notation): New function.
715 (cp_parser_postfix_open_square_expression): Added a check for colons
716 inside square braces. If found, then handle the array access as an
717 array notation access. Also, disable auto-correction from a single
718 colon to scope when Cilk Plus is enabled.
719 (cp_parser_compound_statement): Added a check for array notations
720 inside the statement. If found, then expand them.
721 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
722 (cp_parser_function_definition_after_declarator): Likewise.
723 (cp_parser_selection_statement): Searched for array notations inside
724 condition. If so, then emit an error.
725 (cp_parser_iteration_statement): Likewise.
726 (cp_parser_direct_declarator): Reject array notations inside a
727 variable or array declaration.
728 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
729
730 2013-06-20 Jason Merrill <jason@redhat.com>
731
732 PR c++/55149
733 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
734 context if we're in C++14 mode.
735 * tree.c (array_of_runtime_bound_p): Return true for a dependent
736 bound that is not potentually constant.
737 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
738 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
739 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
740 (build_capture_proxy): Set REFERENCE_VLA_OK.
741 (vla_capture_type): Make it a proper C++ class.
742 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
743 initializer.
744
745 * decl.c (compute_array_index_type): Use size_one_node.
746
747 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
748 a partial specialization.
749 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
750 specialization.
751 (most_specialized_class): Adjust.
752
753 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
754 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
755 TEMPLATE_DECL_CHECK.
756
757 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
758
759 PR c++/57638
760 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
761 TREE_TYPE (arg), not arg itself.
762
763 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
764
765 PR c++/53211
766 * pt.c (type_dependent_expression_p): Handle an array of unknown
767 bound depending on a variadic parameter.
768 * parser.c (cp_parser_range_for): Revert PR56794 changes.
769
770 2013-06-17 Richard Biener <rguenther@suse.de>
771
772 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
773
774 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
775
776 PR c++/16128
777 * parser.c (cp_parser_expression_statement): Check whether
778 cp_parser_expression returns error_mark_node.
779
780 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
781
782 PR c++/51413
783 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
784
785 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
786
787 PR c++/57599
788 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
789 accessible base simply forward to build_static_cast.
790
791 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
792
793 PR c++/38958
794 * decl.c (poplevel): For the benefit of -Wunused-variable see
795 through references.
796
797 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
798
799 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
800
801 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
802
803 PR c++/42021
804 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
805 again diagnostic already emitted by cp_parser_lookup_name.
806
807 2013-06-11 Jan Hubicka <jh@suse.cz>
808
809 PR c++/57551
810 * cp/pt.c (mark_decl_instantiated): Do not export explicit
811 instantiations of anonymous namespace templates.
812
813 2013-06-10 Jason Merrill <jason@redhat.com>
814
815 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
816 namespace to static_decls.
817
818 2013-06-07 Sriraman Tallam <tmsriram@google.com>
819
820 PR c++/57548
821 * call.c (build_over_call): Check if current_function_decl is
822 NULL.
823
824 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
825
826 PR c++/53658
827 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
828 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
829
830 2013-06-06 Jason Merrill <jason@redhat.com>
831
832 PR c++/55520
833 * semantics.c (add_capture): Diagnose capture of variable-size
834 type that is not a C++1y array of runtime bound.
835
836 * decl.c (grokdeclarator): Keep a decl with error type.
837 (grokfield, grokbitfield): Likewise.
838 * pt.c (instantiate_class_template_1): Likewise.
839 (tsubst_decl): Drop redundant error.
840 * class.c (walk_subobject_offsets): Handle erroneous fields.
841 * typeck2.c (process_init_constructor_record): Likewise.
842
843 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
844
845 PR c++/51908
846 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
847 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
848
849 2013-06-03 Jan Hubicka <jh@suse.cz>
850
851 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
852 mark_decl_referenced.
853 (mark_needed): Likewise.
854
855 2013-06-03 Jason Merrill <jason@redhat.com>
856
857 * class.c (mark_type_abi_tags): New.
858 (check_abi_tags): Use it.
859
860 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
861
862 PR c++/57419
863 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
864 * semantics.c (finish_qualified_id_expr): Use it.
865 * cp-tree.h: Update.
866
867 2013-06-01 Jan Hubicka <jh@suse.cz>
868
869 * decl2.c (cp_write_global_declarations): Replace same_body_alias
870 by symbol.cpp_implicit_alias.
871
872 2013-05-30 Jason Merrill <jason@redhat.com>
873
874 PR c++/57404
875 * cp-lang.c (cp_classify_record): Handle structs without
876 TYPE_LANG_SPECIFIC.
877
878 PR c++/52377
879 * class.c (common_enclosing_class): New.
880 * cp-tree.h: Declare it.
881 * init.c (sort_mem_initializers): Don't splice out a union member
882 with an NSDMI.
883
884 2013-05-29 Jan Hubicka <jh@suse.cz>
885
886 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
887 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
888
889 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
890
891 PR c++/25666
892 * decl2.c (check_classfn): Check for destructors declared as member
893 templates.
894
895 2013-05-24 Jason Merrill <jason@redhat.com>
896
897 PR c++/56971
898 * pt.c (any_template_arguments_need_structural_equality_p): A
899 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
900
901 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
902
903 PR c++/19618
904 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
905 with width exceeding the type.
906
907 2013-05-24 Jason Merrill <jason@redhat.com>
908
909 PR c++/57391
910 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
911 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
912
913 2013-05-23 Jason Merrill <jason@redhat.com>
914
915 PR c++/57388
916 * tree.c (build_ref_qualified_type): Clear
917 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
918
919 2013-05-22 Jason Merrill <jason@redhat.com>
920
921 PR c++/56930
922 * call.c (convert_like_real): Use cp_convert_and_check.
923 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
924 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
925 (potential_constant_expression_1): Handle OMP_ATOMIC*.
926
927 PR c++/56915
928 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
929 isn't defined.
930
931 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
932
933 PR c++/57352
934 * parser.c (cp_parser_conversion_type_id): Set up
935 parser->type_definition_forbidden_message before calling
936 cp_parser_type_specifier_seq.
937
938 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
939
940 PR c++/57211
941 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
942 warnings about defaulted functions.
943
944 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
945
946 * call.c (build_conditional_expr_1): Add location_t parameter.
947 (build_conditional_expr): Likewise.
948 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
949 get_member_function_from_ptrfunc, build_x_conditional_expr,
950 cp_build_modify_expr): Update.
951 * init.c (build_new_1): Likewise.
952 * cp-tree.h: Update declaration.
953
954 2013-05-20 Jason Merrill <jason@redhat.com>
955
956 PR c++/57016
957 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
958 if there is one.
959
960 PR c++/57102
961 * decl.c (fndecl_declared_return_type): Also look in
962 DECL_SAVED_FUNCTION_DATA.
963
964 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
965
966 PR c++/12288
967 * parser.c (cp_parser_parameter_declaration): Check return value
968 of cp_parser_parse_and_diagnose_invalid_type_name.
969
970 2013-05-20 Jason Merrill <jason@redhat.com>
971
972 PR c++/57319
973 * class.c (vbase_has_user_provided_move_assign): New.
974 * method.c (synthesized_method_walk): Check it.
975 * cp-tree.h: Declare it.
976
977 PR c++/57325
978 * tree.c (build_cplus_array_type): Copy layout info if element
979 type is complete.
980
981 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
982
983 PR c++/23608
984 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
985
986 2013-05-20 Jason Merrill <jason@redhat.com>
987
988 PR c++/57317
989 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
990 whether a template has its own args.
991
992 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
993
994 PR c++/57327
995 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
996
997 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
998
999 PR c++/10207
1000 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1001 instead of cp_parser_initializer_list for compound-literals.
1002
1003 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
1004
1005 PR c++/57175
1006 * typeck.c (check_return_expr): Reverse the alignment comparison.
1007
1008 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1009
1010 PR c++/18126
1011 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1012 correctly sizeof compound-literal; update comments.
1013
1014 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
1015
1016 * call.c (build_conditional_expr_1): Use cp_build_binary_op
1017 instead of directly calling fold_build2.
1018
1019 2013-05-16 Jason Merrill <jason@redhat.com>
1020
1021 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1022
1023 PR c++/57279
1024 * decl.c (grokdeclarator): Allow member function qualifiers in
1025 TYPENAME context in C++11 mode.
1026
1027 2013-05-16 Dodji Seketeli <dodji@redhat.com>
1028
1029 PR c++/56782 - Regression with empty pack expansions
1030 * pt.c (use_pack_expansion_extra_args_p): When at least a
1031 parameter pack has an empty argument pack, and another parameter
1032 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1033 mechanism.
1034
1035 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1036
1037 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1038 warning_at and permerror with warning_at/inform and permerror/
1039 inform, respectively.
1040
1041 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1042
1043 PR c++/31952
1044 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1045 redeclarations.
1046
1047 2013-05-14 Jason Merrill <jason@redhat.com>
1048
1049 PR c++/57243
1050 * parser.c (cp_parser_range_for): Call complete_type.
1051
1052 PR c++/57041
1053 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1054
1055 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1056
1057 PR c++/53903
1058 * method.c (defaulted_late_check): Check for compatible exception
1059 specification out of class explicitly defaulted functions too.
1060
1061 2013-05-14 Jason Merrill <jason@redhat.com>
1062
1063 PR c++/56998
1064 * semantics.c (potential_constant_expression_1): Make sure the
1065 called function is potentially constant.
1066 * call.c (null_ptr_cst_p): Revert earlier change.
1067
1068 2013-05-13 Jason Merrill <jason@redhat.com>
1069
1070 PR c++/56998
1071 * call.c (null_ptr_cst_p): An expression with side-effects can't
1072 be a C++03 null pointer constant.
1073
1074 PR c++/57041
1075 * decl.c (reshape_init_class): Handle error_mark_node.
1076
1077 PR c++/57254
1078 * typeck.c (merge_types): Propagate ref-qualifier
1079 in METHOD_TYPE case.
1080
1081 PR c++/57253
1082 * decl.c (grokdeclarator): Apply ref-qualifier
1083 in the TYPENAME case.
1084
1085 PR c++/57252
1086 * decl.c (decls_match): Compare ref-qualifiers.
1087
1088 2013-05-10 Jason Merrill <jason@redhat.com>
1089
1090 PR c++/57196
1091 * pt.c (convert_template_argument): Use dependent_template_arg_p,
1092 not uses_template_parms.
1093
1094 PR c++/57047
1095 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1096
1097 PR c++/55149
1098 * semantics.c (add_capture): Error rather than abort on copy
1099 capture of VLA.
1100 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1101 warn about capture proxy.
1102
1103 2013-05-09 Jason Merrill <jason@redhat.com>
1104
1105 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1106
1107 PR c++/57222
1108 * pt.c (lookup_template_class_1): Handle getting a template
1109 template parameter as D1.
1110
1111 N3639 C++1y VLA diagnostics
1112 * decl.c (grokdeclarator): Complain about reference, pointer, or
1113 typedef to VLA.
1114 (create_array_type_for_decl): Complain about array of VLA.
1115 * pt.c (tsubst): Likewise.
1116 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1117 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1118 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1119 (cxx_sizeof_or_alignof_type): Likewise.
1120
1121 N3639 C++1y VLA support
1122 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1123 (check_array_initializer): Allow VLA init.
1124 (reshape_init_array_1): Adjust.
1125 (cp_finish_decl): Check for invalid VLA length.
1126 * typeck2.c (process_init_constructor_array): Adjust.
1127 (store_init_value): Use build_vec_init for VLAs.
1128 * semantics.c (add_capture): Capture VLA as ptr+len.
1129 (vla_capture_type): New.
1130 (build_capture_proxy): Rebuild the VLA.
1131 * typeck.c (build_simple_component_ref): Split out from...
1132 (build_ptrmemfunc_access_expr): ...here.
1133 * tree.c (array_of_runtime_bound_p): New.
1134 * init.c (throw_bad_array_length): New.
1135 (build_vec_init): Use it.
1136 * parser.c (cp_convert_range_for): When iterating over a VLA,
1137 use it directly rather than bind a reference.
1138 * cp-tree.h: Declare new functions.
1139
1140 2013-05-08 Jason Merrill <jason@redhat.com>
1141
1142 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1143 variably_modified_type_p.
1144 (expand_start_catch_block): Mark the typeinfo used here.
1145 * semantics.c (finish_handler_parms): Not here.
1146
1147 * error.c (dump_type_suffix): Try harder on VLA length.
1148
1149 Core 624/N2932
1150 * init.c (throw_bad_array_new_length): New.
1151 (build_new_1): Use it. Don't warn about braced-init-list.
1152 (build_vec_init): Use it.
1153 * call.c (build_operator_new_call): Use it.
1154
1155 PR c++/57068
1156 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1157 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1158 * error.c (maybe_warn_cpp0x): s/0x/11/.
1159
1160 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1161
1162 PR c++/51226
1163 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1164 == error_mark_node.
1165
1166 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
1167
1168 * typeck.c (cp_build_binary_op): Call save_expr before
1169 build_vector_from_val.
1170
1171 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1172
1173 PR c++/57183
1174 * decl.c (cp_finish_decl): After do_auto_deduction copy the
1175 qualifers with cp_apply_type_quals_to_decl.
1176
1177 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
1178
1179 * pt.c (convert_nontype_argument): Add missing whitespace in
1180 error message.
1181
1182 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1183
1184 PR c++/53745
1185 * decl.c (build_enumerator): Improve error message.
1186
1187 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1188
1189 PR c++/14283
1190 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1191 messages for template types and fix column numbers.
1192
1193 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1194
1195 PR c++/57132
1196 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1197 c_inhibit_evaluation_warnings around build_x_modify_expr call.
1198
1199 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1200
1201 PR c++/57092
1202 * semantics.c (finish_decltype_type): Handle instantiated template
1203 non-type arguments.
1204
1205 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
1206
1207 PR c++/56450
1208 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
1209
1210 2013-04-26 Jakub Jelinek <jakub@redhat.com>
1211
1212 * error.c (cp_print_error_function): Adjust file_name_as_prefix
1213 caller.
1214
1215 2013-04-25 Jason Merrill <jason@redhat.com>
1216
1217 PR c++/56859
1218 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
1219
1220 PR c++/50261
1221 * init.c (perform_member_init): Call reshape_init.
1222
1223 2013-04-24 Jason Merrill <jason@redhat.com>
1224
1225 PR c++/53721
1226 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
1227
1228 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1229
1230 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
1231 pedwarn to simply use OPT_Wpointer_arith.
1232 (cp_build_unary_op): Likewise.
1233
1234 2013-04-24 Jason Merrill <jason@redhat.com>
1235
1236 N3648: init-captures are named.
1237 * semantics.c (add_capture): Don't prepend "__" to init-captures.
1238 (build_capture_proxy): Adjust.
1239 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
1240
1241 N3648: Allow braced and parenthesized initializers.
1242 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
1243 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
1244 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
1245 (add_capture): Collapse a parenthesized initializer into a single
1246 expression.
1247 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
1248
1249 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1250
1251 PR c++/56970
1252 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
1253 * semantics.c (finish_qualified_id_expr): Likewise.
1254 (finish_id_expression): Update.
1255 * typeck.c (cp_build_addr_expr_1): Likewise.
1256 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
1257 * cp-tree.h: Update declarations.
1258
1259 2013-04-22 Jason Merrill <jason@redhat.com>
1260
1261 Core 1586
1262 * parser.c (cp_parser_unqualified_id): Handle ~auto.
1263 (cp_parser_pseudo_destructor_name): Likewise.
1264 (cp_parser_postfix_dot_deref_expression): Adjust.
1265 (cp_lexer_nth_token_is_keyword): New.
1266 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
1267 * typeck.c (lookup_destructor): Handle ~auto.
1268
1269 * pt.c (fn_type_unification): Push tinst level around
1270 type_unification_real if we aren't explaining.
1271 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
1272 * error.c (dump_function_decl): Respect it.
1273 (subst_to_string): Pass it.
1274
1275 PR c++/48665
1276 * rtti.c (get_typeid): Diagnose qualified function type.
1277 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
1278
1279 * error.c (dump_aggr_type): Fix lambda detection.
1280 (dump_simple_decl): Pretty-print capture field.
1281
1282 N3323
1283 * cvt.c (build_expr_type_conversion): Two conversions that return
1284 the same type aren't necessarily ambiguous.
1285
1286 N3648
1287 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
1288 pedwarn unconditional except in C++1y mode.
1289
1290 * semantics.c (potential_constant_expression_1): Don't crash on
1291 'this' in NSDMI.
1292
1293 Core 1612
1294 * semantics.c (finish_id_expression): Reject capture of anonymous
1295 union member.
1296
1297 Core 1609
1298 * decl2.c (check_default_args): Check for pack expansion.
1299
1300 * mangle.c (write_type): Mangle decltype(auto).
1301
1302 2013-04-19 Jason Merrill <jason@redhat.com>
1303
1304 N3638 changes to return type deduction
1305 * decl.c (undeduced_auto_decl): New.
1306 (require_deduced_type): New.
1307 (fndecl_declared_return_type): New.
1308 (decls_match): Use it.
1309 (duplicate_decls): Don't check for auto return.
1310 (grokdeclarator): Reject virtual auto.
1311 * class.c (resolve_address_of_overloaded_function): Handle
1312 auto function templates.
1313 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
1314 * cp-tree.h: Declare new fns.
1315 * error.c (dump_function_decl): Use fndecl_declared_return_type.
1316 * search.c (check_final_overrider): Likewise.
1317 * pt.c (make_decltype_auto): New.
1318 (do_auto_deduction): Require plain decltype(auto).
1319 (is_auto): Adjust.
1320
1321 DR 941
1322 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
1323 template specializations.
1324
1325 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
1326
1327 Implement n3599 - Literal operator templates for strings.
1328 * parser.c (make_string_pack (tree value)): New function.
1329 (cp_parser_userdef_string_literal (cp_token *)): Use it
1330 to construct calls to character string literal operator templates.
1331 (cp_parser_template_declaration_after_export): Check for new string
1332 literal operator template parameter form.
1333
1334 2013-04-15 Jason Merrill <jason@redhat.com>
1335
1336 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
1337
1338 PR c++/52748
1339 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
1340 rather than a destructor name, it isn't an unqualified-name.
1341 (tsubst_copy_and_build): Pass down decltype_flag to operator
1342 handling code, too.
1343
1344 PR c++/56388
1345 * semantics.c (insert_capture_proxy): Just use index 1 in the
1346 stmt_list_stack.
1347
1348 2013-04-12 Jakub Jelinek <jakub@redhat.com>
1349
1350 * error.c (cp_print_error_function,
1351 print_instantiation_partial_context_line,
1352 maybe_print_constexpr_context): Colorize locus strings.
1353
1354 2013-04-11 Jason Merrill <jason@redhat.com>
1355
1356 PR c++/52748
1357 * parser.c (complain_flags): New.
1358 (cp_parser_postfix_expression): Use it.
1359 (cp_parser_unary_expression): Likewise.
1360 (cp_parser_binary_expression): Likewise.
1361 (cp_parser_assignment_expression): Likewise.
1362 (cp_parser_expression): Likewise.
1363 (cp_parser_postfix_open_square_expression): Take decltype_p.
1364 (cp_parser_builtin_offsetof): Adjust.
1365 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
1366 * decl2.c (grok_array_decl): Add decltype_p parm.
1367 * cp-tree.h: Adjust prototype.
1368 * semantics.c (finish_unary_op_expr): Add complain parm.
1369
1370 2013-04-11 Jakub Jelinek <jakub@redhat.com>
1371
1372 PR c++/56895
1373 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
1374 calling maybe_constant_value for C++98.
1375
1376 2013-04-11 Jason Merrill <jason@redhat.com>
1377
1378 PR c++/56901
1379 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
1380 Strip references before checking WILDCARD_TYPE_P.
1381
1382 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1383
1384 * call.c (build_conditional_expr_1, build_over_call): Protect
1385 error calls with complain & tf_error.
1386 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
1387 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
1388 build_ptrmemfunc): Likewise.
1389 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
1390
1391 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
1392 (convert_to_reference): Adjust.
1393
1394 2013-04-11 Jason Merrill <jason@redhat.com>
1395
1396 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
1397 local variables, look them up instead.
1398 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
1399 proxies and substitution in unevaluated context.
1400 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
1401 before the iterators.
1402
1403 PR c++/23055
1404 * pt.c (uses_deducible_template_parms): New.
1405 (deducible_array_bound, deducible_expression): New.
1406 (deducible_template_args): New.
1407 (unify_one_argument): Call uses_deducible_template_parms.
1408
1409 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1410
1411 PR c++/56913
1412 * typeck2.c (build_m_component_ref): Protect error calls with
1413 (complain & tf_error).
1414
1415 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1416
1417 PR c++/54216
1418 * parser.c (cp_parser_enum_specifier): Check for empty
1419 anonymous enums and anonymous scoped enums.
1420
1421 2013-04-10 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c++/56895
1424 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
1425 first before calling maybe_constant_value for warn_for_div_by_zero
1426 or invalid shift count warning purposes.
1427
1428 2013-04-09 Jason Merrill <jason@redhat.com>
1429
1430 PR c++/25466
1431 * rtti.c (build_typeid): Check the address of the argument
1432 rather than looking for an INDIRECT_REF.
1433
1434 2013-04-04 Jason Merrill <jason@redhat.com>
1435
1436 PR c++/56838
1437 PR c++/17232
1438 * typeck2.c (abstract_virtuals_error_sfinae): Disable
1439 complete_type again.
1440
1441 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1442
1443 PR c++/56871
1444 * decl.c (validate_constexpr_redeclaration): Allow an explicit
1445 specialization to be different wrt the constexpr specifier.
1446
1447 2013-04-06 Jason Merrill <jason@redhat.com>
1448
1449 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
1450 noreturn attribute.
1451
1452 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
1453
1454 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
1455 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
1456
1457 2013-04-03 Jason Merrill <jason@redhat.com>
1458
1459 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
1460 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
1461 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
1462
1463 * mangle.c (write_type): When writing a function type with
1464 function-cv-quals, don't add the unqualified type as a
1465 substitution candidate.
1466
1467 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1468
1469 PR c++/56815
1470 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
1471 pedwarn.
1472
1473 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR debug/56819
1476 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
1477 from args to new_args.
1478 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
1479 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1480
1481 2013-04-02 Jason Merrill <jason@redhat.com>
1482
1483 PR c++/56821
1484 * mangle.c (write_function_type): Mangle ref-qualifier.
1485 (write_nested_name): Likewise.
1486 (canonicalize_for_substitution): Preserve ref-qualifier.
1487 (write_type): Likewise.
1488
1489 PR c++/34949
1490 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
1491
1492 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
1493
1494 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
1495 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
1496 (for_each_template_parm_r): Use TYPE_TI_ARGS.
1497
1498 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
1499
1500 * cp-tree.h (TAGGED_TYPE_P): Remove.
1501 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
1502 (TYPE_ANONYMOUS_P): Adjust.
1503 * call.c (build_new_op_1): Likewise.
1504 * class.c (find_abi_tags_r): Likewise.
1505 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
1506 type_is_deprecated): Likewise.
1507 * decl2.c (grokfield, min_vis_r): Likewise.
1508 * pt.c (get_template_info): Likewise.
1509 * tree.c (handle_abi_tag_attribute): Likewise.
1510
1511 2013-04-01 Jason Merrill <jason@redhat.com>
1512
1513 * semantics.c (maybe_constant_value): Check
1514 instantiation_dependent_expression_p.
1515 * pt.c (build_non_dependent_expr): Don't check it here.
1516
1517 PR c++/56772
1518 * init.c (build_new): Don't try to process an array initializer
1519 at template definition time.
1520
1521 PR c++/56793
1522 * typeck.c (finish_class_member_access_expr): Handle enum scope.
1523
1524 PR c++/56794
1525 * parser.c (cp_parser_range_for): Don't try to do auto deduction
1526 in a template if the type of the range is incomplete.
1527
1528 * call.c (add_function_candidate): Take the address of 'this' here.
1529 (build_over_call): And here.
1530 (build_new_method_call_1, build_op_call_1): Not here.
1531 (build_user_type_conversion_1): Or here.
1532 (add_candidates): Adjust.
1533
1534 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
1535 * class.c (same_signature_p): Use type_memfn_quals.
1536 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
1537 FUNCTION_OR_METHOD_TYPE_CHECK.
1538 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
1539 * pt.c (unify): Use static_fn_type.
1540
1541 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
1542 Jason Merrill <jason@redhat.com>
1543
1544 Implement N2439 (ref-qualifiers for 'this')
1545 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
1546 (FUNCTION_RVALUE_QUALIFIED): New.
1547 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
1548 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
1549 (cp_ref_qualifier): New enum.
1550 (cp_declarator): Add ref_qualifier.
1551 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
1552 (cp_parser_direct_declarator): Use it.
1553 (make_call_declarator): Adjust.
1554 (cp_parser_lambda_declarator_opt): Adjust.
1555 * call.c (add_function_candidate): Handle ref-qualifier overload
1556 resolution semantics.
1557 (standard_conversion): Adjust.
1558 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
1559 * decl.c (grokdeclarator): Handle ref-qualifiers.
1560 (grokfndecl): Check for invalid ref-qualifiers.
1561 (static_fn_type, revert_static_member_fn): Adjust.
1562 * decl2.c (build_memfn_type): Handle ref-qualifiers.
1563 (check_classfn): Check them.
1564 (cp_reconstruct_complex_type): Retain them.
1565 * error.c (dump_ref_qualifier): New.
1566 (dump_type_suffix, dump_function_decl): Use it.
1567 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
1568 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
1569 (unify): Retain them.
1570 * tree.c (cp_check_qualified_type): New.
1571 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
1572 (build_ref_qualified_type): New.
1573 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
1574 (cp_build_type_attribute_variant): Keep ref-qualifier.
1575 * typeck.c (merge_types): Keep ref-qualifier.
1576 (structural_comptypes): Compare ref-qualifier.
1577 (type_memfn_rqual): New.
1578 (apply_memfn_quals): Take ref-qual argument.
1579 * typeck2.c (build_m_component_ref): Check ref-qualifier.
1580
1581 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1582
1583 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
1584 (DECL_FUNCTION_TEMPLATE_P): Adjust.
1585
1586 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
1587 pp_cxx_qualified_id): Use get_containing_scope.
1588 * parser.c (cp_parser_class_head): Likewise.
1589 * pt.c (push_template_decl_real): Likewise.
1590
1591 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
1592 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
1593
1594 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
1595
1596 * decl2.c (collect_candidates_for_java_method_aliases): Use
1597 DECL_CLASS_SCOPE_P.
1598 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
1599 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
1600 * decl.c (duplicate_decls): Likewise.
1601 * parser.c (cp_parser_template_declaration_after_export): Likewise,
1602 also DECL_DECLARES_TYPE_P.
1603 * pt.c (instantiate_class_template_1): Likewise.
1604 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
1605 (lookup_field_r): Likewise.
1606 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
1607 (lookup_fnfields_slot_nolazy): Likewise.
1608 * semantics.c (finish_member_declaration): Likewise.
1609 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
1610
1611 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1612
1613 * pt.c (template_parms_to_args): Fix typo in comment.
1614
1615 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1616
1617 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
1618
1619 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1620
1621 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
1622 (build_op_call_1): Likewise.
1623 (build_over_call): Likewise.
1624 (compare_ics): Likewise.
1625 * class.c (build_base_path): Likewise.
1626 (resolve_address_of_overloaded_function): Likewise.
1627 * cp-tree.h: Likewise.
1628 * cvt.c (cp_convert_to_pointer): Likewise.
1629 (convert_to_reference): Likewise.
1630 (ocp_convert): Likewise.
1631 (convert_force): Likewise, tidy.
1632 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
1633 (pp_cxx_ptr_operator): Likewise.
1634 * decl.c (duplicate_decls): Likewise.
1635 (start_decl): Likewise.
1636 (grok_op_properties): Likewise.
1637 (start_preparsed_function): Likewise.
1638 (store_parm_decls): Likewise.
1639 (finish_function): Likewise.
1640 * decl2.c (delete_sanity): Likewise.
1641 (acceptable_java_type): Likewise.
1642 (grokbitfield): Likewise.
1643 (cp_reconstruct_complex_type): Likewise.
1644 * error.c (dump_type_prefix): Likewise.
1645 (dump_expr): Likewise.
1646 * except.c (push_eh_cleanup): Likewise.
1647 (complete_ptr_ref_or_void_ptr_p): Likewise.
1648 (can_convert_eh): Likewise.
1649 * init.c (build_new_1): Likewise.
1650 (build_delete): Likewise.
1651 (build_vec_delete): Likewise.
1652 * mangle.c (write_type): Likewise.
1653 * parser.c (lookup_literal_operator): Likewise.
1654 * pt.c (convert_nontype_argument_function): Likewise.
1655 (convert_nontype_argument): Likewise.
1656 (tsubst): Likewise.
1657 (unify): Likewise.
1658 (dependent_type_p_r): Likewise.
1659 * rtti.c (build_headof): Likewise.
1660 (build_typeid): Likewise.
1661 (build_dynamic_cast_1): Likewise.
1662 (target_incomplete_p): Likewise.
1663 (typeinfo_in_lib_p): Likewise.
1664 * semantics.c (finish_omp_for): Likewise.
1665 (cxx_eval_call_expression): Likewise.
1666 (maybe_resolve_dummy): Likewise.
1667 * tree.c (build_target_expr): Likewise.
1668 (cp_build_qualified_type_real): Likewise.
1669 * typeck.c (composite_pointer_type_r): Likewise.
1670 (composite_pointer_type): Likewise.
1671 (comp_except_types): Likewise.
1672 (cxx_sizeof_nowarn): Likewise.
1673 (string_conv_p): Likewise.
1674 (cp_build_array_ref): Likewise.
1675 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
1676 (pointer_diff): Likewise.
1677 (cp_build_addr_expr_1): Likewise.
1678 (cp_build_unary_op): Likewise.
1679 (build_static_cast_1): Likewise.
1680 (cp_build_c_cast): Likewise.
1681 (comp_ptr_ttypes_real): Likewise.
1682 (ptr_reasonably_similar): Likewise.
1683 (comp_ptr_ttypes_const): Likewise.
1684 (casts_away_constness): Likewise.
1685 (check_literal_operator_args): Likewise.
1686 * typeck2.c (build_x_arrow): Likewise.
1687 (add_exception_specifier): Likewise.
1688
1689 2013-03-29 Jason Merrill <jason@redhat.com>
1690
1691 N3582
1692 * cp-tree.h (AUTO_IS_DECLTYPE): New.
1693 * parser.c (cp_parser_decltype): Handle decltype(auto).
1694 (cp_parser_type_id_1): Allow auto without a late-specified
1695 return in C++1y.
1696 (cp_parser_primary_expression): Use the return value of
1697 finish_parenthesized_expr.
1698 (cp_parser_transaction_expression): Likewise.
1699 * semantics.c (force_paren_expr): New.
1700 (finish_parenthesized_expr): Use it.
1701 * call.c (build_conditional_expr_1): Likewise.
1702 * pt.c (do_auto_deduction): Handle decltype(auto).
1703 (tsubst_copy): Handle PAREN_EXPR.
1704 (tsubst_copy_and_build): Likewise.
1705 * error.c (dump_expr): Handle PAREN_EXPR.
1706 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
1707 * mangle.c (write_expression): Ignore PAREN_EXPR.
1708
1709 * parser.c (cp_parser_decltype_expr): Split out...
1710 (cp_parser_decltype): ...from here.
1711
1712 PR c++/56774
1713 PR c++/35722
1714 * pt.c (unify_pack_expansion): Fix indexing.
1715
1716 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1717
1718 * call.c (build_java_interface_fn_ref): Likewise.
1719 (make_temporary_var_for_ref_to_temp): Likewise.
1720 * class.c (check_field_decls): Likewise.
1721 (layout_class_type): Likewise.
1722 (finish_struct_1): Likewise.
1723 (fixed_type_or_null): Likewise.
1724 (get_vtbl_decl_for_binfo): Likewise.
1725 * cp-gimplify.c (omp_var_to_track): Likewise.
1726 (cp_genericize_r): Likewise.
1727 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
1728 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
1729 (DECL_DISCRIMINATOR_P): Likewise.
1730 * decl.c (poplevel): Likewise.
1731 (decls_match): Likewise.
1732 (duplicate_decls): Likewise.
1733 (decl_jump_unsafe): Likewise.
1734 (start_decl): Likewise.
1735 (check_for_uninitialized_const_var): Likewise.
1736 (make_rtl_for_nonlocal_decl): Likewise.
1737 (cp_finish_decl): Likewise.
1738 (expand_static_init): Likewise.
1739 (local_variable_p): Likewise.
1740 (maybe_register_incomplete_var): Likewise.
1741 * decl2.c (grokfield): Likewise.
1742 (comdat_linkage): Likewise.
1743 (determine_visibility): Likewise.
1744 (import_export_decl): Likewise.
1745 (prune_vars_needing_no_initialization): Likewise.
1746 (decl_maybe_constant_var_p): Likewise.
1747 * error.c (dump_simple_decl): Likewise.
1748 (dump_template_decl): Likewise.
1749 (cp_printer): Likewise.
1750 * except.c (build_throw): Likewise.
1751 * init.c (build_vtbl_address): Likewise.
1752 (member_init_ok_or_else): Likewise.
1753 (build_aggr_init): Likewise.
1754 (expand_aggr_init_1): Likewise.
1755 (build_offset_ref): Likewise.
1756 (constant_value_1): Likewise.
1757 * mangle.c (write_mangled_name): Likewise.
1758 (write_prefix): Likewise.
1759 * name-lookup.c (supplement_binding_1): Likewise.
1760 (add_decl_to_level): Likewise.
1761 (pushdecl_maybe_friend_1): Likewise.
1762 (check_for_out_of_scope_variable): Likewise.
1763 (validate_nonmember_using_decl): Likewise.
1764 (lookup_name_innermost_nonclass_level_1): Likewise.
1765 (lookup_arg_dependent_1): Likewise.
1766 * parser.c (cp_parser_lambda_introducer): Likewise.
1767 (cp_parser_template_argument): Likewise.
1768 (cp_parser_single_declaration): Likewise.
1769 * pt.c (convert_nontype_argument): Likewise.
1770 (instantiate_class_template_1): Likewise.
1771 (tsubst_decl): Likewise.
1772 (tsubst_expr): Likewise.
1773 (do_decl_instantiation): Likewise.
1774 (do_type_instantiation): Likewise.
1775 (regenerate_decl_from_template): Likewise.
1776 (always_instantiate_p): Likewise.
1777 (instantiate_decl): Likewise.
1778 (type_dependent_expression_p): Likewise.
1779 (build_non_dependent_expr): Likewise.
1780 * repo.c (repo_emit_p): Likewise.
1781 * rtti.c (build_dynamic_cast_1): Likewise.
1782 * search.c (shared_member_p): Likewise.
1783 * semantics.c (outer_var_p): Likewise.
1784 (finish_id_expression): Likewise.
1785 (finish_omp_clauses): Likewise.
1786 (finish_decltype_type): Likewise.
1787 (ensure_literal_type_for_constexpr_object): Likewise.
1788 * tree.c (lvalue_kind): Likewise.
1789 (bot_replace): Likewise.
1790 (cp_tree_equal): Likewise.
1791 (handle_init_priority_attribute): Likewise.
1792 (decl_storage_duration): Likewise.
1793 * typeck.c (cxx_sizeof_expr): Likewise.
1794 (cxx_alignof_expr): Likewise.
1795 (decay_conversion): Likewise.
1796 (build_class_member_access_expr): Likewise.
1797 (cp_build_array_ref): Likewise.
1798 (cxx_mark_addressable): Likewise.
1799 (maybe_warn_about_returning_address_of_local): Likewise.
1800 (check_return_expr): Likewise.
1801 * typeck2.c (cxx_readonly_error): Likewise.
1802 (abstract_virtuals_error_sfinae): Likewise.
1803 (cxx_incomplete_type_diagnostic): Likewise.
1804
1805 2013-03-28 Lawrence Crowl <crowl@google.com>
1806
1807 * Make-lang.in
1808 (CXX_PARSER_H): Add header dependence.
1809 * cp-tree.h
1810 (extern debug (cp_binding_level &)): New.
1811 (extern debug (cp_binding_level *)): New.
1812 * name-lookup.h
1813 (debug (cp_binding_level &)): New.
1814 (debug (cp_binding_level *)): New.
1815 * parser.c
1816 (debug (cp_parser &)): New.
1817 (debug (cp_parser *)): New.
1818 (debug (cp_token &)): New.
1819 (debug (cp_token *)): New.
1820 (debug (vec<cp_token, va_gc> &)): New.
1821 (debug (vec<cp_token, va_gc> *)): New.
1822 * parser.c: Add header dependence.
1823 (extern debug (cp_parser &)): New.
1824 (extern debug (cp_parser *)): New.
1825 (extern debug (cp_token &)): New.
1826 (extern debug (cp_token *)): New.
1827 (extern debug (vec<cp_token, va_gc> &)): New.
1828 (extern debug (vec<cp_token, va_gc> *)): New.
1829
1830 2013-03-28 Jason Merrill <jason@redhat.com>
1831
1832 PR c++/17232
1833 PR c++/52748
1834 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
1835 the type if tf_decltype is set.
1836 * pt.c (fn_type_unification): Add decltype_p parm.
1837 (get_bindings): Adjust.
1838 * cp-tree.h: Adjust.
1839 * class.c (resolve_address_of_overloaded_function): Adjust.
1840 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
1841
1842 PR c++/56679
1843 * parser.c (cp_parser_sizeof_pack): Split out from...
1844 (cp_parser_sizeof_operand): ...here. Require (id).
1845
1846 PR c++/56701
1847 * semantics.c (finish_this_expr): 'this' is an rvalue.
1848 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
1849
1850 PR c++/56710
1851 * semantics.c (finish_member_declaration): Don't push closure
1852 members.
1853
1854 * name-lookup.c (pushdecl_maybe_friend_1): Use
1855 nonlambda_method_basetype and current_nonlambda_class_type.
1856
1857 PR c++/56728
1858 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
1859 conversion from integer to pointer.
1860 (cxx_eval_constant_expression): Likewise.
1861 (cxx_eval_indirect_ref): Use the folded operand if we still think
1862 this might be constant.
1863
1864 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
1865 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1866
1867 PR c++/56725
1868 * call.c (convert_like_real): Change series of two permerrors
1869 to permerror + inform (and likewise for two errors).
1870 (build_new_method_call_1): Likewise.
1871 * typeck.c (convert_for_initialization): Change additional
1872 warning or error to inform.
1873
1874 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1875
1876 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
1877 (first_aggr_init_expr): Likewise.
1878 (more_aggr_init_expr_args_p): Likewise.
1879 (type_of_this_parm): Likewise.
1880 (class_of_this_parm): Likewise.
1881 * name-lookup.h (get_global_value_if_present): Likewise.
1882 (is_typename_at_global_scope): Likewise.
1883
1884 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
1885
1886 * call.c (joust): Don't call inform for a permerror returning false.
1887 * parser.c (cp_parser_check_class_key): Likewise.
1888 * pt.c (tsubst_copy_and_build): Likewise.
1889
1890 2013-03-27 Jason Merrill <jason@redhat.com>
1891
1892 PR c++/56749
1893 * semantics.c (finish_qualified_id_expr): Return early
1894 for enum scope.
1895
1896 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1897
1898 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1899 * cvt.c (convert_to_void): Likewise.
1900 * error.c (dump_expr): Likewise.
1901 * mangle.c (write_expression): Likewise.
1902 * parser.c (cp_parser_template_argument): Likewise.
1903 * pt.c (convert_nontype_argument): Likewise.
1904 (tsubst_copy_and_build): Likewise.
1905 * rtti.c (build_typeid): Likewise.
1906 * semantics.c (finish_call_expr): Likewise.
1907 (finish_decltype_type): Likewise.
1908 (build_data_member_initialization): Likewise.
1909 * tree.c (is_dummy_object): Likewise.
1910 * typeck.c (decay_conversion): Likewise.
1911 (build_class_member_access_expr): Likewise.
1912 (cp_build_addr_expr_1): Likewise.
1913 (unary_complex_lvalue): Likewise.
1914 (check_return_expr): Likewise.
1915 * typeck2.c (cxx_readonly_error): Likewise.
1916
1917 2013-03-26 Jason Merrill <jason@redhat.com>
1918
1919 PR c++/52597
1920 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
1921 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
1922 * cp-tree.h: Adjust prototype.
1923
1924 PR c++/45282
1925 * typeck2.c (build_m_component_ref): Handle prvalue object.
1926
1927 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1928
1929 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
1930 * decl.c (duplicate_decls): Likewise.
1931 (cp_finish_decl): Likewise.
1932 (check_class_member_definition_namespace): Likewise.
1933 * decl2.c (grokfield): Likewise.
1934 (decl_needed_p): Likewise.
1935 (import_export_decl): Likewise.
1936 (mark_used): Likewise.
1937 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1938 * pt.c (push_access_scope): Likewise.
1939 (instantiate_decl): Likewise.
1940 * ptree.c (cxx_print_decl): Likewise.
1941 * repo.c (repo_emit_p): Likewise.
1942 * semantics.c (note_decl_for_pch): Likewise.
1943 * tree.c (decl_linkage): Likewise.
1944
1945 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
1946
1947 PR c++/55951
1948 * decl.c (check_array_designated_initializer): Handle CONST_DECL
1949 as ce->index.
1950
1951 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
1952
1953 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
1954 error messages.
1955
1956 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
1957
1958 2013-03-25 Jason Merrill <jason@redhat.com>
1959
1960 PR c++/56699
1961 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
1962 class is derived from the type of the object.
1963
1964 PR c++/52014
1965 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
1966 unevaluated context.
1967
1968 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
1969
1970 PR c++/56722
1971 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
1972 DECL_TEMPLATE_INSTANTIATION.
1973
1974 2013-03-22 Jason Merrill <jason@redhat.com>
1975
1976 PR c++/56684
1977 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
1978 and CONST_DECL.
1979
1980 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1981
1982 * cp-tree.h (identifier_p): New.
1983 * call.c: Throughout, call identifier_p insstead of direct
1984 comparaison of TREE_CODE against IDENTIFIER_NODE.
1985 * decl.c: Likewisse.
1986 * decl2.c: Likewise.
1987 * init.c: Likewise.
1988 * mangle.c: Likewise.
1989 * name-lookup.c: Likewise.
1990 * parser.c: Likewise.
1991 * pt.c: Likewise.
1992 * search.c: Likewise.
1993 * semantics.c: Likewise.
1994 * tree.c: Likewise.
1995 * typeck.c: Likewise.
1996 * typeck2.c: Likewise.
1997
1998 2013-03-21 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR middle-end/48087
2001 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2002 * call.c (build_temp): Likewise.
2003 * method.c (synthesize_method): Likewise.
2004 * typeck.c (convert_for_initialization): Likewise.
2005
2006 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
2007
2008 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2009
2010 2013-03-21 Richard Biener <rguenther@suse.de>
2011
2012 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2013 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2014
2015 2013-03-20 Jason Merrill <jason@redhat.com>
2016
2017 PR c++/56646
2018 * parser.c (cp_parser_late_return_type_opt): Save and restore
2019 current_class_ptr/ref.
2020
2021 PR c++/54532
2022 * expr.c (cplus_expand_constant): Do nothing if the class is
2023 incomplete.
2024 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2025 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2026 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2027 (complete_vars): Likewise.
2028
2029 * name-lookup.c (get_anonymous_namespace_name): Never use
2030 get_file_function_name.
2031
2032 * pt.c (retrieve_specialization): Handle null tmpl argument.
2033
2034 PR c++/17232
2035 PR c++/56642
2036 * pt.c (tsubst_decl): Check return value of register_specialization.
2037 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2038 change.
2039
2040 2013-03-17 Jason Merrill <jason@redhat.com>
2041
2042 PR c++/54359
2043 PR c++/56639
2044 * parser.c (cp_parser_direct_declarator): Bail if we see a
2045 qualified-id not at namespace scope.
2046
2047 PR c++/17232
2048 PR c++/56642
2049 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2050 change for now.
2051
2052 2013-03-16 Jason Merrill <jason@redhat.com>
2053
2054 * decl.c (grokdeclarator): Assert that we won't see a pointer to
2055 METHOD_TYPE.
2056
2057 PR c++/54277
2058 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2059 (MAYBE_CLASS_TYPE_P): ...here.
2060 * semantics.c (lambda_capture_field_type): Only build a
2061 magic decltype for wildcard types.
2062 (lambda_proxy_type): Likewise.
2063 (finish_non_static_data_member): Get the quals from
2064 the object.
2065
2066 PR c++/55931
2067 * parser.c (cp_parser_template_argument): Don't
2068 fold_non_dependent_expr.
2069
2070 * parser.c (cp_parser_lambda_declarator_opt): Use
2071 cp_parser_trailing_type_id.
2072
2073 PR c++/45917
2074 * parser.c (cp_parser_template_id): Don't forget access checks.
2075
2076 PR c++/52374
2077 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2078
2079 PR c++/54764
2080 PR c++/55972
2081 * name-lookup.h (tag_scope): Add ts_lambda.
2082 * semantics.c (begin_lambda_type): Use it.
2083 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2084 * pt.c (check_default_tmpl_args): Ignore lambdas.
2085 (push_template_decl_real): Handle lambdas.
2086 * tree.c (no_linkage_check): Adjust lambda check.
2087
2088 PR c++/56039
2089 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2090
2091 PR c++/54359
2092 * parser.c (cp_parser_direct_declarator): Fix late return
2093 for out-of-class defn of member function.
2094
2095 PR c++/55357
2096 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2097 parms to avoid duplicate -Wshadow warnings.
2098
2099 * search.c (lookup_base): Handle NULL_TREE.
2100
2101 PR c++/56481
2102 * semantics.c (potential_constant_expression_1): Use of 'this' in
2103 a non-constexpr function makes the expression not potentially
2104 constant.
2105
2106 N3276
2107 PR c++/52748
2108 * cp-tree.h (tsubst_flags): Add tf_decltype.
2109 * call.c (build_cxx_call): Don't build a temporary if it's set.
2110 (build_over_call): Make sure it's only passed to build_cxx_call.
2111 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2112 (cp_parser_unary_expression): Likewise.
2113 (cp_parser_cast_expression): Likewise.
2114 (cp_parser_binary_expression): Likewise.
2115 (cp_parser_assignment_expression): Likewise.
2116 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
2117 (cp_parser_expression): Add decltype_p. Force a
2118 temporary for a call on the LHS of a comma.
2119 (cp_parser_decltype): Pass true to decltype_p parms.
2120 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2121 (tsubst_copy_and_build): Pass tf_decltype down only for
2122 CALL_EXPR and the RHS of COMPOUND_EXPR.
2123 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2124
2125 * cp-tree.h (abstract_class_use): New enum.
2126 * typeck2.c (pending_abstract_type): Add use field.
2127 (abstract_virtuals_error_sfinae): Add overloads taking
2128 abstract_class_use instead of tree.
2129 * typeck.c (build_static_cast_1): Call it.
2130 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2131 * pt.c: Adjust calls.
2132 * decl.c (cp_finish_decl): Don't handle functions specially.
2133 (grokdeclarator): Always check return type.
2134 * init.c (build_new_1): Adjust call.
2135
2136 DR 337
2137 PR c++/17232
2138 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2139 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2140
2141 DR 657
2142 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2143 (tsubst_arg_types): Likewise.
2144
2145 DR 1518
2146 PR c++/54835
2147 * call.c (convert_like_real): Check for explicit constructors
2148 even for value-initialization.
2149
2150 PR c++/54946
2151 * pt.c (convert_nontype_argument): Handle invalid pointer.
2152
2153 * parser.c (cp_parser_lambda_expression): Use nreverse.
2154
2155 PR c++/56447
2156 PR c++/55532
2157 * pt.c (instantiate_class_template_1): Instantiate lambda capture
2158 list here.
2159 (tsubst_copy_and_build): Not here.
2160
2161 PR c++/55017
2162 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2163
2164 PR c++/55240
2165 * parser.c (parsing_nsdmi): New.
2166 * semantics.c (outer_automatic_var_p): Check it.
2167 (finish_id_expression): Likewise.
2168 * cp-tree.h: Declare it.
2169
2170 PR c++/55241
2171 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2172
2173 * parser.c (lookup_literal_operator): Correct parm/arg naming
2174 mixup.
2175
2176 PR c++/56238
2177 * pt.c (fold_non_dependent_expr_sfinae): Check
2178 instantiation_dependent_expression_p.
2179
2180 PR c++/56095
2181 * class.c (resolve_address_of_overloaded_function): Accept a
2182 reference to function for target_type.
2183 (instantiate_type): Likewise.
2184 * pt.c (convert_nontype_argument): Pass it to
2185 convert_nontype_argument_function.
2186
2187 2013-03-16 Jakub Jelinek <jakub@redhat.com>
2188
2189 * tree.c (cp_tree_equal): Fix a pasto.
2190
2191 PR c++/56607
2192 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2193 pass op1 through maybe_constant_value first.
2194
2195 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
2196
2197 PR c++/56582
2198 * semantics.c (cxx_eval_array_reference): Check for negative index.
2199
2200 2013-03-14 Jason Merrill <jason@redhat.com>
2201
2202 PR c++/56614
2203 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2204
2205 PR c++/56346
2206 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2207 dso_handle parm on targets without __cxa_atexit.
2208
2209 2013-03-11 Jason Merrill <jason@redhat.com>
2210
2211 PR c++/56567
2212 * typeck.c (check_return_expr): Disallow returning init list here.
2213 * semantics.c (apply_deduced_return_type): Not here.
2214
2215 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
2216
2217 PR c++/51412
2218 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
2219 * error.c (dump_expr): Likewise.
2220
2221 2013-03-08 Jason Merrill <jason@redhat.com>
2222
2223 PR c++/51884
2224 * class.c (modify_all_vtables): Mangle the vtable name before
2225 entering dfs_walk.
2226
2227 * semantics.c (lambda_expr_this_capture): In unevaluated context,
2228 just return the nearest 'this'.
2229
2230 PR c++/51494
2231 PR c++/52183
2232 PR c++/56222
2233 * tree.c (maybe_dummy_object): Don't capture 'this'.
2234 * semantics.c (maybe_resolve_dummy): New.
2235 (finish_non_static_data_member): Use it.
2236 (finish_qualified_id_expr): Don't test is_dummy_object.
2237 * cp-tree.h: Declare maybe_resolve_dummy.
2238 * call.c (build_new_method_call_1): Use it.
2239
2240 PR c++/56567
2241 * semantics.c (apply_deduced_return_type): Don't allow returning
2242 std::initializer_list.
2243
2244 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2245
2246 PR c++/56534
2247 * parser.c (cp_parser_elaborated_type_specifier): Don't call
2248 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
2249 * decl.c (check_elaborated_type_specifier): Tidy.
2250
2251 2013-03-06 Jakub Jelinek <jakub@redhat.com>
2252
2253 PR c++/56543
2254 * tree.c (strip_typedefs): Don't copy args if they are NULL.
2255
2256 2013-03-05 Jakub Jelinek <jakub@redhat.com>
2257
2258 * parser.c (cp_parser_braced_list): For {} initialize
2259 *non_constant_p to false.
2260
2261 2013-03-04 Jason Merrill <jason@redhat.com>
2262
2263 PR c++/56464
2264 PR c++/54383
2265 * semantics.c (lambda_expr_this_capture): Handle NSDMI
2266 and non-class scopes.
2267
2268 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2269
2270 * decl.c (grokdeclarator): Remove dead code.
2271
2272 2013-02-28 Jason Merrill <jason@redhat.com>
2273
2274 PR c++/56481
2275 * semantics.c (potential_constant_expression_1): Use
2276 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
2277
2278 PR c++/56243
2279 * call.c (build_over_call): Avoid virtual lookup in a template.
2280
2281 2013-02-27 Jason Merrill <jason@redhat.com>
2282
2283 PR c++/56358
2284 PR c++/56323
2285 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
2286 of the base name for inheriting ctors.
2287 (push_class_level_binding_1): Remove inheriting ctor handling.
2288 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2289 * class.c (add_implicitly_declared_members): Adjust.
2290
2291 2013-02-26 David Binderman <dcb314@hotmail.com>
2292
2293 PR c++/55632
2294 * decl.c (grokdeclarator): Tidy publicp assignment.
2295
2296 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
2297
2298 PR c++/56419
2299 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
2300 (build_transaction_expr): Same.
2301
2302 2013-02-25 Jason Merrill <jason@redhat.com>
2303
2304 PR c++/56377
2305 * pt.c (fn_type_unification): Wait to call push_tinst_level until
2306 we know what args we're looking at.
2307
2308 PR c++/56438
2309 * semantics.c (potential_constant_expression_1): In C++98, a cast
2310 to non-integral type can't be a constant expression.
2311
2312 2013-02-24 Jakub Jelinek <jakub@redhat.com>
2313
2314 PR c++/56403
2315 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
2316 of CLASS_TYPE_P.
2317
2318 2013-02-22 Jason Merrill <jason@redhat.com>
2319
2320 PR c++/40405
2321 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
2322 if we got the wrong number of template parms.
2323
2324 PR c++/56377
2325 * pt.c (fn_type_unification): Use explicit args in template
2326 instantiation context.
2327
2328 PR c++/56359
2329 * call.c (can_convert_arg): Discard access checks.
2330
2331 PR c++/56395
2332 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
2333 args.
2334
2335 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
2336
2337 PR c++/56373
2338 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
2339 * cvt.c (ocp_convert): Use the latter.
2340 (cp_convert_to_pointer): Likewise.
2341 * decl.c (check_default_argument): Likewise.
2342 * typeck.c (cp_build_binary_op): Likewise.
2343 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2344
2345 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
2346 Paolo Carlini <paolo.carlini@oracle.com>
2347
2348 PR c++/51242
2349 * decl2.c (grokbitfield): Allow scoped enumeration types.
2350
2351 2013-02-15 Jason Merrill <jason@redhat.com>
2352
2353 PR c++/54276
2354 * semantics.c (finish_id_expression): Also return the identifier
2355 for an outer local static.
2356
2357 PR c++/56343
2358 * class.c (check_bases_and_members): Deduce noexcept after
2359 checking bases.
2360
2361 PR c++/52026
2362 * semantics.c (finish_id_expression): In a template, return
2363 the identifier for a constant variable.
2364
2365 2013-02-14 Jason Merrill <jason@redhat.com>
2366
2367 PR c++/54922
2368 * semantics.c (build_anon_member_initialization): New.
2369 (build_data_member_initialization): Use it.
2370
2371 PR c++/55003
2372 * decl.c (cp_finish_decl): Force instantiation of an
2373 auto static data member.
2374
2375 PR c++/55220
2376 * pt.c (unify): A pack expansion that is not the last template
2377 argument makes the entire template argument list non-deduced.
2378
2379 PR c++/56323
2380 * name-lookup.c (do_class_using_decl): Handle typedefs with
2381 inheriting constructors.
2382 (push_class_level_binding_1): Allow inheriting from template
2383 template parameter, too.
2384 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2385
2386 PR c++/55223
2387 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
2388 default argument scope.
2389 * mangle.c (write_name): Likewise.
2390
2391 PR c++/55232
2392 * error.c (find_typenames_r): Don't walk into a pack expansion.
2393
2394 2013-02-13 Jason Merrill <jason@redhat.com>
2395
2396 PR c++/55670
2397 * parser.c (cp_parser_member_declaration): Check the declarator
2398 form when detecting a function declaration via typedef.
2399
2400 PR c++/55680
2401 * pt.c (maybe_process_partial_specialization): A lambda
2402 isn't what's being specialized.
2403
2404 PR c++/55710
2405 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
2406 TREE_USED.
2407
2408 PR c++/55879
2409 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
2410
2411 PR c++/55993
2412 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
2413 non-zero offsets, too.
2414
2415 PR c++/56155
2416 * decl.c (build_enumerator): Always convert the value to a
2417 fixed underlying type.
2418
2419 PR c++/56135
2420 * pt.c (tsubst_copy_and_build): Don't forget any new
2421 captures that arose from use of dependent names.
2422
2423 2013-02-13 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c++/56302
2426 * semantics.c (finish_asm_stmt): If input constraints allow
2427 neither register nor memory, try maybe_constant_value to get
2428 a constant if possible.
2429
2430 2013-02-12 Jason Merrill <jason@redhat.com>
2431
2432 PR c++/56285
2433 * method.c (add_one_base_init): Handle base constructor
2434 taking rvalue reference parm.
2435
2436 PR c++/56291
2437 * semantics.c (sort_constexpr_mem_initializers): Handle
2438 vptr out of order.
2439
2440 2013-02-09 Jason Merrill <jason@redhat.com>
2441
2442 PR c++/56268
2443 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
2444 maybe_instantiate_noexcept.
2445
2446 PR c++/56247
2447 * pt.c (eq_specializations): Set comparing_specializations.
2448 * tree.c (cp_tree_equal): Check it.
2449 * cp-tree.h: Declare it.
2450
2451 * decl.c (decls_match): Check versions later.
2452
2453 PR c++/56238
2454 * pt.c (build_non_dependent_expr): Don't try to fold
2455 instantiation-dependent expressions.
2456 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
2457 [BIND_EXPR]: Treat as dependent.
2458
2459 2013-02-07 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c++/56241
2462 * init.c (build_vec_init): Don't append NULL values into new_vec.
2463 (build_zero_init_1): Don't push anything into v if recursive call
2464 returned NULL_TREE.
2465 (build_value_init_noctor): Don't push anything into v if
2466 build_value_init call returned NULL_TREE.
2467
2468 PR c++/56239
2469 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
2470 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
2471 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
2472 return true only if 2nd token isn't CPP_CLOSE_PAREN.
2473 (cp_parser_cast_expression): Adjust caller.
2474
2475 PR c++/56237
2476 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
2477 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
2478 DECL_LANG_SPECIFIC (t).
2479
2480 2013-02-07 Jason Merrill <jason@redhat.com>
2481
2482 PR c++/56235
2483 * method.c (do_build_copy_constructor): Don't bother turning
2484 scalars from lvalues to xvalues.
2485 (do_build_copy_assign): Likewise.
2486
2487 2013-02-06 Jason Merrill <jason@redhat.com>
2488
2489 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2490
2491 2013-02-05 Jason Merrill <jason@redhat.com>
2492
2493 PR c++/54122
2494 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
2495 METHOD_TYPE.
2496
2497 PR c++/56177
2498 * decl.c (start_preparsed_function): Update restype if we change
2499 decl1.
2500
2501 PR c++/56208
2502 * pt.c (fn_type_unification): Discard any access checks from
2503 substituting explicit args.
2504
2505 2013-01-31 Jason Merrill <jason@redhat.com>
2506
2507 PR c++/56162
2508 PR c++/56104
2509 * typeck.c (get_member_function_from_ptrfunc): Fix
2510 ptrmemfunc_vbit_in_delta case.
2511
2512 2013-01-29 Jason Merrill <jason@redhat.com>
2513
2514 PR libstdc++/54314
2515 * class.c (build_ctor_vtbl_group): Give construction vtables
2516 hidden visibility.
2517
2518 2013-01-25 Jason Merrill <jason@redhat.com>
2519
2520 PR c++/56095
2521 * pt.c (convert_nontype_argument_function): Handle invalid input.
2522 (convert_nontype_argument): Likewise.
2523
2524 PR c++/56104
2525 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
2526 dynamic type has no virtual functions.
2527
2528 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
2529
2530 PR c++/55944
2531 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
2532 on TARGET_EXPR nodes.
2533
2534 2013-01-22 Jason Merrill <jason@redhat.com>
2535
2536 PR c++/56071
2537 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2538
2539 2013-01-22 Dodji Seketeli <dodji@redhat.com>
2540
2541 PR c++/53609
2542 * pt.c (argument_pack_element_is_expansion_p)
2543 (make_argument_pack_select, use_pack_expansion_extra_args_p)
2544 (gen_elem_of_pack_expansion_instantiation): New static functions.
2545 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
2546 look through the possibly resulting pack expansion as well.
2547 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
2548 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
2549 Use gen_elem_of_pack_expansion_instantiation to build the
2550 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
2551 as gen_elem_of_pack_expansion_instantiation and the change in
2552 tsubst above generalize this particular case.
2553 (arg_from_parm_pack_p): Remove this for it's not used by
2554 tsubst_pack_expansion anymore.
2555
2556 2013-01-21 Jason Merrill <jason@redhat.com>
2557
2558 PR c++/56059
2559 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
2560 template args count.
2561
2562 2013-01-18 Jason Merrill <jason@redhat.com>
2563
2564 PR target/54908
2565 * decl2.c (get_local_tls_init_fn): New.
2566 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
2567 with aliases for internal variables. Don't use weakrefs if
2568 the variable needs destruction.
2569 (generate_tls_wrapper): Mark the wrapper as const if no
2570 initialization is needed.
2571 (handle_tls_init): Don't require aliases.
2572
2573 2013-01-15 Dodji Seketeli <dodji@redhat.com>
2574
2575 PR c++/55663
2576 * pt.c (coerce_innermost_template_parms): New static function.
2577 (instantiate_alias_template): Use it here.
2578
2579 2013-01-09 Jason Merrill <jason@redhat.com>
2580
2581 PR c++/55878
2582 * rtti.c (build_typeid, get_typeid): Add complain parm.
2583 (get_tinfo_decl_dynamic): Likewise.
2584 * cp-tree.h, parser.c, pt.c: Adjust.
2585
2586 PR c++/55893
2587 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
2588 needs destruction.
2589
2590 2013-01-09 Jakub Jelinek <jakub@redhat.com>
2591
2592 PR c/48418
2593 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
2594 call maybe_constant_value for the negative or too big shift
2595 count warnings.
2596
2597 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
2598
2599 PR c++/55801
2600 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
2601 of the argument is true.
2602
2603 2013-01-08 Joel Brobecker <brobecker@adacore.com>
2604
2605 * parser.c (cp_parser_initializer_list): Move declaration
2606 of variable non_const to start of lexical block.
2607
2608 2013-01-07 Jason Merrill <jason@redhat.com>
2609
2610 PR c++/55753
2611 * tree.c (build_aggr_init_expr): Do nothing in a template.
2612 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
2613 a FUNCTION_DECL before tsubsting.
2614
2615 2013-01-04 Dodji Seketeli <dodji@redhat.com>
2616
2617 PR c++/52343
2618 * pt.c (check_instantiated_arg): Allow type template arguments.
2619
2620 2013-01-04 Jason Merrill <jason@redhat.com>
2621
2622 PR c++/55877
2623 * decl.c (reset_type_linkage, bt_reset_linkage): New.
2624 (grokdeclarator): Use reset_type_linkage.
2625 * name-lookup.c (binding_table_foreach): Handle null table.
2626 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
2627
2628 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
2629
2630 PR c++/54526 (again)
2631 * parser.c (cp_parser_template_id): Revert core of previous change
2632 (keep adjusted inform message).
2633
2634 2013-01-03 Jason Merrill <jason@redhat.com>
2635
2636 PR c++/55419
2637 PR c++/55753
2638 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
2639 TREE_CONSTANT.
2640
2641 PR c++/55842
2642 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
2643
2644 PR c++/55856
2645 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
2646
2647 PR c++/53650
2648 * call.c (type_has_extended_temps): New.
2649 * cp-tree.h: Declare it.
2650 * decl.c (check_initializer): Use build_aggr_init for arrays
2651 if it is false.
2652 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
2653
2654 2013-01-02 Jason Merrill <jason@redhat.com>
2655
2656 PR c++/54325
2657 * call.c (build_new_method_call_1): Don't use build_value_init for
2658 user-provided default constructors.
2659
2660 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
2661
2662 PR c++/55032
2663 PR c++/55245
2664 * tree.c (build_cplus_array_type): Copy layout information
2665 to main variant if necessary.
2666 \f
2667 Copyright (C) 2013 Free Software Foundation, Inc.
2668
2669 Copying and distribution of this file, with or without modification,
2670 are permitted in any medium without royalty provided the copyright
2671 notice and this notice are preserved.