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