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