]>
Commit | Line | Data |
---|---|---|
1ee44b26 JM |
1 | 2011-04-07 Jason Merrill <jason@redhat.com> |
2 | ||
2b8497cd JM |
3 | PR c++/48449 |
4 | * typeck2.c (build_functional_cast): Check complain consistently. | |
5 | Use build_value_init and abstract_virtuals_error_sfinae. | |
6 | (abstract_virtuals_error_sfinae): Split out. | |
7 | * cp-tree.h: Declare it. | |
8 | * init.c (build_new_1): Use it. | |
9 | (build_value_init_noctor): Handle FUNCTION_TYPE. | |
10 | ||
6cdb1428 JM |
11 | * semantics.c (finish_decltype_type): Simplify handling of unknown |
12 | type. | |
13 | ||
5b97c77f JM |
14 | * semantics.c (finish_decltype_type): Add complain parm. |
15 | * cp-tree.h: Adjust. | |
16 | * parser.c (cp_parser_decltype): Adjust. | |
17 | * pt.c (tsubst): Adjust. | |
18 | ||
1ee44b26 JM |
19 | PR c++/48450 |
20 | * cvt.c (ocp_convert): Handle converting scoped enum to bool. | |
21 | ||
4e36c213 JM |
22 | 2011-03-31 Jason Merrill <jason@redhat.com> |
23 | ||
c689d49e JM |
24 | PR c++/48277 |
25 | * semantics.c (finish_call_expr): Remove assert. | |
26 | ||
c454d74a JM |
27 | PR c++/48280 |
28 | * method.c (defaultable_fn_check): Templates are not defaultable. | |
29 | ||
4e36c213 JM |
30 | * parser.c (cp_parser_init_declarator): Avoid redundant |
31 | cp_finish_decl for member declarations. | |
32 | ||
ef5daa25 JM |
33 | 2011-03-30 Jason Merrill <jason@redhat.com> |
34 | ||
35 | PR c++/48212 | |
36 | * semantics.c (non_const_var_error): Just return if DECL_INITIAL | |
37 | is error_mark_node. | |
38 | ||
c06ce6e4 JM |
39 | 2011-03-30 Jason Merrill <jason@redhat.com> |
40 | ||
e0f89433 JM |
41 | PR c++/48369 |
42 | * semantics.c (potential_constant_expression_1): Handle | |
43 | UNORDERED_EXPR and ORDERED_EXPR. | |
44 | ||
a63940ba JM |
45 | PR c++/48281 |
46 | * semantics.c (finish_compound_literal): Do put static/constant | |
47 | arrays in static variables. | |
48 | ||
88d37ae6 JM |
49 | * call.c (convert_like_real) [ck_list]: Build up the |
50 | initializer_list object directly. | |
51 | * decl.c (build_init_list_var_init): Adjust. | |
52 | ||
c06ce6e4 JM |
53 | * call.c (convert_like_real): Correct TREE_CONSTANT on CONSTRUCTOR. |
54 | * decl.c (reshape_init_array_1): Likewise. | |
55 | ||
915829cc JM |
56 | 2011-03-29 Jason Merrill <jason@redhat.com> |
57 | ||
5453bbef JM |
58 | PR c++/48265 |
59 | * pt.c (value_dependent_expression_p) [VAR_DECL]: Make sure | |
60 | the variable is constant before looking at its initializer. | |
61 | ||
5b9e705e JM |
62 | PR c++/48319 |
63 | * pt.c (value_dependent_expression_p): Handle TEMPLATE_ID_EXPR. | |
64 | ||
00a0d6f3 JM |
65 | PR c++/48089 |
66 | * semantics.c (potential_constant_expression_1): Change error about | |
67 | use of *this in constructor into sorry. | |
68 | ||
a90caaa2 JM |
69 | PR c++/48296 |
70 | * decl.c (cp_finish_decl): Defer validation of constexpr member | |
71 | functions. | |
72 | * class.c (finalize_literal_type_property): Validate them here. | |
73 | * semantics.c (is_valid_constexpr_fn): Don't check completeness. | |
74 | ||
915829cc JM |
75 | * semantics.c (is_valid_constexpr_fn): Specify input location. |
76 | ||
0309d288 JM |
77 | 2011-03-28 Jason Merrill <jason@redhat.com> |
78 | ||
c2c6f744 JM |
79 | PR c++/48313 |
80 | * pt.c (maybe_adjust_types_for_deduction): Handle T&& deduction | |
81 | from overloaded function. | |
82 | ||
dd35aac7 JM |
83 | Core 1232 |
84 | * call.c (build_array_conv): New. | |
85 | (implicit_conversion): Use it. | |
86 | ||
159177a1 JM |
87 | * call.c (reference_binding): Allow direct binding to an array |
88 | rvalue. | |
89 | ||
c1120b0c JM |
90 | Core 898 |
91 | * parser.c (cp_parser_compound_statement): Add function_body parm. | |
92 | Complain about non-body compound-stmt in constexpr fn. | |
93 | (cp_parser_primary_expression, cp_parser_statement): Adjust. | |
94 | (cp_parser_implicitly_scoped_statement): Adjust. | |
95 | (cp_parser_function_body, cp_parser_try_block): Adjust. | |
96 | (cp_parser_handler, cp_parser_objc_synchronized_statement): Adjust. | |
97 | (cp_parser_objc_try_catch_finally_statement): Adjust. | |
98 | ||
62add5e1 JM |
99 | Core 898 |
100 | * semantics.c (constexpr_fn_retval): New. Allow using-declaration | |
101 | and using-definition. | |
102 | (register_constexpr_fundef): Call it. | |
103 | ||
0309d288 JM |
104 | * except.c (build_noexcept_spec): Call cxx_constant_value after |
105 | converting to bool. | |
106 | ||
ba78087b KT |
107 | 2011-03-25 Kai Tietz <ktietz@redhat.com> |
108 | ||
109 | * lex.c (interface_strcmp): Handle dos-paths. | |
110 | (handle_pragma_implementation): Use filename_cmp instead of | |
111 | strcmp. | |
112 | (in_main_input_context): Likewise. | |
113 | ||
7eda3368 JM |
114 | 2011-03-25 Jason Merrill <jason@redhat.com> |
115 | ||
5ade176d JM |
116 | Core 1135 |
117 | * method.c (defaulted_late_check): Check for exception spec mismatch. | |
118 | (defaultable_fn_check): Allow exception spec and virtual. | |
119 | * class.c (check_for_override): A virtual dtor is non-trivial. | |
120 | ||
7eda3368 JM |
121 | PR c++/48289 |
122 | * pt.c (build_non_dependent_expr): Keep dereferences outside the | |
123 | NON_DEPENDENT_EXPR. | |
124 | ||
ac9a30ae KT |
125 | 2011-03-25 Kai Tietz <ktietz@redhat.com> |
126 | ||
127 | * decl.c (decls_match): Replace target hook | |
128 | call of comp_type_attributes by version in tree.c file. | |
129 | * search.c (check_final_overrider): Likewise. | |
130 | * typeck.c (structural_comptypes): Likewise. | |
131 | ||
62d784f7 KT |
132 | 2011-03-21 Kai Tietz <ktietz@redhat.com> |
133 | ||
134 | PR target/12171 | |
5050afdf KT |
135 | * cxx-pretty-print.c (pp_cxx_ptr_operator): |
136 | Display allowed attributes for function pointer types. | |
137 | * error.c (dump_type_prefix): Likewise. | |
138 | ||
62d784f7 KT |
139 | * tree.c (cxx_attribute_table): Adjust table. |
140 | ||
e6baef83 JM |
141 | 2011-03-18 Jason Merrill <jason@redhat.com> |
142 | ||
b3f1cee4 JM |
143 | PR c++/48162 |
144 | * semantics.c (finish_call_expr): Allow TARGET_EXPR for now. | |
145 | ||
e6baef83 JM |
146 | PR c++/48118 |
147 | * call.c (build_over_call): Don't skip ck_rvalue. | |
148 | ||
547206a4 JM |
149 | 2011-03-17 Jason Merrill <jason@redhat.com> |
150 | ||
c598e5fa JM |
151 | PR c++/47504 |
152 | * semantics.c (cxx_eval_constant_expression) [NOP_EXPR]: Don't let | |
153 | the conversion set TREE_OVERFLOW. | |
154 | ||
c1e41527 JM |
155 | Core 1212 |
156 | * semantics.c (finish_decltype_type): Return T&& for xvalue. | |
157 | * typeck.c (unlowered_expr_type): Preserve cv-quals. | |
158 | ||
547206a4 JM |
159 | PR c++/48166 |
160 | * decl.c (revert_static_member_fn): Strip function-cv-quals. | |
161 | ||
3f7c7453 JM |
162 | 2011-03-16 Jason Merrill <jason@redhat.com> |
163 | ||
cb21e9cd JM |
164 | PR c++/48089 |
165 | * semantics.c (potential_constant_expression_1): Don't allow *this | |
166 | in a constructor. | |
167 | (register_constexpr_fundef): Use potential_rvalue_constant_expression. | |
168 | ||
89ae3825 JM |
169 | PR c++/47301 |
170 | * decl.c (compute_array_index_type): Don't bother trying to deal | |
171 | with literal classes in ABI v1. | |
172 | ||
9f2a22d0 JM |
173 | PR c++/46336 |
174 | * decl.c (duplicate_decls): Return NULL_TREE for clashing | |
175 | C functions. | |
176 | ||
3f7c7453 JM |
177 | PR c++/47570 |
178 | * semantics.c (cxx_eval_constant_expression) [COMPOUND_EXPR]: Don't | |
179 | use the generic binary expression handling. | |
180 | ||
f617201f DN |
181 | 2011-03-16 Diego Novillo <dnovillo@google.com> |
182 | ||
183 | * Make-lang.in (CXX_PARSER_H): New. | |
184 | (cp/parser.o): Add dependency on CXX_PARSER_H. | |
185 | Add dependency on tree-pretty-print.h | |
186 | (cp/cp-lang.o): Add dependency on CXX_PARSER_H. | |
187 | * cp-lang.c: Include parser.h. | |
188 | * parser.c: Include parser.h. | |
189 | (struct cp_token): Add bitfield purged_p. | |
190 | Update all users. | |
191 | Move to parser.h. | |
192 | (CPP_PURGED): Remove. Update all users. | |
193 | (struct cp_lexer): Change field buffer to be a VEC of cp_token. | |
194 | Remove field buffer_length. | |
195 | Update all users. | |
196 | Move to parser.h. | |
197 | (struct tree_check): Move to parser.h. | |
198 | (cp_token_position): Likewise. | |
199 | (struct cp_token_cache): Likewise. | |
200 | (CPP_KEYWORD): Likewise. | |
201 | (CPP_TEMPLATE_ID): Likewise. | |
202 | (CPP_NESTED_NAME_SPECIFIER): Likewise. | |
203 | (N_CP_TTYPES): Likewise. | |
204 | (enum cp_parser_status_kind): Likewise. | |
205 | (struct cp_parser_context): Likewise. | |
206 | (struct cp_default_arg_entry_d): Likewise. | |
207 | (struct cp_unparsed_functions_entry_d): Likewise. | |
208 | (struct cp_parser): Likewise. | |
209 | (cp_lexer_dump_tokens): New. | |
210 | (cp_lexer_debug_tokens): New. | |
211 | (cp_lexer_finished_p): New. | |
212 | (cp_lexer_alloc): Factor out of cp_lexer_new_main. | |
213 | (cp_lexer_new_main): Re-write main lexing loop to push | |
214 | tokens into the new VEC buffer. | |
215 | (cp_lexer_print_token): Improve printing of CPP_NUMBER tokens. | |
216 | Do not abort if the token type is not recognized, just print | |
217 | its code. | |
218 | * parser.h: New file. | |
219 | * config-lang.in (gtfiles): Add cp/parser.h. | |
220 | ||
0136dc74 JM |
221 | 2011-03-16 Jason Merrill <jason@redhat.com> |
222 | ||
532c679e JM |
223 | Core 1148 |
224 | * typeck.c (check_return_expr): Fix conditions for setting | |
225 | LOOKUP_PREFER_RVALUE. | |
226 | ||
e676810e JM |
227 | * call.c (build_over_call): Remove require_complete_type_sfinae call. |
228 | ||
0136dc74 JM |
229 | PR c++/48132 |
230 | * decl.c (check_array_designated_initializer): Allow integer index. | |
231 | (reshape_init_array_1): Set index on the elements. | |
232 | ||
85a273ba JM |
233 | 2011-03-16 Jason Merrill <jason@redhat.com> |
234 | ||
f8f12278 JM |
235 | PR c++/48113 |
236 | * typeck.c (convert_for_initialization): Use | |
237 | perform_implicit_conversion_flags. | |
238 | * call.c (standard_conversion): If LOOKUP_PREFER_RVALUE, set | |
239 | rvaluedness_matches_p on ck_rvalue. | |
240 | (convert_like_real) [ck_rvalue]: And restore it here. | |
241 | ||
85a273ba JM |
242 | PR c++/48115 |
243 | * call.c (convert_arg_to_ellipsis): Handle incomplete type. | |
244 | ||
a8d7041a JM |
245 | 2011-03-16 Jason Merrill <jason@redhat.com> |
246 | ||
23d956f9 JM |
247 | * parser.c (cp_parser_abort_tentative_parse): Make sure we haven't |
248 | committed to this tentative parse. | |
249 | ||
bb4586d3 JM |
250 | PR c++/47999 |
251 | * semantics.c (finish_call_expr): Preserve reference semantics | |
252 | in templates. | |
253 | ||
a8d7041a JM |
254 | * call.c (convert_default_arg): Use LOOKUP_IMPLICIT. |
255 | ||
2b1c5433 JJ |
256 | 2011-03-16 Jakub Jelinek <jakub@redhat.com> |
257 | ||
258 | * cp-objcp-common.c (cp_function_decl_explicit_p): Don't crash if | |
259 | DECL_LANG_SPECIFIC is NULL. | |
260 | ||
92d0652c JM |
261 | 2011-03-15 Jason Merrill <jason@redhat.com> |
262 | ||
6871351b JM |
263 | Core 1074 |
264 | * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Don't | |
265 | check value_dependent_expression_p on the operand. | |
266 | ||
17bc631c JM |
267 | * semantics.c (push_cx_call_context): Return bool. |
268 | (cxx_eval_call_expression): Handle excess depth. | |
269 | ||
92d0652c JM |
270 | Core 1191 |
271 | * method.c (synthesized_method_walk): Cleanups don't affect the | |
272 | triviality of a constructor, but do affect deletion and exception | |
273 | specification. | |
274 | ||
437697b8 RRC |
275 | 2011-03-15 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> |
276 | ||
277 | * decl2.c (cp_check_const_attributes): New. | |
278 | (cplus_decl_attributes): Call cp_check_const_attributes. | |
279 | ||
4c66d85a JM |
280 | 2011-03-15 Jason Merrill <jason@redhat.com> |
281 | ||
282 | PR c++/34758 | |
283 | * call.c (convert_default_arg): Use DECL_ORIGIN of fn. Check for | |
284 | recursion first. | |
285 | (push_defarg_context, pop_defarg_context): New. | |
286 | * parser.c (cp_parser_late_parsing_default_args): Use them. | |
287 | * cp-tree.h: Declare them. | |
288 | ||
b057bff4 DS |
289 | 2011-03-11 Dodji Seketeli <dodji@redhat.com> |
290 | ||
291 | * call.c (add_builtin_candidate)<case INDIRECT_REF>: The type of | |
292 | the argument of the indirection operator should not be dependent. | |
293 | Fix the comment. | |
294 | ||
e8d6ec55 JM |
295 | 2011-03-11 Jason Merrill <jason@redhat.com> |
296 | ||
ba7d31f6 JM |
297 | PR c++/47125 |
298 | * pt.c (tsubst) [TYPENAME_TYPE]: Only give errors if tf_error. | |
299 | ||
8318b14c JM |
300 | PR c++/47144 |
301 | * parser.c (cp_parser_template_type_arg): Set | |
302 | type_definition_forbidden_message. | |
303 | ||
e8d6ec55 JM |
304 | PR c++/47808 |
305 | * decl.c (compute_array_index_type): Discard folding | |
306 | if it didn't produce a constant. | |
307 | ||
e33eba75 JJ |
308 | 2011-03-11 Jakub Jelinek <jakub@redhat.com> |
309 | ||
310 | PR c++/48035 | |
311 | * init.c (build_zero_init_1): Extracted from build_zero_init. | |
312 | Add FIELD_SIZE argument, if non-NULL and field bit_position | |
313 | as not smaller than that, don't add that field's initializer. | |
314 | Pass DECL_SIZE as last argument to build_zero_init_1 | |
315 | for DECL_FIELD_IS_BASE fields. | |
316 | (build_zero_init): Use build_zero_init_1. | |
317 | ||
4999d9b0 JM |
318 | 2011-03-10 Jason Merrill <jason@redhat.com> |
319 | ||
18d92053 JM |
320 | PR c++/48029 |
321 | * pt.c (iterative_hash_template_arg): Remove special case for | |
322 | ARRAY_TYPE. | |
323 | ||
4999d9b0 JM |
324 | PR c++/47198 |
325 | * parser.c (cp_parser_single_declaration): Just return if | |
326 | cp_parser_parse_and_diagnose_invalid_type_name complained. | |
327 | ||
3a8face4 JM |
328 | 2011-03-09 Jason Merrill <jason@redhat.com> |
329 | ||
330 | PR c++/44629 | |
331 | * pt.c (unify): An unresolved overload is a nondeduced context. | |
332 | ||
bf6817f2 MJ |
333 | 2011-03-09 Martin Jambor <mjambor@suse.cz> |
334 | ||
335 | PR tree-optimization/47714 | |
336 | * method.c (use_thunk): Clear addressable flag of thunk arguments. | |
337 | ||
918f238e DS |
338 | 2011-03-08 Dodji Seketeli <dodji@redhat.com> |
339 | ||
340 | PR c++/47705 | |
341 | * pt.c (convert_nontype_argument): Only call decay_conversion on | |
342 | arrays. | |
343 | ||
2c86a82a JM |
344 | 2011-03-08 Jason Merrill <jason@redhat.com> |
345 | ||
db68a2cb JM |
346 | PR c++/47488 |
347 | * mangle.c (write_template_arg_literal) [STRING_CST]: Sorry. | |
348 | ||
8c0672ff JM |
349 | PR c++/47705 |
350 | * pt.c (convert_nontype_argument): Don't crash on non-pointer | |
351 | argument to pointer parameter. | |
352 | ||
2c86a82a JM |
353 | PR c++/45651 |
354 | * pt.c (instantiate_decl): Don't clear DECL_INTERFACE_KNOWN on | |
355 | !TREE_PUBLIC decls. | |
356 | ||
9ca6556e DS |
357 | 2011-03-08 Dodji Seketeli <dodji@redhat.com> |
358 | ||
530a4800 | 359 | PR c++/47957 |
9ca6556e DS |
360 | * name-lookup.c (binding_to_template_parms_of_scope_p): Only |
361 | consider scopes of primary template definitions. Adjust comments. | |
362 | ||
27062604 JM |
363 | 2011-03-07 Jason Merrill <jason@redhat.com> |
364 | ||
93dd46fb JM |
365 | PR c++/48003 |
366 | * pt.c (convert_nontype_argument): Fix -fpermissive allowing | |
367 | integer overflow. | |
368 | * semantics.c (potential_constant_expression_1): Check TREE_OVERFLOW. | |
369 | ||
8152661b JM |
370 | PR c++/48015 |
371 | * init.c (constant_value_1): Always require init to be TREE_CONSTANT. | |
372 | ||
27062604 JM |
373 | PR c++/48008 |
374 | * mangle.c (write_type): Strip cv-quals from FUNCTION_TYPE here. | |
375 | (write_CV_qualifiers_for_type): Not here. | |
376 | ||
787a8c0f JM |
377 | 2011-03-06 Joseph Myers <joseph@codesourcery.com> |
378 | ||
379 | * lang-specs.h: Match -save-temps* instead of -save-temps. | |
380 | ||
55af847f JM |
381 | 2011-03-05 Jason Merrill <jason@redhat.com> |
382 | ||
383 | * mangle.c (write_expression): Change ABI v6 to v5. | |
384 | (write_type): Likewise. | |
385 | ||
87e7b310 JH |
386 | 2011-03-04 Jan Hubicka <jh@suse.cz> |
387 | ||
388 | PR lto/47497 | |
389 | * optimize.c (maybe_clone_body): Update call of cgraph_same_body_alias | |
390 | and cgraph_add_thunk. | |
391 | * method.c (make_alias_for_thunk, use_thunk): Likewise. | |
392 | * mangle.c (mangle_decl): Likewise. | |
393 | ||
38ffa828 JM |
394 | 2011-03-04 Jason Merrill <jason@redhat.com> |
395 | ||
ad00b8db JM |
396 | PR c++/47971 |
397 | * pt.c (tsubst_copy_and_build) [PSEUDO_DTOR_EXPR]: Use tsubst for type. | |
398 | (tsubst_copy) [default]: Just return t if !ENABLE_CHECKING. | |
399 | ||
38ffa828 JM |
400 | PR c++/46220 |
401 | * search.c (check_final_overrider): Allow pointer to same incomplete | |
402 | class type with different cv-quals. | |
403 | ||
5c62e661 PC |
404 | 2011-03-03 Paolo Carlini <paolo.carlini@oracle.com> |
405 | ||
406 | PR c++/47974 | |
407 | * pt.c (tsubst_template_args): Check argument t for error_mark_node. | |
408 | ||
ff4bfb10 JM |
409 | 2011-03-03 Jason Merrill <jason@redhat.com> |
410 | ||
411 | PR c++/47950 | |
412 | * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Retain TREE_CONSTANT. | |
413 | ||
262a7d6b JM |
414 | 2011-03-02 Jason Merrill <jason@redhat.com> |
415 | ||
79d3d3f4 JM |
416 | PR c++/47950 |
417 | * parser.c (cp_parser_condition): Don't fold_non_dependent_expr here. | |
418 | ||
262a7d6b JM |
419 | PR c++/47774 |
420 | * tree.c (build_vec_init_elt): Split out from... | |
421 | (build_vec_init_expr): ...here. | |
422 | (diagnose_non_constexpr_vec_init): New fn. | |
423 | * semantics.c (potential_constant_expression_1): Use it. | |
424 | * cp-tree.h: Declare it. | |
425 | ||
faa9e9bf JM |
426 | 2011-03-01 Jason Merrill <jason@redhat.com> |
427 | ||
f8221c67 JM |
428 | PR c++/46159 |
429 | * parser.c (cp_parser_primary_expression): Don't warn about a | |
430 | failed tentative parse. | |
431 | ||
c6f54c7a JM |
432 | PR c++/47200 |
433 | * semantics.c (cxx_bind_parameters_in_call): Don't call | |
434 | adjust_temp_type on non-constant args. | |
435 | ||
8d4bcc35 JM |
436 | PR c++/47851 |
437 | * call.c (standard_conversion): Provide requested cv-quals on | |
438 | class rvalue conversion. | |
439 | ||
faa9e9bf JM |
440 | PR c++/46282 |
441 | * decl2.c (grokbitfield): Handle type-dependent width. | |
442 | ||
2c1fb3ee JM |
443 | 2011-02-28 Jason Merrill <jason@redhat.com> |
444 | ||
445 | PR c++/47873 | |
446 | * class.c (update_vtable_entry_for_fn): Check BINFO_LOST_PRIMARY_P | |
447 | after checking for a non-thunk. | |
448 | ||
acfd3fff JM |
449 | 2011-02-26 Jason Merrill <jason@redhat.com> |
450 | ||
e7dc5734 JM |
451 | PR c++/47904 |
452 | * tree.c (cp_tree_equal): Compare DECL_PARM_LEVEL. | |
453 | * pt.c (iterative_hash_template_arg): And hash it. | |
454 | ||
acfd3fff JM |
455 | PR c++/47897 |
456 | * semantics.c (non_const_var_error): Split out from... | |
457 | (cxx_eval_constant_expression): ...here. | |
458 | (potential_constant_expression_1) [VAR_DECL]: Use it. | |
459 | Allow dependent variables. | |
460 | ||
4be5e5b1 JM |
461 | 2011-02-24 Jason Merrill <jason@redhat.com> |
462 | ||
463 | * parser.c (cp_parser_constant_expression): Set | |
464 | non_integral_constant_expression correctly for C++0x too. | |
465 | (cp_parser_static_assert): Allow non-constant expression. | |
466 | (cp_parser_direct_declarator): Expect non_constant_p to be set | |
467 | properly for C++0x. | |
468 | * pt.c (value_dependent_expression_p): Handle TYPEID_EXPR. | |
469 | * semantics.c (maybe_constant_value): Check type_unknown_p too. | |
470 | (potential_rvalue_constant_expression): New. | |
471 | (require_potential_rvalue_constant_expression): New. | |
472 | ||
67e18edb JM |
473 | 2011-02-23 Jason Merrill <jason@redhat.com> |
474 | ||
475 | * cp-tree.h (DECL_PARM_LEVEL): New. | |
476 | (struct lang_decl_parm): Add level field. | |
477 | * name-lookup.c (function_parm_depth): New fn. | |
478 | * name-lookup.h: Declare it. | |
479 | * parser.c (cp_parser_parameter_declaration_list): Use it. | |
480 | * mangle.c (struct globals): Add parm_depth field. | |
481 | (write_bare_function_type): Adjust it. | |
482 | (write_expression): Include the level delta in PARM_DECL mangling | |
483 | for abi >= 6. | |
484 | ||
485 | * semantics.c (finish_decltype_type): Remove shortcut for decltype | |
486 | of id-expression. | |
487 | * mangle.c (write_type) [DECLTYPE_TYPE]: Strip it here for abi < 6. | |
488 | ||
9113b9fb NF |
489 | 2011-02-23 Nathan Froyd <froydnj@codesourcery.com> |
490 | ||
491 | PR c++/46868 | |
492 | * parser.c (cp_parser_class_specifier): Require a closing brace | |
493 | to attempt error recovery. | |
494 | ||
8d422e63 JJ |
495 | 2011-02-23 Jakub Jelinek <jakub@redhat.com> |
496 | ||
497 | PR c++/47833 | |
498 | * pt.c (struct pending_template): Add chain_next GTY option. | |
499 | * decl.c (struct named_label_use_entry): Likewise. | |
500 | ||
a26e0b81 PC |
501 | 2011-02-22 Paolo Carlini <paolo.carlini@oracle.com> |
502 | ||
503 | PR c++/47242 | |
504 | * semantics.c (build_lambda_object): Bail out if a field is | |
505 | error_mark_node. | |
506 | ||
ca2409f9 DS |
507 | 2011-02-22 Dodji Seketeli <dodji@redhat.com> |
508 | ||
509 | PR c++/47666 | |
510 | * class.c (dfs_declare_virt_assop_and_dtor) | |
511 | (declare_virt_assop_and_dtor): New static functions. | |
512 | (add_implicitly_declared_members): Use | |
513 | declare_virt_assop_and_dtor. | |
514 | ||
9931a2bf JM |
515 | 2011-02-21 Jason Merrill <jason@redhat.com> |
516 | ||
517 | PR c++/47207 | |
518 | * decl2.c (decl_constant_var_p): A constexpr var needs an | |
519 | initializer to be constant. | |
520 | * semantics.c (cxx_eval_constant_expression): Complain about | |
521 | constexpr var used in its own initializer. | |
522 | * call.c (set_up_extended_ref_temp): Set | |
523 | DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P too. | |
524 | ||
525c617d JM |
525 | 2011-02-20 Jason Merrill <jason@redhat.com> |
526 | ||
c62f4cd9 JM |
527 | PR c++/47199 |
528 | * semantics.c (cxx_eval_call_expression): Call | |
529 | cxx_eval_constant_expression in trivial shortcut. | |
530 | ||
086bb4b9 JM |
531 | PR c++/46831 |
532 | * call.c (convert_class_to_reference): Don't try to set up a | |
533 | second conv sequence for non-viable candidates. | |
534 | ||
06be4922 JM |
535 | PR c++/47703 |
536 | * error.c (location_of): Handle non-tagged types. | |
537 | ||
525c617d JM |
538 | PR c++/46472 |
539 | * method.c (process_subob_fn): Instantiate constexpr templates. | |
540 | * optimize.c (maybe_clone_body): Propagate DECL_DECLARED_CONSTEXPR_P. | |
541 | ||
869b0af5 DS |
542 | 2011-02-20 Dodji Seketeli <dodji@redhat.com> |
543 | ||
544 | PR c++/46394 | |
545 | * pt.c (tsubst_pack_expansion): do not use | |
546 | cp_tree_equal/same_type_p to detect an expansion of a parameter | |
547 | pack. | |
548 | ||
06a85dd3 JM |
549 | 2011-02-19 Jason Merrill <jason@redhat.com> |
550 | ||
551 | PR c++/47503 | |
552 | * semantics.c (cxx_eval_call_expression): Shortcut trivial copy. | |
553 | ||
1496e7d6 PC |
554 | 2011-02-18 Paolo Carlini <paolo.carlini@oracle.com> |
555 | ||
556 | PR c++/47795 | |
557 | * semantics.c (finish_non_static_data_member): Early return if | |
558 | object is error_mark_node. | |
559 | ||
7f7d4b12 DS |
560 | 2011-02-18 Dodji Seketeli <dodji@redhat.com> |
561 | ||
562 | PR c++/47208 | |
563 | * pt.c (do_auto_deduction): Do not mention error_mark_node in | |
564 | diagnostics. | |
565 | * semantics.c (finish_id_expression): Do not pass erroneous decl | |
566 | to decl_constant_var_p. | |
567 | ||
e3ae330d JJ |
568 | 2011-02-17 Jakub Jelinek <jakub@redhat.com> |
569 | ||
570 | PR c++/47783 | |
571 | * cvt.c (convert_from_reference): Call mark_exp_read. | |
572 | ||
1770aeed DS |
573 | 2011-02-11 Dodji Seketeli <dodji@redhat.com> |
574 | ||
575 | PR c++/47172 | |
576 | * pt.c (finish_call_expr): Consider a call expression that has a | |
577 | dependent "this" pointer as being dependent. Add comments. | |
578 | (dependent_type_p, type_dependent_expression_p): Update comments. | |
579 | ||
ebcb4bc3 DS |
580 | 2011-02-16 Dodji Seketeli <dodji@redhat.com> |
581 | ||
582 | PR c++/47326 | |
583 | * pt.c (tsubst_copy)<case SIZEOF_EXPR>: Ensure that even pack | |
584 | expansion arguments are not evaluated. | |
585 | ||
4e3c0a15 JJ |
586 | 2011-02-16 Jakub Jelinek <jakub@redhat.com> |
587 | ||
588 | PR c++/47704 | |
589 | * cp-tree.h (ENUM_FIXED_UNDERLYING_TYPE_P): Use TYPE_LANG_FLAG_5 | |
590 | instead of TYPE_LANG_FLAG_3. | |
591 | * pt.c (lookup_template_class): Copy over | |
592 | ENUM_FIXED_UNDERLYING_TYPE_P. | |
593 | ||
503c8e86 JM |
594 | 2011-02-15 Jason Merrill <jason@redhat.com> |
595 | ||
596 | PR c++/46807 | |
597 | * method.c (synthesized_method_walk): Always exit early for | |
598 | trivial fn in C++98 mode. | |
599 | ||
c9e71b36 JM |
600 | 2011-02-14 Jason Merrill <jason@redhat.com> |
601 | ||
602 | PR c++/47482 | |
603 | * parser.c (cp_parser_enumerator_definition): Call | |
604 | fold_non_dependent_expr. | |
605 | ||
5b883ca6 JM |
606 | 2011-02-09 Jason Merrill <jason@redhat.com> |
607 | ||
be771f25 JM |
608 | * decl.c (cp_make_fname_decl): Set DECL_THIS_STATIC at toplevel. |
609 | * semantics.c (finish_fname): Only return the name if we're in | |
610 | a function. | |
611 | ||
c51dc544 JM |
612 | * decl.c (build_enumerator): Don't perform integral promotions on |
613 | non-integral constants. | |
614 | ||
cb8384a3 JM |
615 | * cvt.c (convert_to_void): Handle null op1. |
616 | ||
69f36ba6 JM |
617 | * class.c (type_has_constexpr_default_constructor): Make sure the |
618 | caller stripped an enclosing array. | |
619 | * init.c (perform_member_init): Strip arrays before calling it. | |
620 | ||
5b883ca6 JM |
621 | PR c++/47511 |
622 | * semantics.c (potential_constant_expression_1): Handle TEMPLATE_DECL. | |
623 | ||
25aea4e9 DS |
624 | 2011-02-03 Dodji Seketeli <dodji@redhat.com> |
625 | ||
626 | PR c++/47398 | |
627 | * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of | |
628 | template parameters in account. | |
629 | ||
ba9e6dd5 NF |
630 | 2011-02-03 Nathan Froyd <froydnj@codesourcery.com> |
631 | ||
632 | PR c++/46890 | |
633 | * parser.c (cp_parser_class_specifier): Fix setting of | |
634 | want_semicolon. | |
635 | ||
60d237af JJ |
636 | 2011-01-31 Jakub Jelinek <jakub@redhat.com> |
637 | ||
638 | PR c++/47416 | |
639 | * semantics.c (build_data_member_initialization): Handle | |
640 | STATEMENT_LIST always instead of just for CLEANUP_BODY. | |
641 | ||
c6092243 RO |
642 | 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> |
643 | ||
644 | * g++spec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use | |
645 | LD_STATIC_OPTION, LD_DYNAMIC_OPTION. | |
646 | ||
bc44baad DS |
647 | 2011-01-29 Dodji Seketeli <dodji@redhat.com> |
648 | ||
649 | PR c++/47311 | |
650 | * cp-tree.h (fixup_template_parms): Declare. | |
651 | * pt.c (end_template_parm_list): Do not fixup template parms here. | |
652 | (fixup_template_parms): Remove static. Fix typo in the | |
653 | comments. Remove useless code statement. | |
654 | (fixup_template_parm): For a template template parameter, fixup | |
655 | its attributes before fixing up its type. | |
656 | * parser.c | |
657 | (cp_parser_template_declaration_after_export): After parsing | |
658 | template parameters fixup their types. | |
659 | ||
81cce6f6 JJ |
660 | 2011-01-26 Jakub Jelinek <jakub@redhat.com> |
661 | ||
662 | PR c++/47476 | |
663 | * semantics.c (potential_constant_expression_1): Handle | |
664 | TRUTH_XOR_EXPR. | |
665 | ||
47ea1edf DK |
666 | 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com> |
667 | ||
d4dba752 | 668 | PR c++/43601 |
47ea1edf DK |
669 | * semantics.c (expand_or_defer_fn_1): Handle it. |
670 | * decl2.c (decl_needed_p): Likewise. | |
671 | ||
62f9aedc JM |
672 | 2011-01-21 Jason Merrill <jason@redhat.com> |
673 | ||
674 | PR c++/47041 | |
675 | * semantics.c (build_constexpr_constructor_member_initializers): | |
676 | Handle trivial copy. | |
677 | ||
95cc031f JJ |
678 | 2011-01-21 Jakub Jelinek <jakub@redhat.com> |
679 | ||
680 | PR c++/47388 | |
681 | * semantics.c (begin_for_stmt): If -fno-for-scope, don't | |
682 | assume init must be NULL if scope is NULL. | |
683 | (begin_range_for_stmt): Likewise. | |
684 | ||
d6ed1c89 JM |
685 | 2011-01-21 Jason Merrill <jason@redhat.com> |
686 | ||
0eb35d46 JM |
687 | PR c++/46552 |
688 | * semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF. | |
689 | ||
d6ed1c89 JM |
690 | PR c++/46977 |
691 | * semantics.c (potential_constant_expression_1): Split out from | |
692 | potential_constant_expression. Add want_rval parm. Handle | |
693 | template expression forms. Don't enforce restriction on address | |
694 | of automatic variable here. Add a couple of diagnostics that | |
695 | had been missing. | |
696 | (require_potential_constant_expression): New entry point. | |
697 | (build_data_member_initialization, register_constexpr_fundef): Adjust. | |
698 | (maybe_constant_value): Check potential_constant_expression. | |
699 | * pt.c (fold_non_dependent_expr_sfinae): Likewise. | |
700 | * tree.c (build_vec_init_expr): Adjust. | |
701 | ||
cfea9968 JJ |
702 | 2011-01-19 Jakub Jelinek <jakub@redhat.com> |
703 | ||
704 | PR c++/47303 | |
705 | * decl2.c (finish_anon_union): Only call mangle_decl if TREE_STATIC | |
706 | or DECL_EXTERNAL. | |
707 | ||
d79b88a1 JM |
708 | 2011-01-17 Jason Merrill <jason@redhat.com> |
709 | ||
710 | PR c++/47067 | |
711 | * semantics.c (base_field_constructor_elt): New fn. | |
712 | (cxx_eval_bare_aggregate): Use it. | |
713 | (build_data_member_initialization): Leave COMPONENT_REF for | |
714 | vfield inits. | |
715 | ||
86070dcc RRC |
716 | 2011-01-14 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> |
717 | ||
718 | * parser.c (cp_parser_range_for): Remove the "unused variable" warning | |
719 | workaround. | |
720 | ||
620437f2 GF |
721 | 2011-01-15 Giovanni Funchal <gafunchal@gmail.com> |
722 | Jonathan Wakely <jwakely.gcc@gmail.com> | |
723 | ||
724 | PR c++/33558 | |
725 | * decl.c (grokdeclarator): Reject mutable reference members. | |
726 | ||
70f961a5 JM |
727 | 2011-01-14 Jason Merrill <jason@redhat.com> |
728 | ||
aeb459fb JM |
729 | PR c++/47289 |
730 | * pt.c (coerce_template_parms): Fix error recovery. | |
731 | ||
35385f99 JM |
732 | PR c++/46903 |
733 | * typeck2.c (check_narrowing): Only check arithmetic types. | |
734 | ||
70f961a5 JM |
735 | PR c++/46688 |
736 | * tree.c (build_vec_init_expr): Handle flexible array | |
737 | properly. | |
738 | ||
a2b63a20 KT |
739 | 2011-01-13 Kai Tietz <kai.tietz@onevision.com> |
740 | ||
741 | PR c++/47213 | |
742 | * cp-tree.h (CLASSTYPE_VISIBILITY): Use | |
743 | TYPE_MAIN_DECL instead of TYPE_NAME. | |
744 | (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise. | |
745 | * decl2.c (determine_visibility): Add check | |
746 | of CLASS_TYPE_P for underlying_type. | |
747 | ||
3f43ac31 RRC |
748 | 2011-01-12 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> |
749 | ||
750 | * cp-tree.h (begin_for_scope): New prototype. | |
751 | (begin_for_stmt): Update prototype. | |
752 | (begin_range_for_stmt): Update prototype. | |
753 | * init.c (build_vec_init): Update call to begin_for_stmt. | |
754 | * parser.c (cp_parser_for): New. | |
755 | (cp_parser_c_for): Add three new parameters. | |
756 | (cp_parser_range_for): Likewise. Most parsing code removed. | |
757 | (cp_parser_iteration_statement): Call cp_parser_for instead of | |
758 | cp_parser_c_for and cp_parser_range_for. | |
759 | (cp_parser_for_init_statement): Add new parameter and return type. | |
760 | (cp_parser_block_declaration): Update call to | |
761 | cp_parser_simple_declaration. | |
762 | (cp_parser_simple_declaration): Add new parameter. | |
763 | Update call to cp_parser_init_declarator. | |
764 | (cp_parser_init_declarator): Add new parameter. | |
765 | * pt.c (tsubst_expr): Update call to begin_for_stmt. | |
766 | * semantics.c (begin_for_scope): New. | |
767 | (begin_for_stmt): Add two new parameters. | |
768 | (begin_range_for_stmt): Likewise. | |
769 | ||
d853ee42 NP |
770 | 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com> |
771 | ||
772 | * parser.c (cp_parser_objc_at_property_declaration): Improved | |
773 | error message. | |
774 | ||
f8fb7295 DS |
775 | 2011-01-11 Dodji Seketeli <dodji@redhat.com> |
776 | ||
777 | PR debug/46955 | |
778 | * cp-lang.c (get_template_innermost_arguments_folded) | |
779 | (get_template_argument_pack_elems_folded) | |
780 | (template_arg_needs_folding, fold_cplus_constants): New static | |
781 | functions. | |
782 | (LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to | |
783 | get_template_innermost_arguments_folded. | |
784 | (LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to | |
785 | get_template_argument_pack_elems_folded. | |
786 | ||
41d04a8d JM |
787 | 2011-01-11 Jason Merrill <jason@redhat.com> |
788 | ||
a67e7daa JM |
789 | PR c++/46658 |
790 | * init.c (build_new_1): Handle value-init in templates differently. | |
791 | ||
41d04a8d JM |
792 | PR c++/45520 |
793 | * tree.c (maybe_dummy_object): Check current_class_ref against | |
794 | context, not current_class_type. | |
795 | ||
046608a3 NP |
796 | 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com> |
797 | ||
798 | PR objc/47078 | |
799 | * parser.c (cp_parser_objc_typename): If the type is unknown, for | |
800 | error recovery purposes behave as if it was not specified so that | |
801 | the default type is used. | |
802 | ||
a14e5163 JJ |
803 | 2011-01-07 Jakub Jelinek <jakub@redhat.com> |
804 | ||
805 | PR c++/47022 | |
806 | * pt.c (tsubst_copy_and_build): Use tsubst instead of tsubst_copy | |
807 | for the second build_x_va_arg argument. | |
808 | ||
7bd11157 TT |
809 | 2011-01-05 Tom Tromey <tromey@redhat.com> |
810 | ||
811 | * typeck.c (cp_build_addr_expr_1): Update call to lvalue_error. | |
812 | (lvalue_or_else): Likewise. | |
813 | ||
220e83ca KT |
814 | 2011-01-01 Kai Tietz <kai.tietz@onevision.com> |
815 | ||
816 | PR target/38662 | |
817 | * tree.c (cxx_type_hash_eq): | |
818 | Allow METHOD_TYPE, too. | |
819 | ||
ad41bd84 | 820 | \f |
797103eb | 821 | Copyright (C) 2011 Free Software Foundation, Inc. |
ad41bd84 JM |
822 | |
823 | Copying and distribution of this file, with or without modification, | |
824 | are permitted in any medium without royalty provided the copyright | |
825 | notice and this notice are preserved. |