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