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