re PR c/68062 (ICE when comparing vectors)
[gcc.git] / gcc / cp / ChangeLog
1 2016-01-27 Marek Polacek <polacek@redhat.com>
2
3 PR c/68062
4 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
5 needed. Add -Wsign-compare warning.
6
7 2016-01-27 Ryan Burn <contact@rnburn.com>
8
9 PR cilkplus/69267
10 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
11 superfluous post_p argument in call to
12 cilk_gimplify_call_params_in_spawned_fn.
13
14 2016-01-27 Marek Polacek <polacek@redhat.com>
15
16 PR c++/69379
17 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
18 wrapped in NOP_EXPRs.
19
20 2016-01-27 Martin Sebor <msebor@redhat.com>
21
22 PR c++/69317
23 * mangle.c (mangle_decl): Reference the correct (saved) version
24 of the ABI in -Wabi diagnostics.
25
26 2016-01-27 Marek Polacek <polacek@redhat.com>
27
28 PR c++/69496
29 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
30 elements of the array.
31
32 2016-01-26 Jason Merrill <jason@redhat.com>
33
34 PR c++/68949
35 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
36 (cxx_eval_call_expression): Don't look through clones.
37 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
38 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
39 maybe-in-charge *tor.
40
41 2016-01-26 Jason Merrill <jason@redhat.com>
42
43 PR c++/68782
44 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
45 and TREE_SIDE_EFFECTS.
46 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
47 verify_constructor_flags.
48
49 2016-01-26 Jakub Jelinek <jakub@redhat.com>
50
51 PR c++/68357
52 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
53 return error_mark_node instead of building trees with error_mark_node
54 operands.
55
56 2016-01-26 David Malcolm <dmalcolm@redhat.com>
57
58 PR other/69006
59 * error.c (print_instantiation_partial_context_line): Add missing
60 newlines from output for the t == NULL case.
61 (print_instantiation_partial_context): Remove call to pp_newline.
62
63 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
64
65 Revert:
66 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
67
68 PR c++/11858
69 PR c++/24663
70 PR c++/24664
71 * decl.c (grokdeclarator): Don't decay array parameter type to
72 a pointer type if it's dependent.
73 (grokparms): Invoke strip_top_quals instead of directly invoking
74 cp_build_qualified_type.
75 * pt.c (decay_dependent_array_parm_type): New static function.
76 (type_unification_real): Call decay_dependent_array_parm_type
77 to decay a dependent array parameter type to its corresponding
78 pointer type before unification.
79 (more_specialized_fn): Likewise.
80 (get_bindings): Likewise.
81 * tree.c (cp_build_qualified_type): Trivial typofix in
82 documentation.
83
84 2016-01-23 Martin Sebor <msebor@redhat.com>
85
86 PR c++/58109
87 PR c++/69022
88 * decl2.c (is_late_template_attribute): Handle dependent argument
89 to attribute align and attribute vector_size.
90
91 2016-01-21 Jason Merrill <jason@redhat.com>
92
93 PR c++/69392
94 * lambda.c (lambda_capture_field_type): Handle 'this' specially
95 for init-capture, too.
96
97 PR c++/65687
98 * decl.c (type_is_deprecated): Don't look into a typedef.
99
100 PR c++/40751
101 PR c++/64987
102 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
103
104 PR c++/43407
105 * decl.c (start_enum): Add attributes parameter.
106 * parser.c (cp_parser_enum_specifier): Pass it.
107 * pt.c (lookup_template_class_1): Pass it.
108 * cp-tree.h: Adjust.
109
110 2016-01-19 Jason Merrill <jason@redhat.com>
111
112 PR c++/59759
113 * pt.c (convert_template_argument): Handle VAR_DECL properly.
114
115 2016-01-19 Marek Polacek <polacek@redhat.com>
116
117 PR c++/68586
118 * constexpr.c (clear_cv_cache): New.
119 * cp-gimplify.c (clear_fold_cache): New.
120 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
121 * decl.c (finish_enum_value_list): Call them.
122
123 PR c++/68965
124 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
125
126 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
127
128 PR c++/11858
129 PR c++/24663
130 PR c++/24664
131 * decl.c (grokdeclarator): Don't decay array parameter type to
132 a pointer type if it's dependent.
133 (grokparms): Invoke strip_top_quals instead of directly invoking
134 cp_build_qualified_type.
135 * pt.c (decay_dependent_array_parm_type): New static function.
136 (type_unification_real): Call decay_dependent_array_parm_type
137 to decay a dependent array parameter type to its corresponding
138 pointer type before unification.
139 (more_specialized_fn): Likewise.
140 (get_bindings): Likewise.
141 * tree.c (cp_build_qualified_type): Trivial typofix in
142 documentation.
143
144 2016-01-18 Jason Merrill <jason@redhat.com>
145
146 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
147
148 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
149
150 PR c++/68767
151 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
152 (contains_label_1, contains_label_p): Remove.
153
154 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
155
156 PR c++/69091
157 * pt.c (type_dependent_expression_p): For a function template
158 specialization, a type is dependent iff any of its template
159 arguments are.
160
161 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
162
163 * cp-array-notation.c (cp_expand_cond_array_notations): Return
164 error_mark_node only if find_rank failed, not if it was
165 successful.
166
167 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
168
169 PR c++/68936
170 * tree.c (build_min_non_dep_call_vec): Don't retain the
171 KOENIG_LOOKUP_P flag of the non-dependent expression that's
172 been built.
173 (build_min_non_dep_op_overload): Instead, do it here.
174
175 2016-01-15 Jakub Jelinek <jakub@redhat.com>
176
177 PR bootstrap/68271
178 * parser.h (cp_token): Remove pragma_kind field. Add comment
179 with number of unused bits.
180 * parser.c (eof_token): Remove pragma_kind field initializer.
181 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
182 field, don't clear CPP_PRAGMA u.value.
183 (cp_parser_pragma_kind): New function.
184 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
185 cp_parser_omp_construct, cp_parser_initial_pragma,
186 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
187 pragma_kind field.
188
189 2016-01-15 Jason Merrill <jason@redhat.com>
190
191 PR c++/68847
192 * call.c (build_cxx_call): Use fold_non_dependent_expr.
193
194 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
195 value.
196
197 PR c++/69257
198 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
199 array/function-to-pointer conversion. Call
200 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
201 * call.c (convert_like_real): Print call context if
202 decay_conversion errors.
203
204 2016-01-14 Tom de Vries <tom@codesourcery.com>
205
206 PR tree-optimization/68773
207 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
208 set force_output.
209
210 2016-01-14 Jason Merrill <jason@redhat.com>
211
212 PR c++/69261
213 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
214
215 2016-01-12 Marek Polacek <polacek@redhat.com>
216
217 PR c++/68979
218 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
219 error_at and adjust the return value.
220
221 2016-01-12 Jakub Jelinek <jakub@redhat.com>
222
223 PR objc++/68511
224 PR c++/69213
225 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
226 GS_ERROR whenever seen_error (), only if *expr_p contains
227 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
228
229 PR c++/66808
230 PR c++/69000
231 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
232
233 2016-01-11 Jason Merrill <jason@redhat.com>
234
235 PR c++/69131
236 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
237 (process_subob_fn): Likewise. Don't consider triviality if true.
238 (synthesize_method_walk): Pass it.
239
240 2016-01-11 David Malcolm <dmalcolm@redhat.com>
241
242 PR c++/68795
243 * parser.c (cp_parser_postfix_expression): Initialize
244 close_paren_loc to UNKNOWN_LOCATION; only use it if
245 it has been written to by
246 cp_parser_parenthesized_expression_list.
247 (cp_parser_parenthesized_expression_list): Document the behavior
248 with respect to the CLOSE_PAREN_LOC param.
249
250 2016-01-11 Jakub Jelinek <jakub@redhat.com>
251
252 PR c++/69211
253 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
254 folded operands have side-effects, but folding changed any of them,
255 build a new tree with the folded operands instead of returning the
256 unfolded tree.
257
258 2016-01-09 Marek Polacek <polacek@redhat.com>
259
260 PR c++/69113
261 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
262
263 2016-01-09 Jakub Jelinek <jakub@redhat.com>
264
265 PR c++/69164
266 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
267
268 2016-01-08 Jason Merrill <jason@redhat.com>
269
270 PR c++/69158
271 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
272 in completion.
273
274 2016-01-08 Marek Polacek <polacek@redhat.com>
275
276 PR c++/68449
277 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
278
279 2016-01-08 Jason Merrill <jason@redhat.com>
280
281 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
282 workaround.
283
284 PR c++/68983
285 PR c++/67557
286 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
287 TREE_ADDRESSABLE type.
288
289 PR c++/68983
290 PR c++/67557
291 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
292
293 2016-01-05 Nathan Sidwell <nathan@acm.org>
294
295 PR c++/58583
296 * pt.c (build_non_dependent_expr): Don't try a checking fold when
297 parsing an nsdmi.
298
299 2016-01-04 Jakub Jelinek <jakub@redhat.com>
300
301 Update copyright years.
302 \f
303 Copyright (C) 2016 Free Software Foundation, Inc.
304
305 Copying and distribution of this file, with or without modification,
306 are permitted in any medium without royalty provided the copyright
307 notice and this notice are preserved.