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