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