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