* cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2016-01-18  Jason Merrill  <jason@redhat.com>
2
3         * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
4
5         * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
6
7         PR c++/68767
8         * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify.  Do fold COND_EXPR.
9         (contains_label_1, contains_label_p): Remove.
10
11 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
12
13         PR c++/69091
14         * pt.c (type_dependent_expression_p): For a function template
15         specialization, a type is dependent iff any of its template
16         arguments are.
17
18 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
19
20         * cp-array-notation.c (cp_expand_cond_array_notations): Return
21         error_mark_node only if find_rank failed, not if it was
22         successful.
23
24 2016-01-16  Patrick Palka  <ppalka@gcc.gnu.org>
25
26         PR c++/68936
27         * tree.c (build_min_non_dep_call_vec): Don't retain the
28         KOENIG_LOOKUP_P flag of the non-dependent expression that's
29         been built.
30         (build_min_non_dep_op_overload): Instead, do it here.
31
32 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
33
34         PR bootstrap/68271
35         * parser.h (cp_token): Remove pragma_kind field.  Add comment
36         with number of unused bits.
37         * parser.c (eof_token): Remove pragma_kind field initializer.
38         (cp_lexer_get_preprocessor_token): Don't set pragma_kind
39         field, don't clear CPP_PRAGMA u.value.
40         (cp_parser_pragma_kind): New function.
41         (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
42         cp_parser_omp_construct, cp_parser_initial_pragma,
43         cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
44         pragma_kind field.
45
46 2016-01-15  Jason Merrill  <jason@redhat.com>
47
48         PR c++/68847
49         * call.c (build_cxx_call): Use fold_non_dependent_expr.
50
51         * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
52         value.
53
54         PR c++/69257
55         * typeck.c (decay_conversion): Don't call mark_rvalue_use for
56         array/function-to-pointer conversion.  Call
57         complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
58         * call.c (convert_like_real): Print call context if
59         decay_conversion errors.
60
61 2016-01-14  Tom de Vries  <tom@codesourcery.com>
62
63         PR tree-optimization/68773
64         * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
65         set force_output.
66
67 2016-01-14  Jason Merrill  <jason@redhat.com>
68
69         PR c++/69261
70         * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
71
72 2016-01-12  Marek Polacek  <polacek@redhat.com>
73
74         PR c++/68979
75         * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
76         error_at and adjust the return value.
77
78 2016-01-12  Jakub Jelinek  <jakub@redhat.com>
79
80         PR objc++/68511
81         PR c++/69213
82         * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
83         GS_ERROR whenever seen_error (), only if *expr_p contains
84         cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
85
86         PR c++/66808
87         PR c++/69000
88         * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
89
90 2016-01-11  Jason Merrill  <jason@redhat.com>
91
92         PR c++/69131
93         * method.c (walk_field_subobs): Add dtor_from_ctor parm.
94         (process_subob_fn): Likewise.  Don't consider triviality if true.
95         (synthesize_method_walk): Pass it.
96
97 2016-01-11  David Malcolm  <dmalcolm@redhat.com>
98
99         PR c++/68795
100         * parser.c (cp_parser_postfix_expression): Initialize
101         close_paren_loc to UNKNOWN_LOCATION; only use it if
102         it has been written to by
103         cp_parser_parenthesized_expression_list.
104         (cp_parser_parenthesized_expression_list): Document the behavior
105         with respect to the CLOSE_PAREN_LOC param.
106
107 2016-01-11  Jakub Jelinek  <jakub@redhat.com>
108
109         PR c++/69211
110         * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
111         folded operands have side-effects, but folding changed any of them,
112         build a new tree with the folded operands instead of returning the
113         unfolded tree.
114
115 2016-01-09  Marek Polacek  <polacek@redhat.com>
116
117         PR c++/69113
118         * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
119
120 2016-01-09  Jakub Jelinek  <jakub@redhat.com>
121
122         PR c++/69164
123         * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
124
125 2016-01-08  Jason Merrill  <jason@redhat.com>
126
127         PR c++/69158
128         * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
129         in completion.
130
131 2016-01-08  Marek Polacek  <polacek@redhat.com>
132
133         PR c++/68449
134         * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
135
136 2016-01-08  Jason Merrill  <jason@redhat.com>
137
138         * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
139         workaround.
140
141         PR c++/68983
142         PR c++/67557
143         * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
144         TREE_ADDRESSABLE type.
145
146         PR c++/68983
147         PR c++/67557
148         * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
149
150 2016-01-05  Nathan Sidwell  <nathan@acm.org>
151
152         PR c++/58583
153         * pt.c (build_non_dependent_expr): Don't try a checking fold when
154         parsing an nsdmi.
155
156 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
157
158         Update copyright years.
159 \f
160 Copyright (C) 2016 Free Software Foundation, Inc.
161
162 Copying and distribution of this file, with or without modification,
163 are permitted in any medium without royalty provided the copyright
164 notice and this notice are preserved.