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