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