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