47621ca0e868e0f93ae0b1b4a4843480d27a6c16
[gcc.git] / gcc / cp / ChangeLog
1 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
2
3 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
4 return type to bool; in C++11 for constants give errors, not pedwarns.
5 * cp-tree.h (check_narrowing): Adjust declaration.
6 * call.c (convert_like_real): Update calls.
7 * semantics.c (finish_compound_literal): Likewise.
8
9 2014-08-08 Jason Merrill <jason@redhat.com>
10
11 * pt.c (lookup_template_class_1): Copy abi_tag.
12
13 2014-08-08 Kai Tietz <ktietz@redhat.com>
14
15 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
16 that we operate on a true inline.
17
18 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
19
20 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
21 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
22
23 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
24
25 PR c++/51312
26 * decl.c (build_enumerator): Handle class types with conversion
27 operators via perform_implicit_conversion_flags and
28 build_expr_type_conversion.
29
30 * cvt.c (build_expr_type_conversion): Replace pair of errors
31 with error + inform.
32
33 2014-08-07 Jason Merrill <jason@redhat.com>
34
35 PR c++/62043
36 * parser.c (c_parse_file): Change sorry to fatal_error.
37
38 PR c++/61959
39 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
40
41 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
42
43 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
44
45 2014-08-06 Jason Merrill <jason@redhat.com>
46
47 * init.c (build_vec_init): Fix constant initialization of
48 trailing elements.
49 (build_value_init_noctor): Call maybe_constant_init.
50 * semantics.c (maybe_constant_init): See through EXPR_STMT and
51 conversion to void.
52
53 PR c++/60417
54 * init.c (build_vec_init): Reorganize earlier change a bit.
55
56 PR c++/61994
57 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
58 if we're just returning an INIT_EXPR.
59
60 2014-08-06 Jason Merrill <jason@redhat.com>
61 Braden Obrzut <admin@maniacsvault.net>
62
63 * pt.c (check_explicit_specialization): Don't test
64 DECL_DECLARED_INLINE_P for a variable template.
65
66 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
67
68 PR c++/43906
69 * typeck.c (cp_build_binary_op): Extend to more cases the
70 -Waddress warning.
71
72 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
73
74 Implement constexpr variable templates
75 * decl.c (grokvardecl): Handle specializations of variable templates.
76 (grokdeclarator): Handle variable template id expressions and NULL_TREE
77 return from grokvardecl.
78 * decl2.c (check_member_template): Allow declaration of template member
79 variables.
80 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
81 variable templates.
82 * pt.c (check_template_variable): Accept variable temploids at
83 non-class scope.
84 (push_template_decl_real): The current instantiation of a template
85 can be a VAR_DECL.
86 (determine_specialization): Accept variable templates.
87 (check_explicit_specialization): Handle and check for malformed
88 variable template specializations.
89 (lookup_template_variable): New.
90 (tsubst_decl): Handle variable template specializations.
91 (do_decl_instantiation): Handle template variables.
92 (instantiate_decl): Handle template variables.
93 * semantics.c (finish_template_variable): New.
94 (finish_id_expression): Instantiate variable templates.
95 * cp-tree.h (variable_template_p): New.
96
97 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
98
99 PR c++/15339
100 * decl.c (check_redeclaration_no_default_args): New.
101 (duplicate_decls): Use it, handle default arguments
102 in redeclarations of function templates.
103
104 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
105
106 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
107
108 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
109
110 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
111 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
112 instead of pointer_set.
113
114 2014-08-01 Jason Merrill <jason@redhat.com>
115
116 PR c++/60417
117 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
118 init-list for trailing elements.
119 * typeck2.c (process_init_constructor_array): Likewise.
120
121 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
122
123 DR 217 again
124 * decl.c (duplicate_decls): Handle static member functions too.
125
126 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
127
128 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
129 in error output.
130
131 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
132
133 PR other/61963
134 * parser.c (cp_parser_array_notation): Added check for array_type.
135
136 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
137
138 PR middle-end/61455
139 * cp-array-notation.c (expand_array_notation_exprs): Handling of
140 DECL_EXPR improved. Changed handling for INIT_EXPR.
141
142 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
143
144 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
145
146 2014-08-01 Jakub Jelinek <jakub@redhat.com>
147
148 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
149 -fsanitize=alignment call ubsan_maybe_instrument_reference
150 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
151 for calls to member functions.
152
153 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
154
155 PR c++/60517
156 * typeck.c (maybe_warn_about_returning_address_of_local): Return
157 whether it is returning the address of a local variable.
158 (check_return_expr): Return 0 instead of the address of a local
159 variable.
160
161 2014-07-30 Jason Merrill <jason@redhat.com>
162
163 PR lto/53808
164 PR c++/61659
165 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
166
167 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
168
169 PR c++/57397
170 * pt.c (unify_arity): Add boolean parameter.
171 (unify_too_few_arguments): Likewise.
172 (type_unification_real): Diagnose correctly insufficient
173 arguments in the presence of trailing variadic parameters;
174 deducing multiple trailing packs as empty is fine.
175
176 2014-07-30 Jason Merrill <jason@redhat.com>
177
178 PR c++/61659
179 PR c++/61687
180 Revert:
181 * decl2.c (mark_all_virtuals): New variable.
182 (maybe_emit_vtables): Check it instead of flag_devirtualize.
183 (cp_write_global_declarations): Set it and give helpful diagnostic
184 if it introduces errors.
185 * class.c (finish_struct_1): Check it.
186
187 PR lto/53808
188 PR c++/61659
189 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
190 (check_explicit_specialization): Clear it on specializations.
191 * decl.c (duplicate_decls, start_decl): Likewise.
192 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
193 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
194 linkage after setting the appropriate flags.
195 * tree.c (decl_linkage): Don't check DECL_COMDAT.
196 * decl2.c (mark_needed): Mark clones.
197 (import_export_decl): Not here.
198
199 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
200
201 Implement N4051 - Allow typename in a template template parameter
202 * parser.c (cp_parser_type_parameter_key): New funtion;
203 (cp_parser_token_is_type_parameter_key): Ditto;
204 (cp_parser_type_parameter): Look for type-parameter-key for all versions
205 but pedwarn for less than cxx1z.
206
207 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
208
209 PR c++/50961
210 * call.c (standard_conversion): Use resolve_nondeduced_context
211 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
212
213 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
214
215 PR c++/61804
216 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
217 for '++' and '--'.
218
219 2014-07-15 Jason Merrill <jason@redhat.com>
220
221 PR c++/61811
222 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
223
224 PR c++/60848
225 PR c++/61723
226 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
227 * class.c (finish_struct): Reject invalid definition of
228 std::initializer_list.
229
230 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
231
232 * call.c (convert_like_real): Call print_z_candidate and inform only
233 if permerror returns true.
234
235 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
236
237 * class.c (build_clone): Do not clear assembler names of
238 templates.
239 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
240 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
241 as a special case return sizeof (struct tree_decl_non_common)
242 for other decls.
243 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
244 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
245 * cp/cp-tree.h (tree_template_decl): New structure.
246 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
247 (union cp_lang_tree_node): Add template_decl.
248 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
249
250 2014-07-14 Jason Merrill <jason@redhat.com>
251
252 PR c++/61445
253 PR c++/56947
254 * pt.c (instantiate_decl): Don't check defer_ok for local class
255 members.
256
257 2014-07-14 Jakub Jelinek <jakub@redhat.com>
258
259 PR middle-end/61294
260 * cp-tree.h (LITERAL_ZERO_P): Define.
261 * parser.c (cp_parser_parenthesized_expression_list): Add
262 want_literal_zero_p argument, if true, for literal zeros
263 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
264 (cp_parser_postfix_expression): Adjust
265 cp_parser_parenthesized_expression_list caller, handle
266 -Wmemset-transposed-args.
267 (literal_zeros): New variable.
268
269 2014-07-13 Jason Merrill <jason@redhat.com>
270
271 PR c++/58511
272 * semantics.c (is_instantiation_of_constexpr): Return true for
273 defaulted functions, too.
274 (explain_invalid_constexpr_fn): Only use
275 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
276 * method.c (explain_implicit_non_constexpr): Pass
277 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
278
279 PR c++/58611
280 * decl.c (check_initializer): Don't finish_compound_literal
281 on erroneous constexpr init.
282
283 PR c++/58612
284 * tree.c (bot_replace): Only replace a dummy 'this' parm.
285
286 PR c++/60628
287 * decl.c (create_array_type_for_decl): Only check for auto once.
288
289 PR c++/58636
290 * call.c (build_list_conv): Don't try to build a list of references.
291
292 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
293
294 PR C++/60209 - Declaration of user-defined literal operator cause error
295 * parser.c (cp_parser_operator): Fold treatment of strings
296 and user-defined string literals. Use the full string parser.
297 (cp_parser_string_literal): Add flag to not look for literal operator.
298
299 2014-07-11 Jason Merrill <jason@redhat.com>
300
301 PR c++/22434
302 PR c++/61288
303 * call.c (build_conditional_expr_1): Avoid reading freed memory.
304
305 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
306
307 PR c++/53159
308 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
309 into convflags.
310 * decl.c (check_initializer): Don't call check_narrowing here,
311 set LOOKUP_NO_NARROWING.
312 * typeck2.c (digest_init_r): Likewise.
313
314 2014-07-10 Jason Merrill <jason@redhat.com>
315
316 PR c++/61661
317 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
318
319 PR c++/61659
320 PR c++/61687
321 * decl2.c (mark_all_virtuals): New variable.
322 (maybe_emit_vtables): Check it instead of flag_devirtualize.
323 (cp_write_global_declarations): Set it and give helpful diagnostic
324 if it introduces errors.
325 * class.c (finish_struct_1): Check it.
326 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
327
328 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
329
330 PR c++/60686
331 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
332 outside class declaration, in friend declaration, and neither on
333 constructor nor conversion operator.
334
335 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
336
337 DR 1584
338 PR c++/57466
339 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
340 cv-qualifiers of function types.
341
342 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
343 Paolo Carlini <paolo.carlini@oracle.com>
344
345 PR c++/59361
346 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
347 CPP_ELLIPSIS too.
348
349 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
350
351 * class.c (check_for_override): Wrap the 'final' and 'override'
352 keywords in %< and %>.
353
354 2014-07-06 Marek Polacek <polacek@redhat.com>
355
356 PR c/6940
357 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
358 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
359 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
360 function parameter.
361
362 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
363
364 * pt.c (convert_template_argument): Use inform instead of error in
365 three places.
366
367 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
368
369 PR c++/58781
370 PR c++/60249
371 PR c++/59867
372 * parser.c (cp_parser_userdef_string_literal): Take a tree
373 not a cp_token*.
374 (cp_parser_string_literal): Don't hack the token stream.
375
376 2014-06-30 Jason Merrill <jason@redhat.com>
377
378 PR c++/61659
379 PR lto/53808
380 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
381 devirtualizing.
382 * init.c (build_vtbl_address): Don't mark destructor.
383 * class.c (finish_struct_1): Add all classes to keyed_classes
384 if devirtualizing.
385
386 PR c++/61647
387 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
388
389 PR c++/61566
390 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
391
392 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
393 TYPE_BINFO or TYPE_LANG_SPECIFIC.
394 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
395 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
396 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
397 * pt.c (unify): Also check whether the argument is a PMF.
398
399 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
400
401 PR c++/54891
402 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
403 a '[' can also start a primary-expression.
404 (cp_parser_cast_expression): Parse a cast-expression only tentatively
405 when cp_parser_tokens_start_cast_expression returns -1.
406
407 2014-06-30 Jason Merrill <jason@redhat.com>
408
409 PR c++/61539
410 * pt.c (unify_one_argument): Type/expression mismatch just causes
411 deduction failure.
412
413 * semantics.c (simplify_aggr_init_expr): Remove remnants of
414 2014-04-11 change.
415
416 2014-06-30 Marek Polacek <polacek@redhat.com>
417
418 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
419 function has no_sanitize_undefined attribute.
420 * decl.c (compute_array_index_type): Don't instrument VLAs if the
421 function has no_sanitize_undefined attribute.
422
423 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
424
425 PR middle-end/57541
426 * cp-array-notation.c (expand_sec_reduce_builtin):
427 Check that bultin argument is correct.
428 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
429
430 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
431
432 DR 1579
433 PR c++/58051
434 * typeck.c (check_return_expr): Lookup as an rvalue even when the
435 types aren't the same.
436
437 2014-06-27 Jason Merrill <jason@redhat.com>
438
439 PR c++/61433
440 * error.c (dump_template_bindings): Don't tsubst in a clone.
441
442 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
443
444 PR c++/61614
445 * semantics.c (finish_compound_literal): Revert r204228.
446
447 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
448
449 * parser.c (cp_parser_compound_literal_p): New.
450 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
451
452 2014-06-26 Jason Merrill <jason@redhat.com>
453
454 * parser.c (cp_parser_for_init_statement): Change range-for error
455 to pedwarn.
456
457 N3994 Ranged-based for-loops: The Next Generation
458 * parser.c (cp_lexer_nth_token_is): New.
459 (cp_parser_for_init_statement): Allow "for (id : init)".
460
461 2014-06-26 Teresa Johnson <tejohnson@google.com>
462
463 * class.c (dump_class_hierarchy): Use saved dump files.
464 (dump_vtable): Ditto.
465 (dump_vtt): Ditto.
466
467 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
468
469 PR c++/61537
470 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
471 parameter lists outside of function parameter scope.
472
473 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
474
475 DR 178
476 PR c++/49132
477 * typeck2.c (process_init_constructor_record): Do not complain about
478 uninitialized const members, because within aggregate-initialization,
479 members without explicit initializers are value-initialized.
480
481 2014-06-25 Jakub Jelinek <jakub@redhat.com>
482
483 * semantics.c (finish_omp_clauses): Make sure
484 OMP_CLAUSE_LINEAR_STEP has correct type.
485
486 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
487
488 * class.c (check_methods, create_vtable_ptr, determine_key_method,
489 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
490 FUNCTION_DECL check.
491 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
492 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
493 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
494 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
495
496 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
497
498 PR c++/33972
499 * decl.c (grokdeclarator): Do not early check for operator-function-id
500 as non-function.
501
502 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
503
504 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
505 Adjust.
506
507 2014-06-24 Jakub Jelinek <jakub@redhat.com>
508
509 * parser.c (cp_parser_omp_for_loop): For
510 #pragma omp parallel for simd move lastprivate clause from parallel
511 to for rather than simd.
512
513 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
514
515 DR 577
516 PR c++/33101
517 * decl.c (grokparms): Accept a single parameter of type 'void'.
518
519 2014-06-20 Jason Merrill <jason@redhat.com>
520
521 PR c++/59296
522 * call.c (add_function_candidate): Avoid special 'this' handling
523 if we have a ref-qualifier.
524
525 PR c++/61556
526 * call.c (build_over_call): Call build_this in template path.
527
528 2014-06-19 Jason Merrill <jason@redhat.com>
529
530 PR c++/59296
531 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
532
533 2014-06-18 Jason Merrill <jason@redhat.com>
534
535 PR c++/59296
536 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
537 ref-qualifier handling.
538
539 PR c++/61507
540 * pt.c (resolve_overloaded_unification): Preserve
541 ARGUMENT_PACK_EXPLICIT_ARGS.
542
543 2014-06-18 Jakub Jelinek <jakub@redhat.com>
544
545 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
546 argument.
547 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
548
549 2014-06-17 Jason Merrill <jason@redhat.com>
550
551 PR c++/60605
552 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
553
554 2014-06-15 Jason Merrill <jason@redhat.com>
555
556 PR c++/61488
557 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
558
559 PR c++/61500
560 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
561
562 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
563
564 * decl.c (grokvardecl): Fix pasto in previous patch.
565
566 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
567
568 * decl.c (duplicate_decls): Use set_decl_tls_model.
569 (grokdeclarator): Likewise.
570 * semantics.c (finish_id_expression): Check TLS only for
571 static variables.
572 (finish_omp_threadprivate): Use decl_default_tls_model.
573 * decl2.c (get_guard): Likewise.
574 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
575
576 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
577
578 PR c++/33101
579 * decl.c (grokparms): Improve error message about void parameters.
580 * error.c (type_to_string): Fix aka cut off code.
581
582 2014-06-12 Jason Merrill <jason@redhat.com>
583
584 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
585 * cvt.c (type_promotes_to): Likewise.
586 * mangle.c (write_type, write_expression): Likewise.
587 (write_name, write_template_arg): Likewise.
588 (mangle_decl): Make alias based on flag_abi_compat_version.
589 Emit -Wabi warning here.
590 (finish_mangling_internal): Not here. Drop warn parm.
591 (finish_mangling_get_identifier, finish_mangling): Adjust.
592 (mangle_type_string, mangle_special_for_type): Adjust.
593 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
594 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
595 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
596
597 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
598 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
599 (layout_nonempty_base_or_field, end_of_class): Likewise.
600 (layout_empty_base, build_base_field, layout_class_type): Likewise.
601 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
602 (layout_virtual_bases): Likewise.
603 * decl.c (compute_array_index_type): Likewise.
604 * mangle.c (write_mangled_name, write_prefix): Likewise.
605 (write_template_prefix, write_integer_cst, write_expression): Likewise.
606 (write_template_arg, write_array_type): Likewise.
607 * method.c (lazily_declare_fn): Likewise.
608 * rtti.c (get_pseudo_ti_index): Likewise.
609 * typeck.c (comp_array_types): Likewise.
610
611 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
612
613 * vtable-class-hierarchy.c: Update handling for section names
614 that are no longer trees.
615 * decl.c (duplicate_decls): Likewise.
616
617 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
618
619 PR c++/19200
620 * parser.c (cp_parser_init_declarator): Actually pass friend_p
621 to cp_parser_declarator.
622
623 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
624
625 PR c++/60265
626 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
627 * name-lookup.c (validate_nonmember_using_decl): Adjust error
628 message.
629
630 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
631
632 PR c++/19200
633 * parser.c (cp_parser_declarator): Add bool parameter.
634 (cp_parser_direct_declarator): Likewise, use it.
635 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
636 (cp_parser_condition, cp_parser_explicit_instantiation,
637 cp_parser_init_declarator, cp_parser_type_id_1,
638 cp_parser_parameter_declaration, cp_parser_exception_declaration,
639 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
640 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
641 Adjust.
642 * decl.c (grokdeclarator): Fix handling of friend declared in
643 namespace scope (g++.dg/parse/friend10.C).
644
645 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
646
647 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
648 ->implicit_section.
649 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
650 (maybe_clone_body): Move symbol across comdat groups.
651 * method.c (use_thunk): Copy implicit section flag.
652
653 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
654
655 PR c++/22556
656 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
657
658 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
659
660 * method.c (use_thunk): Use set_decl_section_name.
661 * optimize.c (maybe_clone_body): Use set_decl_section_name.
662 * decl.c (duplicate_decls): Likewise.
663 * vtable-class-hierarchy.c: Likewise.
664
665 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
666
667 PR c++/60184
668 * class.c (check_field_decls): In C++11 mode do not reject
669 static data members and reference-type members in unions.
670
671 2014-06-05 Jason Merrill <jason@redhat.com>
672
673 PR c++/43453
674 * decl.c (check_initializer): Collapse a TREE_LIST here.
675 * typeck2.c (store_init_value): Not here.
676
677 2014-06-05 Richard Biener <rguenther@suse.de>
678 Paolo Carlini <paolo.carlini@oracle.com>
679
680 PR c++/56961
681 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
682 handling of empty classes.
683
684 2014-06-04 Jason Merrill <jason@redhat.com>
685
686 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
687 for noexcept and thread_local, too.
688
689 PR c++/61343
690 * decl.c (check_initializer): Maybe clear
691 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
692
693 2014-06-05 Richard Biener <rguenther@suse.de>
694
695 PR c++/61004
696 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
697 warnings for accessing empty classes.
698
699 2014-06-05 Marek Polacek <polacek@redhat.com>
700
701 PR c/49706
702 * parser.c (cp_parser_binary_expression): Warn when logical not is
703 used on the left hand side operand of a comparison.
704
705 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
706
707 PR c++/43453
708 * typeck.c (cp_build_modify_expr): Handle array of characters
709 initialized by a string literal.
710 * decl.c (check_initializer): Handle parenthesized string literal
711 as initializer.
712 * typeck2.c (store_init_value): Remove redundant check.
713
714 2014-06-04 Jason Merrill <jason@redhat.com>
715
716 PR c++/51253
717 PR c++/61382
718 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
719 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
720
721 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
722
723 PR c/58942
724 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
725 with a pointer.
726
727 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
728
729 DR 1423
730 PR c++/52174
731 * call.c (standard_conversion): Convert nullptr to bool only
732 in case of direct-initialization.
733 (convert_like_real): Provide informative error message.
734
735 2014-06-03 Marek Polacek <polacek@redhat.com>
736
737 PR c/60439
738 * semantics.c (finish_switch_cond): Warn if switch condition has
739 boolean value.
740
741 2014-06-03 Jason Merrill <jason@redhat.com>
742
743 PR c++/60992
744 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
745 variable to local_specializations.
746
747 PR c++/60848
748 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
749
750 2014-06-02 Jason Merrill <jason@redhat.com>
751
752 PR c++/61046
753 * decl.c (reshape_init_class): Handle un-folded
754 constant-expressions.
755
756 PR c++/61134
757 * pt.c (pack_deducible_p): Handle canonicalization.
758
759 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
760
761 * pt.c (tsubst_function_type): Initialize arg_types.
762
763 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
764
765 PR debug/57519
766 * class.c (handle_using_decl): Pass the correct scope to
767 cp_emit_debug_info_for_using.
768
769 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
770
771 PR c++/59483
772 PR c++/61148
773 * search.c (accessible_p): Use current_nonlambda_class_type.
774 * semantics.c (check_accessibility_of_qualified_id): Likewise.
775
776 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
777
778 * decl.c: Include builtins.h.
779 * semantics.c: Likewise.
780
781 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
782
783 DR 1227
784 PR c++/57543
785 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
786 * pt.c (tsubst_function_type): Inject the this parameter; do the
787 substitutions in the order mandated by the DR.
788 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
789 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
790 (static_fn_type): Copy it.
791 * decl2.c (build_memfn_type, change_return_type,
792 cp_reconstruct_complex_type): Likewise.
793 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
794 * tree.c (strip_typedefs): Likewise.
795 * typeck.c (merge_types): Likewise.
796
797 2014-05-30 Jason Merrill <jason@redhat.com>
798
799 PR c++/56947
800 * pt.c (instantiate_decl): Check that defer_ok is not set for
801 local class members.
802
803 PR c++/60992
804 * pt.c (tsubst_init): Split out from...
805 (tsubst_expr) [DECL_EXPR]: Here.
806 (tsubst_copy) [VAR_DECL]: Use it.
807 * semantics.c (finish_id_expression): Return the decl for static/const.
808
809 2014-05-28 Jason Merrill <jason@redhat.com>
810
811 PR c++/47202
812 * decl.c (cxx_comdat_group): Return a decl.
813 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
814
815 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
816 bound.
817
818 PR c++/61242
819 * call.c (build_aggr_conv): Ignore passed in flags.
820 (build_array_conv, build_complex_conv): Likewise.
821
822 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
823
824 * optimize.c (maybe_thunk_body): Use set_comdat_group.
825 (maybe_clone_body): Likewise.
826 * decl.c (duplicate_decls): Update code duplicating comdat group;
827 do not copy symtab pointer; before freeing newdecl remove it
828 from symtab.
829 * decl2.c (constrain_visibility): Use set_comdat_group.
830
831 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
832
833 * rtti.c: Include tm_p.h
834 (emit_tinfo_decl): Force RTTI data to be aligned to required
835 ABI alignment only.
836
837 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
838
839 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
840 ignoring other target adjustments.
841
842 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
843
844 * semantics.c (finish_omp_clauses): Remove duplicated variable
845 initialization.
846
847 * parser.c (cp_parser_omp_target): Return bool values.
848
849 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
850
851 PR c++/61088
852 * lambda.c (add_capture): Enforce that capture by value requires
853 complete type.
854 * typeck2.c (cxx_incomplete_type_inform): Early return if
855 TYPE_MAIN_DECL is null.
856
857 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
858
859 PR c/61271
860 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
861
862 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
863
864 PR c++/61133
865 * lambda.c (build_capture_proxy, add_capture): Treat normal
866 captures and init-captures identically.
867
868 2014-05-21 Mark Wielaard <mjw@redhat.com>
869
870 PR debug/16063
871 * cp-lang.c (cxx_enum_underlying_base_type): New function.
872 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
873
874 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
875
876 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
877 * cp-array-notation.c (replace_invariant_exprs): Likewise.
878 (expand_array_notation): Handle VOID_CST.
879 * error.c (dump_expr): Likewise.
880 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
881 (cxx_pretty_printer::expression): Likewise.
882 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
883 * decl.c (register_dtor_fn): Likewise.
884 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
885 (build_delete, push_base_cleanups): Likewise.
886 * mangle.c (write_expression): Likewise.
887 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
888 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
889 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
890 * tree.c (cp_tree_equal): Likewise.
891 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
892 instead of void_zero_node.
893 * typeck.c (check_return_expr): Likewise.
894 * typeck2.c (build_functional_cast): Likewise.
895
896 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
897
898 PR c/60189
899 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
900 from here to...
901 (cp_parser_statement): ...here. Make sure only semicolon can go after
902 Cilk_sync.
903
904 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
905
906 PR c++/58753
907 PR c++/58930
908 PR c++/58704
909 * typeck2.c (digest_nsdmi_init): New.
910 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
911 * init.c (get_nsdmi): Likewise.
912 * cp-tree.h (digest_nsdmi_init): Declare.
913
914 2014-05-20 Jason Merrill <jason@redhat.com>
915
916 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
917 up a virtual function in a dummy object.
918
919 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
920
921 PR c++/60373
922 * decl.c (duplicate_decls): Replace pair of warning_at with
923 warning_at + inform.
924 (maybe_commonize_var): Likewise.
925
926 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
927
928 PR bootstrap/61210
929 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
930 (tsubst_copy_and_build): Perform recursive substitutions in a
931 deterministic order.
932
933 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
934
935 PR c++/58664
936 * typeck2.c (cxx_incomplete_type_inform): New.
937 (cxx_incomplete_type_diagnostic): Use it.
938 * decl.c (grokdeclarator): Check the element type of an
939 incomplete array type; call the above.
940 * cp-tree.h (cxx_incomplete_type_inform): Declare.
941
942 2014-05-19 Jason Merrill <jason@redhat.com>
943
944 PR c++/58761
945 * pt.c (tsubst_copy): Don't check at_function_scope_p.
946 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
947
948 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
949
950 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
951 * parser.c (cp_parser_enum_specifier): Likewise.
952
953 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
954
955 * class.c (sorted_fields_type_new): Adjust.
956 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
957 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
958 * cp-tree.h: Remove usage of variable_size gty attribute.
959 * decl.c (make_label_decl): Adjust.
960 (check_goto): Likewise.
961 (start_preparsed_function): Likewise.
962 (save_function_data): Likewise.
963 * lex.c (init_reswords): Likewise.
964 (retrofit_lang_decl): Likewise.
965 (cxx_dup_lang_specific_decl): Likewise.
966 (copy_lang_type): Likewise.
967 (cxx_make_type): Likewise.
968 * name-lookup.c (binding_entry_make): Likewise.
969 (binding_table_construct): Likewise.
970 (binding_table_new): Likewise.
971 (cxx_binding_make): Likewise.
972 (pushdecl_maybe_friend_1): Likewise.
973 (begin_scope): Likewise.
974 (push_to_top_level): Likewise.
975 * parser.c (cp_lexer_alloc): Likewise.
976 (cp_lexer_new_from_tokens): Likewise.
977 (cp_token_cache_new): Likewise.
978 (cp_parser_context_new): Likewise.
979 (cp_parser_new): Likewise.
980 (cp_parser_nested_name_specifier_opt): Likewise.
981 (cp_parser_template_id): Likewise.
982 * pt.c (maybe_process_partial_specialization): Likewise.
983 (register_specialization): Likewise.
984 (add_pending_template): Likewise.
985 (lookup_template_class_1): Likewise.
986 (push_tinst_level): Likewise.
987 * semantics.c (register_constexpr_fundef): Likewise.
988 (cxx_eval_call_expression): Likewise.
989 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
990
991 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
992
993 PR c++/51640
994 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
995 when cp_parser_lookup_name sets ambiguous_decls.
996
997 2014-05-15 Jason Merrill <jason@redhat.com>
998
999 * call.c (print_conversion_rejection): Use loc consistently.
1000
1001 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1002
1003 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1004 * call.c (convert_like_real, build_new_method_call_1): Use it.
1005 * decl2.c (grokfield): Likewise.
1006 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1007 build_new_1): Likewise.
1008 * mangle.c (write_expression): Likewise.
1009 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1010
1011 2014-05-14 Jason Merrill <jason@redhat.com>
1012
1013 PR c++/20332
1014 PR c++/21631
1015 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1016 dropped cv-quals as a bad conversion.
1017 (convert_like_real) [ck_ref_bind]: Explain them.
1018 (compare_ics): Check badness before stripping reference
1019 bindings. Handle comparing bad reference bindings.
1020 * typeck.c (comp_cv_qualification): Add overload that just takes
1021 integers.
1022 * cp-tree.h: Declare it.
1023
1024 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1025 (arg_conversion_rejection, bad_arg_conversion_rejection)
1026 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1027 (add_function_candidate): Pass actual argument, rather than type, to
1028 bad_arg_conversion_rejection.
1029 (print_conversion_rejection): Explain what's wrong with the conversion.
1030 (print_z_candidates): Say "candidate:" before each candidate.
1031 (splice_viable): Be strict if we see a viable or template candidate.
1032 (build_user_type_conversion_1): Pass false to strict parameter.
1033 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1034 (build_new_op_1, build_new_method_call_1): Likewise.
1035 (build_op_call_1): Pass true to strict parameter.
1036
1037 2014-05-13 Jason Merrill <jason@redhat.com>
1038
1039 * call.c (print_error_for_call_failure): Say "no match" rather
1040 than "ambiguous" if there were no strict matches.
1041 (build_new_method_call_1): Likewise.
1042
1043 PR c++/61151
1044 * semantics.c (is_this_parameter): Allow capture proxies too.
1045
1046 2014-05-12 Jason Merrill <jason@redhat.com>
1047
1048 * call.c (maybe_print_user_conv_context): New.
1049 (convert_like_real): Use it. Print call context for bad
1050 user-defined conversion.
1051 (build_over_call): Print call context for bad 'this' conversion.
1052
1053 * call.c (convert_like_real): Use inform for identifying the
1054 declaration point.
1055
1056 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1057
1058 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1059 complain & tf_error is false.
1060
1061 * decl.c (make_unbound_class_template): Prefer inform for
1062 "declared here"-type message.
1063
1064 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1065
1066 PR c++/60463
1067 PR c++/60755
1068 * lambda.c (lambda_expr_this_capture): Add new parameter
1069 add_capture_p controlling whether the functions will try to
1070 capture 'this' via the default capture.
1071 (maybe_resolve_dummy): Likewise.
1072 * cp-tree.h: Adjust prototypes.
1073 * call.c, semantics.c: Change callers of these functions.
1074 * call.c (build_new_method_call_1): Use the actual 'this' that
1075 would be potentially captured for the overload resolution, instead
1076 of the dummy object.
1077
1078 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1079
1080 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1081 parameter.
1082 (convert_nontype_argument): Adjust calls.
1083 (coerce_template_parameter_pack): Add missing complain & tf_error
1084 check.
1085
1086 2014-05-09 Jason Merrill <jason@redhat.com>
1087
1088 DR 587
1089 PR c++/51317
1090 * call.c (build_conditional_expr_1, conditional_conversion): Handle
1091 non-class lvalues and xvalues that differ only in cv-qualifiers.
1092
1093 DR 5
1094 PR c++/60019
1095 * call.c (build_user_type_conversion_1): The copy-init temporary
1096 is cv-unqualified.
1097
1098 PR c++/58714
1099 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
1100
1101 PR c++/54348
1102 * call.c (build_conditional_expr_1): If overload resolution finds
1103 no match, just say "different types".
1104
1105 PR c++/32019
1106 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
1107
1108 PR c++/22434
1109 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
1110 if we didn't find a conversion.
1111 Don't accept a bad conversion too early.
1112
1113 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1114
1115 PR c++/13981
1116 * typeck.c (convert_for_assignment): Provide an inform for pointers
1117 to incomplete class types.
1118
1119 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1120
1121 PR c++/61083
1122 * pt.c (convert_nontype_argument): Protect all the error calls
1123 with complain & tf_error.
1124
1125 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
1126
1127 PR c++/61080
1128 * pt.c (instantiate_decl): Avoid generating the body of a
1129 deleted function.
1130
1131 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1132
1133 PR c++/60999
1134 * pt.c (maybe_begin_member_template_processing): Use
1135 uses_template_parms.
1136
1137 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1138 Mike Stump <mikestump@comcast.net>
1139 Richard Sandiford <rdsandiford@googlemail.com>
1140
1141 * call.c: Include wide-int.h.
1142 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1143 (convert_for_arg_passing): Likewise.
1144 * class.c: Include wide-int.h.
1145 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
1146 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
1147 (include_empty_classes): Likewise
1148 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
1149 * cvt.c: Include wide-int.h.
1150 (ignore_overflows): Use wide_int_to_tree.
1151 * decl.c: Include wide-int.h.
1152 (check_array_designated_initializer): Use wide-int interfaces.
1153 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
1154 (finish_enum_value_list): Use signop.
1155 (build_enumerator): Use wide-int interfaces.
1156 * init.c: Include wide-int.h.
1157 (build_new_1): Use wide-int interfaces.
1158 * mangle.c: Include wide-int.h.
1159 (write_integer_cst): Use wide-int interfaces.
1160 (write_array_type): Likewise.
1161 * tree.c: Include wide-int.h.
1162 (cp_tree_equal): Use tree_int_cst_equal.
1163 * typeck2.c: Include wide-int.h.
1164 (process_init_constructor_array): Use wide-int interfaces.
1165
1166 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1167
1168 PR c++/58582
1169 * decl.c (grokfndecl): Check duplicate_decls return value for
1170 error_mark_node.
1171 * pt.c (instantiate_decl): A deleted function is defined.
1172
1173 2014-05-02 Jason Merrill <jason@redhat.com>
1174
1175 * decl2.c (vague_linkage_p): Local statics have vague linkage.
1176
1177 PR c++/60992
1178 * lambda.c (lambda_capture_field_type): Wrap anything dependent
1179 other than 'this'.
1180 (add_capture): Check for VLA before calling it.
1181 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
1182 just the current one. Make non-static.
1183 * cp-tree.h: Declare it.
1184 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
1185 the operand was static or constant.
1186
1187 2014-05-02 Marek Polacek <polacek@redhat.com>
1188
1189 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
1190 warning_at calls.
1191
1192 2014-05-01 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/43395
1195 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
1196 between label and variable when warning about returning local address.
1197
1198 2014-04-30 Jason Merrill <jason@redhat.com>
1199
1200 PR c++/60980
1201 * init.c (build_value_init): Don't try to call an array constructor.
1202
1203 PR c++/60951
1204 * typeck2.c (massage_init_elt): Use maybe_constant_init.
1205
1206 2014-04-30 Marek Polacek <polacek@redhat.com>
1207
1208 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
1209 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
1210 for non-integer types.
1211
1212 2014-04-29 Jason Merrill <jason@redhat.com>
1213
1214 DR 1351
1215 Represent the unevaluated exception specification of an implicitly
1216 declared or deleted function with a simple placeholder, not a list
1217 of functions.
1218 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
1219 * except.c (unevaluated_noexcept_spec): New.
1220 * class.c (deduce_noexcept_on_destructor): Use it.
1221 * decl.c (check_redeclaration_exception_specification): Call
1222 maybe_instantiate_noexcept.
1223 (duplicate_decls): Call it before merge_types.
1224 (start_preparsed_function): Call maybe_instantiate_noexcept.
1225 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
1226 * init.c (get_nsdmi): Factor out of perform_member_init.
1227 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
1228 (walk_field_subobs): Consider NSDMI for EH spec.
1229 (get_defaulted_eh_spec): New.
1230 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
1231 (defaulted_late_check): Defer EH checking in non-template classes.
1232 (after_nsdmi_defaulted_late_checks): New.
1233 * parser.c (cp_parser_class_specifier_1): Use it.
1234 (unparsed_classes): New macro.
1235 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
1236 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
1237 Remove list-of-functions handling.
1238 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
1239 handling and FN parameter.
1240 * typeck.c (merge_types): Adjust.
1241
1242 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
1243
1244 PR c++/59120
1245 * parser.c (cp_parser_alias_declaration): Check return value of
1246 cp_parser_require.
1247
1248 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1249
1250 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
1251 atomic-clause, allow comma in between atomic-clause and
1252 seq_cst.
1253
1254 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
1255
1256 PR libstdc++/43622
1257 * rtti.c (emit_support_tinfos): Do not iterate on
1258 registered_builtin_types (partial revert).
1259
1260 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
1261
1262 PR c++/57958
1263 * semantics.c (apply_deduced_return_type): Complete non-void type
1264 before estimating whether the type is aggregate.
1265
1266 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
1267
1268 PR libstdc++/43622
1269 * rtti.c (emit_support_tinfo_1): New function, extracted from
1270 emit_support_tinfos.
1271 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
1272
1273 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/59073
1276 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
1277 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1278
1279 2014-04-18 Jason Merrill <jason@redhat.com>
1280
1281 DR 1571
1282 * call.c (reference_binding): Recurse on user-defined conversion.
1283
1284 PR c++/60872
1285 * call.c (standard_conversion): Don't try to apply restrict to void.
1286
1287 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
1288
1289 * decl.c (reshape_init_r): Handle a single element of vector type.
1290
1291 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1292
1293 PR c++/60765
1294 * decl2.c (cplus_decl_attributes): Handle
1295 pointer-to-member-function declarations.
1296
1297 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
1298
1299 PR c++/60764
1300 * call.c (build_user_type_coversion): Use build_dummy_object
1301 to create the placeholder object for a constructor method call.
1302 (build_special_member_call): Likewise.
1303 (build_over_call): Check for the placeholder object with
1304 is_dummy_object.
1305 (build_new_method_call_1): Likewise. Don't attempt to resolve
1306 a dummy object for a constructor method call.
1307
1308 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
1309
1310 PR c++/59295
1311 * friend.c (add_friend, make_friend_class): Move repeated friend
1312 warning under Wredundant_decls.
1313
1314 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
1315
1316 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
1317 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1318 (do_class_using_decl): Likewise.
1319 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
1320
1321 2014-04-15 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR plugins/59335
1324 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
1325
1326 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1327
1328 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
1329
1330 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1331
1332 * pt.c (mark_template_parm): Use template_parm_level_and_index.
1333
1334 2014-04-11 Jason Merrill <jason@redhat.com>
1335
1336 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
1337 * parser.c: Adjust.
1338 (cp_lexer_get_preprocessor_token): Always clear it.
1339 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
1340
1341 DR 1467
1342 PR c++/51747
1343 * decl.c (reshape_init_r): Handle a single element of class type.
1344
1345 DR 1338
1346 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
1347 built-in operator new.
1348
1349 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1350
1351 PR c++/58600
1352 * name-lookup.c (parse_using_directive): Return early if the
1353 attribs argument is error_mark_node; use get_attribute_name.
1354
1355 2014-04-11 Jason Merrill <jason@redhat.com>
1356
1357 DR 1030
1358 PR c++/51253
1359 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
1360 * call.c (struct z_candidate): Add flags field.
1361 (add_candidate): Add flags parm.
1362 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
1363 (add_template_candidate_real): Pass it.
1364 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
1365 * tree.c (build_aggr_init_expr): Copy it.
1366 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
1367
1368 2014-04-10 Richard Biener <rguenther@suse.de>
1369 Jakub Jelinek <jakub@redhat.com>
1370
1371 PR ipa/60761
1372 * error.c (dump_decl) <case FUNCTION_DECL>: If
1373 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
1374 recurse on DECL_ABSTRACT_ORIGIN instead of printing
1375 <built-in>.
1376
1377 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
1378
1379 * pt.c (check_template_variable): Check for the return of pedwarn
1380 before emitting a note.
1381 * parser.c (cp_parser_lambda_introducer): Likewise.
1382
1383 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1384
1385 PR c++/59115
1386 * pt.c (process_template_parm): For an invalid non-type parameter
1387 only set TREE_TYPE to error_mark_node.
1388 (push_inline_template_parms_recursive, comp_template_parms,
1389 redeclare_class_template, coerce_template_template_parm,
1390 coerce_template_template_parms, unify): Use error_operand_p.
1391
1392 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
1393
1394 * class.c (check_bases_and_members): Warn about non-virtual dtors
1395 in public bases only. Check warn_ecpp before complaining about
1396 non-polymorphic bases.
1397
1398 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1399
1400 * decl.c (duplicate_decls): Check for the return of warning_at
1401 before emitting a note.
1402 (warn_misplaced_attr_for_class_type): Likewise.
1403 (check_tag_decl): Likewise.
1404
1405 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
1406
1407 PR c++/58207
1408 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
1409
1410 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
1411
1412 PR c++/44613
1413 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
1414 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
1415 instantiating a variable-sized type.
1416
1417 PR c++/21113
1418 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
1419
1420 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1421
1422 * class.c (find_abi_tags_r): Check for the return of warning
1423 before emitting a note.
1424 (one_inherited_ctor): Likewise.
1425
1426 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
1427
1428 * decl.c (duplicate_decls): Check for the return of permerror
1429 before emitting a note.
1430
1431 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
1432
1433 * class.c (accessible_nvdtor_p): New.
1434 (check_bases): Don't check base destructor here ...
1435 (check_bases_and_members): ... check them here. Trigger on
1436 Wnon-virtual-dtor flag.
1437 (finish_struct_1): Use accessible_nvdtor_p.
1438
1439 2014-04-01 Jason Merrill <jason@redhat.com>
1440
1441 * pt.c (process_partial_specialization): Say "not deducible"
1442 rather than "not used". Use inform.
1443
1444 PR c++/60374
1445 * pt.c (coerce_template_parms): Check that the pack expansion
1446 pattern works with the first matching parameter.
1447
1448 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
1449
1450 * init.c (perform_member_init): Homogenize uninitialized
1451 diagnostics.
1452
1453 2014-04-01 Jason Merrill <jason@redhat.com>
1454
1455 PR c++/60708
1456 * call.c (build_array_conv): Call complete_type.
1457
1458 PR c++/60713
1459 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
1460 (picflag_from_initializer): Return it.
1461 (process_init_constructor): Handle it.
1462
1463 PR c++/60642
1464 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
1465 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
1466 * pt.c (get_template_info): Handle NAMESPACE_DECL.
1467 (most_general_template): Handle more kinds of template.
1468 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
1469 instantiations and specializations.
1470
1471 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
1472
1473 PR c++/44859
1474 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
1475 COMPONENT_REFs and ARRAY_REFs sooner.
1476
1477 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
1478
1479 PR c++/60626
1480 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
1481 usage in non-functions with pushed scope.
1482
1483 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
1484
1485 PR c++/60573
1486 * name-lookup.h (cp_binding_level): New transient field defining_class_p
1487 to indicate whether a scope is in the process of defining a class.
1488 * semantics.c (begin_class_definition): Set defining_class_p.
1489 * name-lookup.c (leave_scope): Reset defining_class_p.
1490 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
1491 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
1492 unwinding to class-defining scope to handle the erroneous definition of
1493 a generic function of an arbitrarily nested class within an enclosing
1494 class.
1495
1496 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
1497
1498 PR c++/52369
1499 * method.c (walk_field_subobs): Improve the diagnostic
1500 locations for both REFERENCE_TYPEs and non-static const members.
1501 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
1502 instead of %qD to be consistent with the c++11 diagnostic.
1503
1504 2014-03-25 Jason Merrill <jason@redhat.com>
1505
1506 PR c++/60566
1507 PR c++/58678
1508 * class.c (build_vtbl_initializer): Handle abstract dtors here.
1509 * search.c (get_pure_virtuals): Not here.
1510
1511 PR c++/60375
1512 * parser.c (cp_parser_lambda_expression): Don't parse the body of
1513 a lambda in unevaluated context.
1514
1515 PR c++/60628
1516 * decl.c (create_array_type_for_decl): Complain about array of auto.
1517
1518 2014-03-25 Jakub Jelinek <jakub@redhat.com>
1519
1520 PR c++/60331
1521 * semantics.c (potential_constant_expression_1): Handle
1522 DECL_EXPR.
1523
1524 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
1525
1526 PR c++/60627
1527 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
1528 introducing an implicit function template parameter within an explicit
1529 instantiation.
1530
1531 2014-03-22 Jason Merrill <jason@redhat.com>
1532
1533 PR c++/60574
1534 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
1535 to error.
1536
1537 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
1538
1539 PR c++/60384
1540 * name-lookup.c (push_class_level_binding_1): Check identifier_p
1541 on the name argument.
1542
1543 2014-03-20 Jakub Jelinek <jakub@redhat.com>
1544
1545 PR c++/60572
1546 * init.c (build_zero_init_1): Ignore fields with error_mark_node
1547 type.
1548
1549 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1550
1551 PR c++/51474
1552 * call.c (build_new_method_call_1): Handle pure virtuals called by
1553 NSDMIs too.
1554
1555 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
1556
1557 PR c++/60390
1558 * parser.c (cp_parser_member_declaration): Don't allow
1559 finish_fully_implicit_template to consider friend declarations to be
1560 class member templates.
1561 (synthesize_implicit_template_parm): Handling winding back through class
1562 scope to the class being defined in order to inject a template argument
1563 list.
1564
1565 PR c++/60391
1566 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
1567 function scope as per cp_parser_skip_to_end_of_statement.
1568
1569 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
1570
1571 PR c++/59571
1572 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
1573
1574 2014-03-14 Jason Merrill <jason@redhat.com>
1575
1576 PR c++/60532
1577 PR c++/58678
1578 * search.c (get_pure_virtuals): Handle abstract dtor here.
1579 (dfs_get_pure_virtuals): Not here.
1580
1581 PR c++/58678
1582 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
1583 abstract class as pure.
1584
1585 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1586
1587 PR c++/60383
1588 * pt.c (maybe_process_partial_specialization): Check return value
1589 of check_specialization_namespace.
1590
1591 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
1592
1593 PR c++/60254
1594 * semantics.c (finish_static_assert): Call cxx_constant_value only
1595 if require_potential_rvalue_constant_expression returns true.
1596
1597 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
1598
1599 PR c++/60389
1600 * method.c (get_inherited_ctor): New.
1601 * cp-tree.h (get_inherited_ctor): Declare it.
1602 * semantics.c (is_valid_constexpr_fn): Use it.
1603
1604 2014-03-10 Jason Merrill <jason@redhat.com>
1605
1606 PR c++/60367
1607 * call.c (convert_default_arg): Remove special handling for
1608 CONSTRUCTOR.
1609
1610 PR c++/53492
1611 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
1612 when deciding whether to call push_template_decl for a member class.
1613 * pt.c (push_template_decl_real): Return after wrong levels error.
1614
1615 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
1616
1617 PR c++/60033
1618 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
1619 lambda, remove the lambda's own template argument list prior to fetching
1620 the specialization.
1621
1622 PR c++/60393
1623 * parser.c (cp_parser_parameter_declaration_clause): Move generic
1624 function template unwinding on error into a more general location, ...
1625 (cp_parser_skip_to_end_of_statement): ... here.
1626
1627 2014-03-07 Jason Merrill <jason@redhat.com>
1628
1629 * Make-lang.in (check_g++_parallelize): Split dg.exp.
1630
1631 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
1632 we're in a trailing return type.
1633
1634 * typeck.c (comp_template_parms_position): 'auto' and
1635 'decltype(auto)' are different from real template parms.
1636
1637 * parser.c (cp_parser_using_declaration): Consume the semicolon
1638 after bare parameter pack error.
1639
1640 * cp-tree.h (REF_PARENTHESIZED_P): New.
1641 * semantics.c (force_paren_expr): Set it.
1642 * pt.c (do_auto_deduction): Check it.
1643 (tsubst) [COMPONENT_REF]: Copy it.
1644 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
1645
1646 * decl.c (create_array_type_for_decl): Only warn about invalid
1647 C++1y VLA if flag_iso or warn_vla>0.
1648 (grokdeclarator): Likewise.
1649 * pt.c (tsubst): Likewise.
1650 * semantics.c (finish_decltype_type): Likewise.
1651 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
1652 (cp_build_addr_expr_1): Likewise.
1653 * init.c (build_new_1): Improve diagnostics.
1654
1655 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1656
1657 PR c++/58609
1658 * decl.c (check_initializer): Return NULL_TREE after error;
1659 consistently use inform.
1660
1661 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
1662
1663 * decl.c (check_initializer): Remove dead code.
1664
1665 2014-03-06 Marek Polacek <polacek@redhat.com>
1666
1667 PR c/60197
1668 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
1669 of checking tree code.
1670
1671 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
1672
1673 * parser.c (cp_lexer_set_source_position): New.
1674 (cp_parser_mem_initializer): Use it.
1675 (cp_parser_postfix_open_square_expression): Likewise.
1676 (cp_parser_parenthesized_expression_list): Likewise.
1677 (cp_parser_new_initializer): Likewise.
1678 (cp_parser_jump_statement): Likewise.
1679 (cp_parser_initializer): Likewise.
1680 (cp_parser_functional_cast): Likewise.
1681
1682 2014-03-05 Jason Merrill <jason@redhat.com>
1683
1684 PR c++/60409
1685 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
1686 dependent expression.
1687
1688 PR c++/60361
1689 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
1690 if re-parsing might succeed.
1691 * semantics.c (finish_id_expression): Use of a parameter outside
1692 the function body is a parse error.
1693
1694 * parser.c (cp_parser_mem_initializer): Set input_location
1695 properly for init-list warning.
1696 (cp_parser_postfix_open_square_expression): Likewise.
1697 (cp_parser_parenthesized_expression_list): Likewise.
1698 (cp_parser_new_initializer): Likewise.
1699 (cp_parser_jump_statement): Likewise.
1700 (cp_parser_initializer): Likewise.
1701 (cp_parser_functional_cast): Likewise.
1702
1703 2014-03-04 Jason Merrill <jason@redhat.com>
1704
1705 PR c++/60417
1706 * typeck2.c (process_init_constructor_record): Set
1707 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
1708
1709 PR c++/60415
1710 PR c++/54359
1711 * parser.c (cp_parser_direct_declarator): Set declarator to
1712 cp_error_declarator on invalid qualified-id.
1713
1714 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
1715
1716 PR c++/60376
1717 * parser.c (cp_parser_using_declaration): Early return when
1718 cp_parser_nested_name_specifier errors out.
1719
1720 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
1721
1722 PR c++/60377
1723 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
1724 function scope on parse error in function parameter list.
1725
1726 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
1727
1728 * method.c (implicitly_declare_fn): Remove redundant
1729 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
1730 * semantics.c (is_instantiation_of_constexpr): Likewise.
1731 * error.c (dump_function_decl): Likewise.
1732
1733 2014-03-01 Jason Merrill <jason@redhat.com>
1734
1735 PR c++/60379
1736 * semantics.c (begin_maybe_infinite_loop): Use
1737 fold_non_dependent_expr_sfinae.
1738
1739 2014-02-28 Jason Merrill <jason@redhat.com>
1740
1741 PR c++/58845
1742 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
1743
1744 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
1745
1746 PR c++/58610
1747 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
1748 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
1749 * lambda.c (maybe_add_lambda_conv_op): Likewise.
1750
1751 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
1752
1753 PR c++/60253
1754 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
1755 error_at.
1756
1757 2014-02-27 Jason Merrill <jason@redhat.com>
1758
1759 PR c++/60353
1760 PR c++/55877
1761 * decl2.c (tentative_decl_linkage): Don't mess with functions that
1762 are not yet defined.
1763
1764 2014-02-26 Jason Merrill <jason@redhat.com>
1765
1766 PR c++/60347
1767 PR lto/53808
1768 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
1769 * init.c (build_vtbl_address): Do it here.
1770
1771 PR c++/59231
1772 PR c++/11586
1773 PR c++/14710
1774 PR c++/57132
1775 * pt.c (struct warning_sentinel): New.
1776 (tsubst_copy_and_build): Use it instead of
1777 c_inhibit_evaluation_warnings.
1778 * typeck.c (maybe_warn_about_useless_cast): Remove
1779 c_inhibit_evaluation_warnings check.
1780
1781 PR c++/54440
1782 * pt.c (get_template_parm_index): New.
1783 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
1784 (process_template_parm): Allow bare packs in template template
1785 parm template parms.
1786 (coerce_template_parameter_pack): Handle fixed template template
1787 parm packs and fixed packs not at the end of the parm list.
1788 (coerce_template_parms): Handle template parm packs not at the end
1789 of the parm list.
1790 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
1791
1792 PR c++/60182
1793 * pt.c (unify): Ignore alias templates when deducing a template
1794 template parameter.
1795
1796 PR c++/60345
1797 Revert:
1798 DR 1571
1799 * call.c (reference_binding): Recurse on user-defined conversion.
1800 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1801
1802 2014-02-25 Jason Merrill <jason@redhat.com>
1803
1804 DR 1571
1805 * call.c (reference_binding): Recurse on user-defined conversion.
1806 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
1807
1808 * call.c (print_conversion_rejection): Handle n_arg of -2.
1809 (build_user_type_conversion_1): Pass it.
1810
1811 PR c++/55877
1812 * decl2.c (no_linkage_error): Handle C++98 semantics.
1813 (reset_type_linkage): Move from decl.c.
1814 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
1815 (bt_reset_linkage_2, reset_decl_linkage): New.
1816 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
1817 (cp_write_global_declarations): Move condition into no_linkage_error.
1818 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
1819 * semantics.c (expand_or_defer_fn_1): Factor out
1820 tentative_decl_linkage.
1821 * cp-tree.h: Adjust.
1822
1823 * decl2.c (finish_static_data_member_decl): Diagnose static data
1824 member in unnamed class.
1825 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
1826
1827 PR lto/53808
1828 * class.c (clone_function_decl): Call note_vague_linkage_fn for
1829 defaulted virtual dtor.
1830
1831 DR 1286
1832 PR c++/60328
1833 * pt.c (get_underlying_template): Fix equivalence calculation.
1834
1835 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
1836
1837 PR c++/60311
1838 * parser.c (function_being_declared_is_template_p): Return false when
1839 processing a template parameter list.
1840 (cp_parser_parameter_declaration_clause): Don't set
1841 auto_is_implicit_function_template_parm_p when processing a
1842 template parameter list.
1843
1844 * parser.c (synthesize_implicit_template_parm): Inject new template
1845 argument list appropriately when a generic member function
1846 of a class template is declared out-of-line.
1847
1848 PR c++/60065
1849 * parser.c (cp_parser_direct_declarator): Don't save and
1850 restore num_template_parameter_lists around call to
1851 cp_parser_parameter_declaration_list.
1852 (function_being_declared_is_template_p): New predicate.
1853 (cp_parser_parameter_declaration_list): Use
1854 function_being_declared_is_template_p as predicate for
1855 inspecting current function template parameter list length
1856 rather than num_template_parameter_lists.
1857
1858 2014-02-24 Jason Merrill <jason@redhat.com>
1859
1860 PR c++/60146
1861 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
1862 DECL_EXPR initialize a non-class iterator.
1863
1864 PR c++/60312
1865 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
1866
1867 2014-02-21 Jason Merrill <jason@redhat.com>
1868
1869 PR c++/58170
1870 * parser.c (cp_parser_type_name): Always check dependency.
1871 (cp_parser_type_specifier_seq): Call
1872 cp_parser_parse_and_diagnose_invalid_type_name.
1873
1874 PR c++/60108
1875 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
1876
1877 PR c++/60185
1878 * parser.c (cp_parser_default_argument): Clear
1879 current_class_ptr/current_class_ref like tsubst_default_argument.
1880
1881 PR c++/60252
1882 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
1883 than current_binding_level.
1884
1885 PR c++/60186
1886 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
1887
1888 PR c++/60187
1889 * parser.c (cp_parser_enum_specifier): Call
1890 check_for_bare_parameter_packs.
1891
1892 PR c++/59347
1893 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
1894 erroneous typedef.
1895
1896 PR c++/60241
1897 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
1898 of the partial instantiation, not the most general template.
1899 (maybe_process_partial_specialization): Reassign everything on
1900 that list.
1901
1902 PR c++/60216
1903 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
1904 (check_explicit_specialization): Don't clone.
1905
1906 PR c++/60219
1907 * pt.c (coerce_template_parms): Bail if argument packing fails.
1908
1909 PR c++/60224
1910 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
1911 Don't get confused by a CONSTRUCTOR that already has a type.
1912
1913 PR c++/60227
1914 * call.c (build_array_conv): Don't crash on VLA.
1915
1916 PR c++/60248
1917 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
1918
1919 PR c++/60252
1920 * lambda.c (maybe_resolve_dummy): Don't try to capture this
1921 in declaration context.
1922
1923 DR 1591
1924 PR c++/60051
1925 * pt.c (unify): Only unify if deducible. Handle 0-length list.
1926
1927 PR c++/60250
1928 * parser.c (cp_parser_direct_declarator): Don't wrap a
1929 type-dependent expression in a NOP_EXPR.
1930
1931 PR c++/60251
1932 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
1933
1934 PR c++/60167
1935 PR c++/60222
1936 PR c++/58606
1937 * parser.c (cp_parser_template_argument): Restore dereference.
1938 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
1939 (process_partial_specialization): Handle deref.
1940 (unify): Likewise.
1941
1942 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
1943
1944 PR c++/60052
1945 PR c++/60053
1946 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
1947 implicit_template_scope upon leaving an out-of-line generic member
1948 function definition.
1949
1950 2014-02-20 Kai Tietz <ktietz@redhat.com>
1951
1952 PR c++/58873
1953 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
1954 valued type argument as error_mark_node.
1955
1956 PR c++/58835
1957 * semantics.c (finish_fname): Handle error_mark_node.
1958
1959 2014-02-19 Jason Merrill <jason@redhat.com>
1960
1961 PR c++/60046
1962 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
1963 spec from template context.
1964
1965 2014-02-19 Jakub Jelinek <jakub@redhat.com>
1966
1967 PR debug/56563
1968 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
1969 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
1970
1971 PR c++/60267
1972 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
1973
1974 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1975
1976 PR c++/60225
1977 * semantics.c (ensure_literal_type_for_constexpr_object): Use
1978 strip_array_types.
1979
1980 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
1981
1982 PR c++/60215
1983 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
1984 During error recovery allow_non_constant may be false.
1985
1986 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
1987
1988 PR c++/60190
1989 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
1990 scope whenever a template parameter list has been started, independent
1991 of whether the function call operator was well-formed or not.
1992
1993 PR c++/60064
1994 * parser.c (cp_parser_member_declaration): Pop fully implicit template
1995 scope for generic friend declarations as well as for non-friends.
1996
1997 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
1998
1999 PR c++/60047
2000 * method.c (implicitly_declare_fn): A constructor of a class with
2001 virtual base classes isn't constexpr (7.1.5p4).
2002
2003 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2004
2005 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2006
2007 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR c++/58703
2010 * parser.c (cp_parser_omp_declare_reduction): Save and free
2011 declarator_obstack.
2012
2013 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2014
2015 PR c++/53017
2016 PR c++/59211
2017 * tree.c (handle_init_priority_attribute): Call default_conversion on
2018 the attribute argument.
2019
2020 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2021
2022 PR c++/58871
2023 * method.c (synthesized_method_walk): If vbases is non-null but
2024 is_empty is true, likewise don't worry about the virtual bases.
2025
2026 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2027
2028 PR c++/51219
2029 * typeck2.c (process_init_constructor_record): Just skip unnamed
2030 bit-fields.
2031
2032 2014-01-31 Jason Merrill <jason@redhat.com>
2033
2034 PR c++/59469
2035 * pt.c (mark_decl_instantiated): Call mark_needed.
2036
2037 PR c++/58672
2038 * decl2.c (handle_tls_init): Handle null init fn.
2039
2040 PR c++/55800
2041 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2042
2043 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2044
2045 PR c++/59082
2046 * class.c (build_vfield_ref): Early return error_mark_node if
2047 TYPE_VFIELD (type) is null.
2048 (build_base_path): Check return value of build_vfield_ref.
2049
2050 2014-01-31 Jason Merrill <jason@redhat.com>
2051
2052 PR c++/59646
2053 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2054 [ck_list]: Check for error_mark_node.
2055 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2056
2057 PR c++/57043
2058 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2059 during partial ordering.
2060
2061 2014-01-31 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/59963
2064 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2065
2066 2014-01-30 Jason Merrill <jason@redhat.com>
2067
2068 PR c++/57899
2069 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2070 (local_specializations): New macro.
2071 * pt.c (local_specializations): Remove variable.
2072
2073 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2074
2075 PR c++/58708
2076 * parser.c (make_string_pack): Use double_int::from_buffer.
2077
2078 2014-01-30 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/59940
2081 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2082 input_location.
2083 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2084 with input_location.
2085 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
2086 loc parameter.
2087
2088 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2089
2090 PR c++/58843
2091 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
2092
2093 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2094
2095 PR c++/58649
2096 * pt.c (lookup_template_class_1): Check start_enum return value
2097 for error_mark_node.
2098
2099 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
2100
2101 * decl.c (duplicate_decls, typename_hash, typename_compare):
2102 Use TYPE_IDENTIFIER.
2103 * error.c (dump_type): Likewise.
2104 * mangle.c (dump_substitution_candidates): Likewise.
2105
2106 2014-01-30 Jason Merrill <jason@redhat.com>
2107
2108 PR c++/59633
2109 * decl2.c (attributes_naming_typedef_ok): New.
2110 * cp-tree.h: Declare it.
2111 * decl.c (grokdeclarator): Check it.
2112 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
2113
2114 2014-01-29 Jason Merrill <jason@redhat.com>
2115
2116 PR c++/59707
2117 * call.c (add_builtin_candidate): Catch dependent types.
2118
2119 PR c++/59989
2120 * pt.c (expand_template_argument_pack): Correct
2121 non_default_args_count calculation.
2122
2123 PR c++/58466
2124 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
2125
2126 PR c++/59956
2127 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
2128 have a friend template in a class template.
2129 * pt.c (tsubst_friend_function): Look through it.
2130 (push_template_decl_real): A friend member template is
2131 primary.
2132
2133 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2134
2135 PR c++/58846
2136 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
2137 == error_mark_node.
2138
2139 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2140
2141 PR c++/58674
2142 * pt.c (instantiate_template_1): Check for error_mark_node the second
2143 argument too.
2144
2145 2014-01-29 Jason Merrill <jason@redhat.com>
2146
2147 PR c++/59916
2148 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
2149 cdtor_returns_this case.
2150
2151 PR c++/59315
2152 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
2153
2154 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
2155
2156 PR c++/58702
2157 * semantics.c (finish_omp_reduction_clause): Check type for
2158 error_mark_node.
2159
2160 2014-01-28 Jason Merrill <jason@redhat.com>
2161
2162 PR c++/59791
2163 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
2164 (tsubst_copy): Use it if lookup fails.
2165
2166 PR c++/59818
2167 * pt.c (tsubst_function_type): Make sure we keep the same function
2168 quals.
2169
2170 PR c++/58701
2171 * semantics.c (build_anon_member_initialization): Stop walking
2172 when we run out of COMPONENT_REFs.
2173
2174 PR c++/58632
2175 * decl.c (lookup_and_check_tag): Ignore template parameters if
2176 scope == ts_current.
2177 * pt.c (check_template_shadow): Don't complain about the injected
2178 class name.
2179
2180 * decl.c (duplicate_decls): Tweak.
2181
2182 PR c++/53756
2183 * mangle.c (write_unqualified_name): Handle operator auto.
2184
2185 2014-01-27 Jason Merrill <jason@redhat.com>
2186
2187 PR c++/59823
2188 Core DR 1138
2189 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
2190 list-initialization. A conversion to rvalue ref that involves
2191 an lvalue-rvalue conversion is bad.
2192 (convert_like_real): Give helpful error message.
2193
2194 PR c++/54652
2195 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
2196
2197 PR c++/58504
2198 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
2199 types.
2200
2201 PR c++/58606
2202 * pt.c (template_parm_to_arg): Call convert_from_reference.
2203 (tsubst_template_arg): Don't strip reference refs.
2204
2205 PR c++/58639
2206 * call.c (build_aggr_conv): Reject value-initialization of reference.
2207
2208 PR c++/58812
2209 PR c++/58651
2210 * call.c (convert_like_real): Give helpful error about excess braces
2211 for ck_rvalue of scalar type.
2212
2213 Core DR 1288
2214 * call.c (reference_binding): Only elide braces if the single
2215 element is reference-related.
2216
2217 PR c++/58814
2218 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
2219 stabilizing.
2220
2221 PR c++/58837
2222 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
2223 FUNCTION_DECL.
2224
2225 PR c++/59097
2226 * decl.c (compute_array_index_type): Don't call
2227 maybe_constant_value for a non-integral expression.
2228
2229 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2230
2231 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
2232 flag_cilkplus.
2233 * cp-gimplify.c (cp_genericize): Likewise.
2234 * decl.c (grokfndecl): Likewise.
2235 * parser.c (cp_parser_postfix_expression): Likewise.
2236 (cp_parser_postfix_open_square_expression): Likewise.
2237 (cp_parser_direct_declarator): Likewise.
2238 (is_cilkplus_vector_p): Likewise.
2239 (cp_parser_omp_clause_name): Likewise.
2240 (cp_parser_omp_all_clauses): Likewise.
2241 * pt.c (apply_late_template_attributes): Likewise.
2242 * typeck.c (cp_build_array_ref): Likewise.
2243 (cp_build_compound_expr): Likewise.
2244 (check_return_expr): Likewise.
2245
2246 2014-01-24 Jason Merrill <jason@redhat.com>
2247
2248 PR c++/58550
2249 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
2250 c++11 into error.
2251
2252 PR c++/59886
2253 PR c++/59659
2254 * typeck2.c (process_init_constructor_array): Don't create
2255 RANGE_EXPR yet.
2256
2257 2014-01-24 Jakub Jelinek <jakub@redhat.com>
2258
2259 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
2260 handling for RANGE_ARRAY case.
2261
2262 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
2263
2264 PR c++/57524
2265 * name-lookup.c (push_using_directive): Use timevar_cond_start.
2266
2267 2014-01-23 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/59846
2270 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
2271
2272 2014-01-23 Marek Polacek <polacek@redhat.com>
2273
2274 PR c/58346
2275 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2276 an empty aggregate.
2277
2278 2014-01-23 Jason Merrill <jason@redhat.com>
2279
2280 PR c++/55189
2281 * cp-tree.h (struct language_function): Add infinite_loop and
2282 infinite_loops.
2283 (current_function_infinite_loop): New.
2284 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
2285 (break_maybe_infinite_loop): New.
2286 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
2287 (finish_do_stmt, finish_for_cond, finish_for_stmt)
2288 (begin_range_for_stmt): Use them.
2289 * decl.c (finish_function): Don't warn about missing return
2290 if current_function_infinite_loop.
2291 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
2292 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
2293
2294 * call.c (build_op_delete_call): Use make_tree_vector and
2295 release_tree_vector.
2296
2297 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
2298
2299 PR c++/58980
2300 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
2301 nested_name_specifier.
2302
2303 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2304
2305 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
2306 see if there is an attribute after function decl. If so, then
2307 parse them now.
2308 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
2309 enabled function late parsing.
2310 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
2311 attribute for a SIMD-enabled function.
2312 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
2313 the function is used by SIMD-enabled function (indicated by NULL
2314 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
2315 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
2316 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
2317 vectorlength clause in SIMD-enabled function and #pragma SIMD's
2318 vectorlength clause. Added a new bool parameter to differentiate
2319 between the two.
2320 (cp_parser_cilk_simd_fn_vector_attrs): New function.
2321 (is_cilkplus_vector_p): Likewise.
2322 (cp_parser_late_parsing_elem_fn_info): Likewise.
2323 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
2324 and "vectorlength" clauses when Cilk Plus is enabled.
2325 (cp_parser_omp_clause_linear): Added a new parameter of type bool
2326 and emit a sorry message when step size is a parameter.
2327 * parser.h (cp_parser::cilk_simd_fn_info): New field.
2328 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
2329 flag_openmp.
2330 * pt.c (apply_late_template_attributes): Likewise.
2331
2332 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2333
2334 PR middle-end/58809
2335 * semantics.c (finish_omp_reduction_clause): Reject
2336 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2337
2338 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
2339
2340 PR c++/59482
2341 * parser.c (cp_parser_class_head): Push the class before parsing
2342 the base-clause, pop after it.
2343
2344 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
2345
2346 * decl2.c (cpp_check): Revert prototype change.
2347
2348 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2349
2350 PR c++/59270
2351 PR c++/58811
2352 * init.c (build_value_init_noctor): Don't pass error_mark_node to
2353 build_value_init.
2354
2355 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
2356
2357 PR c++/59269
2358 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
2359 only when errorcount == 0.
2360
2361 2014-01-17 Marek Polacek <polacek@redhat.com>
2362
2363 PR c++/59838
2364 * cvt.c (ocp_convert): Don't segfault on non-existing
2365 ENUM_UNDERLYING_TYPE.
2366
2367 2014-01-16 Jason Merrill <jason@redhat.com>
2368
2369 PR c++/59821
2370 * tree.c (bot_manip): Update the location of builtin_LINE and
2371 builtin_FILE calls.
2372
2373 2014-01-14 Jason Merrill <jason@redhat.com>
2374
2375 PR c++/59659
2376 * typeck2.c (massage_init_elt): New.
2377 (process_init_constructor_record)
2378 (process_init_constructor_union): Use it.
2379 (process_init_constructor_array): Use it. Use RANGE_EXPR.
2380 (split_nonconstant_init_1): Handle it.
2381 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
2382
2383 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2384
2385 PR c++/59631
2386 * parser.c (cp_parser_postfix_expression): Added a new if-statement
2387 and replaced an existing if-statement with else-if statement.
2388 Changed an existing error message wording to match the one from the C
2389 parser.
2390
2391 2014-01-08 Jason Merrill <jason@redhat.com>
2392
2393 PR c++/59614
2394 * class.c (abi_tag_data): Add tags field.
2395 (check_abi_tags): Initialize it.
2396 (find_abi_tags_r): Support collecting missing tags.
2397 (mark_type_abi_tags): Don't look at template args.
2398 (inherit_targ_abi_tags): New.
2399 (check_bases_and_members): Use it.
2400 * cp-tree.h (ABI_TAG_IMPLICIT): New.
2401 * mangle.c (write_abi_tags): Check it.
2402
2403 2014-01-07 Jason Merrill <jason@redhat.com>
2404
2405 PR c++/58856
2406 * pt.c (num_innermost_template_parms): New.
2407 (get_underlying_template): Use it.
2408
2409 PR c++/58965
2410 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
2411
2412 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
2413
2414 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
2415 the letter of 20.11.6 about Base and Derived naming the same
2416 class type modulo cv-qualifiers.
2417
2418 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
2419
2420 PR c++/59635
2421 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
2422 function as unimplemented for generic lambdas with varargs.
2423
2424 PR c++/59636
2425 * parser.c (cp_parser_template_parameter): Early out with
2426 error_mark_node if parameter declaration was not parsed.
2427
2428 PR c++/59629
2429 * parser.c (cp_parser_lambda_expression): Save/reset/restore
2430 auto_is_implicit_function_template_parm_p around lambda body.
2431
2432 PR c++/59638
2433 * parser.c (cp_parser_init_declarator): Undo fully implicit
2434 template parameter list when declarator is not a function.
2435
2436 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
2437
2438 PR c++/58950
2439 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
2440
2441 2014-01-03 Tobias Burnus <burnus@net-b.de>
2442
2443 PR c++/58567
2444 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
2445
2446 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
2447
2448 Core DR 1442
2449 PR c++/59165
2450 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
2451 as include_std to perform_koenig_lookup.
2452 (cp_parser_postfix_expression): Adjust.
2453 * pt.c (tsubst_copy_and_build): Likewise.
2454 * semantics.c (perform_koenig_lookup): Remove bool parameter.
2455 (omp_reduction_lookup): Adjust.
2456 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
2457 (lookup_arg_dependent): Likewise.
2458 (lookup_function_nonclass): Adjust.
2459 * name-lookup.h: Adjust declaration.
2460 * cp-tree.h: Likewise.
2461
2462 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2463
2464 PR c++/59087
2465 * parser.c (cp_parser_userdef_numeric_literal): Mention
2466 -fext-numeric-literals in the message.
2467
2468 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2469
2470 PR c++/59641
2471 * call.c (build_conditional_expr_1): Check the return value of
2472 force_rvalue.
2473
2474 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2475
2476 * call.c (convert_like_real): Check complain.
2477
2478 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
2479
2480 PR c++/59378
2481 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
2482 in templates.
2483
2484 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2485
2486 Update copyright years
2487
2488 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2489
2490 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
2491 the standard form for the copyright notice.
2492 \f
2493 Copyright (C) 2014 Free Software Foundation, Inc.
2494
2495 Copying and distribution of this file, with or without modification,
2496 are permitted in any medium without royalty provided the copyright
2497 notice and this notice are preserved.