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