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