re PR c++/59766 (c++1y: declaring friend function with 'auto' return type deduction...
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2015-04-14  David Krauss  <david_work@me.com>
2
3         PR c++/59766
4         * decl.c (grokdeclarator): Do not flag friends with deduced return.
5
6 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
7             Jason Merrill  <jason@redhat.com>
8
9         PR c++/60994
10         * parser.c (cp_parser_class_name): Add enum_ok parameter.
11         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
12         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
13         a class template.
14
15 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
16
17         PR c++/65736
18         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
19         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
20         the expression to the original type at the end.
21
22 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
23
24         PR c++/65690
25         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
26         TYPE_USER_ALIGN.
27
28         PR c++/65690
29         * tree.c (build_cplus_array_type): Layout type before variants are
30         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
31         variant.
32
33 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
34
35         PR c++/64085
36         * lambda.c (add_capture): Use dependent_type_p for capture by
37         reference too.
38
39 2015-04-02  Marek Polacek  <polacek@redhat.com>
40
41         PR c++/65642
42         * constexpr.c (cxx_eval_pointer_plus_expression): Call
43         cxx_eval_constant_expression on the first operand.
44
45 2015-04-01  Jason Merrill  <jason@redhat.com>
46
47         PR c++/65625
48         * decl.c (make_typename_type): Handle seeing a variable template.
49
50 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
51
52         PR c++/56100
53         * pt.c (instantiating_current_function_p): New.
54         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
55         * cp-tree.h (instantiating_current_function_p): Declare.
56
57 2015-04-01  Jason Merrill  <jason@redhat.com>
58
59         PR c++/65646
60         * decl.c (grokvardecl): Don't call check_explicit_specialization
61         for non-template members of a class template.
62
63 2015-04-01  Marek Polacek  <polacek@redhat.com>
64
65         PR c++/65554
66         * class.c (finish_struct): Require that the second field of a
67         user-defined initializer_list be of size type.
68
69 2015-03-31  Marek Polacek  <polacek@redhat.com>
70
71         PR c++/65390
72         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
73         checking for constness.
74
75 2015-03-30  Marek Polacek  <polacek@redhat.com>
76
77         PR c++/65398
78         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
79          *(&A[i] p+ j) => A[i + j] transformation here.
80         (cxx_eval_pointer_plus_expression): New function.
81         (cxx_eval_constant_expression): Use it here.
82
83 2015-03-27  Tobias Burnus  <burnus@net-b.de>
84
85         PR c/65586
86         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
87         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
88         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
89         -fopenmp-simd.
90
91 2015-03-27  Marek Polacek  <polacek@redhat.com>
92
93         PR c++/65556
94         * semantics.c (finish_switch_cond): If the unlowered type is not an
95         enum, use the type of the condition.
96
97 2015-03-27  Jason Merrill  <jason@redhat.com>
98
99         PR c++/65509
100         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
101         constants.
102
103 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
104
105         PR c++/65154
106         * init.c (build_vec_init): Fix initializing aggregates
107         with empty init list.
108
109 2015-03-26  Jason Merrill  <jason@redhat.com>
110
111         PR c++/65525
112         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
113
114 2015-03-25  Marek Polacek  <polacek@redhat.com>
115
116         PR c++/65558
117         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
118         on an anonymous namespace.
119
120 2015-03-25  Marek Polacek  <polacek@redhat.com>
121
122         PR c++/61670
123         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
124
125 2015-03-24  Jason Merrill  <jason@redhat.com>
126
127         PR c++/65046
128         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
129         * parser.c (cp_parser_namespace_definition): Don't set it.
130         * name-lookup.c (handle_namespace_attrs): Check
131         DECL_NAMESPACE_ASSOCIATIONS instead.
132
133         PR c++/65498
134         * pt.c (get_mostly_instantiated_function_type): Just return the
135         type of the partially instantiated template in DECL_TI_TEMPLATE.
136
137 2015-03-20  Marek Polacek  <polacek@redhat.com>
138
139         PR c++/65398
140         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
141         A[i + j].
142
143 2015-03-20  Marek Polacek  <polacek@redhat.com>
144
145         PR c++/65072
146         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
147         variant.
148
149 2015-03-19  Jason Merrill  <jason@redhat.com>
150
151         PR c++/65046
152         Automatically propagate ABI tags to variables and functions
153         from their (return) type.
154         * class.c (check_tag): Handle variables and functions.
155         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
156         (mark_or_check_tags): Likewise.
157         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
158         (check_abi_tags): Add single argument overload for decls.
159         Handle inheriting tags for decls.
160         * mangle.c (write_mangled_name): Call it.
161         (mangle_return_type_p): Split out from write_encoding.
162         (unmangled_name_p): Split out from write_mangled_name.
163         (write_mangled_name): Ignore abi_tag on namespace.
164         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
165         * parser.c (cp_parser_namespace_definition): Set it.
166         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
167         about abi_tag attribute on non-inline namespace.
168         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
169         (handle_abi_tag_attribute): Allow tags on variables.
170
171 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
172
173         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
174         attribute for DECL_EXTERNAL VAR_DECLs.
175
176 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
177
178         PR c++/65340
179         * call.c (build_over_call): Pass the tsubst_flags_t argument to
180         mark_used.
181         * decl2.c (mark_used): Inline the require_deduced_type call and
182         guard the error call.
183
184 2015-03-16  Jason Merrill  <jason@redhat.com>
185
186         PR c++/65061
187         * parser.c (cp_parser_template_name): Call strip_using_decl.
188
189 2015-03-16  Marek Polacek  <polacek@redhat.com>
190
191         DR 1688
192         PR c++/65327
193         * decl.c (grokdeclarator): Allow volatile and constexpr together.
194
195 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
196
197         PR c++/65323
198         * decl.c (check_default_argument): Don't call
199         maybe_warn_zero_as_null_pointer_constant.
200
201 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
202
203         * cp-gimplify.c (simple_empty_class_p): New.
204         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
205         the code for empty class copies into simple_empty_class_p, and
206         adapt it to handle COMPOUND_EXPRs.
207
208 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
209
210         PR c++/65370
211         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
212         only if the location of newdecl doesn't match the location of olddecl.
213
214 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
215
216         PR c++/65127
217         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
218         is not a PARM_DECL.
219
220 2015-03-10  Jason Merrill  <jason@redhat.com>
221
222         PR c++/65333
223         DR 1558
224         * pt.c (dependent_type_p_r): Check both class and alias template args.
225
226 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
227
228         PR c/65120
229         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
230         before preparing arguments to warn_logical_not_parentheses.
231         Use maybe_constant_value on rhs.
232
233 2015-03-09  Jason Merrill  <jason@redhat.com>
234
235         PR c++/65339
236         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
237
238 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
239
240         PR c/65120
241         * parser.c (cp_parser_binary_expression): Don't warn for
242         !!x == y or !b == y where b is bool.
243
244 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
245
246         * ptree.c (cxx_print_lambda_node): New.
247         (cxx_print_xnode): Handle LAMBDA_EXPR.
248
249 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
250
251         PR c++/65295
252         * constexpr.c (cxx_eval_constant_expression): Remove assert in
253         RESULT_DECL handling.
254
255 2015-02-26  Marek Polacek  <polacek@redhat.com>
256
257         PR c++/65202
258         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
259         a RETURN_EXPR if its operand is null.
260
261 2015-02-25  Jason Merrill  <jason@redhat.com>
262
263         PR c++/65209
264         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
265         DECL_COMDAT.
266         (constrain_visibility_for_template): Handle reference arguments.
267
268         PR debug/58315
269         * decl.c (start_preparsed_function): Use create_artificial_label
270         for cdtor_label.
271
272 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
273             Jakub Jelinek  <jakub@redhat.com>
274
275         PR c++/65075
276         * constexpr.c (check_constexpr_bind_expr_vars): Allow
277         implicit typedefs for lambda types.
278
279 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
280
281         PR c++/60894
282         * decl.c (lookup_and_check_tag): Use strip_using_decl.
283
284 2015-02-13  Jason Merrill  <jason@redhat.com>
285
286         PR c++/65054
287         * pt.c (template_args_equal): Look through conversions here.
288         * tree.c (cp_tree_equal): Not here.
289
290 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
291
292         PR c++/60211
293         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
294         pragma_external context.
295
296 2015-02-13  Jason Merrill  <jason@redhat.com>
297
298         PR c++/65051
299         * call.c (reference_binding): Don't look for bad conversion
300         if TO is incomplete.
301
302 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
303
304         PR c++/64970
305         * decl.c (make_typename_type): Pass tsubst_flags_t argument
306         to lookup_template_class.
307
308 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
309
310         PR ipa/65034
311         * decl.c (start_preparsed_function): Use void_type_node instead
312         of NULL_TREE as LABEL_DECL type.
313
314 2015-02-12  Jason Merrill  <jason@redhat.com>
315
316         PR c++/64898
317         * mangle.c (write_mangled_name): Fix test for variable template
318         instantiation.
319
320         * decl.c (begin_destructor_body): Condition clobber on
321         -flifetime-dse.
322
323 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
324
325         PR c++/64959
326         * parser.c (lookup_literal_operator): Return all candidates.
327         (cp_parser_userdef_char_literal): Simplify error handling.
328         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
329         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
330         Also give higher priority to standard string UDL operator.
331
332 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
333
334         PR debug/55541
335         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
336         * decl.c (poplevel): If functionbody, try not to create an extra
337         BLOCK for function body and use subblocks as that, if it is non-NULL
338         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
339         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
340
341         PR sanitizer/64984
342         * except.c (check_noexcept_r): Return NULL for internal
343         calls.
344
345 2015-02-10  Jason Merrill  <jason@redhat.com>
346
347         PR c++/64994
348         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
349
350 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
351
352         PR ipa/64982
353         * method.c (use_thunk): Do not check for stdarg thunks.
354
355 2015-02-06  Jason Merrill  <jason@redhat.com>
356
357         PR c++/64899
358         * init.c (build_vec_init): Handle default-initialized array with
359         constexpr default constructor.
360
361 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
362
363         PR c/64824
364         PR c/64868
365         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
366
367 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
368
369         PR c++/64877
370         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
371         for generated expressions.
372
373 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
374
375         PR c++/64901
376         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
377         DECL_OVERRIDE_P.
378
379 2015-02-02  Jason Merrill  <jason@redhat.com>
380
381         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
382
383 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
384
385         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
386         changed to pass input_location as first argument.
387
388 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
389
390         PR c++/64717
391         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
392         into SAVE_EXPR.
393
394 2015-01-29  Jason Merrill  <jason@redhat.com>
395
396         PR c++/49508
397         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
398         erroneous return statement.
399
400         PR c++/64521
401         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
402         point.
403
404 2015-01-27  Caroline Tice  <cmtice@google.com>
405
406         Committing VTV Cywin/Ming patch for Patrick Wollgast
407         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
408         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
409
410 2015-01-27  Jason Merrill  <jason@redhat.com>
411
412         PR c++/58597
413         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
414         current_function_decl.
415
416         PR c++/63889
417         * pt.c (finish_template_variable): Move from semantics.c.
418         Handle multiple template arg levels.  Handle coercion here.
419         (lookup_template_variable): Not here.
420
421 2015-01-23  Jason Merrill  <jason@redhat.com>
422
423         PR c++/64314
424         PR c++/57510
425         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
426         that has been completely split out.
427
428         PR c++/64701
429         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
430         statement codes.
431
432         PR c++/64727
433         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
434         of CONST_DECL.
435
436 2015-01-21  Jason Merrill  <jason@redhat.com>
437
438         PR c++/64603
439         * constexpr.c (cxx_eval_constant_expression): Only shortcut
440         constant CONSTRUCTORs.
441
442         PR c++/64647
443         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
444         give a hard error in a template instantiation.
445
446 2015-01-21  Richard Biener  <rguenther@suse.de>
447
448         PR middle-end/64313
449         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
450         for builtins the user declared correctly.
451
452 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
453
454         PR c++/58614
455         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
456         TREE_TYPE (elt) == error_mark_node.
457
458 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
459
460         PR tree-optimization/62053
461         * tree.c (build_cplus_array_type): Layout type after variants are set.
462
463 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
464
465         * cp-gimplify.c (cp_genericize_r): Call
466         cp_ubsan_maybe_instrument_member_call for member calls.
467         (cp_ubsan_check_member_access_r): New function.
468         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
469         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
470         cp_ubsan_instrument_member_accesses,
471         cp_ubsan_maybe_instrument_downcast,
472         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
473         * cp-ubsan.c: New file.
474         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
475         * constexpr.c (cxx_eval_call_expression): Return void_node
476         for IFN_UBSAN_VPTR.
477         (potential_constant_expression_1): Return true for
478         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
479         * typeck.c (build_class_member_access_expr): Provide locus
480         for COMPONENT_REFs.
481         (build_static_cast_1): Instrument downcasts.
482         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
483         add ubsan instrumentation for virtual_access.
484         * call.c: Include internal-fn.h.
485         (set_flags_from_callee): Handle internal calls.
486
487 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
488
489         PR c++/59366
490         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
491         and function templates, declared only in the class.
492         * decl.c (duplicate_decls): Reveal hidden friend functions or
493         function templates, if they are redeclared outside the class.
494
495 2015-01-15  Jason Merrill  <jason@redhat.com>
496
497         PR c++/64356
498         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
499
500         PR c++/63283
501         * constexpr.c (potential_constant_expression_1): Handle reference
502         args in templates.
503
504 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
505             James Norris  <jnorris@codesourcery.com>
506             Cesar Philippidis  <cesar@codesourcery.com>
507             Ilmir Usmanov  <i.usmanov@samsung.com>
508             Jakub Jelinek  <jakub@redhat.com>
509
510         * parser.c: Include "gomp-constants.h".
511         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
512         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
513         Use OMP_CLAUSE_SET_MAP_KIND.
514         (cp_parser_omp_construct, cp_parser_pragma): Handle
515         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
516         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
517         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
518         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
519         "create", "delete", "deviceptr", "host", "num_gangs",
520         "num_workers", "present", "present_or_copy", "pcopy",
521         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
522         "present_or_create", "pcreate", "vector_length", "wait".
523         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
524         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
525         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
526         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
527         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
528         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
529         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
530         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
531         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
532         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
533         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
534         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
535         (cp_parser_oacc_parallel, cp_parser_oacc_update)
536         (cp_parser_oacc_wait): New functions.
537         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
538         (finish_oacc_parallel): New prototypes.
539         * semantics.c: Include "gomp-constants.h".
540         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
541         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
542         OMP_CLAUSE_SET_MAP_KIND.
543         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
544         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
545         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
546         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
547         functions.
548
549 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
550
551         PR c++/58671
552         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
553         self-initialization.
554
555 2015-01-13  Jason Merrill  <jason@redhat.com>
556
557         PR c++/64356
558         PR libstdc++/58777
559         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
560         pointer expressions.
561         (cxx_eval_increment_expression): Likewise.
562
563         PR c++/64514
564         * pt.c (coerce_template_parameter_pack): Return NULL for a
565         zero-length fixed parameter pack with a pack expansion arg.
566
567         PR c++/64520
568         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
569
570 2015-01-12  Jason Merrill  <jason@redhat.com>
571
572         PR c++/64547
573         * constexpr.c (cxx_eval_call_expression): A call to a void
574         function doesn't need to return a value.
575
576 2015-01-09  Michael Collison  <michael.collison@linaro.org>
577
578         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
579         input.h, alias.h, symtab.h, options.h, fold-const.h,
580         wide-int.h, and inchash.h due to flattening of tree.h.
581         * class.c: Ditto.
582         * constexpr.c: Ditto.
583         * cp-array-notation.c: Ditto.
584         * cp-gimplify.c: Ditto.
585         * cp-lang.c: Ditto.
586         * cp-objcp-common.c: Ditto.
587         * cvt.c: Ditto.
588         * decl2.c: Ditto.
589         * decl.c: Ditto.
590         * dump.c: Ditto.
591         * error.c: Ditto.
592         * except.c: Ditto.
593         * expr.c: Ditto.
594         * friend.c: Ditto.
595         * init.c: Ditto.
596         * lambda.c: Ditto.
597         * lex.c: Ditto.
598         * mangle.c: Ditto.
599         * name-lookup.c: Ditto.
600         * optimize.c: Ditto.
601         * parser.c: Ditto.
602         * pt.c: Ditto.
603         * ptree.c: Ditto.
604         * repo.c: Ditto.
605         * rtti.c: Ditto.
606         * search.c: Ditto.
607         * semantics.c: Ditto.
608         * tree.c: Ditto.
609         * typeck2.c: Ditto.
610         * typeck.c: Ditto.
611
612 2015-01-08  Jason Merrill  <jason@redhat.com>
613
614         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
615         * decl.c (compute_array_index_type): Likewise.
616         * init.c (build_vec_init): Likewise.
617         * typeck.c (cp_build_binary_op): Likewise.
618
619 2015-01-08  Jason Merrill  <jason@redhat.com>
620
621         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
622         whether an initializer-list is too big for a VLA.
623         (throw_bad_array_length): Remove.
624         * cp-tree.h: Remove prototype.
625
626 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
627
628         PR c++/60753
629         * decl.c (grokfndecl): Add bool parameter.
630         (grokdeclarator): Adjust calls.
631         (start_decl): Don't set DECL_DELETED_FN here.
632
633 2015-01-06  Jason Merrill  <jason@redhat.com>
634
635         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
636         template-ids.
637
638         PR c++/64455
639         * pt.c (type_dependent_expression_p): Handle variable templates.
640         * constexpr.c (potential_constant_expression_1): Use it.
641
642         PR c++/64487
643         * semantics.c (finish_offsetof): Handle templates here.
644         * parser.c (cp_parser_builtin_offsetof): Not here.
645
646         PR c++/64496
647         * semantics.c (process_outer_var_ref): Diagnose lambda in local
648         class NSDMI.
649
650 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
651
652         PR c++/64489
653         * class.c (check_field_decls): Make copy assignment operators
654         complex only in c++98 mode.
655
656 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
657
658         PR c++/31397
659         * class.c (check_for_override): Warn when a virtual function is an
660         override not marked override.
661
662 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
663
664         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
665         hold base_fndecls.
666         (get_basefndecls): Adjust.
667
668 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
669
670         Update copyright years.
671
672 2015-01-05  Marek Polacek  <polacek@redhat.com>
673
674         PR c/64423
675         * typeck.c (cp_build_array_ref): Pass loc down to
676         warn_array_subscript_with_type_char.
677
678 \f
679 Copyright (C) 2015 Free Software Foundation, Inc.
680
681 Copying and distribution of this file, with or without modification,
682 are permitted in any medium without royalty provided the copyright
683 notice and this notice are preserved.