]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
PR target/63764
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2
3 PR target/63764
4 * typeck.c (cp_build_array_ref): Adjust
5 convert_vector_to_pointer_for_subscript caller. If it returns true,
6 call non_lvalue_loc on the result.
7
8 2014-11-20 Jason Merrill <jason@redhat.com>
9
10 PR c++/63658
11 * pt.c (convert_nontype_argument): Call convert_from_reference.
12 (check_instantiated_arg): Don't be confused by reference refs.
13 (unify): Look through reference refs on the arg, too.
14 * mangle.c (write_template_arg): Look through reference refs.
15
16 * error.c (dump_expr): Avoid printing (*&i) for references.
17
18 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
19
20 PR c++/63959
21 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
22
23 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
24
25 * cp-objcp-common.c: Use hash_table instead of htab.
26
27 2014-11-19 Jason Merrill <jason@redhat.com>
28
29 PR c++/56041
30 * cp-tree.h (struct processing_template_decl_sentinel): New.
31 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
32 (instantiate_non_dependent_expr_sfinae): Here.
33 (convert_nontype_argument): Use them.
34 * constexpr.c (fold_non_dependent_expr): Use them.
35
36 PR c++/63885
37 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
38 complain yet about a reference.
39 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
40 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
41 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
42 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
43
44 PR c++/57979
45 * init.c (decl_really_constant_value): Rename from
46 integral_constant_value.
47 (scalar_constant_value): Similar but limited to scalar results.
48 (decl_constant_value_safe): Remove.
49 (constant_value_1): Respect return_aggregate_cst_ok_p.
50 * typeck.c (decay_conversion): Use scalar_constant_value.
51 * call.c (convert_like_real): Likewise.
52 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
53 * typeck.c (decay_conversion): Or ARRAY_TYPE.
54 * constexpr.c (struct constexpr_ctx): Add strict field.
55 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
56 decl_constant_value and decl_really_constant_value.
57 (cxx_eval_outermost_constant_expr): Add strict parm.
58 (maybe_constant_init): Not strict.
59 (potential_constant_expression_1): Add strict parm.
60 Shorten most internal calls with RECUR macro.
61 * cp-tree.h, pt.c, semantics.c: Adjust.
62
63 2014-11-19 Jason Merrill <jason@redhat.com>
64
65 PR c++/63928
66 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
67
68 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
69
70 PR c++/55425
71 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
72 and __PRETTY_FUNCTION__.
73
74 2014-11-18 Jason Merrill <jason@redhat.com>
75
76 PR c++/63924
77 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
78 from a variable of empty class type is constant.
79
80 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
81 (potential_constant_expression_1): Handle STMT_EXPR.
82
83 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
84 default argument.
85 (lots): Omit NULL jump_target arguments.
86
87 * constexpr.c (struct constexpr_ctx): Add quiet field.
88 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
89 (lots): Replace allow_non_constant parameter with ctx->quiet.
90
91 PR c++/63940
92 * constexpr.c (cxx_eval_binary_expression): Don't assume the
93 expression was already folded.
94 (cxx_eval_unary_expression): Likewise.
95
96 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
97
98 PR libstdc++/43622
99 * rtti.c (emit_support_tinfos): Handle __float128.
100
101 2014-11-18 Jason Merrill <jason@redhat.com>
102
103 PR c++/63925
104 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
105
106 PR c++/63934
107 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
108 rather than VOID_TYPE_P.
109
110 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
111
112 PR c++/58102
113 * typeck2.c (store_init_value): Set it.
114 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
115 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
116
117 2014-11-17 Jason Merrill <jason@redhat.com>
118
119 PR c++/33911
120 * call.c (build_call_a): Don't warn_deprecated_use here.
121 (build_over_call): Or here.
122 * decl2.c (mark_used): Do it here.
123 (is_late_template_attribute): Attribute deprecated is not deferred.
124 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
125 * parser.c (cp_parser_template_name): Warn about deprecated template.
126 (cp_parser_template_argument): Likewise.
127
128 PR c++/50473
129 * decl.c (cp_finish_decl): Don't try to process a non-dependent
130 constant initializer for a reference.
131 * pt.c (value_dependent_expression_p): A reference is always
132 dependent.
133 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
134 on any NOP_EXPRs.
135
136 Handle C++14 constexpr flow control.
137 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
138 (cxx_eval_statement_list): New.
139 (cxx_eval_constant_expression): Handle LABEL_EXPR,
140 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
141 semantics of RETURN_EXPR.
142 (many functions): Add jump_target parameter.
143 (returns, breaks, continues, switches, label_matches): New.
144 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
145 * cp-gimplify.c (begin_bc_block): Set them.
146
147 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
148 (genericize_for_stmt): Handle null statement-list.
149
150 * constexpr.c (use_new_call): Always use new call handling.
151
152 C++14 constexpr support (minus loops and multiple returns)
153 * constexpr.c (use_new_call): New macro.
154 (build_data_member_initialization): Ignore non-mem-inits.
155 (check_constexpr_bind_expr_vars): Remove C++14 checks.
156 (constexpr_fn_retval): Likewise.
157 (check_constexpr_ctor_body): Do nothing in C++14.
158 (massage_constexpr_body): In C++14 only collect mem-inits.
159 (get_function_named_in_call): Handle null CALL_EXPR_FN.
160 (cxx_bind_parameters_in_call): Build bindings in same order as
161 parameters. Don't treat iniviref parms specially in new call mode.
162 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
163 based on DECL_SAVED_TREE rather than the massaged constexpr body.
164 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
165 (is_sub_constant_expr): Don't mess with ctx.ctor here.
166 (cxx_eval_component_reference): A null element means we're mid-
167 initialization.
168 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
169 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
170 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
171 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
172 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
173 constexpr functions. In new-call mode find parms in the values table.
174 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
175 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
176 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
177 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
178 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
179 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
180 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
181 SWITCH_STMT, ASM_EXPR.
182 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
183 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
184 caller wants an lvalue.
185 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
186 (maybe_constant_init): Look through INIT_EXPR.
187 (ensure_literal_type_for_constexpr_object): Set
188 cp_function_chain->invalid_constexpr.
189 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
190 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
191 (check_for_uninitialized_const_var): Likewise.
192 (maybe_save_function_definition): Check it.
193 * parser.c (cp_parser_jump_statement): Set
194 cp_function_chain->invalid_constexpr.
195 (cp_parser_asm_definition): Likewise.
196
197 PR c++/52282
198 * decl.c (build_ptrmemfunc_type): Don't build a different
199 RECORD_TYPE for a qualified PMF.
200 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
201 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
202 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
203 * tree.c (cp_walk_subtrees): Likewise.
204 (cp_build_qualified_type_real): Remove special PMF handling.
205
206 2014-11-15 Jason Merrill <jason@redhat.com>
207
208 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
209 an expression.
210
211 * constexpr.c (cxx_eval_builtin_function_call): Use
212 fold_builtin_call_array.
213
214 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
215
216 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
217
218 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
219 * parser.c (cp_parser_omp_clause_collapse): Likewise.
220 (cp_parser_enumerator_definition): Don't call
221 instantiate_non_dependent_expr...
222 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
223 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
224 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
225 the final gcc_assert.
226
227 * constexpr.c (fold_non_dependent_expr): Add.
228 * cp-tree.h (fold_non_dependent_expr): Declare it.
229 * call.c (null_ptr_cst_p): Use it.
230 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
231 * semantics.c (begin_maybe_infinite_loop): Likewise.
232 * typeck.c (cp_build_binary_op): Likewise.
233 * typeck2.c (check_narrowing): Likewise.
234
235 * pt.c (fold_non_dependent_expr): Rename to
236 instantiate_non_dependent_expr.
237 (fold_non_dependent_expr_sfinae): Rename to
238 instantiate_non_dependent_expr_sfinae.
239 (convert_nontype_argument, build_non_dependent_expr): Adjust.
240 * decl.c (compute_array_index_type): Likewise.
241 * parser.c (cp_parser_parenthesized_expression_list,
242 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
243 Likewise.
244 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
245 Likewise.
246 * typeck.c (cxx_alignas_expr): Likewise.
247 * typeck2.c (store_init_value, massage_init_elt): Likewise.
248 * call.c: Adjust comments.
249 * class.c: Likewise.
250 * constexpr.c: Likewise.
251 * decl2.c: Likewise.
252 * tree.c: Likewise.
253
254 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
255
256 * mangle.c (find_substitution): Look for abi_tag on class templates.
257
258 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
259 Thomas Schwinge <thomas@codesourcery.com>
260 Ilya Verbin <ilya.verbin@intel.com>
261 Andrey Turetskiy <andrey.turetskiy@intel.com>
262
263 * Make-lang.in (c++.install-common): Do not install for the offload
264 compiler.
265
266 2014-11-13 Kai Tietz <ktietz@redhat.com>
267
268 * cp-tree.h (cp_build_function_call): Remove prototype.
269 (cp_build_addr_expr_strict): Likewise.
270 (build_typed_address): Likewise.
271 * typeck.c (build_typed_address): Removed.
272 (cp_build_addr_expr_strict): Make static.
273 (cp_build_function_call): Likewise.
274
275 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
276
277 DR 1510
278 PR c++/60420
279 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
280 * decl.c (grokdeclarator): Use it.
281 * parser.c (cp_parser_simple_type_specifier): Likewise.
282 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
283
284 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
285
286 PR c++/63265
287 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
288 constant the condition.
289
290 2014-11-10 Andi Kleen <ak@linux.intel.com>
291
292 * semantics.c (finish_goto_stmt): Call check_no_cilk.
293 (finish_while_stmt_cond): Dito.
294 (finish_do_stmt): Dito.
295 (finish_for_cond): Dito.
296 (finish_switch_cond): Dito.
297
298 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
299
300 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
301 OPT_Wshift_count_overflow in the warnings.
302
303 2014-11-09 Jason Merrill <jason@redhat.com>
304
305 DR 799
306 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
307 same scalar type is an rvalue.
308
309 DR 2007
310 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
311
312 2014-11-07 Jason Merrill <jason@redhat.com>
313
314 DR 1558
315 * pt.c (dependent_alias_template_spec_p): New.
316 (dependent_type_p_r): Handle dependent alias template specialization.
317 (template_args_equal): A dependent alias template specializations
318 is not equal to its underlying type as a template argument.
319 * tree.c (strip_typedefs): Don't strip a dependent alias
320 template-id.
321
322 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
323 (cp_parser_primary_expression): Not here.
324
325 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
326
327 PR c++/63366
328 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
329
330 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
331
332 * constexpr.c: Remove redundant enum from machine_mode.
333
334 2014-10-28 Jason Merrill <jason@redhat.com>
335
336 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
337
338 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
339
340 * call.c: Adjust include files.
341 * class.c: Ditto.
342 * decl2.c: Ditto.
343 * decl.c: Ditto.
344 * lambda.c: Ditto.
345 * mangle.c: Ditto.
346 * method.c: Ditto.
347 * optimize.c: Ditto.
348 * parser.c: Ditto.
349 * semantics.c: Ditto.
350 * tree.c: Ditto.
351 * vtable-class-hierarchy.c: Ditto.
352
353 2014-10-24 Jason Merrill <jason@redhat.com>
354
355 Implement N3653 (Member initializers and aggregates) and fix
356 references to 'this' in constexpr constructors.
357 * class.c (check_field_decls): In C++14 an NSDMI does not make the
358 class non-aggregate.
359 * constexpr.c (struct constexpr_ctx): New.
360 (cxx_bind_parameters_in_call): Handle 'this'.
361 (cxx_eval_call_expression): Create new constexpr_ctx.
362 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
363 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
364 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
365 (cxx_eval_vec_init_1): Likewise.
366 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
367 [TARGET_EXPR]: Build new constexpr_ctx.
368 [PLACEHOLDER_EXPR]: New.
369 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
370 object parameter.
371 (is_sub_constant_expr): Build new constexpr_ctx.
372 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
373 Allow 'this'.
374 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
375 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
376 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
377 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
378 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
379 (build_ctor_subob_ref, replace_placeholders): New.
380 * typeck2.c (store_init_value): Use replace_placeholders.
381 (process_init_constructor_record): Make zero-init before NSDMI
382 explicit.
383
384 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
385
386 * cp-gimplify.c: Adjust include files.
387
388 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
389
390 PR c++/53061
391 * cp-objcp-common.c: Do not include new.
392 (cxx_initialize_diagnostics): Move from here to ...
393 * error.c (cxx_initialize_diagnostics): : ... here. Move
394 diagnostics initialization here from init_error.
395 (cxx_pp): Use a real pointer not a macro.
396 (init_error): Just initialize cxx_pp.
397 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
398 not set maximum line length.
399
400 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
401
402 PR c++/63619
403 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
404
405 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
406
407 * parser.c (cp_parser_unary_expression): Add default arguments.
408 (cp_parser_cast_expression, cp_parser_sizeof_operand,
409 cp_parser_omp_atomic): Adjust.
410
411 2014-10-20 Jason Merrill <jason@redhat.com>
412
413 PR c++/63601
414 * lambda.c (current_nonlambda_function): New.
415 * semantics.c (finish_this_expr): Use it.
416 * cp-tree.h: Declare it.
417
418 2014-10-17 Alan Modra <amodra@gmail.com>
419
420 PR middle-end/61848
421 * decl.c (merge_decls): Don't merge section name, comdat group or
422 tls model to newdecl symtab node, instead merge to olddecl.
423 Override existing olddecl section name. Set tls_model for all
424 thread-local vars, not just OMP thread-private ones. Remove
425 incorrect comment.
426
427 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
428
429 * cp-tree.h: Adjust include files.
430
431 2014-10-15 Jason Merrill <jason@redhat.com>
432
433 PR c++/63528
434 * pt.c (lookup_template_variable): Call coerce_template_parms.
435
436 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
437
438 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
439 ensure_literal_type_for_constexpr_object,
440 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
441 retrieve_constexpr_fundef, is_valid_constexpr_fn,
442 build_anon_member_initialization, build_data_member_initialization,
443 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
444 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
445 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
446 massage_constexpr_body, cx_check_missing_mem_inits,
447 register_constexpr_fundef, explain_invalid_constexpr_fn,
448 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
449 maybe_initialize_constexpr_call_table, get_function_named_in_call,
450 get_nth_callarg, lookup_parameter_binding,
451 cxx_eval_builtin_function_call, adjust_temp_type,
452 cxx_bind_parameters_in_call, push_cx_call_context,
453 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
454 reduced_constant_expression_p, verify_constant,
455 cxx_eval_unary_expression, cxx_eval_binary_expression,
456 cxx_eval_conditional_expression, cxx_eval_array_reference,
457 cxx_eval_component_reference, cxx_eval_bit_field_ref,
458 cxx_eval_logical_expression, base_field_constructor_elt,
459 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
460 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
461 cxx_eval_trinary_expression, var_in_constexpr_fn,
462 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
463 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
464 maybe_constant_init, potential_constant_expression_1,
465 potential_constant_expression, potential_rvalue_constant_expression,
466 require_potential_constant_expression,
467 require_potential_rvalue_constant_expression): Moved definitions...
468 * constexpr.c: ... here, new file.
469 * Make-lang.in: Update.
470 * config-lang.in: Likewise.
471
472 2014-10-14 Jason Merrill <jason@redhat.com>
473
474 PR c++/63455
475 * parser.c (struct saved_token_sentinel): New.
476 (cp_parser_statement): Use it.
477 (cp_parser_start_tentative_firewall): New.
478 (cp_parser_end_tentative_firewall): New.
479 (cp_parser_lambda_expression): Use them.
480 (cp_parser_statement_expr): New.
481 (cp_parser_primary_expression): Use it.
482
483 2014-10-14 DJ Delorie <dj@redhat.com>
484
485 * typeck.c (cp_common_type): Check for all __intN types, not just
486 __int128.
487 * decl.c (grokdeclarator): Likewise.
488 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
489 __int128.
490 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
491 for all __intN types, not just __int128.
492 (cp_parser_simple_type_specifier): Likewise.
493 * mangle.c (integer_type_codes): Remove int128-specific codes.
494 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
495 __intN was specified.
496 * lex.c (init_reswords): Reserve all __intN keywords.
497
498 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
499
500 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
501
502 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
503
504 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
505 unsigned long.
506 (print_template_statistics): Cast size and elements to long.
507
508 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
509
510 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
511 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
512 hashtab.
513
514 2014-10-10 Jason Merrill <jason@redhat.com>
515
516 PR c++/62115
517 * class.c (build_base_path): Preserve rvalueness.
518 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
519 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
520
521 PR c++/63194
522 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
523
524 * method.c (implicitly_declare_fn): Handle deleted lambda default
525 ctor and copy assop here.
526 * class.c (check_bases_and_members): Not here.
527 (add_implicitly_declared_members): And don't set
528 CLASSTYPE_LAZY_MOVE_ASSIGN.
529
530 * semantics.c (finish_id_expression): Check for error_mark_node.
531
532 2014-10-09 Jason Merrill <jason@redhat.com>
533
534 PR c++/63207
535 * semantics.c (outer_var_p): Non-static.
536 (process_outer_var_ref): Split out from finish_id_expression.
537 * pt.c (tsubst_copy_and_build): Call them.
538 * cp-tree.h: Declare them.
539
540 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
541
542 * semantics.c (check_constexpr_ctor_body_1): New.
543 (check_constexpr_ctor_body): Use it; add bool parameter.
544 (build_data_member_initialization): Handle BIND_EXPR and
545 USING_STMT in the main conditional.
546 (build_constexpr_constructor_member_initializers): Do not
547 handle BIND_EXPR here.
548 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
549 (massage_constexpr_body): Don't do it here.
550 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
551 Adjust check_constexpr_ctor_body call.
552 (cp_parser_compound_statement): Do not pedwarn for compound-statement
553 in constexpr function in C++14 mode.
554 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
555
556 2014-10-09 Jason Merrill <jason@redhat.com>
557
558 PR c++/63309
559 * parser.c (cp_parser_class_head): push_template_decl for members
560 of templates, too.
561
562 PR c++/63415
563 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
564 (iterative_hash_template_arg): Likewise.
565
566 PR c++/63437
567 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
568 * semantics.c (force_paren_expr): And set it.
569 * typeck.c (check_return_expr): And handle it.
570
571 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
572
573 * decl.c (grokdeclarator): constexpr only implies const in C++11.
574
575 2014-10-08 Jason Merrill <jason@redhat.com>
576
577 PR c++/63405
578 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
579
580 PR c++/63485
581 * tree.c (build_cplus_array_type): Look for a type with no
582 typedef-name or attributes.
583
584 * call.c (call_copy_ctor): New.
585 (build_over_call): Use it to avoid infinite recursion on invalid code.
586
587 2014-10-07 Jason Merrill <jason@redhat.com>
588
589 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
590
591 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
592
593 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
594
595 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
596
597 PR c++/55250
598 * semantics.c (check_constexpr_bind_expr_vars): New.
599 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
600 (build_constexpr_constructor_member_initializers): Handle
601 BIND_EXPR in the main conditional.
602
603 2014-10-02 Mark Wielaard <mjw@redhat.com>
604
605 PR debug/63239
606 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
607 (cp_function_decl_deleted_p): New prototype.
608 * cp-objcp-common.c (cp_function_deleted_p): New function.
609
610 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
611
612 PR c++/54427
613 PR c++/57198
614 PR c++/58845
615 * typeck.c (cp_build_binary_op): save_expr after convert to save
616 redundant operations.
617 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
618 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
619
620 2014-10-03 Jason Merrill <jason@redhat.com>
621
622 * decl.c (start_decl): Complain about static/thread_local vars
623 in constexpr function.
624 (check_for_uninitialized_const_var): Also uninitialized vars.
625 * parser.c (cp_parser_jump_statement): And gotos.
626 (cp_parser_asm_operand_list): And asm.
627 (cp_parser_try_block): And try.
628 * semantics.c (ensure_literal_type_for_constexpr_object): And
629 non-literal.
630
631 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
632 (var_in_constexpr_fn): New.
633 (cxx_eval_constant_expression): Look into DECL_INITIAL.
634 (potential_constant_expression_1): Allow constexpr-local vars.
635
636 PR c++/63362
637 * tree.c (strip_typedefs): Handle TREE_LIST.
638
639 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
640
641 * parser.c (cp_parser_assignment_expression,
642 cp_parser_constant_expression): Add default arguments.
643 (cp_parser_primary_expression,
644 cp_parser_postfix_open_square_expression,
645 cp_parser_parenthesized_expression_list,
646 cp_parser_question_colon_clause,
647 cp_parser_expression, cp_parser_constant_expression,
648 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
649 cp_parser_template_argument, cp_parser_enumerator_definition,
650 cp_parser_member_declaration, cp_parser_constant_initializer,
651 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
652 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
653 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
654 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
655 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
656 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
657 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
658
659 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
660
661 PR c++/53025
662 * cp-tree.h (struct saved_scope): Add noexcept_operand.
663 (cp_noexcept_operand): Define.
664 * call.c (build_over_call): Use it.
665 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
666 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
667
668 2014-10-01 Jason Merrill <jason@redhat.com>
669
670 PR c++/63362
671 * method.c (constructible_expr): Handle value-init of non-class.
672 * parser.c (cp_parser_trait_expr): Allow pack expansion.
673 * pt.c (tsubst_copy_and_build): Handle pack expansion.
674
675 PR c++/63362
676 * class.c (type_has_non_user_provided_default_constructor): Rename
677 from type_has_user_provided_default_constructor, reverse sense.
678 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
679 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
680 * call.c (build_new_method_call_1): Adjust.
681 * cp-tree.h: Adjust.
682 * decl.c (grok_special_member_properties): Don't set
683 TYPE_HAS_COMPLEX_DFLT.
684 * init.c (build_value_init_noctor): Don't use
685 type_has_user_provided_default_constructor.
686
687 2014-09-30 Jason Merrill <jason@redhat.com>
688
689 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
690 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
691 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
692 * parser.c (cp_parser_primary_expression): Likewise.
693 (cp_parser_trait_expr): Likewise. Handle variadic trait.
694 * semantics.c (trait_expr_value): Likewise.
695 (finish_trait_expr): Likewise.
696 (check_trait_type): Handle variadic trait. Return bool.
697 * method.c (build_stub_object): Add rvalue reference here.
698 (locate_fn_flags): Not here.
699 (check_nontriv, assignable_expr, constructible_expr): New.
700 (is_trivially_xible): New.
701
702 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
703 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
704 * parser.c (cp_parser_primary_expression): Likewise.
705 (cp_parser_trait_expr): Likewise.
706 * semantics.c (trait_expr_value): Likewise.
707 (finish_trait_expr): Likewise.
708
709 * method.c (build_stub_object): Use CONVERT_EXPR.
710 * tree.c (build_dummy_object): Likewise.
711 (is_dummy_object): Adjust.
712
713 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
714 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
715 * semantics.c (trait_expr_value): Likewise.
716 (finish_trait_expr): Likewise.
717 * parser.c (cp_parser_primary_expression): Likewise.
718 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
719
720 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
721
722 PR c++/16564
723 * error.c (print_instantiation_context): Delete.
724 * typeck2.c (build_x_arrow): Record location when pushing
725 template instantiation.
726 * pt.c (push_tinst_level): Make it a wrapper around ...
727 (push_tinst_level_loc): ... this. New function. Make excessive
728 template instantiation depth a fatal error. Record location. Use
729 bool as return type.
730 (instantiate_pending_templates): Make excessive
731 template instantiation depth a fatal error.
732 (problematic_instantiation_changed): Use bool as return type.
733 * cp-tree.h (print_instantiation_context): Delete.
734 (push_tinst_level): Update declaration.
735 (problematic_instantiation_changed): Likewise.
736 (push_tinst_level_loc): New.
737
738 2014-09-29 Richard Biener <rguenther@suse.de>
739
740 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
741 for conversions.
742
743 2014-09-26 Jason Merrill <jason@redhat.com>
744
745 * mangle.c (find_substitution): Use write_abi_tags.
746
747 2014-09-25 Marek Polacek <polacek@redhat.com>
748
749 PR c++/61945
750 * class.c (warn_hidden): Check for FUNCTION_DECL.
751
752 2014-09-25 Jakub Jelinek <jakub@redhat.com>
753
754 PR c++/63249
755 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
756 on low_bound and length.
757
758 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
759
760 * class.c, decl.c, optimize.c: Rename all instances of
761 DECL_ABSTRACT to DECL_ABSTRACT_P.
762
763 2014-09-24 Marek Polacek <polacek@redhat.com>
764
765 PR c/61405
766 PR c/53874
767 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
768 * tree.c (bot_manip): Add default case.
769 * parser.c (cp_parser_primary_expression): Cast the controlling
770 expression of a switch to an int.
771 (cp_parser_unqualified_id): Likewise.
772
773 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
774
775 PR c++/61857
776 * parser.c (cp_parser_skip_to_closing_square_bracket,
777 cp_parser_array_designator_p): New.
778 (cp_parser_initializer_list): Use the latter.
779
780 2014-09-22 Jason Merrill <jason@redhat.com>
781
782 * semantics.c (finish_non_static_data_member): In diagnostic, give
783 error at point of use and note at point of declaration.
784
785 PR c++/63320
786 PR c++/60463
787 PR c++/60755
788 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
789 not finding 'this'.
790
791 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
792
793 PR c++/62219
794 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
795
796 2014-09-22 Jason Merrill <jason@redhat.com>
797
798 * decl.c (poplevel): Don't warn about unused vars in template scope.
799 * error.c (dump_decl): Handle variable templates.
800
801 2014-09-20 Jason Merrill <jason@redhat.com>
802
803 PR c++/62017
804 * decl.c (begin_destructor_body): Only clobber the as-base part of
805 *this.
806
807 2014-09-19 Jason Merrill <jason@redhat.com>
808
809 PR c++/61392
810 * mangle.c (write_expression): Use unresolved-name mangling for
811 DR850 case.
812
813 PR c++/61465
814 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
815 after pulling out an element from a CONSTRUCTOR.
816
817 2014-09-18 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/63248
820 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
821 on type of type dependent expressions, and don't call it if
822 handle_omp_array_sections has kept TREE_LIST because something
823 was type dependent.
824 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
825 Use keep_next_level, begin_omp_structured_block and
826 finish_omp_structured_block instead of push_stmt_list and
827 pop_stmt_list.
828
829 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
830
831 PR c++/62232
832 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
833 for final class types.
834
835 2014-09-15 Jason Merrill <jason@redhat.com>
836
837 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
838 necessary. Call inherit_targ_abi_tags here.
839 * class.c (check_bases_and_members): Not here.
840 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
841 * cp-tree.h: Declare inherit_targ_abi_tags.
842
843 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
844
845 Do not diagnose lambda default arguments in c++14 modes.
846 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
847 conditional.
848
849 2014-09-15 Jakub Jelinek <jakub@redhat.com>
850
851 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
852 number.
853
854 2014-09-13 Marek Polacek <polacek@redhat.com>
855
856 PR c++/60862
857 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
858 location of a call expression.
859
860 2014-09-11 Jason Merrill <jason@redhat.com>
861
862 PR c++/63201
863 * decl.c (start_decl): Handle specialization of member variable
864 template.
865 * pt.c (check_explicit_specialization): Adjust error.
866
867 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
868
869 PR c++/61489
870 * typeck2.c (process_init_constructor_record): Do not warn about
871 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
872
873 2014-09-11 Jason Merrill <jason@redhat.com>
874
875 PR c++/63139
876 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
877 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
878
879 2014-09-10 Jason Merrill <jason@redhat.com>
880
881 PR c++/61659
882 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
883 (duplicate_decls, start_decl): Likewise.
884 * pt.c (check_explicit_specialization): Likewise.
885 (push_template_decl_real): Or static templates.
886
887 2014-09-08 Jason Merrill <jason@redhat.com>
888
889 * typeck.c (build_class_member_access_expr): Move
890 -Winvalid-offsetof code...
891 * semantics.c (finish_offsetof): ...here.
892 * parser.c (cp_parser_builtin_offsetof): Remember the location of
893 the type argument.
894 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
895
896 PR c++/62255
897 * pt.c (instantiate_decl): Handle recursive instantiation of
898 static data member.
899
900 2014-09-05 Jason Merrill <jason@redhat.com>
901
902 PR c++/62659
903 * semantics.c (potential_constant_expression_1): Handle un-folded
904 pointer to member constants.
905
906 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
907
908 PR ipa/61659
909 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
910 newdecl, not olddecl.
911
912 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
913
914 DR 1453
915 * class.c (check_field_decls): A class of literal type cannot have
916 volatile non-static data members and base classes.
917 (explain_non_literal_class): Update.
918
919 2014-09-02 Jakub Jelinek <jakub@redhat.com>
920 Balaji V. Iyer <balaji.v.iyer@intel.com>
921 Igor Zamyatin <igor.zamyatin@intel.com>
922
923 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
924 simplified.
925 * parser.c (cp_parser_cilk_for): New function.
926 (cp_parser_cilk_grainsize): Likewise.
927 (cp_parser_statement): Added RID_CILK_FOR case.
928 (cp_parser_omp_for_cond): Added CILK_FOR check.
929 (cp_parser_omp_for_loop_init): Change function argument to accept
930 tree_code instead just a bool flag; change the check to use that
931 tree_code; check for initialization declaration in case of Cilk_for.
932 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
933 changed call to cp_parser_omp_for_loop_init according new arguments'
934 list.
935 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
936 * pt.c (tsubst_expr): Added CILK_FOR case.
937 * semantics.c: Include convert.h.
938 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
939 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
940 (handle_omp_for_class_iterator): New argument lastp and its usage;
941 added NE_EXPR case.
942 (finish_omp_for): Changed call to handle_omp_for_class_iterator
943 according new arguments' list; in case of Cilk_for save very first
944 decl and create empty stmt_list block; use block to build correct
945 statement tree.
946
947 2014-08-31 Jason Merrill <jason@redhat.com>
948
949 PR c++/62302
950 * optimize.c (cdtor_comdat_group): Just look at the
951 DECL_ASSEMBLER_NAME of the 'tors.
952
953 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
954
955 PR c++/52892
956 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
957 result of cxx_eval_constant_expression.
958
959 2014-08-26 Jason Merrill <jason@redhat.com>
960
961 PR c++/58624
962 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
963 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
964 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
965 template.
966
967 2014-08-25 Jason Merrill <jason@redhat.com>
968
969 * pt.c (check_explicit_specialization): Don't complain about
970 non-template variable.
971 (template_for_substitution): Allow variable templates.
972 (check_template_variable): Fix logic for member var template.
973 * decl.c (start_decl): Don't complain about extra template header
974 here.
975
976 * decl.c (start_decl): Look through member variable template.
977 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
978 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
979 variables.
980
981 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
982
983 PR c++/34938
984 * cp-tree.h (TFF_POINTER): Add.
985 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
986 argument too.
987 * error.c (dump_type_suffix): Actually print the const and noreturn
988 attribute when appropriate.
989
990 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
991
992 * decl.c (compute_array_index_type, grokdeclarator,
993 undeduced_auto_decl): Change from cxx1y to cxx14.
994 *lambda.c(add_capture()): Change error message from C++1y to C++14.
995 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
996 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
997 cp_parser_decltype, cp_parser_conversion_type_id,
998 cp_parser_simple_type_specifier, cp_parser_type_id_1,
999 cp_parser_template_type_arg, cp_parser_std_attribute,
1000 cp_parser_template_declaration_after_export): Ditto.
1001 * pt.c (tsubst): Ditto.
1002 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1003 * tree.c: Change comment.
1004 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1005 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1006
1007 2014-08-23 Jason Merrill <jason@redhat.com>
1008
1009 Allow non-constexpr variable templates.
1010 * decl2.c (note_variable_template_instantiation): New.
1011 * cp-tree.h: Declare it.
1012 * pt.c (instantiate_decl): Call it.
1013 (push_template_decl_real): Allow non-constexpr variable templates.
1014 * semantics.c (finish_id_expression): Mark the variable template
1015 instantiation as used.
1016 * mangle.c (write_mangled_name): Variable template instantiations
1017 are mangled.
1018 * parser.c (cp_parser_init_declarator): Complain about
1019 non-function implicit templates.
1020
1021 2014-08-22 Marek Polacek <polacek@redhat.com>
1022
1023 PR c++/62199
1024 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1025 preceded with logical not. Adjust call to
1026 warn_logical_not_parentheses.
1027
1028 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1029
1030 PR c++/57709
1031 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1032 declaration shadows a function declaration, unless the former
1033 declares a function, pointer to function or pointer to member
1034 function, because this is a common and valid case in real-world
1035 code.
1036 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1037 Improve description.
1038
1039 2014-08-22 Jason Merrill <jason@redhat.com>
1040
1041 PR c++/62129
1042 * class.c (outermost_open_class): Fix logic.
1043 * decl.c (complete_vars): Fix logic.
1044
1045 2014-08-22 Jason Merrill <jason@redhat.com>
1046
1047 PR c++/62129
1048 * class.c (outermost_open_class): New.
1049 * cp-tree.h: Declare it.
1050 * decl.c (maybe_register_incomplete_var): Use it.
1051 (complete_vars): Handle any constant variable.
1052 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1053
1054 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1055
1056 PR other/62008
1057 * cp-array-notation.c (build_array_notation_ref): Added correct
1058 handling of case with incorrect array.
1059
1060 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1061
1062 PR fortran/44054
1063 * error.c (cp_diagnostic_finalizer): Delete.
1064 (init_error): Do not set diagnostic_finalizer here.
1065
1066 2014-08-19 Marek Polacek <polacek@redhat.com>
1067
1068 PR c++/62153
1069 * call.c (build_new_op_1): Remember the type of arguments for
1070 a comparison. If either operand of a comparison is a boolean
1071 expression, call maybe_warn_bool_compare.
1072
1073 2014-08-19 Jason Merrill <jason@redhat.com>
1074
1075 PR tree-optimization/62091
1076 * decl2.c (decl_needed_p): Return true for virtual functions when
1077 devirtualizing.
1078
1079 PR lto/53808
1080 PR c++/61659
1081 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1082 comdat_linkage.
1083
1084 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1085
1086 * class.c (contains_empty_class_p): Remove.
1087
1088 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1089
1090 * parser.c (cp_parser_expression): Add default arguments.
1091 (cp_parser_primary_expression, cp_parser_postfix_expression,
1092 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1093 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1094 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1095 cp_parser_lambda_body, cp_parser_expression_statement,
1096 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1097 cp_parser_iteration_statement, cp_parser_jump_statement,
1098 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1099 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1100 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1101 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1102 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1103 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1104 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1105 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1106 cp_parser_transaction_expression): Adjust.
1107
1108 2014-08-15 Jason Merrill <jason@redhat.com>
1109
1110 PR c++/61566
1111 * pt.c (lookup_template_class_1): Revert recent change.
1112 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1113
1114 PR c++/61566
1115 * pt.c (instantiate_class_template_1): Ignore lambda on
1116 CLASSTYPE_DECL_LIST.
1117 (push_template_decl_real): A lambda is not primary.
1118 (lookup_template_class_1): Don't look for a lambda partial
1119 instantiation.
1120 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1121 currently in a function and the lambda living in a function.
1122 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1123
1124 2014-08-15 Richard Biener <rguenther@suse.de>
1125 Jason Merrill <jason@redhat.com>
1126
1127 PR bootstrap/62077
1128 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1129 (build_cplus_array_type): ...from here. Only call build_array_type
1130 for main variants.
1131
1132 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1133
1134 PR c++/62072
1135 Revert:
1136 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1137
1138 DR 1584
1139 PR c++/57466
1140 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1141 cv-qualifiers of function types.
1142
1143 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1144
1145 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1146
1147 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1148
1149 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1150 cp_build_array_ref, cp_build_function_call_vec): When a
1151 pedwarn is suppressed under SFINAE, return error_mark_node.
1152
1153 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1154 tf_warning_or_error, where complain is a bool, glitch.
1155
1156 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1157
1158 PR c++/62101
1159 * decl.c (grokdeclarator): Move the check for friend initializers..
1160 * decl2.c (grokfield) ..here. Postpone early return for friends
1161 until after the initializer check.
1162
1163 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1164
1165 PR c++/54377
1166 * pt.c (coerce_template_parms): Improve error message vs default
1167 arguments.
1168
1169 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1170
1171 * parser.c (cp_parser_init_declarator): Remove redundant check of
1172 decl_specifiers->type.
1173
1174 2014-08-13 Jason Merrill <jason@redhat.com>
1175
1176 * call.c (build_x_va_arg): Support passing non-POD through ....
1177 (convert_arg_to_ellipsis): Likewise.
1178
1179 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1180
1181 * pt.c (lookup_template_variable): Make dependent variable templates
1182 have unknown type.
1183
1184 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1185
1186 * parser.c (cp_parser_elaborated_type_specifier): Handle
1187 specially cp_parser_template_id returning a BASELINK.
1188
1189 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1190
1191 * parser.c (cp_parser_diagnose_invalid_type_name,
1192 cp_parser_make_typename_type): Remove scope parameter.
1193 (cp_parser_parse_and_diagnose_invalid_type_name,
1194 cp_parser_elaborated_type_specifier): Adjust calls.
1195
1196 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1197
1198 Reject virt-specifiers on friends and member templates
1199 * friend.c (do_friend): Diagnose virt-specifiers.
1200 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1201
1202 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1203
1204 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1205 return type to bool; in C++11 for constants give errors, not pedwarns.
1206 * cp-tree.h (check_narrowing): Adjust declaration.
1207 * call.c (convert_like_real): Update calls.
1208 * semantics.c (finish_compound_literal): Likewise.
1209
1210 2014-08-08 Jason Merrill <jason@redhat.com>
1211
1212 * pt.c (lookup_template_class_1): Copy abi_tag.
1213
1214 2014-08-08 Kai Tietz <ktietz@redhat.com>
1215
1216 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1217 that we operate on a true inline.
1218
1219 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1220
1221 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1222 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1223
1224 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1225
1226 PR c++/51312
1227 * decl.c (build_enumerator): Handle class types with conversion
1228 operators via perform_implicit_conversion_flags and
1229 build_expr_type_conversion.
1230
1231 * cvt.c (build_expr_type_conversion): Replace pair of errors
1232 with error + inform.
1233
1234 2014-08-07 Jason Merrill <jason@redhat.com>
1235
1236 PR c++/62043
1237 * parser.c (c_parse_file): Change sorry to fatal_error.
1238
1239 PR c++/61959
1240 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1241
1242 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1243
1244 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1245
1246 2014-08-06 Jason Merrill <jason@redhat.com>
1247
1248 * init.c (build_vec_init): Fix constant initialization of
1249 trailing elements.
1250 (build_value_init_noctor): Call maybe_constant_init.
1251 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1252 conversion to void.
1253
1254 PR c++/60417
1255 * init.c (build_vec_init): Reorganize earlier change a bit.
1256
1257 PR c++/61994
1258 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1259 if we're just returning an INIT_EXPR.
1260
1261 2014-08-06 Jason Merrill <jason@redhat.com>
1262 Braden Obrzut <admin@maniacsvault.net>
1263
1264 * pt.c (check_explicit_specialization): Don't test
1265 DECL_DECLARED_INLINE_P for a variable template.
1266
1267 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1268
1269 PR c++/43906
1270 * typeck.c (cp_build_binary_op): Extend to more cases the
1271 -Waddress warning.
1272
1273 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1274
1275 Implement constexpr variable templates
1276 * decl.c (grokvardecl): Handle specializations of variable templates.
1277 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1278 return from grokvardecl.
1279 * decl2.c (check_member_template): Allow declaration of template member
1280 variables.
1281 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1282 variable templates.
1283 * pt.c (check_template_variable): Accept variable temploids at
1284 non-class scope.
1285 (push_template_decl_real): The current instantiation of a template
1286 can be a VAR_DECL.
1287 (determine_specialization): Accept variable templates.
1288 (check_explicit_specialization): Handle and check for malformed
1289 variable template specializations.
1290 (lookup_template_variable): New.
1291 (tsubst_decl): Handle variable template specializations.
1292 (do_decl_instantiation): Handle template variables.
1293 (instantiate_decl): Handle template variables.
1294 * semantics.c (finish_template_variable): New.
1295 (finish_id_expression): Instantiate variable templates.
1296 * cp-tree.h (variable_template_p): New.
1297
1298 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1299
1300 PR c++/15339
1301 * decl.c (check_redeclaration_no_default_args): New.
1302 (duplicate_decls): Use it, handle default arguments
1303 in redeclarations of function templates.
1304
1305 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1306
1307 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1308
1309 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1310
1311 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1312 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1313 instead of pointer_set.
1314
1315 2014-08-01 Jason Merrill <jason@redhat.com>
1316
1317 PR c++/60417
1318 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1319 init-list for trailing elements.
1320 * typeck2.c (process_init_constructor_array): Likewise.
1321
1322 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1323
1324 DR 217 again
1325 * decl.c (duplicate_decls): Handle static member functions too.
1326
1327 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1328
1329 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1330 in error output.
1331
1332 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1333
1334 PR other/61963
1335 * parser.c (cp_parser_array_notation): Added check for array_type.
1336
1337 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1338
1339 PR middle-end/61455
1340 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1341 DECL_EXPR improved. Changed handling for INIT_EXPR.
1342
1343 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1344
1345 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1346
1347 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1348
1349 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1350 -fsanitize=alignment call ubsan_maybe_instrument_reference
1351 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1352 for calls to member functions.
1353
1354 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1355
1356 PR c++/60517
1357 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1358 whether it is returning the address of a local variable.
1359 (check_return_expr): Return 0 instead of the address of a local
1360 variable.
1361
1362 2014-07-30 Jason Merrill <jason@redhat.com>
1363
1364 PR lto/53808
1365 PR c++/61659
1366 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1367
1368 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1369
1370 PR c++/57397
1371 * pt.c (unify_arity): Add boolean parameter.
1372 (unify_too_few_arguments): Likewise.
1373 (type_unification_real): Diagnose correctly insufficient
1374 arguments in the presence of trailing variadic parameters;
1375 deducing multiple trailing packs as empty is fine.
1376
1377 2014-07-30 Jason Merrill <jason@redhat.com>
1378
1379 PR c++/61659
1380 PR c++/61687
1381 Revert:
1382 * decl2.c (mark_all_virtuals): New variable.
1383 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1384 (cp_write_global_declarations): Set it and give helpful diagnostic
1385 if it introduces errors.
1386 * class.c (finish_struct_1): Check it.
1387
1388 PR lto/53808
1389 PR c++/61659
1390 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1391 (check_explicit_specialization): Clear it on specializations.
1392 * decl.c (duplicate_decls, start_decl): Likewise.
1393 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1394 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1395 linkage after setting the appropriate flags.
1396 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1397 * decl2.c (mark_needed): Mark clones.
1398 (import_export_decl): Not here.
1399
1400 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1401
1402 Implement N4051 - Allow typename in a template template parameter
1403 * parser.c (cp_parser_type_parameter_key): New funtion;
1404 (cp_parser_token_is_type_parameter_key): Ditto;
1405 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1406 but pedwarn for less than cxx1z.
1407
1408 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1409
1410 PR c++/50961
1411 * call.c (standard_conversion): Use resolve_nondeduced_context
1412 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1413
1414 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1415
1416 PR c++/61804
1417 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1418 for '++' and '--'.
1419
1420 2014-07-15 Jason Merrill <jason@redhat.com>
1421
1422 PR c++/61811
1423 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1424
1425 PR c++/60848
1426 PR c++/61723
1427 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1428 * class.c (finish_struct): Reject invalid definition of
1429 std::initializer_list.
1430
1431 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1432
1433 * call.c (convert_like_real): Call print_z_candidate and inform only
1434 if permerror returns true.
1435
1436 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1437
1438 * class.c (build_clone): Do not clear assembler names of
1439 templates.
1440 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1441 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1442 as a special case return sizeof (struct tree_decl_non_common)
1443 for other decls.
1444 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1445 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1446 * cp/cp-tree.h (tree_template_decl): New structure.
1447 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1448 (union cp_lang_tree_node): Add template_decl.
1449 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1450
1451 2014-07-14 Jason Merrill <jason@redhat.com>
1452
1453 PR c++/61445
1454 PR c++/56947
1455 * pt.c (instantiate_decl): Don't check defer_ok for local class
1456 members.
1457
1458 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1459
1460 PR middle-end/61294
1461 * cp-tree.h (LITERAL_ZERO_P): Define.
1462 * parser.c (cp_parser_parenthesized_expression_list): Add
1463 want_literal_zero_p argument, if true, for literal zeros
1464 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1465 (cp_parser_postfix_expression): Adjust
1466 cp_parser_parenthesized_expression_list caller, handle
1467 -Wmemset-transposed-args.
1468 (literal_zeros): New variable.
1469
1470 2014-07-13 Jason Merrill <jason@redhat.com>
1471
1472 PR c++/58511
1473 * semantics.c (is_instantiation_of_constexpr): Return true for
1474 defaulted functions, too.
1475 (explain_invalid_constexpr_fn): Only use
1476 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1477 * method.c (explain_implicit_non_constexpr): Pass
1478 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1479
1480 PR c++/58611
1481 * decl.c (check_initializer): Don't finish_compound_literal
1482 on erroneous constexpr init.
1483
1484 PR c++/58612
1485 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1486
1487 PR c++/60628
1488 * decl.c (create_array_type_for_decl): Only check for auto once.
1489
1490 PR c++/58636
1491 * call.c (build_list_conv): Don't try to build a list of references.
1492
1493 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1494
1495 PR C++/60209 - Declaration of user-defined literal operator cause error
1496 * parser.c (cp_parser_operator): Fold treatment of strings
1497 and user-defined string literals. Use the full string parser.
1498 (cp_parser_string_literal): Add flag to not look for literal operator.
1499
1500 2014-07-11 Jason Merrill <jason@redhat.com>
1501
1502 PR c++/22434
1503 PR c++/61288
1504 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1505
1506 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1507
1508 PR c++/53159
1509 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1510 into convflags.
1511 * decl.c (check_initializer): Don't call check_narrowing here,
1512 set LOOKUP_NO_NARROWING.
1513 * typeck2.c (digest_init_r): Likewise.
1514
1515 2014-07-10 Jason Merrill <jason@redhat.com>
1516
1517 PR c++/61661
1518 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1519
1520 PR c++/61659
1521 PR c++/61687
1522 * decl2.c (mark_all_virtuals): New variable.
1523 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1524 (cp_write_global_declarations): Set it and give helpful diagnostic
1525 if it introduces errors.
1526 * class.c (finish_struct_1): Check it.
1527 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1528
1529 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1530
1531 PR c++/60686
1532 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1533 outside class declaration, in friend declaration, and neither on
1534 constructor nor conversion operator.
1535
1536 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1537
1538 DR 1584
1539 PR c++/57466
1540 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1541 cv-qualifiers of function types.
1542
1543 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1544 Paolo Carlini <paolo.carlini@oracle.com>
1545
1546 PR c++/59361
1547 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1548 CPP_ELLIPSIS too.
1549
1550 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1551
1552 * class.c (check_for_override): Wrap the 'final' and 'override'
1553 keywords in %< and %>.
1554
1555 2014-07-06 Marek Polacek <polacek@redhat.com>
1556
1557 PR c/6940
1558 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1559 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1560 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1561 function parameter.
1562
1563 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1564
1565 * pt.c (convert_template_argument): Use inform instead of error in
1566 three places.
1567
1568 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1569
1570 PR c++/58781
1571 PR c++/60249
1572 PR c++/59867
1573 * parser.c (cp_parser_userdef_string_literal): Take a tree
1574 not a cp_token*.
1575 (cp_parser_string_literal): Don't hack the token stream.
1576
1577 2014-06-30 Jason Merrill <jason@redhat.com>
1578
1579 PR c++/61659
1580 PR lto/53808
1581 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1582 devirtualizing.
1583 * init.c (build_vtbl_address): Don't mark destructor.
1584 * class.c (finish_struct_1): Add all classes to keyed_classes
1585 if devirtualizing.
1586
1587 PR c++/61647
1588 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1589
1590 PR c++/61566
1591 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1592
1593 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1594 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1595 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1596 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1597 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1598 * pt.c (unify): Also check whether the argument is a PMF.
1599
1600 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1601
1602 PR c++/54891
1603 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1604 a '[' can also start a primary-expression.
1605 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1606 when cp_parser_tokens_start_cast_expression returns -1.
1607
1608 2014-06-30 Jason Merrill <jason@redhat.com>
1609
1610 PR c++/61539
1611 * pt.c (unify_one_argument): Type/expression mismatch just causes
1612 deduction failure.
1613
1614 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1615 2014-04-11 change.
1616
1617 2014-06-30 Marek Polacek <polacek@redhat.com>
1618
1619 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1620 function has no_sanitize_undefined attribute.
1621 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1622 function has no_sanitize_undefined attribute.
1623
1624 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1625
1626 PR middle-end/57541
1627 * cp-array-notation.c (expand_sec_reduce_builtin):
1628 Check that bultin argument is correct.
1629 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1630
1631 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1632
1633 DR 1579
1634 PR c++/58051
1635 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1636 types aren't the same.
1637
1638 2014-06-27 Jason Merrill <jason@redhat.com>
1639
1640 PR c++/61433
1641 * error.c (dump_template_bindings): Don't tsubst in a clone.
1642
1643 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1644
1645 PR c++/61614
1646 * semantics.c (finish_compound_literal): Revert r204228.
1647
1648 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1649
1650 * parser.c (cp_parser_compound_literal_p): New.
1651 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1652
1653 2014-06-26 Jason Merrill <jason@redhat.com>
1654
1655 * parser.c (cp_parser_for_init_statement): Change range-for error
1656 to pedwarn.
1657
1658 N3994 Ranged-based for-loops: The Next Generation
1659 * parser.c (cp_lexer_nth_token_is): New.
1660 (cp_parser_for_init_statement): Allow "for (id : init)".
1661
1662 2014-06-26 Teresa Johnson <tejohnson@google.com>
1663
1664 * class.c (dump_class_hierarchy): Use saved dump files.
1665 (dump_vtable): Ditto.
1666 (dump_vtt): Ditto.
1667
1668 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1669
1670 PR c++/61537
1671 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1672 parameter lists outside of function parameter scope.
1673
1674 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1675
1676 DR 178
1677 PR c++/49132
1678 * typeck2.c (process_init_constructor_record): Do not complain about
1679 uninitialized const members, because within aggregate-initialization,
1680 members without explicit initializers are value-initialized.
1681
1682 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1683
1684 * semantics.c (finish_omp_clauses): Make sure
1685 OMP_CLAUSE_LINEAR_STEP has correct type.
1686
1687 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1688
1689 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1690 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1691 FUNCTION_DECL check.
1692 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1693 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1694 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1695 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1696
1697 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1698
1699 PR c++/33972
1700 * decl.c (grokdeclarator): Do not early check for operator-function-id
1701 as non-function.
1702
1703 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1704
1705 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1706 Adjust.
1707
1708 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1709
1710 * parser.c (cp_parser_omp_for_loop): For
1711 #pragma omp parallel for simd move lastprivate clause from parallel
1712 to for rather than simd.
1713
1714 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1715
1716 DR 577
1717 PR c++/33101
1718 * decl.c (grokparms): Accept a single parameter of type 'void'.
1719
1720 2014-06-20 Jason Merrill <jason@redhat.com>
1721
1722 PR c++/59296
1723 * call.c (add_function_candidate): Avoid special 'this' handling
1724 if we have a ref-qualifier.
1725
1726 PR c++/61556
1727 * call.c (build_over_call): Call build_this in template path.
1728
1729 2014-06-19 Jason Merrill <jason@redhat.com>
1730
1731 PR c++/59296
1732 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1733
1734 2014-06-18 Jason Merrill <jason@redhat.com>
1735
1736 PR c++/59296
1737 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1738 ref-qualifier handling.
1739
1740 PR c++/61507
1741 * pt.c (resolve_overloaded_unification): Preserve
1742 ARGUMENT_PACK_EXPLICIT_ARGS.
1743
1744 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1745
1746 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1747 argument.
1748 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1749
1750 2014-06-17 Jason Merrill <jason@redhat.com>
1751
1752 PR c++/60605
1753 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1754
1755 2014-06-15 Jason Merrill <jason@redhat.com>
1756
1757 PR c++/61488
1758 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1759
1760 PR c++/61500
1761 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1762
1763 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1764
1765 * decl.c (grokvardecl): Fix pasto in previous patch.
1766
1767 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1768
1769 * decl.c (duplicate_decls): Use set_decl_tls_model.
1770 (grokdeclarator): Likewise.
1771 * semantics.c (finish_id_expression): Check TLS only for
1772 static variables.
1773 (finish_omp_threadprivate): Use decl_default_tls_model.
1774 * decl2.c (get_guard): Likewise.
1775 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1776
1777 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1778
1779 PR c++/33101
1780 * decl.c (grokparms): Improve error message about void parameters.
1781 * error.c (type_to_string): Fix aka cut off code.
1782
1783 2014-06-12 Jason Merrill <jason@redhat.com>
1784
1785 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1786 * cvt.c (type_promotes_to): Likewise.
1787 * mangle.c (write_type, write_expression): Likewise.
1788 (write_name, write_template_arg): Likewise.
1789 (mangle_decl): Make alias based on flag_abi_compat_version.
1790 Emit -Wabi warning here.
1791 (finish_mangling_internal): Not here. Drop warn parm.
1792 (finish_mangling_get_identifier, finish_mangling): Adjust.
1793 (mangle_type_string, mangle_special_for_type): Adjust.
1794 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1795 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1796 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1797
1798 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1799 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1800 (layout_nonempty_base_or_field, end_of_class): Likewise.
1801 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1802 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1803 (layout_virtual_bases): Likewise.
1804 * decl.c (compute_array_index_type): Likewise.
1805 * mangle.c (write_mangled_name, write_prefix): Likewise.
1806 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1807 (write_template_arg, write_array_type): Likewise.
1808 * method.c (lazily_declare_fn): Likewise.
1809 * rtti.c (get_pseudo_ti_index): Likewise.
1810 * typeck.c (comp_array_types): Likewise.
1811
1812 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1813
1814 * vtable-class-hierarchy.c: Update handling for section names
1815 that are no longer trees.
1816 * decl.c (duplicate_decls): Likewise.
1817
1818 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1819
1820 PR c++/19200
1821 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1822 to cp_parser_declarator.
1823
1824 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1825
1826 PR c++/60265
1827 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1828 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1829 message.
1830
1831 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1832
1833 PR c++/19200
1834 * parser.c (cp_parser_declarator): Add bool parameter.
1835 (cp_parser_direct_declarator): Likewise, use it.
1836 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1837 (cp_parser_condition, cp_parser_explicit_instantiation,
1838 cp_parser_init_declarator, cp_parser_type_id_1,
1839 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1840 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1841 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1842 Adjust.
1843 * decl.c (grokdeclarator): Fix handling of friend declared in
1844 namespace scope (g++.dg/parse/friend10.C).
1845
1846 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1847
1848 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1849 ->implicit_section.
1850 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1851 (maybe_clone_body): Move symbol across comdat groups.
1852 * method.c (use_thunk): Copy implicit section flag.
1853
1854 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1855
1856 PR c++/22556
1857 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1858
1859 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1860
1861 * method.c (use_thunk): Use set_decl_section_name.
1862 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1863 * decl.c (duplicate_decls): Likewise.
1864 * vtable-class-hierarchy.c: Likewise.
1865
1866 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1867
1868 PR c++/60184
1869 * class.c (check_field_decls): In C++11 mode do not reject
1870 static data members and reference-type members in unions.
1871
1872 2014-06-05 Jason Merrill <jason@redhat.com>
1873
1874 PR c++/43453
1875 * decl.c (check_initializer): Collapse a TREE_LIST here.
1876 * typeck2.c (store_init_value): Not here.
1877
1878 2014-06-05 Richard Biener <rguenther@suse.de>
1879 Paolo Carlini <paolo.carlini@oracle.com>
1880
1881 PR c++/56961
1882 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1883 handling of empty classes.
1884
1885 2014-06-04 Jason Merrill <jason@redhat.com>
1886
1887 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1888 for noexcept and thread_local, too.
1889
1890 PR c++/61343
1891 * decl.c (check_initializer): Maybe clear
1892 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1893
1894 2014-06-05 Richard Biener <rguenther@suse.de>
1895
1896 PR c++/61004
1897 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1898 warnings for accessing empty classes.
1899
1900 2014-06-05 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/49706
1903 * parser.c (cp_parser_binary_expression): Warn when logical not is
1904 used on the left hand side operand of a comparison.
1905
1906 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1907
1908 PR c++/43453
1909 * typeck.c (cp_build_modify_expr): Handle array of characters
1910 initialized by a string literal.
1911 * decl.c (check_initializer): Handle parenthesized string literal
1912 as initializer.
1913 * typeck2.c (store_init_value): Remove redundant check.
1914
1915 2014-06-04 Jason Merrill <jason@redhat.com>
1916
1917 PR c++/51253
1918 PR c++/61382
1919 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1920 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1921
1922 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1923
1924 PR c/58942
1925 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1926 with a pointer.
1927
1928 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1929
1930 DR 1423
1931 PR c++/52174
1932 * call.c (standard_conversion): Convert nullptr to bool only
1933 in case of direct-initialization.
1934 (convert_like_real): Provide informative error message.
1935
1936 2014-06-03 Marek Polacek <polacek@redhat.com>
1937
1938 PR c/60439
1939 * semantics.c (finish_switch_cond): Warn if switch condition has
1940 boolean value.
1941
1942 2014-06-03 Jason Merrill <jason@redhat.com>
1943
1944 PR c++/60992
1945 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1946 variable to local_specializations.
1947
1948 PR c++/60848
1949 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1950
1951 2014-06-02 Jason Merrill <jason@redhat.com>
1952
1953 PR c++/61046
1954 * decl.c (reshape_init_class): Handle un-folded
1955 constant-expressions.
1956
1957 PR c++/61134
1958 * pt.c (pack_deducible_p): Handle canonicalization.
1959
1960 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1961
1962 * pt.c (tsubst_function_type): Initialize arg_types.
1963
1964 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1965
1966 PR debug/57519
1967 * class.c (handle_using_decl): Pass the correct scope to
1968 cp_emit_debug_info_for_using.
1969
1970 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1971
1972 PR c++/59483
1973 PR c++/61148
1974 * search.c (accessible_p): Use current_nonlambda_class_type.
1975 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1976
1977 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1978
1979 * decl.c: Include builtins.h.
1980 * semantics.c: Likewise.
1981
1982 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1983
1984 DR 1227
1985 PR c++/57543
1986 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1987 * pt.c (tsubst_function_type): Inject the this parameter; do the
1988 substitutions in the order mandated by the DR.
1989 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1990 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1991 (static_fn_type): Copy it.
1992 * decl2.c (build_memfn_type, change_return_type,
1993 cp_reconstruct_complex_type): Likewise.
1994 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1995 * tree.c (strip_typedefs): Likewise.
1996 * typeck.c (merge_types): Likewise.
1997
1998 2014-05-30 Jason Merrill <jason@redhat.com>
1999
2000 PR c++/56947
2001 * pt.c (instantiate_decl): Check that defer_ok is not set for
2002 local class members.
2003
2004 PR c++/60992
2005 * pt.c (tsubst_init): Split out from...
2006 (tsubst_expr) [DECL_EXPR]: Here.
2007 (tsubst_copy) [VAR_DECL]: Use it.
2008 * semantics.c (finish_id_expression): Return the decl for static/const.
2009
2010 2014-05-28 Jason Merrill <jason@redhat.com>
2011
2012 PR c++/47202
2013 * decl.c (cxx_comdat_group): Return a decl.
2014 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2015
2016 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2017 bound.
2018
2019 PR c++/61242
2020 * call.c (build_aggr_conv): Ignore passed in flags.
2021 (build_array_conv, build_complex_conv): Likewise.
2022
2023 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2024
2025 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2026 (maybe_clone_body): Likewise.
2027 * decl.c (duplicate_decls): Update code duplicating comdat group;
2028 do not copy symtab pointer; before freeing newdecl remove it
2029 from symtab.
2030 * decl2.c (constrain_visibility): Use set_comdat_group.
2031
2032 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2033
2034 * rtti.c: Include tm_p.h
2035 (emit_tinfo_decl): Force RTTI data to be aligned to required
2036 ABI alignment only.
2037
2038 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2039
2040 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2041 ignoring other target adjustments.
2042
2043 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2044
2045 * semantics.c (finish_omp_clauses): Remove duplicated variable
2046 initialization.
2047
2048 * parser.c (cp_parser_omp_target): Return bool values.
2049
2050 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2051
2052 PR c++/61088
2053 * lambda.c (add_capture): Enforce that capture by value requires
2054 complete type.
2055 * typeck2.c (cxx_incomplete_type_inform): Early return if
2056 TYPE_MAIN_DECL is null.
2057
2058 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2059
2060 PR c/61271
2061 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2062
2063 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2064
2065 PR c++/61133
2066 * lambda.c (build_capture_proxy, add_capture): Treat normal
2067 captures and init-captures identically.
2068
2069 2014-05-21 Mark Wielaard <mjw@redhat.com>
2070
2071 PR debug/16063
2072 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2073 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2074
2075 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2076
2077 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2078 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2079 (expand_array_notation): Handle VOID_CST.
2080 * error.c (dump_expr): Likewise.
2081 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2082 (cxx_pretty_printer::expression): Likewise.
2083 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2084 * decl.c (register_dtor_fn): Likewise.
2085 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2086 (build_delete, push_base_cleanups): Likewise.
2087 * mangle.c (write_expression): Likewise.
2088 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2089 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2090 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2091 * tree.c (cp_tree_equal): Likewise.
2092 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2093 instead of void_zero_node.
2094 * typeck.c (check_return_expr): Likewise.
2095 * typeck2.c (build_functional_cast): Likewise.
2096
2097 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2098
2099 PR c/60189
2100 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2101 from here to...
2102 (cp_parser_statement): ...here. Make sure only semicolon can go after
2103 Cilk_sync.
2104
2105 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2106
2107 PR c++/58753
2108 PR c++/58930
2109 PR c++/58704
2110 * typeck2.c (digest_nsdmi_init): New.
2111 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2112 * init.c (get_nsdmi): Likewise.
2113 * cp-tree.h (digest_nsdmi_init): Declare.
2114
2115 2014-05-20 Jason Merrill <jason@redhat.com>
2116
2117 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2118 up a virtual function in a dummy object.
2119
2120 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2121
2122 PR c++/60373
2123 * decl.c (duplicate_decls): Replace pair of warning_at with
2124 warning_at + inform.
2125 (maybe_commonize_var): Likewise.
2126
2127 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2128
2129 PR bootstrap/61210
2130 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2131 (tsubst_copy_and_build): Perform recursive substitutions in a
2132 deterministic order.
2133
2134 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2135
2136 PR c++/58664
2137 * typeck2.c (cxx_incomplete_type_inform): New.
2138 (cxx_incomplete_type_diagnostic): Use it.
2139 * decl.c (grokdeclarator): Check the element type of an
2140 incomplete array type; call the above.
2141 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2142
2143 2014-05-19 Jason Merrill <jason@redhat.com>
2144
2145 PR c++/58761
2146 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2147 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2148
2149 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2150
2151 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2152 * parser.c (cp_parser_enum_specifier): Likewise.
2153
2154 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2155
2156 * class.c (sorted_fields_type_new): Adjust.
2157 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2158 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2159 * cp-tree.h: Remove usage of variable_size gty attribute.
2160 * decl.c (make_label_decl): Adjust.
2161 (check_goto): Likewise.
2162 (start_preparsed_function): Likewise.
2163 (save_function_data): Likewise.
2164 * lex.c (init_reswords): Likewise.
2165 (retrofit_lang_decl): Likewise.
2166 (cxx_dup_lang_specific_decl): Likewise.
2167 (copy_lang_type): Likewise.
2168 (cxx_make_type): Likewise.
2169 * name-lookup.c (binding_entry_make): Likewise.
2170 (binding_table_construct): Likewise.
2171 (binding_table_new): Likewise.
2172 (cxx_binding_make): Likewise.
2173 (pushdecl_maybe_friend_1): Likewise.
2174 (begin_scope): Likewise.
2175 (push_to_top_level): Likewise.
2176 * parser.c (cp_lexer_alloc): Likewise.
2177 (cp_lexer_new_from_tokens): Likewise.
2178 (cp_token_cache_new): Likewise.
2179 (cp_parser_context_new): Likewise.
2180 (cp_parser_new): Likewise.
2181 (cp_parser_nested_name_specifier_opt): Likewise.
2182 (cp_parser_template_id): Likewise.
2183 * pt.c (maybe_process_partial_specialization): Likewise.
2184 (register_specialization): Likewise.
2185 (add_pending_template): Likewise.
2186 (lookup_template_class_1): Likewise.
2187 (push_tinst_level): Likewise.
2188 * semantics.c (register_constexpr_fundef): Likewise.
2189 (cxx_eval_call_expression): Likewise.
2190 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2191
2192 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2193
2194 PR c++/51640
2195 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2196 when cp_parser_lookup_name sets ambiguous_decls.
2197
2198 2014-05-15 Jason Merrill <jason@redhat.com>
2199
2200 * call.c (print_conversion_rejection): Use loc consistently.
2201
2202 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2203
2204 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2205 * call.c (convert_like_real, build_new_method_call_1): Use it.
2206 * decl2.c (grokfield): Likewise.
2207 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2208 build_new_1): Likewise.
2209 * mangle.c (write_expression): Likewise.
2210 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2211
2212 2014-05-14 Jason Merrill <jason@redhat.com>
2213
2214 PR c++/20332
2215 PR c++/21631
2216 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2217 dropped cv-quals as a bad conversion.
2218 (convert_like_real) [ck_ref_bind]: Explain them.
2219 (compare_ics): Check badness before stripping reference
2220 bindings. Handle comparing bad reference bindings.
2221 * typeck.c (comp_cv_qualification): Add overload that just takes
2222 integers.
2223 * cp-tree.h: Declare it.
2224
2225 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2226 (arg_conversion_rejection, bad_arg_conversion_rejection)
2227 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2228 (add_function_candidate): Pass actual argument, rather than type, to
2229 bad_arg_conversion_rejection.
2230 (print_conversion_rejection): Explain what's wrong with the conversion.
2231 (print_z_candidates): Say "candidate:" before each candidate.
2232 (splice_viable): Be strict if we see a viable or template candidate.
2233 (build_user_type_conversion_1): Pass false to strict parameter.
2234 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2235 (build_new_op_1, build_new_method_call_1): Likewise.
2236 (build_op_call_1): Pass true to strict parameter.
2237
2238 2014-05-13 Jason Merrill <jason@redhat.com>
2239
2240 * call.c (print_error_for_call_failure): Say "no match" rather
2241 than "ambiguous" if there were no strict matches.
2242 (build_new_method_call_1): Likewise.
2243
2244 PR c++/61151
2245 * semantics.c (is_this_parameter): Allow capture proxies too.
2246
2247 2014-05-12 Jason Merrill <jason@redhat.com>
2248
2249 * call.c (maybe_print_user_conv_context): New.
2250 (convert_like_real): Use it. Print call context for bad
2251 user-defined conversion.
2252 (build_over_call): Print call context for bad 'this' conversion.
2253
2254 * call.c (convert_like_real): Use inform for identifying the
2255 declaration point.
2256
2257 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2258
2259 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2260 complain & tf_error is false.
2261
2262 * decl.c (make_unbound_class_template): Prefer inform for
2263 "declared here"-type message.
2264
2265 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2266
2267 PR c++/60463
2268 PR c++/60755
2269 * lambda.c (lambda_expr_this_capture): Add new parameter
2270 add_capture_p controlling whether the functions will try to
2271 capture 'this' via the default capture.
2272 (maybe_resolve_dummy): Likewise.
2273 * cp-tree.h: Adjust prototypes.
2274 * call.c, semantics.c: Change callers of these functions.
2275 * call.c (build_new_method_call_1): Use the actual 'this' that
2276 would be potentially captured for the overload resolution, instead
2277 of the dummy object.
2278
2279 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2280
2281 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2282 parameter.
2283 (convert_nontype_argument): Adjust calls.
2284 (coerce_template_parameter_pack): Add missing complain & tf_error
2285 check.
2286
2287 2014-05-09 Jason Merrill <jason@redhat.com>
2288
2289 DR 587
2290 PR c++/51317
2291 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2292 non-class lvalues and xvalues that differ only in cv-qualifiers.
2293
2294 DR 5
2295 PR c++/60019
2296 * call.c (build_user_type_conversion_1): The copy-init temporary
2297 is cv-unqualified.
2298
2299 PR c++/58714
2300 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2301
2302 PR c++/54348
2303 * call.c (build_conditional_expr_1): If overload resolution finds
2304 no match, just say "different types".
2305
2306 PR c++/32019
2307 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2308
2309 PR c++/22434
2310 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2311 if we didn't find a conversion.
2312 Don't accept a bad conversion too early.
2313
2314 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2315
2316 PR c++/13981
2317 * typeck.c (convert_for_assignment): Provide an inform for pointers
2318 to incomplete class types.
2319
2320 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2321
2322 PR c++/61083
2323 * pt.c (convert_nontype_argument): Protect all the error calls
2324 with complain & tf_error.
2325
2326 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2327
2328 PR c++/61080
2329 * pt.c (instantiate_decl): Avoid generating the body of a
2330 deleted function.
2331
2332 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2333
2334 PR c++/60999
2335 * pt.c (maybe_begin_member_template_processing): Use
2336 uses_template_parms.
2337
2338 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2339 Mike Stump <mikestump@comcast.net>
2340 Richard Sandiford <rdsandiford@googlemail.com>
2341
2342 * call.c: Include wide-int.h.
2343 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2344 (convert_for_arg_passing): Likewise.
2345 * class.c: Include wide-int.h.
2346 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2347 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2348 (include_empty_classes): Likewise
2349 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2350 * cvt.c: Include wide-int.h.
2351 (ignore_overflows): Use wide_int_to_tree.
2352 * decl.c: Include wide-int.h.
2353 (check_array_designated_initializer): Use wide-int interfaces.
2354 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2355 (finish_enum_value_list): Use signop.
2356 (build_enumerator): Use wide-int interfaces.
2357 * init.c: Include wide-int.h.
2358 (build_new_1): Use wide-int interfaces.
2359 * mangle.c: Include wide-int.h.
2360 (write_integer_cst): Use wide-int interfaces.
2361 (write_array_type): Likewise.
2362 * tree.c: Include wide-int.h.
2363 (cp_tree_equal): Use tree_int_cst_equal.
2364 * typeck2.c: Include wide-int.h.
2365 (process_init_constructor_array): Use wide-int interfaces.
2366
2367 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2368
2369 PR c++/58582
2370 * decl.c (grokfndecl): Check duplicate_decls return value for
2371 error_mark_node.
2372 * pt.c (instantiate_decl): A deleted function is defined.
2373
2374 2014-05-02 Jason Merrill <jason@redhat.com>
2375
2376 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2377
2378 PR c++/60992
2379 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2380 other than 'this'.
2381 (add_capture): Check for VLA before calling it.
2382 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2383 just the current one. Make non-static.
2384 * cp-tree.h: Declare it.
2385 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2386 the operand was static or constant.
2387
2388 2014-05-02 Marek Polacek <polacek@redhat.com>
2389
2390 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2391 warning_at calls.
2392
2393 2014-05-01 Marek Polacek <polacek@redhat.com>
2394
2395 PR c/43395
2396 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2397 between label and variable when warning about returning local address.
2398
2399 2014-04-30 Jason Merrill <jason@redhat.com>
2400
2401 PR c++/60980
2402 * init.c (build_value_init): Don't try to call an array constructor.
2403
2404 PR c++/60951
2405 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2406
2407 2014-04-30 Marek Polacek <polacek@redhat.com>
2408
2409 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2410 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2411 for non-integer types.
2412
2413 2014-04-29 Jason Merrill <jason@redhat.com>
2414
2415 DR 1351
2416 Represent the unevaluated exception specification of an implicitly
2417 declared or deleted function with a simple placeholder, not a list
2418 of functions.
2419 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2420 * except.c (unevaluated_noexcept_spec): New.
2421 * class.c (deduce_noexcept_on_destructor): Use it.
2422 * decl.c (check_redeclaration_exception_specification): Call
2423 maybe_instantiate_noexcept.
2424 (duplicate_decls): Call it before merge_types.
2425 (start_preparsed_function): Call maybe_instantiate_noexcept.
2426 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2427 * init.c (get_nsdmi): Factor out of perform_member_init.
2428 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2429 (walk_field_subobs): Consider NSDMI for EH spec.
2430 (get_defaulted_eh_spec): New.
2431 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2432 (defaulted_late_check): Defer EH checking in non-template classes.
2433 (after_nsdmi_defaulted_late_checks): New.
2434 * parser.c (cp_parser_class_specifier_1): Use it.
2435 (unparsed_classes): New macro.
2436 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2437 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2438 Remove list-of-functions handling.
2439 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2440 handling and FN parameter.
2441 * typeck.c (merge_types): Adjust.
2442
2443 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2444
2445 PR c++/59120
2446 * parser.c (cp_parser_alias_declaration): Check return value of
2447 cp_parser_require.
2448
2449 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2450
2451 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2452 atomic-clause, allow comma in between atomic-clause and
2453 seq_cst.
2454
2455 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2456
2457 PR libstdc++/43622
2458 * rtti.c (emit_support_tinfos): Do not iterate on
2459 registered_builtin_types (partial revert).
2460
2461 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2462
2463 PR c++/57958
2464 * semantics.c (apply_deduced_return_type): Complete non-void type
2465 before estimating whether the type is aggregate.
2466
2467 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2468
2469 PR libstdc++/43622
2470 * rtti.c (emit_support_tinfo_1): New function, extracted from
2471 emit_support_tinfos.
2472 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2473
2474 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2475
2476 PR c/59073
2477 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2478 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2479
2480 2014-04-18 Jason Merrill <jason@redhat.com>
2481
2482 DR 1571
2483 * call.c (reference_binding): Recurse on user-defined conversion.
2484
2485 PR c++/60872
2486 * call.c (standard_conversion): Don't try to apply restrict to void.
2487
2488 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2489
2490 * decl.c (reshape_init_r): Handle a single element of vector type.
2491
2492 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2493
2494 PR c++/60765
2495 * decl2.c (cplus_decl_attributes): Handle
2496 pointer-to-member-function declarations.
2497
2498 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2499
2500 PR c++/60764
2501 * call.c (build_user_type_coversion): Use build_dummy_object
2502 to create the placeholder object for a constructor method call.
2503 (build_special_member_call): Likewise.
2504 (build_over_call): Check for the placeholder object with
2505 is_dummy_object.
2506 (build_new_method_call_1): Likewise. Don't attempt to resolve
2507 a dummy object for a constructor method call.
2508
2509 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2510
2511 PR c++/59295
2512 * friend.c (add_friend, make_friend_class): Move repeated friend
2513 warning under Wredundant_decls.
2514
2515 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2516
2517 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2518 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2519 (do_class_using_decl): Likewise.
2520 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2521
2522 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2523
2524 PR plugins/59335
2525 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2526
2527 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2528
2529 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2530
2531 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2532
2533 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2534
2535 2014-04-11 Jason Merrill <jason@redhat.com>
2536
2537 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2538 * parser.c: Adjust.
2539 (cp_lexer_get_preprocessor_token): Always clear it.
2540 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2541
2542 DR 1467
2543 PR c++/51747
2544 * decl.c (reshape_init_r): Handle a single element of class type.
2545
2546 DR 1338
2547 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2548 built-in operator new.
2549
2550 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2551
2552 PR c++/58600
2553 * name-lookup.c (parse_using_directive): Return early if the
2554 attribs argument is error_mark_node; use get_attribute_name.
2555
2556 2014-04-11 Jason Merrill <jason@redhat.com>
2557
2558 DR 1030
2559 PR c++/51253
2560 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2561 * call.c (struct z_candidate): Add flags field.
2562 (add_candidate): Add flags parm.
2563 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2564 (add_template_candidate_real): Pass it.
2565 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2566 * tree.c (build_aggr_init_expr): Copy it.
2567 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2568
2569 2014-04-10 Richard Biener <rguenther@suse.de>
2570 Jakub Jelinek <jakub@redhat.com>
2571
2572 PR ipa/60761
2573 * error.c (dump_decl) <case FUNCTION_DECL>: If
2574 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2575 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2576 <built-in>.
2577
2578 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2579
2580 * pt.c (check_template_variable): Check for the return of pedwarn
2581 before emitting a note.
2582 * parser.c (cp_parser_lambda_introducer): Likewise.
2583
2584 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2585
2586 PR c++/59115
2587 * pt.c (process_template_parm): For an invalid non-type parameter
2588 only set TREE_TYPE to error_mark_node.
2589 (push_inline_template_parms_recursive, comp_template_parms,
2590 redeclare_class_template, coerce_template_template_parm,
2591 coerce_template_template_parms, unify): Use error_operand_p.
2592
2593 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2594
2595 * class.c (check_bases_and_members): Warn about non-virtual dtors
2596 in public bases only. Check warn_ecpp before complaining about
2597 non-polymorphic bases.
2598
2599 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2600
2601 * decl.c (duplicate_decls): Check for the return of warning_at
2602 before emitting a note.
2603 (warn_misplaced_attr_for_class_type): Likewise.
2604 (check_tag_decl): Likewise.
2605
2606 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2607
2608 PR c++/58207
2609 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2610
2611 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2612
2613 PR c++/44613
2614 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2615 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2616 instantiating a variable-sized type.
2617
2618 PR c++/21113
2619 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2620
2621 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2622
2623 * class.c (find_abi_tags_r): Check for the return of warning
2624 before emitting a note.
2625 (one_inherited_ctor): Likewise.
2626
2627 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2628
2629 * decl.c (duplicate_decls): Check for the return of permerror
2630 before emitting a note.
2631
2632 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2633
2634 * class.c (accessible_nvdtor_p): New.
2635 (check_bases): Don't check base destructor here ...
2636 (check_bases_and_members): ... check them here. Trigger on
2637 Wnon-virtual-dtor flag.
2638 (finish_struct_1): Use accessible_nvdtor_p.
2639
2640 2014-04-01 Jason Merrill <jason@redhat.com>
2641
2642 * pt.c (process_partial_specialization): Say "not deducible"
2643 rather than "not used". Use inform.
2644
2645 PR c++/60374
2646 * pt.c (coerce_template_parms): Check that the pack expansion
2647 pattern works with the first matching parameter.
2648
2649 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2650
2651 * init.c (perform_member_init): Homogenize uninitialized
2652 diagnostics.
2653
2654 2014-04-01 Jason Merrill <jason@redhat.com>
2655
2656 PR c++/60708
2657 * call.c (build_array_conv): Call complete_type.
2658
2659 PR c++/60713
2660 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2661 (picflag_from_initializer): Return it.
2662 (process_init_constructor): Handle it.
2663
2664 PR c++/60642
2665 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2666 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2667 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2668 (most_general_template): Handle more kinds of template.
2669 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2670 instantiations and specializations.
2671
2672 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2673
2674 PR c++/44859
2675 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2676 COMPONENT_REFs and ARRAY_REFs sooner.
2677
2678 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2679
2680 PR c++/60626
2681 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2682 usage in non-functions with pushed scope.
2683
2684 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2685
2686 PR c++/60573
2687 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2688 to indicate whether a scope is in the process of defining a class.
2689 * semantics.c (begin_class_definition): Set defining_class_p.
2690 * name-lookup.c (leave_scope): Reset defining_class_p.
2691 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2692 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2693 unwinding to class-defining scope to handle the erroneous definition of
2694 a generic function of an arbitrarily nested class within an enclosing
2695 class.
2696
2697 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2698
2699 PR c++/52369
2700 * method.c (walk_field_subobs): Improve the diagnostic
2701 locations for both REFERENCE_TYPEs and non-static const members.
2702 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2703 instead of %qD to be consistent with the c++11 diagnostic.
2704
2705 2014-03-25 Jason Merrill <jason@redhat.com>
2706
2707 PR c++/60566
2708 PR c++/58678
2709 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2710 * search.c (get_pure_virtuals): Not here.
2711
2712 PR c++/60375
2713 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2714 a lambda in unevaluated context.
2715
2716 PR c++/60628
2717 * decl.c (create_array_type_for_decl): Complain about array of auto.
2718
2719 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2720
2721 PR c++/60331
2722 * semantics.c (potential_constant_expression_1): Handle
2723 DECL_EXPR.
2724
2725 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2726
2727 PR c++/60627
2728 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2729 introducing an implicit function template parameter within an explicit
2730 instantiation.
2731
2732 2014-03-22 Jason Merrill <jason@redhat.com>
2733
2734 PR c++/60574
2735 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2736 to error.
2737
2738 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2739
2740 PR c++/60384
2741 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2742 on the name argument.
2743
2744 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c++/60572
2747 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2748 type.
2749
2750 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2751
2752 PR c++/51474
2753 * call.c (build_new_method_call_1): Handle pure virtuals called by
2754 NSDMIs too.
2755
2756 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2757
2758 PR c++/60390
2759 * parser.c (cp_parser_member_declaration): Don't allow
2760 finish_fully_implicit_template to consider friend declarations to be
2761 class member templates.
2762 (synthesize_implicit_template_parm): Handling winding back through class
2763 scope to the class being defined in order to inject a template argument
2764 list.
2765
2766 PR c++/60391
2767 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2768 function scope as per cp_parser_skip_to_end_of_statement.
2769
2770 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2771
2772 PR c++/59571
2773 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2774
2775 2014-03-14 Jason Merrill <jason@redhat.com>
2776
2777 PR c++/60532
2778 PR c++/58678
2779 * search.c (get_pure_virtuals): Handle abstract dtor here.
2780 (dfs_get_pure_virtuals): Not here.
2781
2782 PR c++/58678
2783 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2784 abstract class as pure.
2785
2786 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2787
2788 PR c++/60383
2789 * pt.c (maybe_process_partial_specialization): Check return value
2790 of check_specialization_namespace.
2791
2792 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2793
2794 PR c++/60254
2795 * semantics.c (finish_static_assert): Call cxx_constant_value only
2796 if require_potential_rvalue_constant_expression returns true.
2797
2798 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2799
2800 PR c++/60389
2801 * method.c (get_inherited_ctor): New.
2802 * cp-tree.h (get_inherited_ctor): Declare it.
2803 * semantics.c (is_valid_constexpr_fn): Use it.
2804
2805 2014-03-10 Jason Merrill <jason@redhat.com>
2806
2807 PR c++/60367
2808 * call.c (convert_default_arg): Remove special handling for
2809 CONSTRUCTOR.
2810
2811 PR c++/53492
2812 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2813 when deciding whether to call push_template_decl for a member class.
2814 * pt.c (push_template_decl_real): Return after wrong levels error.
2815
2816 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2817
2818 PR c++/60033
2819 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2820 lambda, remove the lambda's own template argument list prior to fetching
2821 the specialization.
2822
2823 PR c++/60393
2824 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2825 function template unwinding on error into a more general location, ...
2826 (cp_parser_skip_to_end_of_statement): ... here.
2827
2828 2014-03-07 Jason Merrill <jason@redhat.com>
2829
2830 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2831
2832 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2833 we're in a trailing return type.
2834
2835 * typeck.c (comp_template_parms_position): 'auto' and
2836 'decltype(auto)' are different from real template parms.
2837
2838 * parser.c (cp_parser_using_declaration): Consume the semicolon
2839 after bare parameter pack error.
2840
2841 * cp-tree.h (REF_PARENTHESIZED_P): New.
2842 * semantics.c (force_paren_expr): Set it.
2843 * pt.c (do_auto_deduction): Check it.
2844 (tsubst) [COMPONENT_REF]: Copy it.
2845 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2846
2847 * decl.c (create_array_type_for_decl): Only warn about invalid
2848 C++1y VLA if flag_iso or warn_vla>0.
2849 (grokdeclarator): Likewise.
2850 * pt.c (tsubst): Likewise.
2851 * semantics.c (finish_decltype_type): Likewise.
2852 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2853 (cp_build_addr_expr_1): Likewise.
2854 * init.c (build_new_1): Improve diagnostics.
2855
2856 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2857
2858 PR c++/58609
2859 * decl.c (check_initializer): Return NULL_TREE after error;
2860 consistently use inform.
2861
2862 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2863
2864 * decl.c (check_initializer): Remove dead code.
2865
2866 2014-03-06 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/60197
2869 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2870 of checking tree code.
2871
2872 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2873
2874 * parser.c (cp_lexer_set_source_position): New.
2875 (cp_parser_mem_initializer): Use it.
2876 (cp_parser_postfix_open_square_expression): Likewise.
2877 (cp_parser_parenthesized_expression_list): Likewise.
2878 (cp_parser_new_initializer): Likewise.
2879 (cp_parser_jump_statement): Likewise.
2880 (cp_parser_initializer): Likewise.
2881 (cp_parser_functional_cast): Likewise.
2882
2883 2014-03-05 Jason Merrill <jason@redhat.com>
2884
2885 PR c++/60409
2886 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2887 dependent expression.
2888
2889 PR c++/60361
2890 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2891 if re-parsing might succeed.
2892 * semantics.c (finish_id_expression): Use of a parameter outside
2893 the function body is a parse error.
2894
2895 * parser.c (cp_parser_mem_initializer): Set input_location
2896 properly for init-list warning.
2897 (cp_parser_postfix_open_square_expression): Likewise.
2898 (cp_parser_parenthesized_expression_list): Likewise.
2899 (cp_parser_new_initializer): Likewise.
2900 (cp_parser_jump_statement): Likewise.
2901 (cp_parser_initializer): Likewise.
2902 (cp_parser_functional_cast): Likewise.
2903
2904 2014-03-04 Jason Merrill <jason@redhat.com>
2905
2906 PR c++/60417
2907 * typeck2.c (process_init_constructor_record): Set
2908 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2909
2910 PR c++/60415
2911 PR c++/54359
2912 * parser.c (cp_parser_direct_declarator): Set declarator to
2913 cp_error_declarator on invalid qualified-id.
2914
2915 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2916
2917 PR c++/60376
2918 * parser.c (cp_parser_using_declaration): Early return when
2919 cp_parser_nested_name_specifier errors out.
2920
2921 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2922
2923 PR c++/60377
2924 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2925 function scope on parse error in function parameter list.
2926
2927 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2928
2929 * method.c (implicitly_declare_fn): Remove redundant
2930 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2931 * semantics.c (is_instantiation_of_constexpr): Likewise.
2932 * error.c (dump_function_decl): Likewise.
2933
2934 2014-03-01 Jason Merrill <jason@redhat.com>
2935
2936 PR c++/60379
2937 * semantics.c (begin_maybe_infinite_loop): Use
2938 fold_non_dependent_expr_sfinae.
2939
2940 2014-02-28 Jason Merrill <jason@redhat.com>
2941
2942 PR c++/58845
2943 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2944
2945 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2946
2947 PR c++/58610
2948 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2949 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2950 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2951
2952 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2953
2954 PR c++/60253
2955 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2956 error_at.
2957
2958 2014-02-27 Jason Merrill <jason@redhat.com>
2959
2960 PR c++/60353
2961 PR c++/55877
2962 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2963 are not yet defined.
2964
2965 2014-02-26 Jason Merrill <jason@redhat.com>
2966
2967 PR c++/60347
2968 PR lto/53808
2969 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2970 * init.c (build_vtbl_address): Do it here.
2971
2972 PR c++/59231
2973 PR c++/11586
2974 PR c++/14710
2975 PR c++/57132
2976 * pt.c (struct warning_sentinel): New.
2977 (tsubst_copy_and_build): Use it instead of
2978 c_inhibit_evaluation_warnings.
2979 * typeck.c (maybe_warn_about_useless_cast): Remove
2980 c_inhibit_evaluation_warnings check.
2981
2982 PR c++/54440
2983 * pt.c (get_template_parm_index): New.
2984 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2985 (process_template_parm): Allow bare packs in template template
2986 parm template parms.
2987 (coerce_template_parameter_pack): Handle fixed template template
2988 parm packs and fixed packs not at the end of the parm list.
2989 (coerce_template_parms): Handle template parm packs not at the end
2990 of the parm list.
2991 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2992
2993 PR c++/60182
2994 * pt.c (unify): Ignore alias templates when deducing a template
2995 template parameter.
2996
2997 PR c++/60345
2998 Revert:
2999 DR 1571
3000 * call.c (reference_binding): Recurse on user-defined conversion.
3001 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3002
3003 2014-02-25 Jason Merrill <jason@redhat.com>
3004
3005 DR 1571
3006 * call.c (reference_binding): Recurse on user-defined conversion.
3007 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3008
3009 * call.c (print_conversion_rejection): Handle n_arg of -2.
3010 (build_user_type_conversion_1): Pass it.
3011
3012 PR c++/55877
3013 * decl2.c (no_linkage_error): Handle C++98 semantics.
3014 (reset_type_linkage): Move from decl.c.
3015 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3016 (bt_reset_linkage_2, reset_decl_linkage): New.
3017 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3018 (cp_write_global_declarations): Move condition into no_linkage_error.
3019 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3020 * semantics.c (expand_or_defer_fn_1): Factor out
3021 tentative_decl_linkage.
3022 * cp-tree.h: Adjust.
3023
3024 * decl2.c (finish_static_data_member_decl): Diagnose static data
3025 member in unnamed class.
3026 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3027
3028 PR lto/53808
3029 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3030 defaulted virtual dtor.
3031
3032 DR 1286
3033 PR c++/60328
3034 * pt.c (get_underlying_template): Fix equivalence calculation.
3035
3036 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3037
3038 PR c++/60311
3039 * parser.c (function_being_declared_is_template_p): Return false when
3040 processing a template parameter list.
3041 (cp_parser_parameter_declaration_clause): Don't set
3042 auto_is_implicit_function_template_parm_p when processing a
3043 template parameter list.
3044
3045 * parser.c (synthesize_implicit_template_parm): Inject new template
3046 argument list appropriately when a generic member function
3047 of a class template is declared out-of-line.
3048
3049 PR c++/60065
3050 * parser.c (cp_parser_direct_declarator): Don't save and
3051 restore num_template_parameter_lists around call to
3052 cp_parser_parameter_declaration_list.
3053 (function_being_declared_is_template_p): New predicate.
3054 (cp_parser_parameter_declaration_list): Use
3055 function_being_declared_is_template_p as predicate for
3056 inspecting current function template parameter list length
3057 rather than num_template_parameter_lists.
3058
3059 2014-02-24 Jason Merrill <jason@redhat.com>
3060
3061 PR c++/60146
3062 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3063 DECL_EXPR initialize a non-class iterator.
3064
3065 PR c++/60312
3066 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3067
3068 2014-02-21 Jason Merrill <jason@redhat.com>
3069
3070 PR c++/58170
3071 * parser.c (cp_parser_type_name): Always check dependency.
3072 (cp_parser_type_specifier_seq): Call
3073 cp_parser_parse_and_diagnose_invalid_type_name.
3074
3075 PR c++/60108
3076 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3077
3078 PR c++/60185
3079 * parser.c (cp_parser_default_argument): Clear
3080 current_class_ptr/current_class_ref like tsubst_default_argument.
3081
3082 PR c++/60252
3083 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3084 than current_binding_level.
3085
3086 PR c++/60186
3087 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3088
3089 PR c++/60187
3090 * parser.c (cp_parser_enum_specifier): Call
3091 check_for_bare_parameter_packs.
3092
3093 PR c++/59347
3094 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3095 erroneous typedef.
3096
3097 PR c++/60241
3098 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3099 of the partial instantiation, not the most general template.
3100 (maybe_process_partial_specialization): Reassign everything on
3101 that list.
3102
3103 PR c++/60216
3104 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3105 (check_explicit_specialization): Don't clone.
3106
3107 PR c++/60219
3108 * pt.c (coerce_template_parms): Bail if argument packing fails.
3109
3110 PR c++/60224
3111 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3112 Don't get confused by a CONSTRUCTOR that already has a type.
3113
3114 PR c++/60227
3115 * call.c (build_array_conv): Don't crash on VLA.
3116
3117 PR c++/60248
3118 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3119
3120 PR c++/60252
3121 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3122 in declaration context.
3123
3124 DR 1591
3125 PR c++/60051
3126 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3127
3128 PR c++/60250
3129 * parser.c (cp_parser_direct_declarator): Don't wrap a
3130 type-dependent expression in a NOP_EXPR.
3131
3132 PR c++/60251
3133 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3134
3135 PR c++/60167
3136 PR c++/60222
3137 PR c++/58606
3138 * parser.c (cp_parser_template_argument): Restore dereference.
3139 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3140 (process_partial_specialization): Handle deref.
3141 (unify): Likewise.
3142
3143 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3144
3145 PR c++/60052
3146 PR c++/60053
3147 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3148 implicit_template_scope upon leaving an out-of-line generic member
3149 function definition.
3150
3151 2014-02-20 Kai Tietz <ktietz@redhat.com>
3152
3153 PR c++/58873
3154 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3155 valued type argument as error_mark_node.
3156
3157 PR c++/58835
3158 * semantics.c (finish_fname): Handle error_mark_node.
3159
3160 2014-02-19 Jason Merrill <jason@redhat.com>
3161
3162 PR c++/60046
3163 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3164 spec from template context.
3165
3166 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR debug/56563
3169 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3170 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3171
3172 PR c++/60267
3173 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3174
3175 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3176
3177 PR c++/60225
3178 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3179 strip_array_types.
3180
3181 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3182
3183 PR c++/60215
3184 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3185 During error recovery allow_non_constant may be false.
3186
3187 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3188
3189 PR c++/60190
3190 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3191 scope whenever a template parameter list has been started, independent
3192 of whether the function call operator was well-formed or not.
3193
3194 PR c++/60064
3195 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3196 scope for generic friend declarations as well as for non-friends.
3197
3198 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3199
3200 PR c++/60047
3201 * method.c (implicitly_declare_fn): A constructor of a class with
3202 virtual base classes isn't constexpr (7.1.5p4).
3203
3204 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3205
3206 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3207
3208 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3209
3210 PR c++/58703
3211 * parser.c (cp_parser_omp_declare_reduction): Save and free
3212 declarator_obstack.
3213
3214 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3215
3216 PR c++/53017
3217 PR c++/59211
3218 * tree.c (handle_init_priority_attribute): Call default_conversion on
3219 the attribute argument.
3220
3221 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3222
3223 PR c++/58871
3224 * method.c (synthesized_method_walk): If vbases is non-null but
3225 is_empty is true, likewise don't worry about the virtual bases.
3226
3227 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3228
3229 PR c++/51219
3230 * typeck2.c (process_init_constructor_record): Just skip unnamed
3231 bit-fields.
3232
3233 2014-01-31 Jason Merrill <jason@redhat.com>
3234
3235 PR c++/59469
3236 * pt.c (mark_decl_instantiated): Call mark_needed.
3237
3238 PR c++/58672
3239 * decl2.c (handle_tls_init): Handle null init fn.
3240
3241 PR c++/55800
3242 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3243
3244 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3245
3246 PR c++/59082
3247 * class.c (build_vfield_ref): Early return error_mark_node if
3248 TYPE_VFIELD (type) is null.
3249 (build_base_path): Check return value of build_vfield_ref.
3250
3251 2014-01-31 Jason Merrill <jason@redhat.com>
3252
3253 PR c++/59646
3254 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3255 [ck_list]: Check for error_mark_node.
3256 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3257
3258 PR c++/57043
3259 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3260 during partial ordering.
3261
3262 2014-01-31 Marek Polacek <polacek@redhat.com>
3263
3264 PR c/59963
3265 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3266
3267 2014-01-30 Jason Merrill <jason@redhat.com>
3268
3269 PR c++/57899
3270 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3271 (local_specializations): New macro.
3272 * pt.c (local_specializations): Remove variable.
3273
3274 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3275
3276 PR c++/58708
3277 * parser.c (make_string_pack): Use double_int::from_buffer.
3278
3279 2014-01-30 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/59940
3282 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3283 input_location.
3284 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3285 with input_location.
3286 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3287 loc parameter.
3288
3289 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3290
3291 PR c++/58843
3292 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3293
3294 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3295
3296 PR c++/58649
3297 * pt.c (lookup_template_class_1): Check start_enum return value
3298 for error_mark_node.
3299
3300 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3301
3302 * decl.c (duplicate_decls, typename_hash, typename_compare):
3303 Use TYPE_IDENTIFIER.
3304 * error.c (dump_type): Likewise.
3305 * mangle.c (dump_substitution_candidates): Likewise.
3306
3307 2014-01-30 Jason Merrill <jason@redhat.com>
3308
3309 PR c++/59633
3310 * decl2.c (attributes_naming_typedef_ok): New.
3311 * cp-tree.h: Declare it.
3312 * decl.c (grokdeclarator): Check it.
3313 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3314
3315 2014-01-29 Jason Merrill <jason@redhat.com>
3316
3317 PR c++/59707
3318 * call.c (add_builtin_candidate): Catch dependent types.
3319
3320 PR c++/59989
3321 * pt.c (expand_template_argument_pack): Correct
3322 non_default_args_count calculation.
3323
3324 PR c++/58466
3325 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3326
3327 PR c++/59956
3328 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3329 have a friend template in a class template.
3330 * pt.c (tsubst_friend_function): Look through it.
3331 (push_template_decl_real): A friend member template is
3332 primary.
3333
3334 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3335
3336 PR c++/58846
3337 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3338 == error_mark_node.
3339
3340 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3341
3342 PR c++/58674
3343 * pt.c (instantiate_template_1): Check for error_mark_node the second
3344 argument too.
3345
3346 2014-01-29 Jason Merrill <jason@redhat.com>
3347
3348 PR c++/59916
3349 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3350 cdtor_returns_this case.
3351
3352 PR c++/59315
3353 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3354
3355 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3356
3357 PR c++/58702
3358 * semantics.c (finish_omp_reduction_clause): Check type for
3359 error_mark_node.
3360
3361 2014-01-28 Jason Merrill <jason@redhat.com>
3362
3363 PR c++/59791
3364 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3365 (tsubst_copy): Use it if lookup fails.
3366
3367 PR c++/59818
3368 * pt.c (tsubst_function_type): Make sure we keep the same function
3369 quals.
3370
3371 PR c++/58701
3372 * semantics.c (build_anon_member_initialization): Stop walking
3373 when we run out of COMPONENT_REFs.
3374
3375 PR c++/58632
3376 * decl.c (lookup_and_check_tag): Ignore template parameters if
3377 scope == ts_current.
3378 * pt.c (check_template_shadow): Don't complain about the injected
3379 class name.
3380
3381 * decl.c (duplicate_decls): Tweak.
3382
3383 PR c++/53756
3384 * mangle.c (write_unqualified_name): Handle operator auto.
3385
3386 2014-01-27 Jason Merrill <jason@redhat.com>
3387
3388 PR c++/59823
3389 Core DR 1138
3390 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3391 list-initialization. A conversion to rvalue ref that involves
3392 an lvalue-rvalue conversion is bad.
3393 (convert_like_real): Give helpful error message.
3394
3395 PR c++/54652
3396 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3397
3398 PR c++/58504
3399 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3400 types.
3401
3402 PR c++/58606
3403 * pt.c (template_parm_to_arg): Call convert_from_reference.
3404 (tsubst_template_arg): Don't strip reference refs.
3405
3406 PR c++/58639
3407 * call.c (build_aggr_conv): Reject value-initialization of reference.
3408
3409 PR c++/58812
3410 PR c++/58651
3411 * call.c (convert_like_real): Give helpful error about excess braces
3412 for ck_rvalue of scalar type.
3413
3414 Core DR 1288
3415 * call.c (reference_binding): Only elide braces if the single
3416 element is reference-related.
3417
3418 PR c++/58814
3419 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3420 stabilizing.
3421
3422 PR c++/58837
3423 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3424 FUNCTION_DECL.
3425
3426 PR c++/59097
3427 * decl.c (compute_array_index_type): Don't call
3428 maybe_constant_value for a non-integral expression.
3429
3430 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3431
3432 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3433 flag_cilkplus.
3434 * cp-gimplify.c (cp_genericize): Likewise.
3435 * decl.c (grokfndecl): Likewise.
3436 * parser.c (cp_parser_postfix_expression): Likewise.
3437 (cp_parser_postfix_open_square_expression): Likewise.
3438 (cp_parser_direct_declarator): Likewise.
3439 (is_cilkplus_vector_p): Likewise.
3440 (cp_parser_omp_clause_name): Likewise.
3441 (cp_parser_omp_all_clauses): Likewise.
3442 * pt.c (apply_late_template_attributes): Likewise.
3443 * typeck.c (cp_build_array_ref): Likewise.
3444 (cp_build_compound_expr): Likewise.
3445 (check_return_expr): Likewise.
3446
3447 2014-01-24 Jason Merrill <jason@redhat.com>
3448
3449 PR c++/58550
3450 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3451 c++11 into error.
3452
3453 PR c++/59886
3454 PR c++/59659
3455 * typeck2.c (process_init_constructor_array): Don't create
3456 RANGE_EXPR yet.
3457
3458 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3459
3460 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3461 handling for RANGE_ARRAY case.
3462
3463 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3464
3465 PR c++/57524
3466 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3467
3468 2014-01-23 Marek Polacek <polacek@redhat.com>
3469
3470 PR c/59846
3471 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3472
3473 2014-01-23 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/58346
3476 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3477 an empty aggregate.
3478
3479 2014-01-23 Jason Merrill <jason@redhat.com>
3480
3481 PR c++/55189
3482 * cp-tree.h (struct language_function): Add infinite_loop and
3483 infinite_loops.
3484 (current_function_infinite_loop): New.
3485 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3486 (break_maybe_infinite_loop): New.
3487 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3488 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3489 (begin_range_for_stmt): Use them.
3490 * decl.c (finish_function): Don't warn about missing return
3491 if current_function_infinite_loop.
3492 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3493 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3494
3495 * call.c (build_op_delete_call): Use make_tree_vector and
3496 release_tree_vector.
3497
3498 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3499
3500 PR c++/58980
3501 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3502 nested_name_specifier.
3503
3504 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3505
3506 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3507 see if there is an attribute after function decl. If so, then
3508 parse them now.
3509 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3510 enabled function late parsing.
3511 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3512 attribute for a SIMD-enabled function.
3513 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3514 the function is used by SIMD-enabled function (indicated by NULL
3515 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3516 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3517 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3518 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3519 vectorlength clause. Added a new bool parameter to differentiate
3520 between the two.
3521 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3522 (is_cilkplus_vector_p): Likewise.
3523 (cp_parser_late_parsing_elem_fn_info): Likewise.
3524 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3525 and "vectorlength" clauses when Cilk Plus is enabled.
3526 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3527 and emit a sorry message when step size is a parameter.
3528 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3529 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3530 flag_openmp.
3531 * pt.c (apply_late_template_attributes): Likewise.
3532
3533 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR middle-end/58809
3536 * semantics.c (finish_omp_reduction_clause): Reject
3537 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3538
3539 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3540
3541 PR c++/59482
3542 * parser.c (cp_parser_class_head): Push the class before parsing
3543 the base-clause, pop after it.
3544
3545 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3546
3547 * decl2.c (cpp_check): Revert prototype change.
3548
3549 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3550
3551 PR c++/59270
3552 PR c++/58811
3553 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3554 build_value_init.
3555
3556 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3557
3558 PR c++/59269
3559 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3560 only when errorcount == 0.
3561
3562 2014-01-17 Marek Polacek <polacek@redhat.com>
3563
3564 PR c++/59838
3565 * cvt.c (ocp_convert): Don't segfault on non-existing
3566 ENUM_UNDERLYING_TYPE.
3567
3568 2014-01-16 Jason Merrill <jason@redhat.com>
3569
3570 PR c++/59821
3571 * tree.c (bot_manip): Update the location of builtin_LINE and
3572 builtin_FILE calls.
3573
3574 2014-01-14 Jason Merrill <jason@redhat.com>
3575
3576 PR c++/59659
3577 * typeck2.c (massage_init_elt): New.
3578 (process_init_constructor_record)
3579 (process_init_constructor_union): Use it.
3580 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3581 (split_nonconstant_init_1): Handle it.
3582 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3583
3584 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3585
3586 PR c++/59631
3587 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3588 and replaced an existing if-statement with else-if statement.
3589 Changed an existing error message wording to match the one from the C
3590 parser.
3591
3592 2014-01-08 Jason Merrill <jason@redhat.com>
3593
3594 PR c++/59614
3595 * class.c (abi_tag_data): Add tags field.
3596 (check_abi_tags): Initialize it.
3597 (find_abi_tags_r): Support collecting missing tags.
3598 (mark_type_abi_tags): Don't look at template args.
3599 (inherit_targ_abi_tags): New.
3600 (check_bases_and_members): Use it.
3601 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3602 * mangle.c (write_abi_tags): Check it.
3603
3604 2014-01-07 Jason Merrill <jason@redhat.com>
3605
3606 PR c++/58856
3607 * pt.c (num_innermost_template_parms): New.
3608 (get_underlying_template): Use it.
3609
3610 PR c++/58965
3611 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3612
3613 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3614
3615 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3616 the letter of 20.11.6 about Base and Derived naming the same
3617 class type modulo cv-qualifiers.
3618
3619 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3620
3621 PR c++/59635
3622 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3623 function as unimplemented for generic lambdas with varargs.
3624
3625 PR c++/59636
3626 * parser.c (cp_parser_template_parameter): Early out with
3627 error_mark_node if parameter declaration was not parsed.
3628
3629 PR c++/59629
3630 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3631 auto_is_implicit_function_template_parm_p around lambda body.
3632
3633 PR c++/59638
3634 * parser.c (cp_parser_init_declarator): Undo fully implicit
3635 template parameter list when declarator is not a function.
3636
3637 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3638
3639 PR c++/58950
3640 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3641
3642 2014-01-03 Tobias Burnus <burnus@net-b.de>
3643
3644 PR c++/58567
3645 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3646
3647 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3648
3649 Core DR 1442
3650 PR c++/59165
3651 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3652 as include_std to perform_koenig_lookup.
3653 (cp_parser_postfix_expression): Adjust.
3654 * pt.c (tsubst_copy_and_build): Likewise.
3655 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3656 (omp_reduction_lookup): Adjust.
3657 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3658 (lookup_arg_dependent): Likewise.
3659 (lookup_function_nonclass): Adjust.
3660 * name-lookup.h: Adjust declaration.
3661 * cp-tree.h: Likewise.
3662
3663 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3664
3665 PR c++/59087
3666 * parser.c (cp_parser_userdef_numeric_literal): Mention
3667 -fext-numeric-literals in the message.
3668
3669 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3670
3671 PR c++/59641
3672 * call.c (build_conditional_expr_1): Check the return value of
3673 force_rvalue.
3674
3675 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3676
3677 * call.c (convert_like_real): Check complain.
3678
3679 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3680
3681 PR c++/59378
3682 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3683 in templates.
3684
3685 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3686
3687 Update copyright years
3688
3689 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3690
3691 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3692 the standard form for the copyright notice.
3693 \f
3694 Copyright (C) 2014 Free Software Foundation, Inc.
3695
3696 Copying and distribution of this file, with or without modification,
3697 are permitted in any medium without royalty provided the copyright
3698 notice and this notice are preserved.