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