1 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
3 * Makefile.in: Adjusted dependencies on c-incpath.o.
5 2008-05-23 Jakub Jelinek <jakub@redhat.com>
8 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
9 fold_build_cleanup_point_expr on build_call_a results.
12 * semantics.c (omp_clause_info_fndecl): New function.
13 (finish_omp_clauses): Use it.
15 2008-05-21 Jakub Jelinek <jakub@redhat.com>
18 * cp-tree.h (check_array_initializer): New prototype.
19 * decl.c (check_array_initializer): New function.
20 (check_initializer): Call it.
21 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
23 2008-05-21 Tom Tromey <tromey@redhat.com>
25 * mangle.c (save_partially_mangled_name): Remove.
26 (restore_partially_mangled_name): Likewise.
27 (write_encoding): Update.
28 (write_unqualified_name): Likewise.
29 (start_mangling): Always use name_obstack. Remove 'ident_p'
31 (get_identifier_nocopy): Remove.
32 (finish_mangling_internal): Rename from finish_mangling.
33 (finish_mangling): New function.
34 (finish_mangling_get_identifier): Likewise.
35 (partially_mangled_name, partially_mangled_name_len): Remove.
36 (mangle_decl_string): Change return type. Update.
37 (mangle_decl, mangle_type_string, mangle_special_for_type,
38 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
39 mangle_ref_init_variable): Update.
41 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
44 * semantics.c (begin_class_definition): Extend checks on the first
47 2008-05-12 Tomas Bily <tbily@suse.cz>
49 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
50 * call.c (build_over_call): Likewise.
51 * error.c (dump_expr): Use CASE_CONVERT.
52 * class.c (fixed_type_or_null): Likewise.
54 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
56 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
58 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
61 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
63 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
64 DECL_LOOPING_CONST_OR_PURE_P attributes.
65 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
68 2008-05-02 Simon Baldwin <simonb@google.com>
71 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
73 2008-05-01 Simon Baldwin <simonb@google.com>
75 * typeck.c (build_array_ref): Call warn_array_subscript_range.
77 2008-04-30 Jakub Jelinek <jakub@redhat.com>
80 * pt.c (more_specialized_fn): Stop the loop even if there are no
81 arguments before ellipsis.
83 2008-04-29 Jakub Jelinek <jakub@redhat.com>
86 * parser.c (cp_parser_lookup_name): Look through single function
90 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
91 COMPOUND_EXPR if the second argument would be error_mark_node.
93 2008-04-28 Jason Merrill <jason@redhat.com>
94 Liu Guanwei <liu_gw@163.com>
97 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
100 2008-04-25 Jan Hubicka <jh@suse.cz>
102 * typeck.c (check_return_expr): Update.
103 * decl.c (start_preparsed_function): Update.
104 * method.c (use_thunk): Update.
106 2008-04-24 Jakub Jelinek <jakub@redhat.com>
109 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
110 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
111 * decl2.c (is_late_template_attribute): Only make vector_size
112 late tmpl attribute if argument is type or value dependent.
113 (cp_reconstruct_complex_type): New function.
115 2008-04-24 Richard Guenther <rguenther@suse.de>
117 * typeck.c (cp_build_function_call): Call
118 check_builtin_function_arguments.
120 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
122 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
123 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
124 * init.c (build_zero_init): Don't set TREE_INVARIANT.
125 * class.c (build_base_path): Don't set TREE_INVARIANT.
126 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
127 (build_vtbl_initializer): Don't set TREE_INVARIANT.
128 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
129 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
130 (generic_initializer): Don't set TREE_INVARIANT.
131 (ptr_initializer): Don't set TREE_INVARIANT.
132 (ptm_initializer): Don't set TREE_INVARIANT.
133 (class_initializer): Don't set TREE_INVARIANT.
134 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
135 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
136 (build_template_parm_index): Don't set TREE_INVARIANT.
137 (reduce_template_parm_level): Don't set TREE_INVARIANT.
138 (process_template_parm): Don't set TREE_INVARIANT.
140 2008-04-22 Jason Merrill <jason@redhat.com>
143 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
144 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
145 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
147 2008-04-22 Jakub Jelinek <jakub@redhat.com>
150 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
151 expression is errorneous.
153 2008-04-21 Jason Merrill <jason@redhat.com>
156 * tree.c (cp_tree_equal): Handle FIXED_CST.
159 * pt.c (template_template_parm_bindings_ok_p): Set
160 processing_template_decl while in this function.
162 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
164 * cvt.c (type_promotes_to): Support char16_t and char32_t.
165 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
166 char16_t and char32_t.
167 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
168 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
169 extended builtin type "u8char{16,32}_t".
170 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
172 (cp_lexer_print_token): Support CPP_STRING{16,32}.
173 (cp_parser_is_string_literal): Idem.
174 (cp_parser_string_literal): Idem.
175 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
177 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
178 * tree.c (char_type_p): Support char16_t and char32_t as char types.
179 * typeck.c (string_conv_p): Support char16_t and char32_t.
181 2008-04-17 Jason Merrill <jason@redhat.com>
184 * call.c (build_user_type_conversion_1): Represent second step of
185 copy-init with an rvalue conversion.
186 (convert_like_real) [ck_user]: Don't implicitly add it here.
188 2008-04-15 Jakub Jelinek <jakub@redhat.com>
191 * decl.c (layout_var_decl): If extern or static var has variable
192 size, set TREE_TYPE (decl) to error_mark_node.
194 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
197 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
200 2008-04-09 Jason Merrill <jason@redhat.com>
203 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
204 not a pushed variable.
206 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
208 * call.c (build_op_delete_call): Fix quotation in warning message.
209 * decl.c (grokdeclarator): Quote keyword in error message.
210 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
213 * parser.c (cp_parser_check_type_definition): Print error string
214 directly rather than using "%s".
215 (cp_parser_postfix_expression): Fix quotation.
216 (cp_parser_decltype): Likewise.
217 (cp_parser_sizeof_operand): Fix quotation. Simplify.
219 * parser.c (cp_parser_non_integral_constant_expression): Build error
220 message with CONCAT rather than using "%s".
221 (cp_parser_primary_expression): Fix quotation.
222 (cp_parser_postfix_expression): Likewise.
223 (cp_parser_postfix_dot_deref_expression): Likewise.
224 (cp_parser_unary_expression): Likewise.
225 (cp_parser_new_expression): Likewise.
226 (cp_parser_delete_expression): Likewise.
228 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
229 as `)', not as `('. Fix quotation.
230 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
231 (cp_parser_primary_expression): Likewise.
232 (cp_parser_nested_name_specifier_opt): Likewise.
233 (cp_parser_postfix_expression): Likewise.
234 (cp_parser_postfix_open_square_expression): Likewise.
235 (cp_parser_parenthesized_expression_list): Likewise.
236 (cp_parser_pseudo_destructor_name): Likewise.
237 (cp_parser_new_expression): Likewise.
238 (cp_parser_direct_new_declarator): Likewise.
239 (cp_parser_delete_expression): Likewise.
240 (cp_parser_cast_expression): Likewise.
241 (cp_parser_question_colon_clause): Likewise.
242 (cp_parser_builtin_offsetof): Likewise.
243 (cp_parser_trait_expr): Likewise.
244 (cp_parser_label_for_labeled_statement): Likewise.
245 (cp_parser_compound_statement): Likewise.
246 (cp_parser_selection_statement): Likewise.
247 (cp_parser_condition): Likewise.
248 (cp_parser_iteration_statement): Likewise.
249 (cp_parser_already_scoped_statement): Likewise.
250 (cp_parser_simple_declaration): Likewise.
251 (cp_parser_linkage_specification): Likewise.
252 (cp_parser_static_assert): Likewise.
253 (cp_parser_decltype): Likewise.
254 (cp_parser_conversion_function_id): Likewise.
255 (cp_parser_operator_function_id): Likewise.
256 (cp_parser_operator): Likewise.
257 (cp_parser_type_parameter): Likewise.
258 (cp_parser_template_id): Likewise.
259 (cp_parser_explicit_instantiation): Likewise.
260 (cp_parser_explicit_specialization): Likewise.
261 (cp_parser_enum_specifier): Likewise.
262 (cp_parser_namespace_definition): Likewise.
263 (cp_parser_namespace_alias_definition): Likewise.
264 (cp_parser_using_declaration): Likewise.
265 (cp_parser_using_directive): Likewise.
266 (cp_parser_asm_definition): Likewise.
267 (cp_parser_direct_declarator): Likewise.
268 (cp_parser_ptr_operator): Likewise.
269 (cp_parser_parameter_declaration_clause): Likewise.
270 (cp_parser_initializer_clause): Likewise.
271 (cp_parser_class_specifier): Likewise.
272 (cp_parser_member_specification_opt): Likewise.
273 (cp_parser_member_declaration): Likewise.
274 (cp_parser_pure_specifier): Likewise.
275 (cp_parser_constant_initializer): Likewise.
276 (cp_parser_base_clause): Likewise.
277 (cp_parser_exception_specification_opt): Likewise.
278 (cp_parser_try_block): Likewise.
279 (cp_parser_function_try_block): Likewise.
280 (cp_parser_handler): Likewise.
281 (cp_parser_throw_expression): Likewise.
282 (cp_parser_asm_operand_list): Likewise.
283 (cp_parser_attributes_opt): Likewise.
284 (cp_parser_label_declaration): Likewise.
285 (cp_parser_constructor_declarator_p): Likewise.
286 (cp_parser_template_declaration_after_export): Likewise.
287 (cp_parser_single_declaration): Likewise.
288 (cp_parser_objc_message_expression): Likewise.
289 (cp_parser_objc_message_args): Likewise.
290 (cp_parser_objc_encode_expression): Likewise.
291 (cp_parser_objc_defs_expression): Likewise.
292 (cp_parser_objc_protocol_expression): Likewise.
293 (cp_parser_objc_selector_expression): Likewise.
294 (cp_parser_objc_protocol_refs_opt): Likewise.
295 (cp_parser_objc_typename): Likewise.
296 (cp_parser_objc_method_keyword_params): Likewise.
297 (cp_parser_objc_superclass_or_category): Likewise.
298 (cp_parser_objc_try_catch_finally_statement): Likewise.
299 (cp_parser_objc_synchronized_statement): Likewise.
300 (cp_parser_objc_throw_statement): Likewise.
301 (cp_parser_omp_var_list_no_open): Likewise.
302 (cp_parser_omp_clause_default): Likewise.
303 (cp_parser_omp_clause_if): Likewise.
304 (cp_parser_omp_clause_num_threads): Likewise.
305 (cp_parser_omp_clause_reduction): Likewise.
306 (cp_parser_omp_clause_schedule): Likewise.
307 (cp_parser_omp_critical): Likewise.
308 (cp_parser_omp_for_loop): Likewise.
309 (cp_parser_omp_sections_scope): Likewise.
311 * parser.c (cp_parser_template_parameter_list): Simplify.
313 2008-04-07 James E. Wilson <wilson@tuliptree.org>
315 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
317 2008-04-07 Jason Merrill <jason@redhat.com>
320 * class.c (type_has_user_nondefault_constructor): A template
321 counts as a nondefault constructor.
323 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
325 * decl.c (cxx_push_function_context): Delete.
326 (cxx_pop_function_context): Delete.
327 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
329 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
330 LANG_HOOKS_FUNCTION_FINAL): Delete.
331 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
332 LANG_HOOKS_MISSING_NORETURN_OK_P.
333 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
335 * semantics.c (current_stmt_tree): Fix comment.
337 2008-04-03 Jakub Jelinek <jakub@redhat.com>
340 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
341 before calling fold_offsetof.
343 2008-04-03 Tom Tromey <tromey@redhat.com>
345 * Make-lang.in (c++_OBJS): New variable.
347 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
349 * optimize.c (clone_body): New, from tree-inline.c.
351 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
353 * method.c (synthesize_method): Use {push,pop}_function_context.
354 * name-lookup.c (push_to_top_level): Likewise.
355 * parser.c (cp_parser_late_parsing_for_member): Likewise.
357 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
360 * parser.c (cp_parser_decl_specifier_seq): Add location to error
363 2008-03-27 Tom Tromey <tromey@redhat.com>
365 * Make-lang.in: Revert automatic dependency patch.
367 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
370 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
371 (build_compound_expr): New, for compatibility with C
373 (cp_build_compound_expr): Renamed from build_compound_expr.
374 (build_c_cast): New, for compatibility with C build_c_cast.
375 (cp_build_c_cast): Renamed from build_c_cast.
376 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
377 * decl.c (cxx_maybe_build_cleanup): Ditto.
378 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
379 (cp_build_compound_expr): Renamed from build_compound_expr.
380 (build_c_cast): Add C-compatible prototype.
381 (cp_build_c_cast): Renamed from build_c_cast.
382 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
383 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
385 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
387 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
388 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
389 ending in a pack expansion, both of which can occur when
390 substituting into a nested template.
391 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
392 instantiating the sizeof...(X) form, make tsubst_copy do the work.
393 * parser.c (cp_parser_template_parameter): Deal with unnamed
394 non-type template parameter packs identified by pack expansions in
397 2008-03-26 Jakub Jelinek <jakub@redhat.com>
400 * pt.c (apply_late_template_attributes): Don't call tsubst on
401 first attribute argument if it is IDENTIFIER_NODE.
404 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
405 and LTGT_EXPR to pp_expression.
407 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
409 * pt.c (coerce_template_template_parm): Moved the body of the loop
410 of coerce_template_template_parms here, to make iteration over a
411 template argument pack simpler.
412 Also, allow matching of a template parameter pack in the template
413 template parameter to a template parameter in the template
415 (coerce_template_template_parms): Deal with variadic template
416 template parameters. Use coerce_template_template_parm.
417 (unify): Make sure we coerce the template template argument's
418 template arguments to the template template parameter's template
419 parameters, not the other way around.
421 2008-03-25 Tom Tromey <tromey@redhat.com>
423 * Make-lang.in: Remove .o targets.
424 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
426 (c++_OBJS): New variable.
427 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
429 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
431 * typeck.c (composite_pointer_type_r): Add SFINAE support.
432 (composite_pointer_type): Ditto.
433 (common_type): Fix call to composite_pointer_type.
434 (cxx_sizeof_nowarn): New; used to be a macro.
435 (cxx_sizeof_expr): Add SFINAE support.
436 (cxx_alignof_expr): Ditto.
437 (decay_conversion): Fix calls for SFINAE support.
438 (rationalize_conditional_expr): Add SFINAE support.
439 (build_class_member_access_expr): Ditto.
440 (finish_class_member_access_expr): Ditto.
441 (build_x_indirect_ref): Ditto.
442 (build_indirect_ref): Original version renamed to
443 cp_build_indirect_ref; new version provides a bridge from
445 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
447 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
448 (build_function_call): Original version renamed to
449 cp_build_function_call; new version provides a bridge from
451 (cp_build_function_call): Was build_function_call; added SFINAE
453 (convert_arguments): Add SFINAE support.
454 (build_x_binary_op): Ditto.
455 (build_binary_op): Original version renamed to cp_build_binary_op;
456 new version provides a bridge from c-common.
457 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
458 (pointer_diff): Fix calls for SFINAE.
459 (build_x_unary_op): Add SFINAE support.
460 (condition_conversion): Fix calls for SFINAE.
461 (build_unary_op): Original version renamed to cp_build_unary_op;
462 new version provides a bridge from c-common.
463 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
464 (unary_complex_lvalue): Fix calls for SFINAE.
465 (build_x_conditional_expr): Add SFINAE support.
466 (build_x_compound_expr_from_list): Fix calls for SFINAE.
467 (build_x_compound_expr): Add SFINAE support.
468 (convert_ptrmem): Fix calls for SFINAE.
469 (build_static_cast_1): Add SFINAE support.
470 (build_static_cast): Ditto.
471 (build_reinterpret_cast_1): Ditto.
472 (build_reinterpret_cast): Ditto.
473 (build_const_cast_1): Ditto.
474 (build_const_cast): Ditto.
475 (build_c_cast): Ditto.
476 (build_modify_expr): Original version renamed to
477 cp_build_modify_expr; new version provides a bridge from c-common.
478 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
480 (build_x_modify_expr): Add SFINAE support.
481 (build_ptrmemfunc): Fix calls for SFINAE.
482 (convert_for_assignment): Add SFINAE support.
483 (convert_for_initialization): Ditto.
484 (check_return_expr): Fix calls for SFINAE.
485 (lvalue_or_else): Add SFINAE support.
486 * init.c (perform_member_init): Fix calls for SFINAE.
487 (emit_mem_initializers): Ditto.
488 (expand_virtual_init): Ditto.
489 (expand_cleanup_for_base): Ditto.
490 (build_aggr_init): Add SFINAE support.
491 (expand_default_init): Ditto.
492 (expand_aggr_init_1): Fix calls for SFINAE.
493 (build_offset_ref): Ditto.
494 (build_new_1): Add SFINAE support.
496 (build_vec_delete_1): Fix calls for SFINAE.
497 (get_temp_regvar): Ditto.
498 (build_vec_init): Add SFINAE support.
499 (build_dtor_call): Fix calls for SFINAE.
500 (build_delete): Ditto.
501 (push_base_cleanups): Ditto.
502 (build_vec_delete_1): Ditto.
503 * class.c (build_base_path): Fix calls for SFINAE.
504 (build_simple_base_path): Ditto.
505 (convert_to_base_statically): Ditto.
506 (build_vfn_ref): Ditto.
507 (resolve_address_of_overloaded_function): Ditto.
508 * decl.c (check_initializer): Fix calls for SFINAE.
509 (register_dtor_fn): Ditto.
510 (compute_array_index_type): Ditto.
511 (finish_enum): Ditto.
512 (start_preparsed_function): Ditto.
513 (cxx_maybe_build_cleanup): Ditto.
514 * call.c (convert_like): Add COMPLAIN argument.
515 (convert_like_with_context): Ditto.
516 (build_this): Fix calls for SFINAE.
517 (build_user_type_conversion): Ditto.
518 (resolve_args): Ditto.
519 (build_new_function_call): Add SFINAE support.
520 (build_operator_new_call): Fix calls for SFINAE.
521 (build_object_call): Add SFINAE support.
522 (build_conditional_expr): Ditto.
523 (build_new_op): Ditto.
524 (build_op_delete_call): Fix calls for SFINAE.
526 (convert_like_real): Add SFINAE support.
527 (build_x_va_arg): Fix calls for SFINAE.
528 (convert_default_arg): Ditto.
529 (build_over_call): Add SFINAE support.
530 (build_java_interface_fn_ref): Fix calls for SFINAE.
531 (build_special_member_call): Add SFINAE support.
532 (build_new_method_call): Ditto.
533 (perform_implicit_conversion): Ditto.
534 (perform_direct_initialization_if_possible): Ditto.
535 (initialize_reference): Fix calls for SFINAE.
536 * method.c (do_build_assign_ref): Fix calls for SFINAE.
537 * rtti.c (build_headof): Fix calls for SFINAE.
538 (get_tinfo_decl_dynamic): Ditto.
540 (build_dynamic_cast_1): Add SFINAE support.
541 (build_dynamic_cast): Ditto.
542 (tinfo_base_init): Fix calls for SFINAE.
543 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
544 (do_end_catch): Ditto.
545 (initialize_handler_parm): Ditto.
546 (expand_start_catch_block): Ditto.
547 (do_allocate_exception): Ditto.
548 (do_free_exception): Ditto.
549 (build_throw): Ditto.
550 * cvt.c (build_up_reference): Fix calls for SFINAE.
551 (convert_to_reference): Ditto.
552 (ocp_convert): Ditto.
553 (convert_to_void): Add SFINAE support.
554 * tree.c (build_dummy_object): Fix calls for SFINAE.
555 (stabilize_expr): Ditto.
556 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
558 (build_new_method_call): Ditto.
559 (build_special_member_call): Ditto.
560 (build_new_op): Ditto.
561 (perform_implicit_conversion): Ditto.
562 (perform_direct_initialization_if_possible): Ditto.
563 (convert_to_void): Ditto.
564 (build_aggr_init): Ditto.
566 (build_vec_init): Ditto.
567 (build_dynamic_cast): Ditto.
568 (finish_call_expr): Ditto
569 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
570 (cxx_sizeof_nowarn): Remove macro; add function declaration.
571 (build_class_member_access_expr): Add tsubst_flags_t parameter.
572 (finish_class_member_access_expr): Ditto.
573 (build_x_indirect_ref): Ditto.
574 (cp_build_indirect_ref): New.
575 (cp_build_function_call): Add tsubst_flags_t parameter.
576 (build_x_unary_op): Ditto.
577 (cp_build_unary_op): New.
578 (build_x_conditional_expr): Add tsubst_flags_t parameter.
579 (build_x_compound_expr): Ditto.
580 (build_compound_expr): Ditto.
581 (build_static_cast): Ditto.
582 (build_reinterpret_cast): Ditto.
583 (build_const_cast): Ditto.
584 (build_c_cast): Ditto.
585 (build_x_modify_expr): Ditto.
586 (cp_build_modify_expr): New.
587 (convert_for_initialization): Add tsubst_flags_t parameter.
588 (cp_build_binary_op): Remove macro; add function declaration.
589 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
590 (lvalue_or_else): Ditto.
591 (build_functional_cast): Ditto.
592 * typeck2.c (digest_init): Fix calls for SFINAE.
593 (process_init_constructor_array): Ditto.
594 (process_init_constructor_record): Ditto.
595 (build_x_arrow): Ditto.
596 (build_m_component_ref): Ditto.
597 (build_functional_cast): Add SFINAE support.
598 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
599 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
600 (finish_expr_stmt): Ditto.
601 (finish_for_expr): Ditto.
602 (finish_asm_stmt): Ditto.
603 (finish_non_static_data_member): Ditto.
604 (finish_qualified_id_expr): Ditto.
605 (finish_call_expr): Add SFINAE support.
606 (finish_increment_expr): Fix calls for SFINAE.
607 (finish_unary_op_expr): Ditto.
608 (simplify_aggr_init_expr): Ditto.
609 (finish_omp_clauses): Ditto.
610 (finish_omp_for): Ditto.
611 (finish_omp_barrier): Ditto.
612 (finish_omo_flush): Ditto.
613 * decl2.c (grok_array_decl): Fix calls or SFINAE.
614 (build_anon_union_vars): Ditto.
615 (get_guard_cond): Ditto.
617 (one_static_initialization_or_destruction): Ditto.
618 (do_static_initialization_or_destruction): Ditto.
619 (generate_ctor_or_dtor_function): Ditto.
620 (build_offset_ref_call_from_tree): Ditto.
621 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
622 (cp_parser_postfix_dot_deref_expression): Ditto.
623 (cp_parser_unary_expression): Ditto.
624 (cp_parser_new_expression): Ditto.
625 (cp_parser_cast_expression): Ditto.
626 (cp_parser_binary_expression): Ditto.
627 (cp_parser_question_colon_clause): Ditto.
628 (cp_parser_assignment_expression): Ditto.
629 (cp_parser_expression): Ditto.
630 (cp_parser_builtin_offsetof): Ditto.
631 (cp_parser_template_argument): Ditto.
632 (cp_parser_functional_cast): Ditto.
634 2008-03-24 Tom Tromey <tromey@redhat.com>
636 * lex.c (handle_pragma_interface): Don't copy the filename.
637 (handle_pragma_implementation): Copy filename using xstrdup.
639 2008-03-21 Paolo Carlini <pcarlini@suse.de>
641 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
642 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
643 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
644 (PROMOTES_TO_AGGR_TYPE): Remove.
645 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
646 * typeck.c (unary_complex_lvalue, build_modify_expr,
647 convert_for_initialization): Adjust.
648 * init.c (is_aggr_type): Remove.
649 (is_class_type): Add.
650 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
651 build_delete): Adjust.
652 * lex.c (make_aggr_type): Remove.
653 (make_class_type): Add.
654 (cxx_make_type): Adjust.
655 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
657 * decl.c (build_typename_type, make_typename_type,
658 make_unbound_class_template, cxx_init_decl_processing,
659 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
660 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
661 grok_op_properties, xref_tag, check_function_type): Adjust.
662 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
663 add_builtin_candidate, add_builtin_candidates,
664 build_user_type_conversion_1, convert_like_real, build_cxx_call,
665 is_subseq, compare_ics): Adjust.
666 * method.c (use_thunk): Adjust.
667 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
668 create_tinfo_types): Adjust.
669 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
670 build_up_reference, convert_to_reference, convert_from_reference,
671 ocp_convert, build_expr_type_conversion): Adjust.
672 * tree.c (bind_template_template_parm, error_type): Adjust.
673 * dump.c (cp_dump_tree): Adjust.
674 * search.c (lookup_member): Adjust.
675 * friend.c (make_friend_class, do_friend): Adjust.
676 * typeck2.c (store_init_value, process_init_constructor_array,
677 process_init_constructor_record, build_x_arrow, build_m_component_ref,
678 build_functional_cast): Adjust.
679 * pt.c (finish_member_template_decl, process_template_parm,
680 lookup_template_class, tsubst_function_type, tsubst,
681 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
683 * semantics.c (begin_class_definition, finish_base_specifier,
684 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
686 * name-lookup.c (constructor_name_p, push_overloaded_decl,
687 do_class_using_decl, lookup_qualified_name,
688 maybe_process_template_type_declaration): Adjust.
689 * decl2.c (grok_array_decl, check_member_template,
690 constrain_class_visibility): Adjust.
691 * parser.c (cp_parser_class_name): Adjust.
693 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
695 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
697 2008-03-17 Jason Merrill <jason@redhat.com>
700 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
701 a temp directly to a reference as per DR391.
703 2008-03-12 Richard Guenther <rguenther@suse.de>
707 2008-02-04 Richard Guenther <rguenther@suse.de>
710 * decl.c (record_builtin_java_type): Make jboolean a
711 integer type again where its mode doesn't match that of bool.
713 2008-01-25 Richard Guenther <rguenther@suse.de>
716 * decl.c (record_builtin_java_type): Make __java_boolean
718 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
719 after TYPE_MAIN_VARIANT check.
721 2008-03-10 Jakub Jelinek <jakub@redhat.com>
724 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
728 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
729 DECL_P in not a variable and appears more than once error messages.
731 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
735 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
739 * typeck.c (structural_comptypes): Call cp_comptypes.
740 (comptypes): New; called from the C/C++ common bits to perform
742 (cp_comptypes): Renamed from comptypes, which is already used,
743 with a different signature, by the C++ front end.
744 (build_reinterpret_cast_1): Call cp_comptypes.
745 (ptr_reasonably_similar): Ditto.
746 * decl.c (decls_match): Ditto.
747 * cvt.c (convert_to_reference): Ditto.
748 * cp-tree.h (same_type_p): Ditto.
749 (same_or_base_type_p): Ditto.
750 (comptypes): Rename to cp_comptypes.
751 * pt.c (canonical_type_parameter): Call cp_comptypes.
753 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
755 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
756 test for equivalence between pointer and references.
758 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
761 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
762 (check_field_decls): Likewise.
763 (note_name_declared_in_class): Likewise.
764 * call.c (build_new_op): Likewise.
765 (convert_like_real): Likewise.
766 (build_over_call): Likewise.
767 * lex.c (unqualified_fn_lookup_error): Likewise.
768 * parser.c (cp_parser_template_id): Likewise.
769 * cvt.c (warn_ref_binding): Likewise.
770 (convert_to_reference): Likewise.
771 (ocp_convert): Likewise.
772 (convert_to_void): Use error instead of pedwarn.
773 * error.c (cp_cpp_error): Use pedantic_warning_kind.
774 * decl.c (compute_array_index_type): Use constant_expression_error.
776 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
778 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
779 that auto is either a storage class or a simple type specifier,
780 depending on the dialect.
781 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
782 specifier in C++98 mode, error in C++0x mode (since we don't
783 support auto as a type specifier, yet).
784 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
785 storage specifier in C++0x mode.
786 (cp_parser_simple_type_specifier): Parse `auto' as a
787 simple-type-specifier, but error because we don't support it yet.
789 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
791 * parser.c (cp_parser_nonclass_name): New.
792 (cp_parser_pseudo_destructor_name): Use it instead of
794 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
796 2008-02-29 Tom Tromey <tromey@redhat.com>
798 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
799 (cp_lexer_get_preprocessor_token): Update.
800 (cp_lexer_set_source_position_from_token): Don't call
801 restore_input_file_stack.
802 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
804 2008-02-28 Richard Guenther <rguenther@suse.de>
807 2008-02-26 Richard Guenther <rguenther@suse.de>
809 * decl.c (duplicate_decls): Remove decl from global mapping
810 before ggc_freeing it.
812 2008-02-27 Jakub Jelinek <jakub@redhat.com>
815 * rtti.c: Include c-pragma.h.
816 (push_abi_namespace, pop_abi_namespace): New functions.
817 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
818 create_tinfo_types, emit_support_tinfos): Use them.
819 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
821 2008-02-26 Jason Merrill <jason@redhat.com>
824 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
825 to name the struct for linkage purposes even if it has attributes.
826 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
828 2008-02-26 Tom Tromey <tromey@redhat.com>
830 * parser.c (eof_token): Remove old location code.
831 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
832 * decl2.c (generate_ctor_or_dtor_function): Remove old location
834 (cp_write_global_declarations): Likewise.
835 * lex.c (cxx_init): Remove old location code.
836 (handle_pragma_implementation): Remove test of
838 * pt.c (tsubst): Remove old location code.
839 * error.c (cp_print_error_function): Remove test of
841 * decl.c (pop_label): Remove old location code.
842 (finish_function): Likewise.
844 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
847 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
849 2008-02-26 Richard Guenther <rguenther@suse.de>
851 * decl.c (duplicate_decls): Remove decl from global mapping
852 before ggc_freeing it.
854 2008-02-26 Paolo Carlini <pcarlini@suse.de>
857 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
859 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
861 * typeck.c (build_class_member_access_expr): Add appropriate
862 OPT_W* parameter to warning.
863 (build_reinterpret_cast_1): Likewise.
864 * name-lookup.c (push_overloaded_decl): Likewise.
866 2008-02-25 Paolo Carlini <pcarlini@suse.de>
869 * error.c (dump_expr): Handle CONJ_EXPR.
871 2008-02-25 Paolo Carlini <pcarlini@suse.de>
874 * error.c (dump_type): Handle FIXED_POINT_TYPE.
875 (dump_expr): Handle FIXED_CST.
877 2008-02-24 Jason Merrill <jason@redhat.com>
879 * parser.c (cp_parser_declaration): Handle "inline namespace".
880 (cp_parser_namespace_definition): Likewise.
883 * name-lookup.c (arg_assoc_namespace): Look down into inline
886 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
888 * typeck.c (check_for_casting_away_constness): Use 1 single
889 argument, the type of cast, to decide what diagnostics generate.
890 (build_static_cast_1): Remove unused code. Update call to
891 check_for_casting_away_constness.
892 (build_reinterpret_cast_1): Update call to
893 check_for_casting_away_constness.
894 (build_const_cast_1): Likewise.
896 2008-02-24 Paolo Carlini <pcarlini@suse.de>
898 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
899 VEC_NEW_EXPR), forward to pp_expression.
900 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
902 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
905 * friend.c (do_friend): Call cplus_decl_attributes earlier.
907 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
910 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
911 template decls' function decl.
913 2008-02-22 Paolo Carlini <pcarlini@suse.de>
917 2008-02-14 Paolo Carlini <pcarlini@suse.de>
920 * pt.c (determine_specialization): In case of function templates,
921 when the type of DECL does not match FN there is no match.
923 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
926 * typeck.c (build_binary_op): Warn about floating point
927 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
929 2008-02-19 Jason Merrill <jason@redhat.com>
932 * pt.c (resolve_overloaded_unification): Set processing_template_decl
933 while we look for possible bindings.
935 2008-02-19 Jakub Jelinek <jakub@redhat.com>
938 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
942 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
943 vars. Afterwards ensure v is VAR_DECL.
946 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
948 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
951 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
956 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
957 is error_mark_node, return an error early.
958 (find_parameter_packs_r): Pass the pointer set along to recursive
959 calls of cp_walk_subtrees; don't try to manage the pointer set
961 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
962 (make_pack_expansion): Ditto.
963 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
964 a second pass through the tree with find_parameter_packs_r; that
965 second pass no longer does anything.
966 (push_template_decl_real): If we have an erroneous declaration,
967 set its type to error_mark_node before returning an error.
969 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
972 * pt.c (tsubst_initializer_list): Deal with the use of
973 VOID_TYPE_NODE to indicate value-initialization of the bases.
975 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
976 Jason Merrill <jason@redhat.com>
980 * class.c (type_has_user_nondefault_constructor): New fn.
981 * cp-tree.h: Declare it.
982 * init.c (emit_mem_initializers): Use it for -W warning about
983 missing base initializer.
985 2008-02-14 Paolo Carlini <pcarlini@suse.de>
988 * pt.c (determine_specialization): In case of function templates,
989 when the type of DECL does not match FN there is no match.
991 2008-02-13 Jakub Jelinek <jakub@redhat.com>
992 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
995 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
996 are not identifier :: ~, return before calling cp_parser_type_name.
998 2008-02-13 Jason Merrill <jason@redhat.com>
1000 PR c++/34962, c++/34937, c++/34939
1001 * decl2.c (is_late_template_attribute): Always defer attributes
1002 vector_size and weak.
1005 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1006 of enumerators, too.
1008 2008-02-12 Jason Merrill <jason@redhat.com>
1011 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1012 if we're doing conversions to call a user-defined conversion function.
1014 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1017 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1020 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1023 * init.c (build_new_1): Don't create placement_expr before
1024 constructing alloc_call. Verify that the pointer is passed by
1025 value to operator new.
1027 2008-02-11 Jason Merrill <jason@redhat.com>
1030 * pt.c (tsubst): Don't look up a template typedef in an explicit
1033 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1036 * tree.c (cp_build_qualified_type_real): When building a
1037 cv-qualified array type, build it as a unique type with
1038 build_cplus_array_type_1 and then adopt the unqualified type's
1041 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1044 * decl.c (groktypename): Check grokdeclarator return.
1046 2008-02-10 Jason Merrill <jason@redhat.com>
1049 * decl2.c (cp_write_global_declarations): Don't write out static
1050 data members with DECL_IN_AGGR_P set.
1052 2008-02-08 Jason Merrill <jason@redhat.com>
1055 * tree.c (build_target_expr_with_type): Handle void initializer.
1056 (bot_manip): Remap slot before recursing.
1058 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1061 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1063 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1066 * tree.c: Include tree-flow.h.
1067 (build_target_expr): Check type compatibility.
1068 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1069 * call.c (convert_like_real): Convert bitfield to expected type.
1071 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1075 * typeck.c (structural_comptypes): Call cp_comptypes.
1076 (comptypes): New; called from the C/C++ common bits to perform
1078 (cp_comptypes): Renamed from comptypes, which is already used,
1079 with a different signature, by the C++ front end.
1080 (build_reinterpret_cast_1): Call cp_comptypes.
1081 (ptr_reasonably_similar): Ditto.
1082 * decl.c (decls_match): Ditto.
1083 * cvt.c (convert_to_reference): Ditto.
1084 * cp-tree.h (same_type_p): Ditto.
1085 (same_or_base_type_p): Ditto.
1086 (comptypes): Rename to cp_comptypes.
1087 * pt.c (canonical_type_parameter): Call cp_comptypes.
1089 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1092 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1093 value dependent expression.
1095 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1098 * decl2.c (save_template_attributes): When we're modifying the
1099 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1100 all of the other variants to add those same attributes. Otherwise,
1101 the main variant will be inconsistent with those other variants.
1103 2008-02-04 Richard Guenther <rguenther@suse.de>
1106 * decl.c (record_builtin_java_type): Make jboolean a
1107 integer type again where its mode doesn't match that of bool.
1109 2008-02-02 Jason Merrill <jason@redhat.com>
1110 Mark Mitchell <mark@codesourcery.com>
1113 * init.c (build_value_init_1): New function.
1114 (build_value_init): New function.
1115 * typeck2.c (build_functional_cast): Call it.
1116 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1118 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1119 TYPE_HAS_CONSTRUCTOR.
1120 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1121 add_implicitly_declared_members): Adjust.
1122 (check_field_decls): Adjust. Remove warnings about reference/const
1123 in class without constructor.
1124 (check_bases_and_members): Adjust. Give those warnings here instead.
1125 * decl.c (fixup_anonymous_aggr): Adjust.
1126 (check_initializer): Adjust, clarify logic slightly.
1127 (grok_special_member_properties): Adjust, only set if user-provided.
1128 * rtti.c (create_tinfo_types): Don't set.
1129 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1130 Use same_type_ignoring_top_level_qualifiers_p.
1131 * pt.c (check_explicit_specialization): Adjust.
1132 (instantiate_class_template): Adjust.
1134 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1135 Jakub Jelinek <jakub@redhat.com>
1139 * typeck.c (structural_comptypes): Handle comparisons of
1140 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1142 * mangle.c (write_builtin_type): Map down to the canonical type,
1143 which will be one of the predefined type nodes.
1145 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1148 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1149 bits to allow for expansion of the number of middle end tree
1152 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1163 * typeck.c (check_return_expr): Tweak call to
1164 check_for_bare_parameter_packs.
1165 * class.c (add_method): Be careful with error_mark_nodes.
1166 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1168 * pt.c (struct find_parameter_pack_data): Remove
1170 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1171 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1172 (make_pack_expansion): Ditto.
1173 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1175 (process_template_parm): Tweak call to
1176 check_for_bare_parameter_packs.
1177 (push_template_decl_real): Tweak calls to
1178 check_for_bare_parameter_packs. If bare parameter packs are found
1179 in the list of exceptions, clear out that list after giving an
1181 * semantics.c (finish_cond): Tweak call to
1182 check_for_bare_parameter_packs.
1183 (finish_expr_stmt): Ditto.
1184 (finish_for_expr): Ditto.
1185 (finish_switch_cond): Ditto.
1186 (finish_mem_initializers): Ditto.
1187 (finish_member_declaration): Ditto.
1188 (finish_static_assert): Check for bare parameter packs in the
1190 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1191 attributes of a declaration.
1192 * parser.c (cp_parser_using_declaration): Tweak call to
1193 check_for_bare_parameter_packs.
1194 (cp_parser_base_clause): Ditto.
1196 2008-01-28 Jason Merrill <jason@redhat.com>
1199 * class.c (build_base_path): Fix !want_pointer case.
1201 2008-01-27 Jason Merrill <jason@redhat.com>
1204 * class.c (build_base_path): Fix previous change.
1206 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1209 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1212 2008-01-26 Richard Guenther <rguenther@suse.de>
1215 * typeck.c (build_binary_op): Remove code to shorten compares.
1217 2008-01-25 Richard Guenther <rguenther@suse.de>
1220 * decl.c (record_builtin_java_type): Make __java_boolean
1222 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1223 after TYPE_MAIN_VARIANT check.
1225 2008-01-25 Jason Merrill <jason@redhat.com>
1228 * class.c (build_base_path): Don't mess with virtual access if
1230 * call.c (standard_conversion): Don't check whether source type
1233 * decl2.c (is_late_template_attribute): Don't defer attribute
1234 visibility just because the type is dependent.
1236 2008-01-25 Jason Merrill <jason@redhat.com>
1237 Mark Mitchell <mark@codesourcery.com>
1240 * call.c (standard_conversion): Allow conversion from integer/real
1242 (compare_ics): Such a conversion is worse than a normal arithmetic
1245 2008-01-25 Richard Guenther <rguenther@suse.de>
1248 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1251 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1254 * pt.c (push_template_decl_real): Return error_mark_node in case
1255 of template definition of non-template.
1257 2008-01-24 Jason Merrill <jason@redhat.com>
1260 * decl2.c (is_late_template_attribute): Defer any attribute with
1261 dependent args. Also defer type attributes if the type is dependent.
1263 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1264 Alexandre Oliva <aoliva@redhat.com>
1267 * call.c (reference_binding): For bitfields use the declared bitfield
1269 (add_builtin_candidates): Likewise.
1270 * class.c (layout_class_type): For bitfields copy over the
1271 original type quals.
1273 2008-01-22 Jason Merrill <jason@redhat.com>
1276 * decl.c (groktypename): Also ignore attributes on dependent
1277 possibly-class types.
1280 * friend.c (do_friend): Check for prior declaration of a friend
1281 function of a local class.
1282 * name-lookup.c (lookup_name_innermost_nonclass_level):
1284 * name-lookup.h: Declare it.
1286 2008-01-22 Tom Tromey <tromey@redhat.com>
1289 * init.c (build_new_1): Only disallow Java aggregates.
1291 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1294 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1295 if decl or init is error_mark_node.
1298 * error.c (dump_expr): Handle VECTOR_CST.
1300 2008-01-21 Jason Merrill <jason@redhat.com>
1303 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1306 * pt.c (retrieve_local_specialization): Robustify.
1307 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1310 * pt.c (tsubst): Only call retrieve_local_specialization if the
1311 original typedef was in a function template.
1314 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1316 2008-01-21 Richard Guenther <rguenther@suse.de>
1319 * error.c (cp_print_error_function): Deal with recursive
1322 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1325 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1327 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1331 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1332 on non-IS_AGGR_TYPE scope.
1333 (constructor_name_p): Assert IS_AGGR_TYPE.
1335 2008-01-18 Ian Lance Taylor <iant@google.com>
1338 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1339 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1340 DECL_IS_OPERATOR_NEW flag.
1342 2008-01-16 Richard Guenther <rguenther@suse.de>
1345 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1346 for conversions to type variants.
1348 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1350 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1351 declaration and code. Update copyright year.
1353 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1356 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1357 know we have a class type.
1359 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1362 * pt.c (coerce_template_parameter_pack): When substituting into
1363 the type of a non-type template parameter pack. use the
1364 deduced/substituted arguments.
1365 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1366 can be a parameter pack with the ellipsis following it. When we
1367 have an erroneous declaration, allow it to be a parameter pack.
1368 (cp_parser_template_parameter): Complain about default
1369 arguments on non-type template parameter packs, and parse them
1370 using the new cp_parser_default_argument.
1371 (cp_parser_parameter_declaration): Complain about parameter packs
1372 with default arguments. Move parsing of default arguments into a
1373 new function, cp_parser_default_argument.
1374 (cp_parser_default_argument): New; extracted from
1375 cp_parser_parameter_declaration.
1377 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1383 * typeck.c (check_return_expr): If there are bare parameter packs
1384 in the return value, set it to error_mark_node.
1385 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1386 * pt.c (find_parameter_packs_r): Look at the type of
1387 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1388 (check_for_bare_parameter_packs): Flip the result: now returns
1389 TRUE when there were bare parameter packs, FALSE otherwise.
1390 (push_template_decl_real): Deal with flipped result of
1391 check_for_bare_parameter_packs.
1392 * semantics.c (finish_cond): If there are bare parameter packs in
1393 the conditional, set it to error_mark_node.
1394 (finish_expr_stmt): If there are bare parameter packs in the
1395 expression, set it to error_mark_node.
1396 (finish_for_expr): Ditto.
1397 (finish_switch_cond): If there are bare parameter packs in
1398 the conditional, set it to error_mark_node.
1399 (finish_mem_initializers): If there are bare parameter packs in
1400 the member initializer, set it to error_mark_node.
1401 (finish_member_declaration): Check the attributes of the
1402 declaration for bare parameter packs, and remove the attributes if
1403 any have bare parameter packs.
1404 * parser.c (cp_parser_using_declaration): Check the using
1405 declaration for bare parameter packs.
1406 (cp_parser_base_clause): If there are bare parameter packs in a
1407 base specifier, don't add it to the chain.
1409 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1412 * error.c (dump_simple_decl): Display ellipsis for template
1413 non-type parameter packs.
1414 (dump_decl): Display ellipsis for template type parameter packs.
1415 (dump_template_decl): Display ellipsis for template template
1417 * pt.c (redeclare_class_template): When redeclaring a class
1418 template, check for collisions between template parameters and
1419 template parameter packs.
1421 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1424 * pt.c (process_partial_specialization): Don't mark template
1425 parameters that occur in non-deduced contexts.
1426 (struct pair_fn_data): Add include_nondeduced_p.
1427 (for_each_template_parm_r): Only visit non-deduced contexts if
1428 include_nondeduced_p is set.
1429 (for_each_template_parm): Added parameter include_nondeduced_p,
1430 which states whether template parameters found in non-deduced
1431 contexts should be visited.
1432 (uses_template_parms): Visit all template parameters, even those
1433 in non-deduced contexts.
1435 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1438 * pt.c (check_default_tmpl_args): Check for parameter packs that
1439 aren't at the end of a primary template.
1440 (push_template_decl_real): Remove check for parameter packs that
1441 aren't at the end of a primary template; that now happens in
1442 check_default_tmpl_args.
1443 * semantics.c (finish_template_template_parm): Use
1444 check_default_tmpl_args to check for errors in the template
1447 2008-01-12 Doug Kwan <dougkwan@google.com>
1449 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1450 instead of OPT_Wreturn_type in warning due to ignored return type
1452 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1453 instead of OPT_Wreturn_type in warning due to ignored return type
1456 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1459 * semantics.c (finish_omp_for): Don't call
1460 fold_build_cleanup_point_expr if processing_template_decl.
1462 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1463 Jakub Jelinek <jakub@redhat.com>
1466 * error.c (dump_template_argument): Deal with TREE_LIST.
1468 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1470 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1471 long" in C++0x mode; change the warning to note that "long long"
1472 is only unsupported in C++98 mode.
1474 2007-12-20 Jason Merrill <jason@redhat.com>
1477 * call.c (standard_conversion): Derived-to-base is considered a
1478 standard conversion.
1480 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1483 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1484 call cp_parser_statement rather than
1485 cp_parser_already_scoped_statement.
1487 2007-12-18 Jason Merrill <jason@redhat.com>
1490 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1492 (dependent_type_p_r): Handle the domain of an array.
1494 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1495 Jakub Jelinek <jakub@redhat.com>
1500 * pt.c (template_template_parm_bindings_ok_p): New; verifies
1501 bindings of template template parameters after all template
1502 arguments have been deduced.
1503 (coerce_template_parms): Don't complain when COMPLAIN doesn't
1505 (fn_type_unification): Use template_template_parm_bindings_ok_p.
1506 (unify): Deal with variadic, bound template template parameters.
1507 (get_class_bindings): Use template_template_parm_bindings_ok_p.
1509 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1512 * decl.c (grokdeclarator): Reject friend sfk_constructor
1515 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1518 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1521 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1524 * cp-lang.c (cp_classify_record): New.
1525 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1527 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1530 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1533 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1534 dynamic_cast in a template.
1536 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
1539 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
1540 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
1542 2007-12-10 Jakub Jelinek <jakub@redhat.com>
1545 * error.c (dump_type_prefix, dump_type_suffix): Handle
1546 TYPE_PACK_EXPANSION.
1549 * error.c (dump_expr): Handle ABS_EXPR.
1551 2007-12-09 Jakub Jelinek <jakub@redhat.com>
1555 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
1556 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1557 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
1558 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
1559 flag_use_repository and repo_emit_p returned 2.
1561 2007-12-06 Jakub Jelinek <jakub@redhat.com>
1564 * tree.c (stabilize_call, stabilize_init): Do nothing if
1565 processing_template_decl.
1567 2007-12-05 Jakub Jelinek <jakub@redhat.com>
1570 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
1571 error instead of assertion failure.
1572 * parser.c (cp_parser_decltype): If closing paren is not found,
1573 return error_mark_node.
1575 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1578 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
1580 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
1581 since arg_assoc_template_arg will deal with them (better).
1583 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1586 * pt.c (tsubst_exception_specification): Handle substitutions into
1587 member templates, where tsubst_pack_expansion returns a
1588 TYPE_PACK_EXPANSION.
1590 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
1593 * pt.c (unify_pack_expansion): If we didn't deduce any actual
1594 bindings for the template parameter pack, don't try to keep the
1595 empty deduced arguments.
1596 (unify): If a parameter is a template-id whose template argument
1597 list contains a pack expansion that is not at the end, then we
1598 cannot unify against that template-id.
1600 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1603 * pt.c (current_template_args): Use error_operand_p.
1605 2007-12-02 Paolo Carlini <pcarlini@suse.de>
1608 * error.c (dump_decl): Handle TREE_BINFO.
1610 2007-12-01 Ollie Wild <aaw@google.com>
1613 * typeck.c (build_binary_op): Add conversion of pointers to function
1614 members appearing as operands to the equality operators.
1616 2007-11-30 Jakub Jelinek <jakub@redhat.com>
1619 * error.c (dump_expr): Handle OBJ_TYPE_REF.
1621 2007-11-29 Jakub Jelinek <jakub@redhat.com>
1624 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
1626 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
1631 * parser.c (cp_parser_decltype): Don't call finish_id_expression
1633 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
1636 2007-11-27 Jakub Jelinek <jakub@redhat.com>
1638 PR tree-optimization/34181
1639 * method.c (use_thunk): Don't inline the call in the thunk.
1642 * tree.c (decl_linkage): Static data members and static member
1643 functions in anonymous ns classes are lk_external.
1645 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1648 * decl.c (start_preparsed_function): Pass
1649 processing_template_decl for the new allocate_struct_function
1652 2007-11-25 Richard Guenther <rguenther@suse.de>
1654 * decl.c (poplevel): Use BLOCK_CHAIN.
1656 2007-11-24 Ollie Wild <aaw@google.com>
1658 * typeck.c (delta_from_ptrmemfunc): New function.
1659 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
1660 (build_binary_op): Call delta_from_ptrmemfunc.
1662 2007-11-23 Jakub Jelinek <jakub@redhat.com>
1666 * decl.c (cp_finish_decl): Disallow variable or field
1667 definitions if extern "Java" aggregates.
1668 (grokparms): Disallow parameters with extern "Java"
1670 (check_function_type): Disallow function return values
1671 with extern "Java" aggregates.
1672 * init.c (build_new_1): Disallow placement new with
1673 extern "Java" aggregates.
1675 2007-11-23 Mark Mitchell <mark@codesourcery.com>
1676 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1679 * call.c (convert_like_real): Build a zero constant when __null is
1680 converted to an integer type.
1682 2007-11-22 Jakub Jelinek <jakub@redhat.com>
1685 * decl2.c (cp_write_global_declarations): Issue error about static
1686 data members in anonymous namespace which are declared and used,
1689 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1692 * parser.c (cp_parser_class_head): Reject function template ids.
1695 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
1696 when processing_template_decl to build_array_type.
1699 * pt.c (more_specialized_fn): Don't segfault if one or
1700 both argument list end with ellipsis.
1702 2007-11-18 Jakub Jelinek <jakub@redhat.com>
1705 * semantics.c (finish_call_expr): Set
1706 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1707 or OVERLOAD with all noreturn functions.
1709 2007-11-16 Jakub Jelinek <jakub@redhat.com>
1712 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1715 2007-11-13 Jakub Jelinek <jakub@redhat.com>
1722 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1723 set to error_mark_node the outermost POINTER_TYPE to the pack if
1724 it is seen in a POINTER_TYPE.
1725 (push_template_decl_real): If check_for_bare_parameter_packs
1726 fails for function return type, set the return type to
1727 integer_type_node. If check_for_bare_parameter_packs failed
1728 for non-function, return error_mark_node.
1731 * call.c (build_new_op): Call resolve_args before calling
1734 2007-11-11 Tom Tromey <tromey@redhat.com>
1737 * lex.c (handle_pragma_implementation): Use cpp_included_before.
1739 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1742 * pt.c (redeclare_class_template): Update error message. Use a
1743 note to show the previous declaration.
1744 (tsubst_friend_class): Use the location of the friend template as
1745 the input location before calling redeclare_class_template.
1747 2007-11-11 Jakub Jelinek <jakub@redhat.com>
1750 * semantics.c (finish_pseudo_destructor_expr): Handle
1751 object == error_mark_node.
1753 2007-11-10 Jakub Jelinek <jakub@redhat.com>
1756 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1757 is not scalar type, let finish_class_member_access_expr handle
1758 diagnostics. Pass BIT_NOT_EXPR argument to
1759 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
1761 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
1764 * decl.c (cp_complete_array_type): If any of the initializer
1765 elements are pack expansions, don't compute the array size yet.
1767 2007-11-08 Andrew Pinski <pinskia@gmail.com>
1770 * tree.c (decl_linkage): Fields have no linkage.
1772 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
1774 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1776 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
1781 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1782 Be careful with ERROR_MARK_NODEs.
1783 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1786 2007-11-07 Jakub Jelinek <jakub@redhat.com>
1789 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1792 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1796 * tree.c (c_build_qualified_type): Define bridge to
1797 cp_build_qualified_type.
1799 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1810 * typeck.c (check_return_expr): Pass address of retval to
1811 check_for_bare_parameter_packs.
1812 * class.c (build_base_field): Tolerate bases that have no layout
1814 (end_of_base): Ditto.
1815 * tree.c (canonical_type_variant): Be careful with
1817 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1819 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1820 which states whether parameter packs should be replaced with
1822 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1823 possible. If set_packs_to_error is set true, replace the parameter
1824 pack with ERROR_MARK_NODE. Manage our own pointer sets.
1825 (uses_parameter_packs): Don't set parameter packs to
1827 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1828 which may be modified (if it is a parameter pack). Instructs
1829 find_parameter_packs_r to replace parameter packs with
1830 ERROR_MARK_NODE (so that they won't cause errors later on).
1831 (process_template_parm): Pass pointer to
1832 check_for_bare_parameter_packs.
1833 (process_partial_specialization): Replace pack expansions before
1834 the end of the template argument list with ERROR_MARK_NODE.
1835 (push_template_decl_real): Pass pointer to
1836 check_for_bare_parameter_packs. Replace parameter packs not at the
1837 end of the template parameter list with ERROR_MARK_NODE.
1838 (convert_template_argument): Be more careful about using DECL_NAME
1839 on only declarations.
1840 (unify): Can't unify against ERROR_MARK_NODE.
1841 * semantics.c (finish_cond): Pass pointer to
1842 check_for_bare_parameter_packs.
1843 (finish_expr_stmt): Ditto.
1844 (finish_for_expr): Ditto.
1845 (finish_switch_cond): Pass pointer to
1846 check_for_bare_parameter_packs, and call it before we put the
1847 condition into the statement.
1848 (finish_mem_initializers): Pass pointer to
1849 check_for_bare_parameter_packs.
1850 (finish_member_declaration): Ditto.
1851 * parser.c (cp_parser_base_clause): Ditto.
1853 2007-11-06 Jakub Jelinek <jakub@redhat.com>
1856 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1857 with the final TREE_READONLY flag in place. processing_template_decl
1858 is known to be 0 in this part of function.
1861 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1862 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1863 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1864 * semantics.c (finish_omp_atomic): Revert most of the
1865 2007-02-05 changes, just keep the new representation of
1866 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1868 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
1871 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1874 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1879 * typeck.c (merge_types): Don't lose rvalue references when
1881 * call.c (build_over_call): Don't elide move constructors just
1882 because the copy constructor is trivial (!).
1883 (compare_ics): If comparing cv-qualifiers fails, we can still order
1884 based on binding lvalues vs. rvalues.
1886 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1889 * pt.c (unify_pack_expansion): bring handling of function call
1890 arguments into line with type_unification_real.
1892 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1894 * typeck.c (build_binary_op): Use pedwarn instead of error for
1897 2007-11-05 Jakub Jelinek <jakub@redhat.com>
1900 * parser.c (cp_parser_unary_expression): For &&label call
1901 cp_parser_non_integral_constant_expression and return error_mark_node
1902 if it returned true.
1905 * decl.c (grokdeclarator): Don't call build_memfn_type if type
1906 is neither FUNCTION_TYPE nor METHOD_TYPE.
1908 2007-11-02 Jakub Jelinek <jakub@redhat.com>
1911 * parser.c (cp_parser_nested_name_specifier_opt): Use
1912 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1913 typedef of currently open class.
1915 2007-11-02 Paolo Carlini <pcarlini@suse.de>
1918 * error.c (dump_expr): Deal specially with statements.
1920 2007-11-01 Jason Merrill <jason@redhat.com>
1923 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1925 (lookup_template_class): Use it to get the outer template args
1926 for instantiating one.
1929 * pt.c (reduce_template_parm_level): tsubst the parameters
1930 of a template template parm.
1932 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
1935 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1937 2007-11-01 Jakub Jelinek <jakub@redhat.com>
1940 * parser.c (cp_parser_postfix_dot_deref_expression): If
1941 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1942 first and if that succeeds and type is SCALAR_TYPE_P, create
1946 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1947 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1948 as for std::type_info.
1950 2007-10-31 Paolo Carlini <pcarlini@suse.de>
1953 * cxx-pretty-print.c (pp_cxx_typeid_expression,
1954 pp_cxx_delete_expression): Change to static linkage.
1955 * cxx-pretty-print.h: Adjust declarations.
1956 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1957 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1958 MODOP_EXPR): Forward to pp_expression.
1960 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1963 2007-10-31 Christian Bruel <christian.bruel@st.com>
1964 Mark Mitchell <mark@codesourcery.com>
1967 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1968 if retval is volatile.
1970 2007-10-30 Jakub Jelinek <jakub@redhat.com>
1973 * decl2.c (build_offset_ref_call_from_tree): Call
1974 build_non_dependent_expr on object prior to building ADDR_EXPR from it
1975 if FN is DOTSTAR_EXPR.
1977 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
1981 * pt.c (find_parameter_packs_r): Fix typo in comment.
1982 (convert_template_argument): Look at the pattern of a pack
1983 expansion to determine what kind of entity we're converting.
1984 (coerce_template_parameter_pack): When we have coerced a non-type
1985 template parameter pack, substitute into the type of that pack.
1986 (tsubst_pack_expansion): When our substitution of a parameter pack
1987 is a "trivial" substitution of itself, just substitute into the
1988 pack expansion rather than actually expanding.
1990 2007-10-29 Jakub Jelinek <jakub@redhat.com>
1993 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1994 for non-integral type bitfields. Return true if bitfield is correct, false
1995 error has been diagnosed.
1996 (check_field_decls): If check_bitfield_decl returned false, call also
1999 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2000 Mark Mitchell <mark@codesourcery.com>
2003 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2004 class member error out and return.
2006 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2008 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2009 to current_function_decl rather than 0.
2012 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2014 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2016 2007-10-27 Jason Merrill <jason@redhat.com>
2019 * call.c (convert_default_arg): Detect recursion.
2021 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2024 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2025 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2027 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2029 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2031 2007-10-26 Jason Merrill <jason@redhat.com>
2034 * pt.c (get_template_info): New fn.
2035 (template_class_depth): Use it.
2036 (push_template_decl_real): Check that the template args of the
2037 definition match the args of the previous declaration.
2039 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2042 * decl2.c (coerce_new_type): Do not allow a default argument for
2043 the first parameter.
2045 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2048 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2049 don't see the leading '('. Only lookup names if we get an
2052 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2055 * parser.c (cp_parser_parenthesized_expression_list): Set
2056 greater_than_is_operator_p to true in between the parens.
2058 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2061 * decl.c (grokdeclarator): In case of conflicting specifiers
2062 just return error_mark_node.
2064 2007-10-26 Ollie Wild <aaw@google.com>
2066 * expr.c (cxx_expand_expr): Removed.
2067 * cp-tree.h (exx_expand_expr): Removed.
2068 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2071 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2074 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2076 2007-10-23 Jason Merrill <jason@redhat.com>
2078 PR c++/25950 (DR 391)
2079 * call.c (struct conversion): Remove check_copy_constructor_p.
2080 (reference_binding): Always bind a reference directly to a
2081 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2083 (check_constructor_callable): Remove.
2084 (convert_like_real): Don't call it.
2085 (initialize_reference): Don't call check_constructor_callable.
2086 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2087 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2088 conversions if LOOKUP_NO_TEMP_BIND.
2089 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2090 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2092 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2094 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2097 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2098 before checking if its type is integral.
2100 2007-10-22 Jason Merrill <jason@redhat.com>
2103 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2104 * pt.c (apply_late_template_attributes): Splice out dependent
2105 attributes from DECL_ATTRIBUTES.
2107 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2109 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2111 * typeck.c (build_binary_op) : Use appropriate warning option
2112 instead of unnamed warning.
2114 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2117 * pt.c (current_template_args): Do not change TREE_LIST elements
2118 with a TREE_VALUE of error_mark_node.
2120 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2122 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2123 * decl.c (start_decl): Tidy.
2124 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2126 (grokdeclarator): Clarify comment.
2128 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2131 * decl.c (grokfndecl): Return NULL after the "definition of
2132 implicitly-declared" error happened.
2134 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2137 * call.c (build_user_type_conversion_1): Do not consider conversion
2138 functions to convert a (possibly cv-qualified) object to the (possibly
2139 cv-qualified) same object type (or a reference to it), to a (possibly
2140 cv-qualified) base class of that type (or a reference to it).
2142 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2144 * pt.c (tsubst): Use template_parm_level_and_index.
2146 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2149 * parser.c (cp_parser_compound_statement): Handle label-declarations
2150 at the beginning of the compound statement.
2151 (cp_parser_block_declaration): Issue diagnostics about __label__
2152 not at the beginning of a block.
2154 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2157 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2158 to convert_template_argument.
2159 (coerce_template_parms): Return error_mark_node after fixed-length
2161 (tsubst_decl): Check for error_mark_node the return value of the
2162 first tsubst in 'case VAR_DECL'.
2164 2007-10-08 Ollie Wild <aaw@google.com>
2166 * typeck2.c (digest_init): Call cplus_expand_constant after
2167 convert_for_initialization.
2168 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2169 * expr.c (cplus_expand_constant): Updated function description.
2171 2007-10-04 Jason Merrill <jason@redhat.com>
2174 * call.c (initialize_reference): Handle local static reference
2177 2007-10-03 Jason Merrill <jason@redhat.com>
2180 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2181 (push_namespace): Here.
2182 (handle_namespace_attrs): New fn for the attr code.
2183 (leave_scope): Don't pop_visibility.
2184 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2185 * parser.c (cp_parser_namespace_definition): Call
2186 handle_namespace_attrs and pop_visibility as appropriate.
2189 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2191 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2193 * decl.c (duplicate_decls): Preserve linkage flags for mere
2194 redeclarations of gnu_inline definitions.
2196 2007-10-03 Jason Merrill <jason@redhat.com>
2199 * decl.c (wrap_cleanups_r): New fn.
2200 (wrap_temporary_cleanups): New fn.
2201 (initialize_local_var): Call it.
2203 2007-09-29 Jason Merrill <jason@redhat.com>
2206 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2207 constant to not have DECL_EXTERNAL if it's file-local.
2209 2007-09-28 Ollie Wild <aaw@google.com>
2212 2007-09-27 Ollie Wild <aaw@google.com>
2214 * typeck2.c (digest_init): Call cplus_expand_constant after
2215 convert_for_initialization.
2216 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2217 * expr.c (cplus_expand_constant): Updated function description.
2219 2007-09-28 Jason Merrill <jason@redhat.com>
2222 * class.c (layout_empty_base): Take rli parameter, update
2223 rli->record_align if empty base has user-specified alignment.
2224 (build_base_field): Pass rli to it.
2226 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2229 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2231 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2234 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2235 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2236 (dump_parameters): Just call dump_type for argument packs too.
2238 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2241 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2242 qualification by creating qualified PACK_EXPANSION_PATTERN and
2243 then calling make_pack_expansion on it.
2245 2007-09-27 Ollie Wild <aaw@google.com>
2247 * typeck2.c (digest_init): Call cplus_expand_constant after
2248 convert_for_initialization.
2249 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2250 * expr.c (cplus_expand_constant): Updated function description.
2252 2007-09-27 Jason Merrill <jason@redhat.com>
2255 * decl2.c (is_late_template_attribute): Don't crash on unknown
2258 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2261 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2262 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2263 spaces in the formatting.
2264 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2266 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2268 * error.c (cxx_print_error_function): Add third argument, pass
2269 it over to lhd_print_error_function.
2270 (cp_print_error_function): If diagnostic->abstract_origin, print
2272 * cp-tree.h (struct diagnostic_info): New forward decl.
2273 (cxx_print_error_function): Add third argument.
2275 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2278 * name-lookup.c (pushtag): Do not create an implicit typedef before
2279 the associated type declaration is known to be valid.
2281 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2283 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2284 rather than pointers.
2286 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2289 * search.c (check_final_overrider): Fail if
2290 targetm.comp_type_attributes returns 0.
2292 2007-09-24 Jason Merrill <jason@redhat.com>
2295 * pt.c (resolve_typename_type): Don't look things up in the original
2296 template if it would mean losing template arguments.
2298 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2301 * cp-tree.h (cxx_type_hash_eq): New prototype.
2302 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2303 * tree.c (cxx_type_hash_eq): New function.
2305 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2308 * tree.c (cp_build_qualified_type_real): Build a canonical
2309 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2311 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2315 * tree.c (cplus_array_compare): Compare pointers, not types.
2316 (build_cplus_array_type_1): Store new array type into the hash
2317 table before building the canonical type; build the canonical type
2319 (cp_build_qualified_type_real): Put all of the array types with
2320 cv-qualified element types into the C++ array hash table, built as
2321 variants of the unqualified versions.
2323 2007-09-23 Jason Merrill <jason@redhat.com>
2326 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2327 for deprecation warnings.
2329 2007-09-22 Jason Merrill <jason@redhat.com>
2332 * call.c (build_over_call): Warn about deprecated virtuals.
2335 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2336 (MAYBE_TAGGED_TYPE_P): Remove.
2337 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2338 instead of calling is_late_template_attribute again.
2339 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2340 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2341 Don't crash on typedefs from non-template classes.
2342 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2343 (is_late_template_attribute): All attributes applied to template
2344 parms or typename types are dependent. Static.
2345 (splice_template_attributes): Pass decl through.
2346 (save_template_attributes): Likewise.
2348 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2351 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2352 returned from tsubst_pack_expansion.
2353 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2354 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2356 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2359 * semantics.c (finish_id_expression): Use consistently
2360 context_for_name_lookup.
2361 * decl.c (fixup_anonymous_aggr): Fix error message for
2362 anonymous struct (vs union).
2364 2007-09-19 Jason Merrill <jason@redhat.com>
2367 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2368 (retrieve_specialization): Only tagged types use
2369 DECL_TEMPLATE_INSTANTIATIONS.
2370 (instantiate_class_template): Push nested classes too.
2371 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2373 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2374 * init.c (is_aggr_type): Remove redundant tests.
2375 * class.c (push_nested_class): Use CLASS_TYPE_P.
2377 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2380 * init.c (build_zero_init): If, recursively, build_zero_init
2381 returns a NULL_TREE, do not append it to the VEC of constructors.
2383 2007-09-18 Jason Merrill <jason@redhat.com>
2386 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2387 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2388 ATTR_FLAG_TYPE_IN_PLACE.
2389 (tsubst): Do unqualified lookup to find typedefs from current class.
2390 [ARRAY_TYPE]: Propagate alignment info.
2391 * decl2.c (is_late_template_attribute): Only defer handling of
2392 attribute aligned if the expression is dependent.
2393 (save_template_attributes): If we're deferring any attributes,
2394 make this a naming typedef.
2396 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2398 PR c++/33462 (again)
2399 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2400 va_arg instead of __builtin_va_arg.
2402 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2405 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2406 (pp_cxx_primary_expression): Use it.
2407 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2408 * error.c (dump_expr): Use it.
2410 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2413 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2414 out case TYPEID_EXPR to...
2415 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2416 and pp_cxx_right_paren.
2417 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2418 * error.c (dump_expr): Use it.
2420 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2423 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2424 (pp_cxx_primary_expression): Use it.
2425 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2426 * error.c (dump_expr): Use it.
2428 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2431 * init.c (build_new): Remove warning for zero-element
2434 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2437 * call.c (maybe_handle_implicit_object): Set this_p, clear
2438 rvaluedness_matches_p.
2439 (compare_ics): Do not compare rvaluedness matching when one of the
2440 operands is an implicit object.
2442 2007-09-14 Jason Merrill <jason@redhat.com>
2444 PR c++/17743, c++/19163
2445 * decl2.c (is_late_template_attribute): New fn.
2446 (splice_template_attributes, save_template_attributes): New fns.
2447 (cplus_decl_attributes): Call save_template_attributes.
2448 * pt.c (apply_late_template_attributes): New fn.
2449 (instantiate_class_template, tsubst_decl): Use it.
2450 * cp-tree.h: Declare is_late_template_attribute.
2452 2007-09-13 Tom Tromey <tromey@redhat.com>
2454 * parser.c (cp_lexer_new_main): Don't use
2455 c_lex_return_raw_strings.
2456 (cp_lexer_get_preprocessor_token): Update. Add special case when
2459 2007-09-11 Jan Hubicka <jh@suse.cz>
2461 * method.c (use_thunk): Use tree_rest_of_compilation
2462 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2463 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2464 * cp-tree.h (expand_body): Kill.
2465 (emit_associated_thunks): Declare.
2466 * semantics.c (emit_associated_thunks): Export.
2467 (expand_body): Kill.
2469 2007-09-09 David Daney <ddaney@avtrex.com>
2472 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2473 to calculate cookie_ptr.
2475 2007-09-08 Jason Merrill <jason@redhat.com>
2478 * pt.c (most_specialized_class): Set processing_template_decl
2479 while tsubsting partial spec args.
2481 2007-09-06 Jason Merrill <jason@redhat.com>
2483 * decl2.c (get_guard): Copy visibility from the guarded variable.
2485 2007-09-06 Jan Hubicka <jh@suse.cz>
2487 * semantics.c (expand_body): Do not mark arguments of clones used.
2489 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2492 * decl.c (cp_finish_decl): When processing_template_decl,
2493 deal correctly with init as TREE_LIST.
2495 2007-09-06 Tom Tromey <tromey@redhat.com>
2497 * decl.c (finish_function): Put return's location on line zero of
2500 2007-09-05 Jason Merrill <jason@redhat.com>
2503 * except.c (prepare_eh_type): Use type_decays_to.
2506 * init.c (build_delete): Use build_headof to get the address of the
2507 complete object if we aren't using the deleting destructor.
2508 * rtti.c (build_headof): No longer static.
2509 * cp-tree.h: Declare it.
2511 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2513 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2514 decl if a prototype for XX is provided with throw().
2517 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2518 on __*_chk non-__builtin_* decls.
2520 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2523 * semantics.c (finish_id_expression): Use context_for_name_lookup
2524 insted of DECL_CONTEXT, to see through anonymous structs and unions.
2525 * class.c (finish_struct_anon): Deal correctly with anonymous
2526 structs (vs unions, as GNU extension) in error messages.
2528 2007-09-05 Jan Hubicka <jh@suse.cz>
2530 * sematics.c (expand_body): Remove unnecesary import_export_decl
2531 call, DECL_EXTERNAL checks and current_function_decl saving.
2533 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2535 PR c++/29731 (again)
2536 * parser.c (cp_parser_primary_expression): Return error_mark_node
2537 when a statement-expression is found in a template-argument list.
2539 2007-09-04 Jason Merrill <jason@redhat.com>
2541 * except.c (initialize_handler_parm): Use
2542 fold_build_cleanup_point_expr.
2545 * call.c (reference_binding): Don't look for user-defined conversions
2549 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
2550 the MUST_NOT_THROW_EXPR.
2552 2007-09-04 Richard Sandiford <richard@codesourcery.com>
2554 * decl.c (cp_finish_decl): Call determine_visibility before
2555 make_rtl_for_nonlocal_decl.
2557 2007-09-04 Jason Merrill <jason@redhat.com>
2560 * pt.c (most_specialized_class): Substitute outer template
2561 arguments into the arguments of a member template partial
2563 (strip_innermost_template_args): New fn.
2565 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
2567 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
2569 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2571 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
2572 * decl.c (cp_make_fname_decl): Likewise,
2573 * parser.c (cp_parser_string_literal): Likewise,
2574 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
2575 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2578 2007-09-02 Paolo Carlini <pcarlini@suse.de>
2581 * typeck.c (build_unary_op): Fix error message for
2582 Boolean expression as operand to operator--.
2584 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2586 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
2587 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
2590 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2593 * init.c (build_default_init): Make extern.
2594 * cp-tree.h (build_default_init): Declare here.
2595 * pt.c (tsubst_expr): When the instantiation of the initializer of
2596 a variable results in an empty list, default-initialize the
2598 (tsubst_copy_and_build): When the instantiation of the initializer
2599 in a new expression results in an empty initializer list,
2600 default-initialize it.
2602 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
2604 * mangle.c (write_type): Change mangling of rvalue reference from
2607 2007-08-31 Jakub Jelinek <jakub@redhat.com>
2609 * decl.c (duplicate_decls): Remove duplicated line.
2611 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2614 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
2615 BOUND_TEMPLATE_TEMPLATE_PARM.
2617 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2620 * search.c (lookup_member): Check the name argument for
2623 2007-08-31 Paolo Carlini <pcarlini@suse.de>
2626 * parser.c (cp_parser_trait_expr): Check rerurn value of
2629 2007-08-30 Ollie Wild <aaw@google.com>
2631 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
2632 convert_ptrmem for pointer to member conversions.
2633 (convert_to_pointer_force): Update cp_convert_to_pointer call.
2634 (ocp_convert): Update cp_convert_to_pointer call.
2635 * typeck.c (convert_ptrmem): Add conditional for null pointers to
2637 (build_static_cast_1): Check can_convert for conversions in either
2639 (get_delta_difference_1): New function.
2640 (get_delta_difference): Refactor to call get_delta_difference_1.
2642 2007-08-30 Jakub Jelinek <jakub@redhat.com>
2644 * decl.c (start_preparsed_function): Set
2645 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
2647 2007-08-28 Paolo Carlini <pcarlini@suse.de>
2650 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
2651 BOUND_TEMPLATE_TEMPLATE_PARM.
2653 2007-08-28 Jakub Jelinek <jakub@redhat.com>
2657 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
2658 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2660 2007-08-27 Jason Merrill <jason@redhat.com>
2663 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
2664 Look inside STMT_EXPR.
2665 * semantics.c (stmt_expr_value_expr): New fn.
2666 * cp-tree.h: Declare it.
2669 * decl.c (groktypename): Ignore attributes applied to class type.
2671 2007-08-28 Richard Guenther <rguenther@suse.de>
2673 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
2675 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
2677 * error.c (dump_expr): Handle COMPLEX_CST.
2678 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
2679 (pp_cxx_expression): Likewise.
2681 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
2683 * decl.c (GNU_INLINE_P): New.
2684 (duplicate_decls): Handle gnu_inline. Merge attributes and
2685 some flags in overriding definitions.
2686 (redeclaration_error_message): Handle gnu_inline.
2687 (start_preparsed_function): Likewise.
2689 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2691 * call.c (sufficient_parms_p): Constify.
2692 * class.c (same_signature_p): Likewise.
2693 * cp-gimplify.c (is_invisiref_parm,
2694 cxx_omp_privatize_by_reference): Likewise.
2695 * cp-objcp-common.c (has_c_linkage): Likewise.
2696 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
2697 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
2698 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
2699 num_artificial_parms_for, comp_template_parms,
2700 template_parameter_pack_p, any_dependent_template_arguments_p,
2701 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2702 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2703 zero_init_p, member_p, cp_lvalue_kind,
2704 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2705 varargs_function_p, is_dummy_object, special_function_kind,
2706 string_conv_p, type_unknown_p, comp_except_specs, compparms,
2707 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2708 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2709 cp_has_mutable_p, at_least_as_qualified_p,
2710 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2711 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2712 * except.c (nothrow_libfn_p): Likewise.
2713 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2715 * pt.c (comp_template_parms, template_parameter_pack_p,
2716 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2717 any_dependent_template_arguments_p): Likewise.
2718 * repo.c (repo_export_class_p): Likewise.
2719 * semantics.c (anon_aggr_type_p): Likewise.
2720 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2721 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2722 varargs_function_p, member_p, is_dummy_object, pod_type_p,
2723 zero_init_p, special_function_p): Likewise.
2724 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2725 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2726 compparms, invalid_nonstatic_memfn_p,
2727 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2728 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2729 cp_has_mutable_p, lvalue_or_else): Likewise.
2731 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
2733 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2734 * cp-objcp-common.c (cp_tree_size): Ditto.
2735 * tree.c (cp_walk_subtrees): Ditto
2736 * cp-tree.def (TINST_LEVEL): Go away.
2737 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2738 move together with other non-tree structs.
2739 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2740 (union lang_tree_node): Eliminate tinst_level field.
2741 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2742 (current_instantiation, outermost_tinst_level): Return
2743 a "struct tinst_level *".
2745 * error.c (print_instantiation_partial_context): Change second
2746 parameter to a "struct tinst_level *". Replace accessor macros
2748 (print_instantiation_full_context): Likewise.
2749 * lex.c (in_main_input_context): Likewise.
2751 * pt.c (struct pending_templates): New.
2752 (pending_templates, last_pending_template): Use it as a type.
2753 (current_tinst_level): Change typo to "struct tinst_level *"
2754 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2755 (add_pending_template): Construct a "struct pending_template".
2756 Replace TINST_LEVEL accessor macros with field access.
2757 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2758 (pop_tinst_level): Likewise.
2759 (instantiate_pending_templates): Likewise. Factor common code used
2760 when an instantiation has been done.
2761 (outermost_tinst_level): Replace tree_last with loop.
2762 (current_instantiation): Return a "struct tinst_level *".
2764 2007-08-24 Ollie Wild <aaw@google.com>
2766 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2767 * name-lookup.h (cp_binding_level): Remove vtables member.
2769 2007-08-24 Richard Guenther <rguenther@suse.de>
2771 * tree.c (cp_cannot_inline_tree_fn): Remove.
2772 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2773 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2776 2007-08-24 Jakub Jelinek <jakub@redhat.com>
2779 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2780 error_mark_node right away if build_expr_type_conversion
2784 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2785 is error_mark_node rather than NULL_TREE.
2786 * pt.c (check_explicit_specialization): Likewise.
2789 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2790 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2792 2007-08-22 Jason Merrill <jason@redhat.com>
2795 * pt.c (outermost_tinst_level): New function.
2796 * lex.c (in_main_input_context): New function.
2797 * cp-tree.h: Declare it.
2798 * decl2.c (constrain_class_visibility): Use it to avoid warning
2799 about uses of the anonymous namespace in the main input file.
2801 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2803 * init.c (build_new_1): Use get_target_expr instead of save_expr.
2805 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
2808 * class.c (finish_struct_1): Warn when a class has virtual
2809 functions and accessible non-virtual destructor.
2811 2007-08-20 Richard Guenther <rguenther@suse.de>
2815 * call.c (build_new_method_call): Convert initializer to
2817 * init.c (build_aggr_init): Do not fiddle with types.
2818 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2819 * except.c (build_throw): Do not drop qualifiers for the
2821 * typeck.c (get_member_function_from_ptrfunc): Do not
2822 fiddle with types, instead convert.
2823 (build_ptrmemfunc1): Convert to the target type for
2825 (gfc_trans_allocate): Convert result to target type.
2826 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2827 pointer-to-member structures shall have alias set zero as well.
2829 2007-08-20 Richard Guenther <rguenther@suse.de>
2831 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2833 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2834 (nonstatic_local_decl_p): Likewise.
2835 * tree.c (cp_auto_var_in_fn_p): Remove.
2836 * decl.c (nonstatic_local_decl_p): Remove.
2838 2007-08-20 Richard Guenther <rguenther@suse.de>
2840 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2842 * tree.h (cp_walk_tree): New define to walk_tree_1 with
2843 cp_walk_subtrees lh parameter.
2844 (cp_walk_tree_without_duplicates): New define to
2845 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2846 * tree.c (count_trees): Call
2847 cp_walk_tree_without_duplicates.
2848 (verify_stmt_tree): Call cp_walk_tree.
2849 (break_out_target_exprs): Likewise.
2850 (WALK_SUBTREE): Likewise.
2851 * cp-gimplify.c (cp_genericize): Likewise.
2852 * cp-pt.c (find_parameter_packs_r): Likewise.
2853 (uses_parameter_packs): Likewise.
2854 (make_pack_expansion): Likewise.
2855 (check_for_bare_parameter_packs): Likewise.
2856 (for_each_template_parm): Likewise.
2857 * decl.c (check_default_argument): Call
2858 cp_walk_tree_without_duplicates.
2859 * except.c (build_throw): Likewise.
2860 * decl2.c (type_visibility): Likewise.
2861 * semantics.c (expand_or_defer_fn): Likewise.
2862 (finalize_nrv): Call cp_walk_tree.
2864 2007-08-20 Jakub Jelinek <jakub@redhat.com>
2867 * init.c (build_new_1): Rename placement_var variable to placement_expr.
2868 Initialize it with save_expr rather than get_temp_regvar.
2870 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
2873 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2876 2007-08-17 Ollie Wild <aaw@google.com>
2879 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2880 declarations into appropriate slots for comparison. Fix type
2883 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2886 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2887 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2889 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2892 * parser.c (cp_parser_class_head): Improve error message.
2894 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
2896 * pt.c (instantiate_decl): Set input_location
2897 for the function end.
2899 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2901 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2903 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2904 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2905 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2906 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2907 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2908 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2909 * typeck.c (cp_type_quals): Likewise.
2910 * typeck2.c (cxx_incomplete_type_diagnostic,
2911 cxx_incomplete_type_error): Likewise.
2913 2007-08-16 Paolo Carlini <pcarlini@suse.de>
2916 * pt.c (tsubst_friend_function): When check_classfn
2917 returns error_mark_node likewise return it.
2919 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2922 * typeck.c (check_return_expr): Don't NRV optimize vars in
2924 * decl.c (finish_function): Comment fix.
2926 2007-08-15 Paolo Carlini <pcarlini@suse.de>
2929 * pt.c (push_template_decl_real): Depending on TYPE_P
2930 use either TYPE_CONTEXT or DECL_CONTEXT.
2932 2007-08-14 Mark Mitchell <mark@codesourcery.com>
2934 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2935 constructors and destructors return this.
2937 2007-08-14 Paolo Carlini <pcarlini@suse.de>
2940 * decl2.c (check_classfn): Return error_mark_node in case of error;
2941 in that case, do not call add_method.
2942 * decl.c (start_decl): Deal with check_classfn returning
2944 (grokfndecl): Likewise.
2945 * pt.c (tsubst_friend_function): Likewise.
2947 2007-08-14 Andrew Pinski <pinskia@gmail.com>
2950 * typeck.c (build_binary_op): Disallow vector float types with
2951 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2953 2007-08-11 Ian Lance Taylor <iant@google.com>
2955 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2957 * cp-tree.h (cxx_get_alias_set): Update declaration.
2959 2007-08-10 Ollie Wild <aaw@google.com>
2961 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2963 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
2965 (unqualified_namespace_lookup): Fix ambiguous_decl call.
2966 (lookup_using_namespace): Fix ambiguous_decl call.
2967 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2969 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2971 * call.c (name_as_c_string): Use CONST_CAST.
2972 * decl.c (build_decl): Likewise.
2973 * parser.c (cp_parser_string_literal): Likewise.
2975 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2978 * error.c (dump_expr): Consistently use the *_cxx_*
2979 variants of the pretty-print functions.
2981 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2984 * decl.c (check_special_function_return_type): Just error
2985 on return type specified for conversion operator.
2987 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
2989 * typeck2.c (readonly_error): Handle general expressions.
2990 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2992 2007-08-06 Dan Hipschman <dsh@google.com>
2994 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2995 access function name.
2997 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3000 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3001 * g++spec.c (lang_specific_driver): Check them.
3003 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3006 * pt.c (inline_needs_template_parms): Fix comment; change return type
3009 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3012 2007-03-26 Dirk Mueller <dmueller@suse.de>
3014 * parser.c (cp_parser_member_declaration): Pedwarn
3015 about stray semicolons after member declarations.
3017 2007-08-02 Lee Millward <lee.millward@gmail.com>
3022 * parser.c (cp_parser_asm_definition): Detect and discard asm
3023 statements with invalid inputs or outputs.
3024 (cp_parser_asm_operand_list): Return error mark node if any
3025 of the operands are invalid. Adjust documentation.
3027 2007-08-02 Nick Clifton <nickc@redhat.com>
3029 * typeck.c: Change copyright header to refer to version 3 of the
3030 GNU General Public License and to point readers at the COPYING3
3031 file and the FSF's license web page.
3032 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3033 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3034 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3035 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3036 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3037 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3038 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3039 name-lookup.h, parser.c: Likewise.
3041 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3044 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3046 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3049 * semantics.c (finish_label_stmt): Reject the __label__
3050 extension outside function scopes.
3052 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3054 * parser.c (eof_token): Un-constify.
3055 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3056 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3059 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3061 * pt.c, tree.c, typeck2.c: Fix comment typos.
3063 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3064 Mark Mitchell <mark@codesourcery.com>
3067 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3068 hidden due to friend declarations in local classes.
3070 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3072 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3073 * cp-tree.def (DECLTYPE_TYPE): New.
3074 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3075 (dump_type_prefix): Ditto.
3076 (dump_type_suffix): Ditto.
3077 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3078 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3079 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3081 (DECLTYPE_TYPE_EXPR): New.
3082 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3083 (finish_declared_type): Declare.
3084 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3085 DECLTYPE_TYPE nodes.
3086 (pp_cxx_type_id): Ditto.
3087 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3088 (tsubst): Substitute into a DECLTYPE_TYPE node.
3089 (tsubst_copy): Ditto.
3090 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3092 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3093 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3094 structural equality (because we can't hash the expressions).
3095 (finish_declared_type): New.
3096 * lex.c (reswords): Add "decltype" keyword.
3097 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3098 (cp_parser_postfix_expression): Add member_access_only_p to
3099 restrict postfix expression to member access expressions.
3100 (cp_parser_unary_expression): Update call to
3101 cp_parser_postfix_expression to reflect new parameter.
3102 (cp_parser_declared_type): New.
3103 (cp_parser_simple_type_specifier): Parse decltype types.
3105 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3108 * call.c (convert_for_arg_passing): Only widen bitfields to their
3109 declared types if necessary.
3111 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3113 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3116 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3118 * decl.c (typename_hash, typename_compare): Constify.
3119 * mangle.c (hash_type, compare_type): Likewise.
3120 * pt.c (eq_local_specializations, hash_local_specialization):
3122 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3123 list_hash): Likewise.
3124 * typeck2.c (pat_compare): Likewise.
3126 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3128 * method.c (implicitly_declare_fn): Increase alignment if member
3129 function pointer format requires it.
3131 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3134 * typeck.c (check_return_expr): Do not pass a null argument
3137 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3140 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3143 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3146 * typeck.c (convert_arguments): Only use default args if we have
3150 * typeck.c (structural_comptypes): No need to check
3151 resolve_typename_type return value here.
3152 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3153 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3154 original type rather than error_mark_node in case of failure.
3155 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3156 resolve_typename_type result check.
3157 (cp_parser_direct_declarator, cp_parser_head,
3158 cp_parser_constructor_declarator_p): Likewise.
3160 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3162 * pt.c (template_parms_variadic_p): Remove.
3163 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3165 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3168 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3169 argument to dump_aggr_init_expr_args instead of false.
3171 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3173 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3174 canonical types; otherwise, fall back to structural type
3175 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3176 internal compiler error if the canonical types are wrong.
3178 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3181 * parser.c (cp_parser_make_indirect_declarator): When the
3182 the code argument is ERROR_MARK return cp_error_declarator.
3184 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3187 * decl.c (cxx_init_decl_processing): Don't set
3188 force_align_functions_log.
3189 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3190 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3191 FUNCTION_DECL, return its alignment.
3193 2007-07-09 Richard Guenther <rguenther@suse.de>
3195 * decl.c (start_preparsed_function): Do not promote return type.
3197 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3200 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3202 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3205 * pt.c (resolve_overloaded_unification): Robustify. Return a
3207 (type_unification_real): Adjust accordingly.
3209 2007-07-06 Richard Guenther <rguenther@suse.de>
3211 * init.c (build_new_1): Use the correct pointer type.
3212 * typeck2.c (build_m_component_ref): Likewise.
3214 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3217 * init.c (build_zero_init): Always build an initializer for
3219 * typeck2.c (build_functional_cast): Use build_zero_init.
3222 * init.c (build_new_1): Always pass the allocation function to
3223 build_op_delete_call.
3224 * call.c (build_op_delete_call): Handle operator delete with a
3225 variable-argument list. Do not issue an error when no matching
3226 deallocation function is available for a new operator.
3229 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3230 * decl.c (value_dependent_init_p): New function.
3231 (cp_finish_decl): Use it.
3232 * pt.c (value_dependent_expression_p): Use
3233 any_value_dependent_elements_p.
3234 * parser.c (cp_parser_primary_expression): Add comment about
3235 treating dependent qualified names as integral
3236 constant-expressions.
3238 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3240 * decl.c (build_ptrmemfunc_type): Always use structural equality
3241 tests when comparing pointer-to-member-function types, because the
3242 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3245 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3247 * init.c (build_new): Tweak comment.
3249 2007-06-29 Dave Brolley <brolley@redhat.com>
3252 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3253 type to its base type and number of elements here.
3254 * init.c (build_new): Call complete_type_or_else to ensure that the
3255 type is complete and to issue a diagnostic if it is not.
3256 (build_new_1): Don't call complete_type_or_else here.
3258 2007-07-03 Richard Guenther <rguenther@suse.de>
3261 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3264 2007-07-02 Simon Baldwin <simonb@google.com>
3266 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3267 for inner-style nested forward declarations that don't declare
3270 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3273 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3274 DECL_P in not a variable and appears more than once error messages.
3276 2007-07-01 Ollie Wild <aaw@google.com>
3278 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3279 (select_decl): Remove function.
3280 (unqualified_namespace_lookup): Populate binding by calling
3281 ambiguous_decl. Remove select_decl call.
3282 (lookup_qualified_name): Remove select_decl call.
3283 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3284 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3285 generation when name lookup is ambiguous.
3287 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3290 * init.c (build_new_1): Use structural equality on the copy of the
3293 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3295 * decl2.c (determine_visibility): Implement
3296 flag_visibility_ms_compat effect on type info.
3297 * decl.c (cxx_init_decl_processing): Implement
3298 global effect of flag_visibility_ms_compat.
3300 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3302 * decl2.c (start_objects): Mark constructor-running function
3305 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3308 * decl.c (grokdeclarator): Reset friendp for member functions declared
3309 friend of their own class.
3311 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3313 * decl2.c (determine_visibility): Don't look for dllexport here.
3314 (determine_visibility_from_class): Tidy.
3316 2007-06-18 Simon Baldwin <simonb@google.com>
3319 * parser.c (cp_parser_single_declaration): Added check for storage
3320 class other than sc_none in parsed declaration, and a flag to indicate
3321 if the call is part of an explicit template specialization parse.
3322 * (cp_parser_explicit_specialization): Specialization check flag added
3323 to call to cp_parser_single_declaration(), set true.
3324 * (cp_parser_template_declaration_after_export): Specialization check
3325 flag added to call to cp_parser_single_declaration(), set false.
3326 * pt.c (check_explicit_specialization): Added code to copy visiblity
3327 and linkage from the templated function to the explicit specialization.
3329 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3331 * typeck.c (build_binary_op): For templates build the
3332 expression in pieces to avoid the assert in build2_stat.
3333 (get_member_function_from_ptrfunc):
3334 Change over to using POINTER_PLUS_EXPR and convert
3335 the second operand to sizetype.
3336 * typeck2.c (build_m_component_ref): Likewise.
3337 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3338 instead of PLUS_EXPR for pointers.
3339 (build_new_1): Likewise.
3340 (build_vec_delete_1): Likewise.
3341 (build_vec_delete): Likewise.
3342 * class.c (build_base_path): Likewise.
3343 (build_base_path): Likewise.
3344 (convert_to_base_statically): Likewise.
3345 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3346 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3347 instead of PLUS_EXPR.
3348 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3349 instead of PLUS_EXPR for pointers.
3350 * call.c (build_special_member_call): Likewise.
3351 * rtti.c (build_headof): Likewise.
3352 Use sizetype instead of ptrdiff_type_node.
3353 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3354 instead of PLUS_EXPR for pointers.
3355 * except.c (expand_start_catch_block): Do a
3356 NEGATIVE and then a POINTER_PLUS_EXPR instead
3358 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3359 PLUS_EXPR on pointer types over to use
3360 POINTER_PLUS_EXPR and remove the conversion
3361 to the pointer types.
3362 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3363 adding to a pointer type. Use size_int instead of
3364 ssize_int. Convert the index to sizetype before
3365 adding it to the pointer.
3367 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3369 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3370 (DECL_ANON_UNION_VAR_P): New macro.
3371 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3372 than DECL_VAR_MARKED_P, to keep track of which variables we have
3374 * decl.c (redeclaration_error_message): Complain about redeclaring
3375 anonymous union members at namespace scope.
3376 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3378 2007-06-14 Geoff Keating <geoffk@apple.com>
3380 * decl2.c (determine_visibility): Ensure that functions with
3381 hidden types as parameters are hidden.
3384 * decl2.c (determine_visibility): Remove duplicate code for
3387 2007-06-12 Ian Lance Taylor <iant@google.com>
3390 * init.c (avoid_placement_new_aliasing): New static function.
3391 (build_new_1): Call it.
3393 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3395 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3396 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3398 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3401 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3402 on init, the non-decl cond operand and increment value.
3404 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3407 * decl.c (check_initializer): Report an error when a brace enclosed
3408 initializer is used for a non-aggregate type in C++98.
3409 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3411 (grokdeclarator): Likewise.
3412 (move_fn_p): Likewise.
3413 * typeck.c (check_return_expr): Likewise.
3414 * call.c (reference_binding): Likewise.
3415 * error.c (cp_cpp_error): Likewise.
3416 * pt.c (check_default_tmpl_args): Likewise.
3418 * lex.c (init_reswords): Likewise.
3419 * parser.c (p_parser_primary_expression): Likewise.
3420 (TOKEN_PRECEDENCE): Likewise.
3421 (cp_parser_init_declarator): Likewise.
3422 (cp_parser_ptr_operator): Likewise.
3423 (cp_parser_parameter_declaration): Likewise.
3424 (cp_parser_enclosed_template_argument_list): Likewise.
3425 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3426 (cp_parser_next_token_ends_template_argument_p): Likewise.
3428 2007-06-04 Simon Baldwin <simonb@google.com>
3430 * decl.c (grokdeclarator): Readability change. Moved case labels
3431 into direct switch statement scope.
3433 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3435 * call.c (convert_like_real): Remove pointless code.
3437 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3439 * decl.c (get_atexit_fn_ptr_type): New function.
3440 (get_atexit_node): Use it.
3441 (start_cleanup_fn): Likewise.
3442 (register_dtor_fn): Use the object's destructor, instead of a
3443 separate cleanup function, where possible.
3444 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3445 (atexit_fn_ptr_type_node): New macro.
3446 * decl2.c (build_cleanup): Use build_address.
3448 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3450 * typeck.c (build_binary_op): Include types in error.
3452 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3455 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3456 needs runtime initialization.
3458 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3461 * semantics.c (finish_trait_expr): Complete the types.
3463 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3464 Douglas Gregor <doug.gregor@gmail.com>
3465 Pedro Lamarao <pedro.lamarao@mndfck.org>
3466 Howard Hinnant <howard.hinnant@gmail.com>
3470 * typeck.c (comptypes): Don't consider rvalue and lvalue
3471 reference types to be equivalent.
3472 (check_return_expr): Move from certain lvalues when returning
3474 * decl.c (grokdeclarator): Implement reference collapsing.
3475 (copy_fn_p): Don't consider constructors taking rvalue references
3476 to be copy constructors.
3478 * call.c (conversion): New "rvaluedness_matches_p" member.
3479 (convert_class_to_reference): Require reference type as first
3480 parameter instead of base type.
3481 (reference_binding): Add logic to handle rvalue references.
3482 (implicit_conversion): Update inaccurate comment.
3483 (convert_like_real): Disable creation of temporaries that are
3484 impossible to initialize for types with move constructors.
3485 (build_over_call): Elide move constructors when possible.
3486 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3487 (maybe_handle_ref_bind): Return conversion instead of type node.
3488 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3489 determine preferred conversion sequences.
3490 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3491 (LOOKUP_PREFER_RVALUE): New.
3492 (DECL_MOVE_CONSTRUCTOR_P): New.
3493 (struct cp_declarator): Add "reference" member for reference
3494 types, with new "rvalue_ref" flag.
3495 (cp_build_reference_type): Declare.
3496 (move_fn_p): Declare.
3497 * error.c (dump_type_prefix): Format rvalue reference types
3498 correctly in error messages.
3499 * except.c (build_throw): Move from certain lvalues when
3501 * mangle.c (write_type): Mangle rvalue references differently
3502 than regular references.
3503 * parser.c (make_reference_declarator): Add boolean parameter for
3505 (cp_parser_make_indirect_declarator): New.
3506 (cp_parser_new_declarator_opt): Call
3507 cp_parser_make_indirect_declarator.
3508 (cp_parser_conversion_declarator_opt): Ditto.
3509 (cp_parser_declarator): Ditto.
3510 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3512 * pt.c (tsubst): Implement reference collapsing.
3513 (maybe_adjust_types_for_deduction): Implement special template
3514 parameter deduction rule for rvalue references.
3515 (type_unification_real): Update calls to
3516 maybe_adjust_types_for_deduction.
3517 (try_one_overload): Ditto.
3518 (unify_pack_expansion): Ditto.
3519 * tree.c (lvalue_p_1): Handle rvalue reference types.
3520 (cp_build_reference_type): New.
3522 2007-05-30 Jakub Jelinek <jakub@redhat.com>
3525 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3526 variables that need runtime initialization.
3528 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
3531 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3532 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3533 case POSTDECREMENT_EXPR>): Return the error_mark_node
3534 if either the real or imaginary parts would an
3537 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
3538 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3541 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
3542 token is a closing brace, false if there are no tokens left.
3543 (cp_parser_namespace_alias_definition): Only consume the next token if
3544 it is a closing brace.
3546 * parser.c (cp_parser_class_specifier): Likewise.
3548 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
3550 * semantics.c (finish_member_declaration): Fix a typo in the
3553 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
3565 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
3566 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
3567 * pt.c (check_for_bare_parameter_packs): Return bool indicated
3568 whether everything was okay. Fix indentation.
3569 (push_template_decl_real): Check for bare parameter packs in
3570 function parameters; where errors occur, mark the parameter types
3571 with ERROR_MARK_NODEs to avert ICEs.
3572 (coerce_template_parameter_pack): New.
3573 (coerce_template_parms): Moved parameter pack coercion into
3574 coerce_template_parameter_pack, and permit it anywhere in the
3575 template parameter list (not just at the end). Parameter and
3576 argument indices can vary (somewhat) separately now, so add
3577 PARM_IDX and ARG_IDX.
3578 (fn_type_unification): Don't set an argument pack as incomplete if
3579 no argument pack was deduced.
3580 (type_unification_real): If a type parameter is a parameter pack
3581 and has not otherwise been deduced, it will be deduced to an empty
3583 (more_specialized_fn): Use the actual lengths of the argument
3584 lists when comparing against expansions.
3585 * semantics.c (finish_member_declaration): If a field's type has
3586 bare parameter packs, error and set its type to ERROR_MARK_NODE.
3588 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
3591 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
3593 2007-05-22 Ollie Wild <aaw@google.com>
3595 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
3596 (unqualified_namespace_lookup): Adds check for hidden types.
3598 2007-05-22 Ollie Wild <aaw@google.com>
3600 * decl.c (duplicate_decls): Verify namespace names are unique.
3602 2007-05-21 Mark Mitchell <mark@codesourcery.com>
3604 * decl.c (cxx_maybe_build_cleanup): Handle
3605 __attribute__((cleanup)).
3607 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3609 * cvt.c (cp_convert_and_check): Don't check warnings if the
3612 2007-05-18 Geoffrey Keating <geoffk@apple.com>
3614 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
3616 2007-05-14 Paolo Carlini <pcarlini@suse.de>
3619 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
3620 type only if is a class type (5.2.8/4).
3622 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
3624 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3625 * decl.c (grokdeclarator): Use unsigned_type_for instead of
3626 c_common_unsigned_type.
3628 2007-05-11 Silvius Rus <rus@google.com>
3630 * typeck.c (build_indirect_ref): Add call to
3631 strict_aliasing_warning.
3632 (build_reinterpret_cast_1): Condition call to
3633 strict_aliasing_warning.
3635 2007-05-11 Jan Hubicka <jh@suse.cz>
3637 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
3638 * decl2.c (start_objects): ctors and dtors are no longer public.
3639 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
3641 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
3643 * typeck.c (build_unary_op): Remove code that used to
3644 handle non lvalue increments/decrements.
3646 2007-05-07 Mike Stump <mrs@apple.com>
3648 * parser.c (check_empty_body): Add.
3649 (cp_parser_iteration_statement): Add call to check_empty_body.
3651 2007-05-05 Geoffrey Keating <geoffk@apple.com>
3654 * mangle.c (write_mangled_name): Mangle static variable names.
3655 (write_unqualified_name): Use local-source-name for
3656 namespace-scope static variables.
3658 2007-05-04 Dirk Mueller <dmueller@suse.de>
3660 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
3663 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
3666 * decl2.c (constrain_class_visibility):
3667 Use strip_pointer_or_array_types instead of strip_array_types.
3669 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
3672 * decl.c (reshape_init_r): Don't reshape the first element if it
3673 is a pointer to member function.
3675 2007-04-27 Simon Baldwin <simonb@google.com>
3677 * decl.c (grokparms): Changed message format from %qD to %qE.
3679 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
3681 * error.c (maybe_warn_variadic_templates): Variadic templates are
3682 now in C++0x, so only warn about them in C++98 mode.
3684 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
3687 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
3688 integeral types from vectors types.
3690 2007-04-26 Jakub Jelinek <jakub@redhat.com>
3693 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
3694 for type dependent OMP_CLAUSE_DECLs.
3696 2007-04-24 Mark Mitchell <mark@codesourcery.com>
3699 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
3700 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
3701 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3702 * init.c (build_zero_init): Adjust, as
3703 COMPLEX_TYPE is now a SCALAR_TYPE.
3704 * typeck2.c (digest_init): Allow brace-enclosed initializers for
3705 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3707 2007-04-25 Paolo Carlini <pcarlini@suse.de>
3709 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3710 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3711 (trait_expr_value): Adjust.
3713 2007-04-23 Simon Baldwin <simonb@google.com>
3715 * decl.c (grokparms): Added new error for duplicate function
3716 parameters names in function prototypes, to match gcc behavior.
3718 2007-04-23 Jan Hubicka <jh@suse.cz>
3720 * decl2.c (finish_objects): Do not call target constructor/destructor
3723 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3725 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3726 instead of checking GIMPLE_STMT_P in chain_next.
3728 2007-04-17 Mark Mitchell <mark@codesourcery.com>
3731 * call.c (convert_for_arg_passing): Convert bitfields to their
3734 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
3737 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3739 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
3742 * decl2.c (constrain_class_visibility):
3743 Do not warn about the use of anonymous namespace in the main input file.
3745 2007-04-15 Mark Mitchell <mark@codesourcery.com>
3747 * cp-tree.h (current_template_parms): Fix typo in comment.
3749 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3751 * cp-tree.h, error.c: Fix comment typos.
3753 2007-04-13 Jason Merrill <jason@redhat.com>
3756 * call.c (reference_binding): Add c_cast_p parm. If true,
3757 add quals to TO as needed to make it reference-compatible.
3759 2007-04-11 Jan Hubicka <jh@suse.cz>
3761 * class.c (convert_to_base_statically): Fold produced tree; verify
3762 that we are not processing template_decl.
3764 2007-04-09 Mark Mitchell <mark@codesourcery.com>
3767 * class.c (build_base_path): Ensure that the converted pointer has
3768 the same cv-qualification as the input.
3770 2007-04-09 Paolo Carlini <pcarlini@suse.de>
3772 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3774 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
3776 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3778 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3779 * tree.c (cp_add_pending_fn_decls): Remove.
3780 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3782 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
3784 Revert change removing staticp.
3786 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
3788 * cp-objcp-common.c (cxx_staticp): Remove.
3789 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3790 * cp-tree.h (cxx_staticp):
3792 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
3794 * class.c (check_for_override): Don't remove dllmport attribute
3797 2007-04-03 Jakub Jelinek <jakub@redhat.com>
3800 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3801 type issue error and return early.
3803 2007-03-30 Jason Merrill <jason@redhat.com>
3806 * typeck.c (cp_type_readonly): New fn.
3807 * cp-tree.h: Declare it.
3808 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3809 (cp_finish_decl): Not here.
3811 2007-03-31 Richard Guenther <rguenther@suse.de>
3813 * optimize.c (maybe_clone_body): Replace splay-tree usage by
3816 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
3821 * parser.c (declarator_can_be_parameter_pack): New.
3822 (cp_parser_template_parameter): Only parse the `...' if the
3823 declarator can be a parameter pack.
3824 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3826 * pt.c (find_parameter_packs_r): Look into the bounds on integer
3827 types (they could be used as array bounds).
3828 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3829 (tsubst_pack_expansion): Handle failure to expand parameter
3832 2007-03-30 Paolo Carlini <pcarlini@suse.de>
3835 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3836 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3837 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3838 (CLASS_TYPE_NON_UNION_P): Add.
3839 (struct lang_type_class): Add has_complex_dflt.
3840 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3841 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3842 * cp-tree.def: Add TRAIT_EXPR.
3843 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3844 * lex.c (struct resword): Add __has_nothrow_assign,
3845 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3846 __has_trivial_constructor, __has_trivial_copy,
3847 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3848 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3849 __is_pod, __is_polymorphic, __is_union.
3850 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3851 (cp_parser_trait_expr): New.
3852 * semantics.c (finish_trait_expr, trait_expr_value
3853 classtype_has_nothrow_copy_or_assign_p): New.
3854 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3856 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3857 * class.c (check_bases, check_field_decl, check_bases_and_members):
3858 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3859 * pt.c (uses_template_parms, tsubst_copy_and_build,
3860 value_dependent_expression_p, type_dependent_expression_p): Deal with
3862 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3864 2007-03-29 Richard Guenther <rguenther@suse.de>
3866 * tree.c (cp_walk_subtrees): Do not set input_location.
3868 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
3871 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3874 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3876 * parser.c (struct cp_parser): Update comment for
3877 greater_than_is_operator_p.
3878 (cp_parser_primary_expression): In C++0x mode, a cast operator can
3879 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3880 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3881 !GREATER_THAN_IS_OPERATOR_P.
3882 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3883 `>>' operators that will become two `>' tokens in C++0x.
3884 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3885 mode, allowing it to terminate default arguments.
3886 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3887 `>>' like two consecutive `>' tokens.
3888 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3889 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3890 ends a template argument.
3892 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3894 * decl.c (redeclaration_error_message): Complain when redeclaring
3895 a friend function with default template arguments (C++0x mode only).
3896 * cp-tree.h (check_default_tmpl_args): Declare.
3897 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3898 template arguments in function templates. Add support for checking
3899 the default template arguments of friend templates.
3900 (push_template_decl_real): Fix call to check_default_tmpl_args.
3901 (type_unification_real): If a template parameter has not been
3902 deduced but provides a default template argument, substitute into
3903 that default template argument.
3904 * parser.c (cp_parser_init_declarator): When declaring (but not
3905 defining!) a function template in C++0x mode, check for default
3908 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3911 * decl.c (grokdeclarator): Deal with cv-qualified function type
3912 typedefs in the same way for member and non-member functions.
3914 2007-03-26 Dirk Mueller <dmueller@suse.de>
3916 * parser.c (cp_parser_member_declaration): Pedwarn
3917 about stray semicolons after member declarations.
3919 2007-03-26 Paolo Carlini <pcarlini@suse.de>
3922 * pt.c (instantiate_decl): Set in_system_header.
3924 2007-03-22 Mark Mitchell <mark@codesourcery.com>
3926 * cp-tree.h (current_tempalte_parms): Improve documentation.
3927 * pt.c (current_template_args): Likewise.
3930 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3931 not consume tokens when failing.
3933 2007-03-22 Jim Wilson <wilson@specifix.com>
3934 Mark Mitchell <mark@codesourcery.com>
3937 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
3938 consistent with FROM.
3940 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3942 * error.c (dump_expr): Handle dependent names that designate types.
3943 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3945 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
3947 * cp-tree.def, parser.c, pt.c: Fix comment typos.
3949 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3951 * cvt.c (cp_convert_and_check) : Define.
3952 * cp-tree.h (cp_convert_and_check): Declare.
3953 * call.c (convert_conversion_warnings): Rename to
3954 conversion_null_warnings. The warning for floating-point to
3955 integer is handled by convert_and_check in convert_like_real.
3956 (convert_like_real): convert_conversion_warnings was renamed as
3957 conversion_null_warnings.
3958 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3959 overflow and changes of value during conversion.
3961 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3964 * parser.c (cp_parser_statement): If 'namespace' is found, this
3965 only can be a namespace alias definition, so parse it now.
3966 (cp_parser_namespace_alias_definition): if we find an open brace
3967 instead of '=', then this is actually a misplaced namespace
3970 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3973 * decl.c (cxx_init_decl_processing): Move command-line options
3974 processing to c-opts.c.
3976 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
3978 * ptree.c (cxx_print_type): Use formatting markup for integers
3979 when printing template parameter index/level/orig level.
3980 (cxx_print_xnode): Ditto.
3981 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3982 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3983 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3985 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3986 rather than a HOST_WIDE_INT.
3987 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3988 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3990 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3991 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3992 IN_BASE_INITIALIZER bool bitfields.
3993 (struct cp_declarator): Make KIND a 4-bit field. Make
3994 PARAMETER_PACK_P a bool bitfield just after KIND.
3995 * pt.c (uses_parameter_packs): Destroy the pointer set.
3996 (make_pack_expansion): Ditto.
3997 (check_for_bare_parameter_packs): Ditto.
3998 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4000 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4003 * call.c (convert_default_arg): Instead of copying the node,
4006 2007-03-15 Dirk Mueller <dmueller@suse.de>
4009 * call.c (convert_conversion_warnings): New..
4010 (convert_like_real): .. factored out from here.
4011 (convert_conversion_warnings): Add warning about
4012 false being converted to NULL in argument passing.
4014 2007-03-14 Dirk Mueller <dmueller@suse.de>
4016 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4017 (finish_do_body): Warn about empty body in do/while statement.
4019 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4021 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4023 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4026 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4029 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4031 * repo.c (init_repo): Initialize random_seed saved options.
4032 (finish_repo): Adjust.
4034 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4037 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4040 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4042 * decl.c (compute_array_index_type): New warning flag warn_vla.
4044 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4047 * call.c (convert_default_arg): Copy non-constant arguments.
4049 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4052 * parser.c (cp_parser_postfix_expression): Disallow compound
4053 literals in constant expressions.
4056 * semantics.c (finish_typeof): Use unlowered_expr_type.
4058 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4061 * cp-tree.h (unlowered_expr_type): New function.
4062 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4063 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4064 (unlowered_expr_type): New function.
4065 (build_unary_op): Disallow predecrements of bool bitfields.
4066 * call.c (build_conditional_expr): Use unlowered_expr_type.
4067 * pt.c (type_unification_real): Likewise.
4069 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4072 * typeck.c (check_return_expr): Check for bare parameter packs.
4073 (comptypes): Compare template parameter packs and
4074 type pack expansions.
4075 * decl.c (grokdeclarator): Deal with the declaration of function
4077 (grokparms): Verify that the (optional) function parameter pack is
4078 at the end of the parameter list.
4079 (xref_basetypes): Handle pack expansions in the base class.
4080 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4081 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4082 (NONTYPE_ARGUMENT_PACK): New.
4083 (TYPE_PACK_EXPANSION): New.
4084 (EXPR_PACK_EXPANSION): New.
4085 (ARGUMENT_PACK_SELECT): New.
4086 * cp-objcp-common.c (cp_tree_size): Compute size of
4087 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4088 ARGUMENT_PACK_SELECT.
4089 * error.c (dump_template_argument): Print template argument packs.
4090 (dump_template_argument_list): Ditto.
4091 (dump_template_parameter): Dump `...' for template type parameter
4093 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4094 (dump_parameters): Print function parameter packs.
4095 (dump_template_parms): Print template argument packs.
4096 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4097 (maybe_warn_variadic_templates): New.
4098 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4099 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4100 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4102 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4103 (write_template_arg): Write argument packs as separate arguments.
4104 * cp-tree.h (struct template_parm_index_s): Add flag that
4105 indicates that the template parameter is actually a parameter
4107 (struct tree_argument_pack_select): New.
4108 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4109 (union lang_tree_node): Add argument_pack_select.
4110 (FUNCTION_PARAMETER_PACK_P): New.
4111 (PACK_EXPANSION_P): New.
4112 (PACK_EXPANSION_PATTERN): New.
4113 (SET_PACK_EXPANSION_PATTERN): New.
4114 (PACK_EXPANSION_PARAMETER_PACKS): New.
4115 (ARGUMENT_PACK_P): New.
4116 (ARGUMENT_PACK_ARGS): New.
4117 (SET_ARGUMENT_PACK_ARGS): New.
4118 (ARGUMENT_PACK_INCOMPLETE_P): New.
4119 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4120 (TEMPLATE_PARM_PARAMETER_PACK): New.
4121 (TEMPLATE_TYPE_PARAMETER_PACK): New.
4122 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4123 (ARGUMENT_PACK_SELECT_INDEX): New.
4124 (ARGUMENT_PACK_SELECT_ARG): New.
4125 (struct cp_declarator): Add parameter_pack_p flag.
4126 (maybe_warn_variadic_templates): Declare.
4127 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4128 indicate a template parameter pack.
4129 (uses_parameter_packs): Declare.
4130 (template_parameter_pack_p): Declare.
4131 (template_parms_variadic_p): Declare.
4132 (make_pack_expansion): Declare.
4133 (check_for_bare_parameter_packs): Declare.
4134 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4135 sizeof... expressions.
4136 (pp_cxx_expression): Print pack expansions and non-type argument
4138 (pp_cxx_exception_specification): Print pack expansions.
4139 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4140 (pp_cxx_ctor_initializer): Print pack expansions.
4141 (pp_cxx_type_id): Print pack expansions.
4142 (pp_cxx_template_argument_list): Print argument packs.
4143 (pp_cxx_template_parameter): Print ellipsis for template parameter
4145 * pt.c (comp_template_parms): Compare template parameter packs.
4146 (template_parameter_pack_p): New.
4147 (template_parms_variadic_p): New.
4148 (template_args_variadic_p): New.
4149 (make_ith_pack_parameter_name): New.
4150 (struct find_parameter_pack_data): New.
4151 (find_parameter_packs_r): New.
4152 (uses_parameter_packs): New.
4153 (make_pack_expansion): New.
4154 (check_for_bare_parameter_packs): New.
4155 (expand_template_argument_pack): New.
4156 (reduce_template_parm_level): Propagate parameter pack flag.
4157 (process_template_parm): Add is_parameter_pack parameter to state
4158 when the parameter is actually a parameter pack. Create template
4159 parameter packs when is_parameter_pack is true.
4160 (current_template_args): The argument for a template parameter
4161 pack is an argument pack containing a single pack expansion.
4162 (process_partial_specialization): When checking that non-type
4163 argument expressions do not involve template parameters, loop over
4164 the arguments in argument packs separately.
4165 (push_template_decl_real): Check that the type of the declaration
4166 does not have any bare parameter packs. Check that primary
4167 templates have no more than one parameter pack, and that it comes
4168 at the end of the template parameter list.
4169 (convert_template_argument): Handle coercions for pack expansion
4170 expressions by coercing the pattern then rebuilding the expansion.
4171 (coerce_template_parms): When coercing the arguments for a
4172 variadic template, pack "extra" arguments into an argument pack.
4173 (coerce_template_template_parms): Cannot coerce between parameter
4174 packs and non-pack parameters.
4175 (template_args_equal): Compare PACK_EXPANSION_P expressions.
4176 (comp_template_args): Expand all template arguments packs before
4177 comparing template argument lists.
4178 (mangle_class_name_for_template): Make argument packs as separate
4180 (for_each_template_parm_r): No need to handle BASELINK.
4181 (instantiate_class_template): Handle pack expansions in the base
4183 (tsubst_pack_expansion): New.
4184 (tsubst_template_args): Handle substitutions of argument packs and
4185 pack expansion into template argument lists.
4186 (tsubst_decl): Expand function parameter packs into separate
4187 function parameters.
4188 (tsubst_arg_types): Expand a type pack expansion into separate
4190 (tsubst_exception_specification): Handle pack expansions in
4191 exception specifiers.
4192 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
4193 replacing a template parameter with its argument. If we encounter
4194 a substitution for an argument pack, just return the parameter
4196 (tsubst_copy): sizeof(X...) returns the number of elements in
4197 parameter pack X. See through ARGUMENT_PACK_SELECT when the
4198 PARM_DECL is a parameter pack.
4199 (tsubst_expr): Expression pack expansions and argument packs
4200 cannot show up here; they will all be handled through function
4201 calls, sizeof, and template argument lists.
4202 (tsubst_copy_and_build): sizeof(X...) returns the number of
4203 elements in parameter pack X. Handle pack expansions in TREE_LIST
4204 and CONSTRUCTOR nodes.
4205 (fn_type_unification): Handle "incomplete" explicit template
4206 argument lists that specify some of the arguments for a template
4208 (type_unification_real): Unify arguments against pack expansions.
4209 (template_parm_level_and_index): New, helper function.
4210 (unify_pack_expansion): New.
4211 (unify): Unify argument packs on an argument-by-argument basis,
4212 handling variadic argument packs as well.
4213 (more_specialized_fn): Handle unification of function parameter
4214 packs. All things being equal, prefer non-variadic function
4215 templates to variadic function templates.
4216 (more_specialized_class): Prefer the variadic class template
4217 partial specialization that binds fewer arguments to a parameter
4219 (regenerate_decl_from_template): Expand function parameter packs
4220 into separate parameters.
4221 (instantiate_decl): Ditto.
4222 (tsubst_initializer_list): Handle pack expansions for base-class
4224 (dependent_type_p_r): Determine dependent types in argument packs
4225 and pack expansions.
4226 (value_dependent_expression_p): Determine value-dependence of
4227 non-type argument packs.
4228 (dependent_template_arg_p): Handle argument packs.
4229 * semantics.c (finish_cond): Check for bare parameter packs.
4230 (finish_expr_stmt): Ditto.
4231 (finish_for_expr): Ditto.
4232 (finish_switch_cond): Ditto.
4233 (finish_mem_initializers): Ditto.
4234 * name-lookup.c (arg_assoc_type): Handle pack expansions and
4236 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4237 * parser.c (make_declarator): Declarator is not an expansion.
4238 (make_pointer_declarator): Transfer parameter pack flag to outer
4240 (make_reference_declarator): Ditto.
4241 (make_ptrmem_declarator): Ditto.
4242 (make_call_declarator): Ditto.
4243 (make_array_declarator): Ditto.
4244 (cp_parser_postfix_expression): Allow pack expansion expressions
4245 in the argument list for a call expression.
4246 (cp_parser_parenthesized_expression_list): Add new parameter
4247 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4248 into separate arguments."
4249 (cp_parser_new_placement): Allow pack expansion expressions.
4250 (cp_parser_new_initializer): Ditto.
4251 (cp_parser_mem_initializer_list): Allow ellipsis to create a
4252 base-class initializer expansion.
4253 (cp_parser_mem_initializer): Ditto.
4254 (cp_parser_template_parameter_list): Keep track of whether the
4255 template parameter is a template parameter pack.
4256 (cp_parser_template_parameter): Parse the ellipsis to indicate a
4257 template parameter pack.
4258 (cp_parser_type_parameter): Ditto.
4259 (cp_parser_template_argument_list): Parse the ellipsis to indicate
4261 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4262 this declarator is a parameter pack.
4263 (cp_parser_parameter_declaration): The ellipsis does not end the
4264 parameter declaration, because it might be a parameter pack. Parse
4265 the ellipsis to indicate a parameter pack.
4266 (cp_parser_initializer): Allow pack expansions.
4267 (cp_parser_initializer_list): Allow ellipsis to create an
4268 initializer expansion.
4269 (cp_parser_base_clause): Allow ellipsis to create a base specifier
4271 (cp_parser_type_id_list): Allow ellipsis to create an exception
4272 specifier expansion.
4273 (cp_parser_attribute_list): Don't allow pack expansions.
4274 (cp_parser_functional_cast): Allow pack expansions.
4275 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4276 compute the length of a parameter pack.
4277 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4278 end a template argument.
4279 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4280 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4283 2007-03-09 Dirk Mueller <dmueller@suse.de>
4285 * call.c (build_new_op): Call warn_logical_operator.
4287 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4290 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4293 * pt.c (any_template_arguments_need_structural_equality_p):
4296 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4298 * decl.c (grokdeclarator): Disable warnings for anonymous
4301 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4303 * typeck2.c (readonly_error): Always emit a hard error.
4304 Remove last argument.
4305 * cp-tree.h (readonly_error): Adjust prototype.
4306 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4307 * typeck.c (build_unary_op): Likewise.
4308 (build_modify_expr): Likewise.
4310 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4313 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4315 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4318 * parser.c (struct cp_parser): New IN_IF_STMT.
4319 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4320 returning if parsing the body of an 'if' statement or issuing an
4321 error and continuing.
4322 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4324 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4326 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4329 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4332 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4334 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4335 Objective-C++. Don't exit early if -shared-libgcc needs to be
4338 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4340 * typeck.c (common_base_type): Delete unused function.
4342 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4344 * Make-lang.in: Add dummy lang.install-pdf target.
4346 2007-03-01 Simon Baldwin <simonb@google.com>
4349 * decl.c (check_tag_decl): Added new warning for typedef ignored
4350 when it precedes an otherwise valid non-typedef declaration.
4352 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4354 * typeck.c (build_function_call): Store converted arguments
4355 in a stack-allocated array instead of building a list.
4356 (convert_arguments): Store arguments in the array passed in as an
4357 argument, and return the actual number of arguments.
4358 * call.c (build_call): Delete, and replace with...
4359 (build_call_n, build_call_a): New.
4360 (build_op_delete_call): Rewrite to avoid constructing argument lists.
4361 (build_over_call): Store converted arguments in a stack-allocated
4362 array instead of building a list.
4363 (build_cxx_call): Pass arguments in an array instead of as a list.
4364 (build_java_interface_fn_ref): Rewrite to avoid constructing
4366 * tree.h: Update declarations to reflect above changes.
4367 * method.c (use_thunk): Use a stack-allocated array to hold
4368 the arguments instead of a list.
4369 * rtti.c (throw_bad_cast): Update call to cxx_call.
4370 (throw_bad_typeid): Likewise.
4371 (build_dynamic_cast_1): Likewise.
4372 * init.c (build_builtin_delete_call): Use build_call_n.
4373 * decl.c (expand_static_init): Likewise.
4374 * except.c (cp_protect_cleanup_actions): Likewise.
4375 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4376 (gimplify_must_not_throw_expr): Likewise.
4377 (cxx_omp_apply_fn): Use build_call_a.
4379 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4381 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4382 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4384 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4386 * cp-tree.h (static_ctors): Remove.
4387 * cp-tree.h (static_dtors): Likewise.
4388 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4389 refactoring of tree_map hierarchy.
4390 (decl_shadowed_for_var_insert): Likewise.
4391 * semantics.c (expand_body): Use c_expand_body.
4392 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4393 * decl2.c (static_ctors): Remove.
4394 (static_dtors): Likewise.
4395 (generate_ctor_or_dtor_function): Pass NULL_TREE to
4396 objc_generate_static_init_call. Do not call static_[cd]tors.
4397 (generate_ctor_and_dtor_functions_for_priority): Do not check for
4399 (cp_write_global_declarations): Likewise.
4401 2007-02-23 Richard Guenther <rguenther@suse.de>
4403 * class.c (note_name_declared_in_class): Make declaration
4404 changes meaning a pedwarn.
4406 2007-02-22 Michael Matz <matz@suse.de>
4409 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4410 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4411 dump_function_decl): Guard emitting outer scopes by new flag.
4412 * cp-lang.c (cxx_dwarf_name): New function.
4413 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4414 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4416 (push_template_decl_real, lookup_template_class): Remove calls
4419 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4421 * call.c (build_new_method_call): Ensure that explicit calls of
4422 destructors have type "void".
4424 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4426 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4427 and -Walways-true with -Waddress.
4428 * cvt.c (convert_to_void): Replace unconditional warning with
4431 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4433 * decl.c, tree.c: Fix comment typos.
4435 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4438 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4439 statement expression if we had an error mark node.
4441 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4442 Brooks Moses <brooks.moses@codesourcery.com>
4443 Lee Millward <lee.millward@codesourcery.com>
4445 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4446 Change class to tcc_vl_exp.
4448 * call.c (build_call): Use build_call_list instead
4450 (build_over_call): Likewise.
4451 (build_new_method_call): Use build_min_non_dep_call_list
4452 instead of build_min_non_dep.
4454 * error.c (dump_call_expr_args): New function.
4455 (dump_aggr_init_expr_args): New function.
4456 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
4457 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4459 * cvt.c (convert_to_void): Use build_call_array instead
4460 of build3; use new AGGR_INIT_EXPR accessor macros.
4462 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4463 instead of TREE_CODE_LENGTH.
4465 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4466 AGGR_INIT_EXPR accessor macros.
4468 * cp-gimplify.c (cp_gimplify_init_expr): Use
4469 AGGR_INIT_EXPR_SLOT to set the slot operand.
4471 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4472 (AGGR_INIT_EXPR_SLOT): New macro.
4473 (AGGR_INIT_EXPR_ARG): New macro.
4474 (aggr_init_expr_nargs): New macro.
4475 (AGGR_INIT_EXPR_ARGP): New macro.
4476 (aggr_init_expr_arg_iterator): New.
4477 (init_aggr_init_expr_arg_iterator): New.
4478 (next_aggr_init_expr_arg): New.
4479 (first_aggr_init_expr_arg): New.
4480 (more_aggr_init_expr_args_p): New.
4481 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4482 (stabilize_aggr_init): New declaration.
4483 (build_min_non_dep_call_list): Likewise.
4485 * tree.c (process_aggr_init_operands): New function.
4486 (build_aggr_init_array) New function.
4487 (build_cplus_new): Update to use new CALL_EXPR and
4488 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4489 build_aggr_init_array.
4490 (build_min_non_dep_call_list) New function.
4491 (build_min_nt): Assert input code parameter is not a variable
4492 length expression class.
4493 (build_min, build_min_non_dep): Likewise.
4494 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4495 to check for equality instead of recursing. Handle tcc_vl_exp
4497 (stabilize_call): Update to only handle CALL_EXPRs, not
4498 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4499 (stabilize_aggr_init): New function.
4500 (stabilize_init): Use it.
4502 * cxx-pretty-print.c (pp_cxx_postfix_expression)
4503 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4504 AGGR_INIT_EXPR accessor macros and argument iterators.
4506 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4507 build_vl_exp. Iterate through the operands, recursively
4508 processing each one.
4509 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4510 CALL_EXPR accessor macros.
4511 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4512 tree code classes. Use TREE_OPERAND_LENGTH instead of
4515 * semantics.c (finish_call_expr): Use build_nt_call_list
4516 instead of build_nt.
4517 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
4518 accessor macros. Use build_call_array to construct the
4519 CALL_EXPR node instead of build3
4521 * decl2.c (build_offset_ref_call_from_tree): Use
4522 build_nt_call_list and build_min_non_dep_call_list instead
4523 of build_min_nt and build_min_non_dep.
4525 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4526 Use build_nt_call_list instead of build_min_nt.
4528 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4531 * call.c (build_conditional_expr): Improve error message.
4533 2007-02-13 Dirk Mueller <dmueller@suse.de>
4535 * friend.c (do_friend): Annotate warning about friend
4536 declarations in templates with OPT_Wnon_template_friend.
4537 Convert informal message from warning() to inform().
4539 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
4540 Mark Mitchell <mark@codesourcery.com>
4543 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
4544 instantiations for variables.
4546 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4549 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
4550 Check warn_unused_value just once.
4552 2007-02-11 Mark Mitchell <mark@codesourcery.com>
4555 * pt.c (determine_specialization): Use skip_artificial_parms_for.
4556 (fn_type_unificiation): Likewise.
4557 (get_bindings): Likewise.
4559 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
4562 * decl.c (finish_function): Use DECL_REPLACEABLE.
4563 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4565 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4567 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
4569 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
4571 * decl.c (grokvardecl): Don't error if !have_tls.
4572 (grokdeclarator): Likewise.
4573 * parser.c (cp_parser_omp_threadprivate): Likewise.
4575 2007-02-07 Jakub Jelinek <jakub@redhat.com>
4578 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
4579 parameters and result decls in omp clauses.
4580 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
4583 2007-02-05 Dirk Mueller <dmueller@suse.de>
4586 * parser.c (cp_parser_class_specifier): Always initialize bases.
4588 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4590 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
4591 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
4592 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
4594 * semantics.c (finish_omp_atomic): Store a whole expression node
4595 in operand 1, and integer_zero_node in operand 0, for dependent
4596 OMP_ATOMIC. Rewrite to make flow easier to understand.
4598 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4600 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
4602 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
4604 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
4605 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
4607 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
4609 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
4610 keyword warning to -Wc++0x-compat.
4612 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4614 * decl.c (grokdeclarator): Update documentation.
4616 2007-02-02 Jakub Jelinek <jakub@redhat.com>
4619 * decl.c (grokdeclarator): If __thread is used together with
4620 a storage class other than extern and static, clear thread_p
4621 after issuing diagnostics and fall through to checking the
4624 2007-01-30 Roger Sayle <roger@eyesopen.com>
4626 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
4627 calculating the size of an array (to avoid recursive errors).
4629 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4632 * typeck.c (build_binary_op): Fix logic for warning. Move warning
4634 * call.c (convert_like_real): Don't warn when converting to
4637 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4639 * decl.c (pop_label): Replace warning with call to
4640 warn_for_unused_label.
4642 2007-01-28 Andrew Pinski <pinskia@gmail.com>
4645 * semantics.c (finish_pseudo_destructor_expr): Check the
4646 destrutor name by calling check_dtor_name.
4648 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
4650 * lex.c (D_CPP0X): Rename.
4652 (reswords): D_CPP0X -> D_CXX0X.
4653 (init_reswords): Ditto.
4654 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
4655 of C++0x keywords as identifiers.
4657 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
4660 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
4663 2007-01-23 Ian Lance Taylor <iant@google.com>
4665 * typeck.c (convert_for_assignment): Only warn about a = b = c
4666 when converting to bool.
4668 2007-01-23 Roger Sayle <roger@eyesopen.com>
4670 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
4672 * typeck.c (ignore_overflows): Remove the remaining uses of
4673 TREE_CONSTANT_OVERFLOW.
4675 2007-01-20 Jan Hubicka <jh@suse.cz>
4677 * decl2.c (start_objects, start_static_storage_duration_function):
4678 Do not make the functions uninlinable.
4680 2007-01-17 Ian Lance Taylor <iant@google.com>
4682 * class.c (add_method): Call VEC_reserve_exact rather than passing
4683 a negative size to VEC_reserve.
4685 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
4688 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
4690 2007-01-10 Mark Mitchell <mark@codesourcery.com>
4693 * decl.c (make_typename_type): If the qualified name is not a
4694 type, issue an error.
4695 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
4698 2007-01-08 Geoffrey Keating <geoffk@apple.com>
4700 * rtti.c: Include target.h.
4701 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4702 don't emit typeinfo for fundamental types as weak.
4703 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4705 2007-01-08 Richard Guenther <rguenther@suse.de>
4707 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4709 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
4711 * call.c (standard_conversion): Pass flag to
4712 vector_types_convertible_p to disallow emission of note.
4713 * typeck.c (convert_for_assignment): Pass flag to
4714 vector_types_convertible_p to allow emission of note.
4715 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4716 to disallow emission of note.
4718 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4721 * typeck.c (build_binary_op): Call overflow_warning if
4722 TREE_OVERFLOW_P is true for the result and not for any of the
4725 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
4728 * class.c (add_method): Don't wait until template
4729 instantiation time to complain about duplicate methods.
4731 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4734 * semantics.c (finish_unary_op_expr): Warn only if result
4735 overflowed and operands did not.
4737 2007-01-05 Ian Lance Taylor <iant@google.com>
4739 * typeck.c (build_binary_op): Warn about comparing a non-weak
4742 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
4744 * pt.c (tsubst): Propagate the need for structural equality checks
4745 when reducing the level of template parameters.
4747 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
4749 * pt.c: Fix a comment typo.
4751 2007-01-02 Ian Lance Taylor <iant@google.com>
4753 * semantics.c (maybe_convert_cond): Optionally warn when using an
4754 assignment as a condition.
4755 * typeck.c (convert_for_assignment): Optionally warn about
4756 assigning the result of an assignment to a bool.
4758 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4760 * pt.c (canonical_template_parms): Correct typo in comment.
4762 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4764 * typeck.c (structural_comptypes): Renamed from "comptypes".
4765 (comptypes): Use canonical type information to perform fast type
4766 comparison. When VERIFY_CANONICAL_TYPES, verify that the
4767 canonical type comparison returns the same results as we would see
4768 from the current, structural check. Support COMPARE_STRUCTURAL
4769 when we need structural checks.
4770 * decl.c (typename_compare): Fix comment.
4771 (build_typename_type): TYPENAME_TYPE nodes require structural
4772 equality checks, because they resolve different based on the
4774 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4775 require structural equality checks (for now).
4776 (build_ptrmemfunc_type): Build the canonical pointer to member
4778 (compute_array_index_type): Whenever we build a new index type
4779 to represent the size of an array in a template, we need to mark
4780 this index type as requiring structural equality. This goes for
4781 arrays with value-dependent sizes with the current ABI, or all
4783 * tree.c (cplus_array_hash): New.
4784 (struct cplus_array_info): New.
4785 (cplus_array_compare): New.
4786 (cplus_array_htab): New.
4787 (build_cplus_array_type_1): Use a hash table to cache the array
4788 types we build. Build the canonical array type for each array
4790 (cp_build_qualified_type_real): When building a cv-qualified array
4791 type, use the hash table of array types and build canonical array
4793 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4794 use structural equality (for now).
4795 * cp-tree.h (COMPARE_STRUCTURAL): New.
4796 * pt.c (canonical_template_parms): New.
4797 (canonical_type_parameter): New.
4798 (process_template_parm): Find the canonical type parameter.
4799 (lookup_template_class): When we have named the primary template
4800 type, set the canonical type for our template class to the primary
4801 template type. If any of the template arguments need structural
4802 equality checks, the template class needs structural equality
4804 (tsubst): When reducing the level of a template template
4805 parameter, we require structural equality tests for the resulting
4806 parameter because its template parameters have not had their types
4807 canonicalized. When reducing a template type parameter, find the
4808 canonical reduced type parameter.
4809 (any_template_arguments_need_structural_equality_p): New.