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