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