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