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