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