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