c.opt (Wc++11-compat): Make primary.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2015-05-08  Jason Merrill  <jason@redhat.com>
2
3         * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
4         -Wc++0x-compat.
5
6 2015-05-08  Jason Merrill  <jason@redhat.com>
7
8         * decl2.c (mangling_aliases): New variable.
9         (note_mangling_alias, generate_mangling_aliases): New.
10         (cp_write_global_declarations): Call generate_mangling_aliases.
11         (generate_mangling_alias): Split out from...
12         * mangle.c (mangle_decl): ...here.
13         * cp-tree.h: Declare note_mangling_alias.
14
15 2015-05-08  Aldy Hernandez  <aldyh@redhat.com>
16
17         * decl2.c (collect_candidates_for_java_method_aliases): Remove.
18         (build_java_method_aliases): Adapt to use create_same_body_alias
19         instead of assemble_alias.  Move variable declarations to
20         definition and tidy up.
21         (cp_write_global_declarations): Call build_java_method_aliases
22         instead of collecting candidates first.
23
24 2015-05-07  Jason Merrill  <jason@redhat.com>
25
26         PR c++/59012
27         * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
28         (cp_parser_std_attribute_spec): Handle alignas pack expansion.
29         * decl2.c (is_late_template_attribute): An attribute exp is dependent.
30         * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
31         (apply_late_template_attributes): Handle attribute pack expansion.
32
33 2015-05-07  Marek Polacek  <polacek@redhat.com>
34
35         PR c/65179
36         * typeck.c (cp_build_binary_op): Warn when left shifting a negative
37         value.
38
39 2015-05-07  Jason Merrill  <jason@redhat.com>
40
41         DR 1467
42         PR c++/51747
43         * typeck2.c (digest_init_r): Fix single element list.
44
45 2015-05-05  Jason Merrill  <jason@redhat.com>
46
47         * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
48         MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
49         MUST_NOT_THROW_EXPR.
50         (cp_genericize_data): Add try_block field.
51         (cp_genericize_tree): Initialize it.
52         * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
53         implicit rethrow.
54
55         * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
56         Return false.
57
58         * semantics.c (finish_call_expr): Check complain.
59
60         * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
61         maybe-in-charge constructor.
62
63         * decl.c (start_decl): Don't push the plain VAR_DECL for a
64         variable template.
65
66         DR 1518
67         DR 1630
68         PR c++/54835
69         PR c++/60417
70         * call.c (convert_like_real): Check value-initialization before
71         explicit.
72         * typeck2.c (process_init_constructor_record): Don't set
73         CONSTRUCTOR_IS_DIRECT_INIT.
74         (process_init_constructor_array): Likewise.
75         * init.c (build_vec_init): Likewise.
76
77 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
78
79         * parser.c (cp_parser_asm_definition): Only test for
80         error_mark_node if "outputs" was just set.  Likewise for "inputs".
81
82 2015-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
83             Jakub Jelinek  <jakub@redhat.com>
84
85         PR c++/66007
86         * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
87         result in an actual error.
88
89 2015-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
90             Prathamesh Kulharni  <prathamesh.kulkarni@linaro.org>
91
92         PR c++/65858
93         * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
94         false.
95
96 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
97
98         * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
99         trailing semicolon.
100
101 2015-04-29  Jason Merrill  <jason@redhat.com>
102
103         PR c++/50800
104         * tree.c (apply_identity_attributes): Fix handling of classes.
105
106 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
107
108         * parser.c (cp_parser_oacc_enter_exit_data): Use
109         OMP_STANDALONE_CLAUSES.
110
111 2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
112
113         PR c++/64667
114         * init.c (perform_member_init): Handle references for -Winit-self.
115
116 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
117
118         * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
119         OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
120
121 2015-04-28  Jason Merrill  <jason@redhat.com>
122
123         PR c++/65896
124         * constexpr.c (cxx_eval_store_expression): Don't try to actually
125         store an empty class.
126
127         PR c++/65656
128         * constexpr.c (cxx_eval_builtin_function_call): Fix
129         __builtin_constant_p.
130
131         PR c++/50800
132         * tree.c (strip_typedefs): Add remove_attributes parm.
133         (strip_typedefs_expr): Likewise.
134         (apply_identity_attributes): New subroutine of strip_typedefs.
135         * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
136         (convert_nontype_argument, unify): Likewise.
137         * cp-tree.h: Adjust.
138
139         PR c++/65734
140         * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
141
142 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
143
144         * class.c (layout_class_type): Remove check if
145         PCC_BITFIELD_TYPE_MATTERS is defined.
146
147 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
148
149         * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
150
151 2015-04-24  Jason Merrill  <jason@redhat.com>
152
153         PR c++/50800
154         * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
155
156         * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
157         Remove obsolete code.
158         [NE_EXPR]: Likewise.
159
160 2015-04-23  Jason Merrill  <jason@redhat.com>
161
162         PR c++/65646
163         * pt.c (check_explicit_specialization): Don't
164         SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
165         headers.
166         * decl.c (grokvardecl): Revert earlier fix.
167
168 2015-04-20  Paolo Carlini  <paolo.carlini@oracle.com>
169
170         PR c++/65801
171         * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
172         suppresses the diagnostic.
173
174 2015-04-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
175
176         Reject trailing return type for an operator auto().
177         * decl.c (grokdeclarator): Reject trailing return types for
178         all conversion operators, don't handle conversion operators
179         in the previous checks that deal with auto.
180
181 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
182
183         * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
184
185 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
186
187         * class.c (resolve_address_of_overloaded_function, instantiate_type):
188         Rename tsubst_flags_t parameter flags -> complain.
189
190 2015-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
191
192         * call.c (build_op_delete_call, build_over_call): Check mark_used
193         return value.
194         * class.c (resolve_address_of_overloaded_function): Likewise.
195         * decl.c (cxx_maybe_build_cleanup): Likewise.
196         * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
197         tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
198         * rtti.c (build_dynamic_cast_1): Likewise.
199         * semantics.c (process_outer_var_ref): Likewise.
200         * typeck.c (build_class_member_access_expr,
201         cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
202
203 2015-04-15  Jason Merrill  <jason@redhat.com>
204
205         * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
206         (build_constexpr_constructor_member_initializers): Loop to find
207         the BIND_EXPR.
208         * decl.c (start_preparsed_function): Clobber the object at the
209         beginning of a constructor.
210
211         * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
212         * method.c (implicitly_declare_fn): Likewise.
213         * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
214
215         * decl2.c (determine_visibility): Use get_template_info.
216
217 2015-04-15  Jason Merrill  <jason@redhat.com>
218             Marek Polacek  <polacek@redhat.com>
219
220         PR c++/65727
221         * lambda.c (lambda_expr_this_capture): In unevaluated context go
222         through the normal loop, just don't capture.
223         (maybe_resolve_dummy): Handle null return.
224
225 2015-04-15  Paolo Carlini  <paolo.carlini@oracle.com>
226
227         * call.c (enforce_access): Emit error + inform.
228
229 2015-04-15  Marek Polacek  <polacek@redhat.com>
230
231         * constexpr.c (use_new_call): Remove #define.
232         (lookup_parameter_binding): Remove function.
233         (cxx_bind_parameters_in_call): Remove unused code.
234         (cxx_eval_call_expression): Likewise.
235         (cxx_eval_constant_expression): Likewise.
236
237 2015-04-14  Mikhail Maltsev  <maltsevm@gmail.com>
238
239         * tree.c (replace_placeholders_t): Remove unused type.
240         (replace_placeholders): Remove unused pset.
241
242 2015-04-14  Jason Merrill  <jason@redhat.com>
243
244         * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
245
246         PR c++/65695
247         * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
248
249         PR c++/65721
250         * name-lookup.c (do_class_using_decl): Complain about specifying
251         the current class even if there are dependent bases.
252
253 2015-04-14  David Krauss  <david_work@me.com>
254
255         PR c++/59766
256         * decl.c (grokdeclarator): Do not flag friends with deduced return.
257
258 2015-04-14  Momchil Velikov  <momchil.velikov@gmail.com>
259             Jason Merrill  <jason@redhat.com>
260
261         PR c++/60994
262         * parser.c (cp_parser_class_name): Add enum_ok parameter.
263         (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
264         (cp_parser_diagnose_invalid_type_name): Don't assume a template is
265         a class template.
266
267 2015-04-12  Jakub Jelinek  <jakub@redhat.com>
268
269         PR c++/65736
270         * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
271         don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
272         the expression to the original type at the end.
273
274 2015-04-09  Jakub Jelinek  <jakub@redhat.com>
275
276         PR c++/65690
277         * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
278         TYPE_USER_ALIGN.
279
280         PR c++/65690
281         * tree.c (build_cplus_array_type): Layout type before variants are
282         set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
283         variant.
284
285 2015-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
286
287         PR c++/64085
288         * lambda.c (add_capture): Use dependent_type_p for capture by
289         reference too.
290
291 2015-04-02  Marek Polacek  <polacek@redhat.com>
292
293         PR c++/65642
294         * constexpr.c (cxx_eval_pointer_plus_expression): Call
295         cxx_eval_constant_expression on the first operand.
296
297 2015-04-01  Jason Merrill  <jason@redhat.com>
298
299         PR c++/65625
300         * decl.c (make_typename_type): Handle seeing a variable template.
301
302 2015-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
303
304         PR c++/56100
305         * pt.c (instantiating_current_function_p): New.
306         * name-lookup.c (pushdecl_maybe_friend_1): Use it.
307         * cp-tree.h (instantiating_current_function_p): Declare.
308
309 2015-04-01  Jason Merrill  <jason@redhat.com>
310
311         PR c++/65646
312         * decl.c (grokvardecl): Don't call check_explicit_specialization
313         for non-template members of a class template.
314
315 2015-04-01  Marek Polacek  <polacek@redhat.com>
316
317         PR c++/65554
318         * class.c (finish_struct): Require that the second field of a
319         user-defined initializer_list be of size type.
320
321 2015-03-31  Marek Polacek  <polacek@redhat.com>
322
323         PR c++/65390
324         * tree.c (build_cplus_array_type): Use dependent_type_p rather than
325         checking for constness.
326
327 2015-03-30  Marek Polacek  <polacek@redhat.com>
328
329         PR c++/65398
330         * constexpr.c (cxx_fold_indirect_ref): Don't perform the
331          *(&A[i] p+ j) => A[i + j] transformation here.
332         (cxx_eval_pointer_plus_expression): New function.
333         (cxx_eval_constant_expression): Use it here.
334
335 2015-03-27  Tobias Burnus  <burnus@net-b.de>
336
337         PR c/65586
338         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
339         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
340         cp_parser_omp_declare): Don't show error for skipped omp pragmas with
341         -fopenmp-simd.
342
343 2015-03-27  Marek Polacek  <polacek@redhat.com>
344
345         PR c++/65556
346         * semantics.c (finish_switch_cond): If the unlowered type is not an
347         enum, use the type of the condition.
348
349 2015-03-27  Jason Merrill  <jason@redhat.com>
350
351         PR c++/65509
352         * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
353         constants.
354
355 2015-03-26  Mikhail Maltsev  <maltsevm@gmail.com>
356
357         PR c++/65154
358         * init.c (build_vec_init): Fix initializing aggregates
359         with empty init list.
360
361 2015-03-26  Jason Merrill  <jason@redhat.com>
362
363         PR c++/65525
364         * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
365
366 2015-03-25  Marek Polacek  <polacek@redhat.com>
367
368         PR c++/65558
369         * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
370         on an anonymous namespace.
371
372 2015-03-25  Marek Polacek  <polacek@redhat.com>
373
374         PR c++/61670
375         * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
376
377 2015-03-24  Jason Merrill  <jason@redhat.com>
378
379         PR c++/65046
380         * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
381         * parser.c (cp_parser_namespace_definition): Don't set it.
382         * name-lookup.c (handle_namespace_attrs): Check
383         DECL_NAMESPACE_ASSOCIATIONS instead.
384
385         PR c++/65498
386         * pt.c (get_mostly_instantiated_function_type): Just return the
387         type of the partially instantiated template in DECL_TI_TEMPLATE.
388
389 2015-03-20  Marek Polacek  <polacek@redhat.com>
390
391         PR c++/65398
392         * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
393         A[i + j].
394
395 2015-03-20  Marek Polacek  <polacek@redhat.com>
396
397         PR c++/65072
398         * typeck.c (lookup_anon_field): Make sure we're dealing with the main
399         variant.
400
401 2015-03-19  Jason Merrill  <jason@redhat.com>
402
403         PR c++/65046
404         Automatically propagate ABI tags to variables and functions
405         from their (return) type.
406         * class.c (check_tag): Handle variables and functions.
407         (mark_or_check_attr_tags): Split out from find_abi_tags_r.
408         (mark_or_check_tags): Likewise.
409         (mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
410         (check_abi_tags): Add single argument overload for decls.
411         Handle inheriting tags for decls.
412         * mangle.c (write_mangled_name): Call it.
413         (mangle_return_type_p): Split out from write_encoding.
414         (unmangled_name_p): Split out from write_mangled_name.
415         (write_mangled_name): Ignore abi_tag on namespace.
416         * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
417         * parser.c (cp_parser_namespace_definition): Set it.
418         * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
419         about abi_tag attribute on non-inline namespace.
420         * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
421         (handle_abi_tag_attribute): Allow tags on variables.
422
423 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
424
425         * decl2.c (cplus_decl_attributes): Also add "omp declare target"
426         attribute for DECL_EXTERNAL VAR_DECLs.
427
428 2015-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
429
430         PR c++/65340
431         * call.c (build_over_call): Pass the tsubst_flags_t argument to
432         mark_used.
433         * decl2.c (mark_used): Inline the require_deduced_type call and
434         guard the error call.
435
436 2015-03-16  Jason Merrill  <jason@redhat.com>
437
438         PR c++/65061
439         * parser.c (cp_parser_template_name): Call strip_using_decl.
440
441 2015-03-16  Marek Polacek  <polacek@redhat.com>
442
443         DR 1688
444         PR c++/65327
445         * decl.c (grokdeclarator): Allow volatile and constexpr together.
446
447 2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
448
449         PR c++/65323
450         * decl.c (check_default_argument): Don't call
451         maybe_warn_zero_as_null_pointer_constant.
452
453 2015-03-11  Aldy Hernandez  <aldyh@redhat.com>
454
455         * cp-gimplify.c (simple_empty_class_p): New.
456         * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR.  Abstract
457         the code for empty class copies into simple_empty_class_p, and
458         adapt it to handle COMPOUND_EXPRs.
459
460 2015-03-10  Paolo Carlini  <paolo.carlini@oracle.com>
461
462         PR c++/65370
463         * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
464         only if the location of newdecl doesn't match the location of olddecl.
465
466 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
467
468         PR c++/65127
469         * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
470         is not a PARM_DECL.
471
472 2015-03-10  Jason Merrill  <jason@redhat.com>
473
474         PR c++/65333
475         DR 1558
476         * pt.c (dependent_type_p_r): Check both class and alias template args.
477
478 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
479
480         PR c/65120
481         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
482         before preparing arguments to warn_logical_not_parentheses.
483         Use maybe_constant_value on rhs.
484
485 2015-03-09  Jason Merrill  <jason@redhat.com>
486
487         PR c++/65339
488         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
489
490 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
491
492         PR c/65120
493         * parser.c (cp_parser_binary_expression): Don't warn for
494         !!x == y or !b == y where b is bool.
495
496 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
497
498         * ptree.c (cxx_print_lambda_node): New.
499         (cxx_print_xnode): Handle LAMBDA_EXPR.
500
501 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
502
503         PR c++/65295
504         * constexpr.c (cxx_eval_constant_expression): Remove assert in
505         RESULT_DECL handling.
506
507 2015-02-26  Marek Polacek  <polacek@redhat.com>
508
509         PR c++/65202
510         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
511         a RETURN_EXPR if its operand is null.
512
513 2015-02-25  Jason Merrill  <jason@redhat.com>
514
515         PR c++/65209
516         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
517         DECL_COMDAT.
518         (constrain_visibility_for_template): Handle reference arguments.
519
520         PR debug/58315
521         * decl.c (start_preparsed_function): Use create_artificial_label
522         for cdtor_label.
523
524 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
525             Jakub Jelinek  <jakub@redhat.com>
526
527         PR c++/65075
528         * constexpr.c (check_constexpr_bind_expr_vars): Allow
529         implicit typedefs for lambda types.
530
531 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
532
533         PR c++/60894
534         * decl.c (lookup_and_check_tag): Use strip_using_decl.
535
536 2015-02-13  Jason Merrill  <jason@redhat.com>
537
538         PR c++/65054
539         * pt.c (template_args_equal): Look through conversions here.
540         * tree.c (cp_tree_equal): Not here.
541
542 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
543
544         PR c++/60211
545         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
546         pragma_external context.
547
548 2015-02-13  Jason Merrill  <jason@redhat.com>
549
550         PR c++/65051
551         * call.c (reference_binding): Don't look for bad conversion
552         if TO is incomplete.
553
554 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
555
556         PR c++/64970
557         * decl.c (make_typename_type): Pass tsubst_flags_t argument
558         to lookup_template_class.
559
560 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
561
562         PR ipa/65034
563         * decl.c (start_preparsed_function): Use void_type_node instead
564         of NULL_TREE as LABEL_DECL type.
565
566 2015-02-12  Jason Merrill  <jason@redhat.com>
567
568         PR c++/64898
569         * mangle.c (write_mangled_name): Fix test for variable template
570         instantiation.
571
572         * decl.c (begin_destructor_body): Condition clobber on
573         -flifetime-dse.
574
575 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
576
577         PR c++/64959
578         * parser.c (lookup_literal_operator): Return all candidates.
579         (cp_parser_userdef_char_literal): Simplify error handling.
580         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
581         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
582         Also give higher priority to standard string UDL operator.
583
584 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
585
586         PR debug/55541
587         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
588         * decl.c (poplevel): If functionbody, try not to create an extra
589         BLOCK for function body and use subblocks as that, if it is non-NULL
590         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
591         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
592
593         PR sanitizer/64984
594         * except.c (check_noexcept_r): Return NULL for internal
595         calls.
596
597 2015-02-10  Jason Merrill  <jason@redhat.com>
598
599         PR c++/64994
600         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
601
602 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
603
604         PR ipa/64982
605         * method.c (use_thunk): Do not check for stdarg thunks.
606
607 2015-02-06  Jason Merrill  <jason@redhat.com>
608
609         PR c++/64899
610         * init.c (build_vec_init): Handle default-initialized array with
611         constexpr default constructor.
612
613 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
614
615         PR c/64824
616         PR c/64868
617         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
618
619 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
620
621         PR c++/64877
622         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
623         for generated expressions.
624
625 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
626
627         PR c++/64901
628         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
629         DECL_OVERRIDE_P.
630
631 2015-02-02  Jason Merrill  <jason@redhat.com>
632
633         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
634
635 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
636
637         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
638         changed to pass input_location as first argument.
639
640 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
641
642         PR c++/64717
643         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
644         into SAVE_EXPR.
645
646 2015-01-29  Jason Merrill  <jason@redhat.com>
647
648         PR c++/49508
649         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
650         erroneous return statement.
651
652         PR c++/64521
653         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
654         point.
655
656 2015-01-27  Caroline Tice  <cmtice@google.com>
657
658         Committing VTV Cywin/Ming patch for Patrick Wollgast
659         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
660         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
661
662 2015-01-27  Jason Merrill  <jason@redhat.com>
663
664         PR c++/58597
665         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
666         current_function_decl.
667
668         PR c++/63889
669         * pt.c (finish_template_variable): Move from semantics.c.
670         Handle multiple template arg levels.  Handle coercion here.
671         (lookup_template_variable): Not here.
672
673 2015-01-23  Jason Merrill  <jason@redhat.com>
674
675         PR c++/64314
676         PR c++/57510
677         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
678         that has been completely split out.
679
680         PR c++/64701
681         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
682         statement codes.
683
684         PR c++/64727
685         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
686         of CONST_DECL.
687
688 2015-01-21  Jason Merrill  <jason@redhat.com>
689
690         PR c++/64603
691         * constexpr.c (cxx_eval_constant_expression): Only shortcut
692         constant CONSTRUCTORs.
693
694         PR c++/64647
695         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
696         give a hard error in a template instantiation.
697
698 2015-01-21  Richard Biener  <rguenther@suse.de>
699
700         PR middle-end/64313
701         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
702         for builtins the user declared correctly.
703
704 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
705
706         PR c++/58614
707         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
708         TREE_TYPE (elt) == error_mark_node.
709
710 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
711
712         PR tree-optimization/62053
713         * tree.c (build_cplus_array_type): Layout type after variants are set.
714
715 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
716
717         * cp-gimplify.c (cp_genericize_r): Call
718         cp_ubsan_maybe_instrument_member_call for member calls.
719         (cp_ubsan_check_member_access_r): New function.
720         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
721         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
722         cp_ubsan_instrument_member_accesses,
723         cp_ubsan_maybe_instrument_downcast,
724         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
725         * cp-ubsan.c: New file.
726         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
727         * constexpr.c (cxx_eval_call_expression): Return void_node
728         for IFN_UBSAN_VPTR.
729         (potential_constant_expression_1): Return true for
730         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
731         * typeck.c (build_class_member_access_expr): Provide locus
732         for COMPONENT_REFs.
733         (build_static_cast_1): Instrument downcasts.
734         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
735         add ubsan instrumentation for virtual_access.
736         * call.c: Include internal-fn.h.
737         (set_flags_from_callee): Handle internal calls.
738
739 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
740
741         PR c++/59366
742         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
743         and function templates, declared only in the class.
744         * decl.c (duplicate_decls): Reveal hidden friend functions or
745         function templates, if they are redeclared outside the class.
746
747 2015-01-15  Jason Merrill  <jason@redhat.com>
748
749         PR c++/64356
750         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
751
752         PR c++/63283
753         * constexpr.c (potential_constant_expression_1): Handle reference
754         args in templates.
755
756 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
757             James Norris  <jnorris@codesourcery.com>
758             Cesar Philippidis  <cesar@codesourcery.com>
759             Ilmir Usmanov  <i.usmanov@samsung.com>
760             Jakub Jelinek  <jakub@redhat.com>
761
762         * parser.c: Include "gomp-constants.h".
763         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
764         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
765         Use OMP_CLAUSE_SET_MAP_KIND.
766         (cp_parser_omp_construct, cp_parser_pragma): Handle
767         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
768         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
769         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
770         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
771         "create", "delete", "deviceptr", "host", "num_gangs",
772         "num_workers", "present", "present_or_copy", "pcopy",
773         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
774         "present_or_create", "pcreate", "vector_length", "wait".
775         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
776         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
777         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
778         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
779         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
780         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
781         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
782         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
783         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
784         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
785         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
786         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
787         (cp_parser_oacc_parallel, cp_parser_oacc_update)
788         (cp_parser_oacc_wait): New functions.
789         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
790         (finish_oacc_parallel): New prototypes.
791         * semantics.c: Include "gomp-constants.h".
792         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
793         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
794         OMP_CLAUSE_SET_MAP_KIND.
795         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
796         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
797         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
798         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
799         functions.
800
801 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
802
803         PR c++/58671
804         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
805         self-initialization.
806
807 2015-01-13  Jason Merrill  <jason@redhat.com>
808
809         PR c++/64356
810         PR libstdc++/58777
811         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
812         pointer expressions.
813         (cxx_eval_increment_expression): Likewise.
814
815         PR c++/64514
816         * pt.c (coerce_template_parameter_pack): Return NULL for a
817         zero-length fixed parameter pack with a pack expansion arg.
818
819         PR c++/64520
820         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
821
822 2015-01-12  Jason Merrill  <jason@redhat.com>
823
824         PR c++/64547
825         * constexpr.c (cxx_eval_call_expression): A call to a void
826         function doesn't need to return a value.
827
828 2015-01-09  Michael Collison  <michael.collison@linaro.org>
829
830         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
831         input.h, alias.h, symtab.h, options.h, fold-const.h,
832         wide-int.h, and inchash.h due to flattening of tree.h.
833         * class.c: Ditto.
834         * constexpr.c: Ditto.
835         * cp-array-notation.c: Ditto.
836         * cp-gimplify.c: Ditto.
837         * cp-lang.c: Ditto.
838         * cp-objcp-common.c: Ditto.
839         * cvt.c: Ditto.
840         * decl2.c: Ditto.
841         * decl.c: Ditto.
842         * dump.c: Ditto.
843         * error.c: Ditto.
844         * except.c: Ditto.
845         * expr.c: Ditto.
846         * friend.c: Ditto.
847         * init.c: Ditto.
848         * lambda.c: Ditto.
849         * lex.c: Ditto.
850         * mangle.c: Ditto.
851         * name-lookup.c: Ditto.
852         * optimize.c: Ditto.
853         * parser.c: Ditto.
854         * pt.c: Ditto.
855         * ptree.c: Ditto.
856         * repo.c: Ditto.
857         * rtti.c: Ditto.
858         * search.c: Ditto.
859         * semantics.c: Ditto.
860         * tree.c: Ditto.
861         * typeck2.c: Ditto.
862         * typeck.c: Ditto.
863
864 2015-01-08  Jason Merrill  <jason@redhat.com>
865
866         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
867         * decl.c (compute_array_index_type): Likewise.
868         * init.c (build_vec_init): Likewise.
869         * typeck.c (cp_build_binary_op): Likewise.
870
871 2015-01-08  Jason Merrill  <jason@redhat.com>
872
873         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
874         whether an initializer-list is too big for a VLA.
875         (throw_bad_array_length): Remove.
876         * cp-tree.h: Remove prototype.
877
878 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
879
880         PR c++/60753
881         * decl.c (grokfndecl): Add bool parameter.
882         (grokdeclarator): Adjust calls.
883         (start_decl): Don't set DECL_DELETED_FN here.
884
885 2015-01-06  Jason Merrill  <jason@redhat.com>
886
887         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
888         template-ids.
889
890         PR c++/64455
891         * pt.c (type_dependent_expression_p): Handle variable templates.
892         * constexpr.c (potential_constant_expression_1): Use it.
893
894         PR c++/64487
895         * semantics.c (finish_offsetof): Handle templates here.
896         * parser.c (cp_parser_builtin_offsetof): Not here.
897
898         PR c++/64496
899         * semantics.c (process_outer_var_ref): Diagnose lambda in local
900         class NSDMI.
901
902 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
903
904         PR c++/64489
905         * class.c (check_field_decls): Make copy assignment operators
906         complex only in c++98 mode.
907
908 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
909
910         PR c++/31397
911         * class.c (check_for_override): Warn when a virtual function is an
912         override not marked override.
913
914 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
915
916         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
917         hold base_fndecls.
918         (get_basefndecls): Adjust.
919
920 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
921
922         Update copyright years.
923
924 2015-01-05  Marek Polacek  <polacek@redhat.com>
925
926         PR c/64423
927         * typeck.c (cp_build_array_ref): Pass loc down to
928         warn_array_subscript_with_type_char.
929
930 \f
931 Copyright (C) 2015 Free Software Foundation, Inc.
932
933 Copying and distribution of this file, with or without modification,
934 are permitted in any medium without royalty provided the copyright
935 notice and this notice are preserved.