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