re PR c++/65075 (constexpr regression)
[gcc.git] / gcc / cp / ChangeLog
1 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
2 Jakub Jelinek <jakub@redhat.com>
3
4 PR c++/65075
5 * constexpr.c (check_constexpr_bind_expr_vars): Allow
6 implicit typedefs for lambda types.
7
8 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
9
10 PR c++/60894
11 * decl.c (lookup_and_check_tag): Use strip_using_decl.
12
13 2015-02-13 Jason Merrill <jason@redhat.com>
14
15 PR c++/65054
16 * pt.c (template_args_equal): Look through conversions here.
17 * tree.c (cp_tree_equal): Not here.
18
19 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
20
21 PR c++/60211
22 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
23 pragma_external context.
24
25 2015-02-13 Jason Merrill <jason@redhat.com>
26
27 PR c++/65051
28 * call.c (reference_binding): Don't look for bad conversion
29 if TO is incomplete.
30
31 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
32
33 PR c++/64970
34 * decl.c (make_typename_type): Pass tsubst_flags_t argument
35 to lookup_template_class.
36
37 2015-02-13 Jakub Jelinek <jakub@redhat.com>
38
39 PR ipa/65034
40 * decl.c (start_preparsed_function): Use void_type_node instead
41 of NULL_TREE as LABEL_DECL type.
42
43 2015-02-12 Jason Merrill <jason@redhat.com>
44
45 PR c++/64898
46 * mangle.c (write_mangled_name): Fix test for variable template
47 instantiation.
48
49 * decl.c (begin_destructor_body): Condition clobber on
50 -flifetime-dse.
51
52 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
53
54 PR c++/64959
55 * parser.c (lookup_literal_operator): Return all candidates.
56 (cp_parser_userdef_char_literal): Simplify error handling.
57 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
58 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
59 Also give higher priority to standard string UDL operator.
60
61 2015-02-12 Jakub Jelinek <jakub@redhat.com>
62
63 PR debug/55541
64 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
65 * decl.c (poplevel): If functionbody, try not to create an extra
66 BLOCK for function body and use subblocks as that, if it is non-NULL
67 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
68 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
69
70 PR sanitizer/64984
71 * except.c (check_noexcept_r): Return NULL for internal
72 calls.
73
74 2015-02-10 Jason Merrill <jason@redhat.com>
75
76 PR c++/64994
77 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
78
79 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
80
81 PR ipa/64982
82 * method.c (use_thunk): Do not check for stdarg thunks.
83
84 2015-02-06 Jason Merrill <jason@redhat.com>
85
86 PR c++/64899
87 * init.c (build_vec_init): Handle default-initialized array with
88 constexpr default constructor.
89
90 2015-02-04 Jakub Jelinek <jakub@redhat.com>
91
92 PR c/64824
93 PR c/64868
94 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
95
96 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
97
98 PR c++/64877
99 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
100 for generated expressions.
101
102 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
103
104 PR c++/64901
105 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
106 DECL_OVERRIDE_P.
107
108 2015-02-02 Jason Merrill <jason@redhat.com>
109
110 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
111
112 2015-01-30 Joseph Myers <joseph@codesourcery.com>
113
114 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
115 changed to pass input_location as first argument.
116
117 2015-01-29 Jakub Jelinek <jakub@redhat.com>
118
119 PR c++/64717
120 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
121 into SAVE_EXPR.
122
123 2015-01-29 Jason Merrill <jason@redhat.com>
124
125 PR c++/49508
126 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
127 erroneous return statement.
128
129 PR c++/64521
130 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
131 point.
132
133 2015-01-27 Caroline Tice <cmtice@google.com>
134
135 Committing VTV Cywin/Ming patch for Patrick Wollgast
136 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
137 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
138
139 2015-01-27 Jason Merrill <jason@redhat.com>
140
141 PR c++/58597
142 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
143 current_function_decl.
144
145 PR c++/63889
146 * pt.c (finish_template_variable): Move from semantics.c.
147 Handle multiple template arg levels. Handle coercion here.
148 (lookup_template_variable): Not here.
149
150 2015-01-23 Jason Merrill <jason@redhat.com>
151
152 PR c++/64314
153 PR c++/57510
154 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
155 that has been completely split out.
156
157 PR c++/64701
158 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
159 statement codes.
160
161 PR c++/64727
162 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
163 of CONST_DECL.
164
165 2015-01-21 Jason Merrill <jason@redhat.com>
166
167 PR c++/64603
168 * constexpr.c (cxx_eval_constant_expression): Only shortcut
169 constant CONSTRUCTORs.
170
171 PR c++/64647
172 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
173 give a hard error in a template instantiation.
174
175 2015-01-21 Richard Biener <rguenther@suse.de>
176
177 PR middle-end/64313
178 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
179 for builtins the user declared correctly.
180
181 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
182
183 PR c++/58614
184 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
185 TREE_TYPE (elt) == error_mark_node.
186
187 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
188
189 PR tree-optimization/62053
190 * tree.c (build_cplus_array_type): Layout type after variants are set.
191
192 2015-01-15 Jakub Jelinek <jakub@redhat.com>
193
194 * cp-gimplify.c (cp_genericize_r): Call
195 cp_ubsan_maybe_instrument_member_call for member calls.
196 (cp_ubsan_check_member_access_r): New function.
197 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
198 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
199 cp_ubsan_instrument_member_accesses,
200 cp_ubsan_maybe_instrument_downcast,
201 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
202 * cp-ubsan.c: New file.
203 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
204 * constexpr.c (cxx_eval_call_expression): Return void_node
205 for IFN_UBSAN_VPTR.
206 (potential_constant_expression_1): Return true for
207 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
208 * typeck.c (build_class_member_access_expr): Provide locus
209 for COMPONENT_REFs.
210 (build_static_cast_1): Instrument downcasts.
211 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
212 add ubsan instrumentation for virtual_access.
213 * call.c: Include internal-fn.h.
214 (set_flags_from_callee): Handle internal calls.
215
216 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
217
218 PR c++/59366
219 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
220 and function templates, declared only in the class.
221 * decl.c (duplicate_decls): Reveal hidden friend functions or
222 function templates, if they are redeclared outside the class.
223
224 2015-01-15 Jason Merrill <jason@redhat.com>
225
226 PR c++/64356
227 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
228
229 PR c++/63283
230 * constexpr.c (potential_constant_expression_1): Handle reference
231 args in templates.
232
233 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
234 James Norris <jnorris@codesourcery.com>
235 Cesar Philippidis <cesar@codesourcery.com>
236 Ilmir Usmanov <i.usmanov@samsung.com>
237 Jakub Jelinek <jakub@redhat.com>
238
239 * parser.c: Include "gomp-constants.h".
240 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
241 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
242 Use OMP_CLAUSE_SET_MAP_KIND.
243 (cp_parser_omp_construct, cp_parser_pragma): Handle
244 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
245 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
246 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
247 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
248 "create", "delete", "deviceptr", "host", "num_gangs",
249 "num_workers", "present", "present_or_copy", "pcopy",
250 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
251 "present_or_create", "pcreate", "vector_length", "wait".
252 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
253 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
254 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
255 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
256 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
257 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
258 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
259 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
260 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
261 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
262 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
263 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
264 (cp_parser_oacc_parallel, cp_parser_oacc_update)
265 (cp_parser_oacc_wait): New functions.
266 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
267 (finish_oacc_parallel): New prototypes.
268 * semantics.c: Include "gomp-constants.h".
269 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
270 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
271 OMP_CLAUSE_SET_MAP_KIND.
272 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
273 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
274 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
275 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
276 functions.
277
278 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
279
280 PR c++/58671
281 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
282 self-initialization.
283
284 2015-01-13 Jason Merrill <jason@redhat.com>
285
286 PR c++/64356
287 PR libstdc++/58777
288 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
289 pointer expressions.
290 (cxx_eval_increment_expression): Likewise.
291
292 PR c++/64514
293 * pt.c (coerce_template_parameter_pack): Return NULL for a
294 zero-length fixed parameter pack with a pack expansion arg.
295
296 PR c++/64520
297 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
298
299 2015-01-12 Jason Merrill <jason@redhat.com>
300
301 PR c++/64547
302 * constexpr.c (cxx_eval_call_expression): A call to a void
303 function doesn't need to return a value.
304
305 2015-01-09 Michael Collison <michael.collison@linaro.org>
306
307 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
308 input.h, alias.h, symtab.h, options.h, fold-const.h,
309 wide-int.h, and inchash.h due to flattening of tree.h.
310 * class.c: Ditto.
311 * constexpr.c: Ditto.
312 * cp-array-notation.c: Ditto.
313 * cp-gimplify.c: Ditto.
314 * cp-lang.c: Ditto.
315 * cp-objcp-common.c: Ditto.
316 * cvt.c: Ditto.
317 * decl2.c: Ditto.
318 * decl.c: Ditto.
319 * dump.c: Ditto.
320 * error.c: Ditto.
321 * except.c: Ditto.
322 * expr.c: Ditto.
323 * friend.c: Ditto.
324 * init.c: Ditto.
325 * lambda.c: Ditto.
326 * lex.c: Ditto.
327 * mangle.c: Ditto.
328 * name-lookup.c: Ditto.
329 * optimize.c: Ditto.
330 * parser.c: Ditto.
331 * pt.c: Ditto.
332 * ptree.c: Ditto.
333 * repo.c: Ditto.
334 * rtti.c: Ditto.
335 * search.c: Ditto.
336 * semantics.c: Ditto.
337 * tree.c: Ditto.
338 * typeck2.c: Ditto.
339 * typeck.c: Ditto.
340
341 2015-01-08 Jason Merrill <jason@redhat.com>
342
343 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
344 * decl.c (compute_array_index_type): Likewise.
345 * init.c (build_vec_init): Likewise.
346 * typeck.c (cp_build_binary_op): Likewise.
347
348 2015-01-08 Jason Merrill <jason@redhat.com>
349
350 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
351 whether an initializer-list is too big for a VLA.
352 (throw_bad_array_length): Remove.
353 * cp-tree.h: Remove prototype.
354
355 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
356
357 PR c++/60753
358 * decl.c (grokfndecl): Add bool parameter.
359 (grokdeclarator): Adjust calls.
360 (start_decl): Don't set DECL_DELETED_FN here.
361
362 2015-01-06 Jason Merrill <jason@redhat.com>
363
364 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
365 template-ids.
366
367 PR c++/64455
368 * pt.c (type_dependent_expression_p): Handle variable templates.
369 * constexpr.c (potential_constant_expression_1): Use it.
370
371 PR c++/64487
372 * semantics.c (finish_offsetof): Handle templates here.
373 * parser.c (cp_parser_builtin_offsetof): Not here.
374
375 PR c++/64496
376 * semantics.c (process_outer_var_ref): Diagnose lambda in local
377 class NSDMI.
378
379 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
380
381 PR c++/64489
382 * class.c (check_field_decls): Make copy assignment operators
383 complex only in c++98 mode.
384
385 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
386
387 PR c++/31397
388 * class.c (check_for_override): Warn when a virtual function is an
389 override not marked override.
390
391 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
392
393 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
394 hold base_fndecls.
395 (get_basefndecls): Adjust.
396
397 2015-01-05 Jakub Jelinek <jakub@redhat.com>
398
399 Update copyright years.
400
401 2015-01-05 Marek Polacek <polacek@redhat.com>
402
403 PR c/64423
404 * typeck.c (cp_build_array_ref): Pass loc down to
405 warn_array_subscript_with_type_char.
406
407 \f
408 Copyright (C) 2015 Free Software Foundation, Inc.
409
410 Copying and distribution of this file, with or without modification,
411 are permitted in any medium without royalty provided the copyright
412 notice and this notice are preserved.