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