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