1 2008-07-23 Jason Merrill <jason@redhat.com>
3 Implement defaulted/deleted functions as per N2346
4 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
5 (DECL_DELETED_FN): New macro.
6 (DECL_DEFAULTED_FN): New macro.
7 * class.c (user_provided_p): New fn.
8 (defaultable_fn_p): New fn.
9 (type_has_user_provided_constructor): New fn.
10 (type_has_user_provided_default_constructor): New fn.
11 (check_methods): A defaulted fn is still trivial.
12 (check_bases_and_members): Likewise.
13 * decl.c (grok_special_member_properties): Likewise.
14 (duplicate_decls): Complain about redeclaring a function as deleted.
15 (start_decl): initialized==2 means deleted.
16 (cp_finish_decl): Handle deleted/defaulted semantics.
17 * decl2.c (grokfield): Likewise.
18 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
19 Complain about using a deleted fn.
20 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
21 (perform_member_init): Check for a user-provided default constructor
22 even if TYPE_NEEDS_CONSTRUCTING.
23 (build_new_1): Likewise.
24 * call.c (build_over_call): Don't call mark_used twice.
25 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
26 * search.c (check_final_overrider): Check for deleted mismatch.
27 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
28 (cp_parser_pure_specifier): Handle =default and =delete.
30 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
32 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
35 * typeck.c: All calls to pedwarn changed.
36 * decl.c: All calls to pedwarn changed.
37 * call.c: All calls to pedwarn changed.
38 * error.c: All calls to pedwarn changed.
39 * typeck2.c: All calls to pedwarn changed.
40 * pt.c: All calls to pedwarn changed.
41 * name-lookup.c: All calls to pedwarn changed.
42 * parser.c: All calls to pedwarn changed.
44 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
46 * call.c: Fix comment typos.
48 * cp-tree.h: Likewise.
49 * cxx-pretty-print.c: Likewise.
52 * name-lookup.c: Likewise.
53 * operators.def: Likewise.
59 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
63 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
64 copy constructors and copy assignment operators proper.
66 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
68 * parser.c (cp_token): Remove in_system_header.
69 (eof_token): Remove in_system_header.
70 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
71 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
72 (cp_parser_member_declaration): Use in_system_header_at.
73 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
74 (pop_tinst_level): Don't set in_system_header.
75 (instantiate_class_template): Don't set in_system_header.
76 (instantiate_decl): Don't set in_system_header.
77 (instantiate_pending_templates): Don't set in_system_header.
79 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
82 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
83 TYPE_NOTHROW_P, not TREE_NOTHROW.
84 (trait_expr_value): Likewise.
86 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
89 * call.c (convert_like_real): Don't take the error code path
90 when a rvalue or base conversion has the bad_p field set.
92 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
94 * rtti.c (emit_support_tinfos): Add char16_type_node and
96 * typeck2.c (digest_init): Support char16_t and char32_t.
98 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
100 * cvt.c (convert_to_void): Avoid C++ keywords.
101 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
103 * friend.c (is_friend): Likewise.
104 * init.c (perform_member_init): Likewise.
105 * mangle.c (write_template_prefix, write_template_template_param):
107 * name-lookup.c (do_namespace_alias, do_using_directive,
108 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
109 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
110 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
112 * pt.c (is_specialization_of_friend, lookup_template_class,
113 push_tinst_level, instantiate_class_template,
114 tsubst_copy_and_build): Likewise.
115 * tree.c (add_stmt_to_compound): Likewise.
116 * typeck.c (finish_class_member_access_expr): Likewise.
118 2008-07-17 Julian Brown <julian@codesourcery.com>
119 Mark Mitchell <mark@codesourcery.com>
121 * decl2.c (determine_visibility): Allow target to override
122 visibility of class data.
124 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
127 * semantics.c (trait_expr_value): Update __has_trivial_destructor
128 semantics to the current WP (N2691).
130 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
133 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
134 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
135 complies with exception specification constraints.
137 2008-07-14 Jason Merrill <jason@redhat.com>
139 * lex.c (init_reswords): Always set D_OBJC.
141 2008-07-11 Tom Tromey <tromey@redhat.com>
142 Ian Lance Taylor <iant@google.com>
144 * lex.c (struct resword, reswords): Don't define.
145 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
146 (init_reswords): Clarify mask code. Use c_common_reswords rather
149 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
152 * decl.c (grokdeclarator): Warn about initializing variables
153 of storage class 'extern' only after the type of the declarator
154 has been properly computed.
156 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
159 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
160 carries the location of the primary type.
161 * parser.c (cp_parser_check_type_definition): Update documentation.
162 (cp_parser_check_for_definition_in_return_type,
163 cp_parser_check_for_invalid_template_id,
164 cp_parser_set_decl_spec_type,
165 cp_parser_check_for_definition_in_return_type,
166 cp_parser_diagnose_invalid_type_name,
167 cp_parser_new_expression, cp_parser_explicit_instantiation,
168 cp_parser_type_specifier, cp_parser_simple_type_specifier,
169 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
172 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
176 * semantic.c (qualified_name_lookup_error, finish_id_expression):
177 Add a location_t parameter so that
178 error message can have a more accurate location.
179 * cp-tree.h: Updated prototype
180 * pt.c (tsubst_qualified_id): Use location in error messages.
181 * parser.c (cp_parser_postfix_expression,
182 cp_parser_objc_statement, cp_parser_trait_expr,
183 cp_parser_token_is_class_key,
184 cp_parser_uncommitted_to_tentative_parse_p,
185 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
186 cp_parser_error, cp_parser_name_lookup_error,
187 cp_parser_simulate_error, cp_parser_check_decl_spec,
188 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
189 cp_parser_diagnose_invalid_type_name,
190 cp_parser_parse_and_diagnose_invalid_type_name,
191 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
192 cp_parser_string_literal, cp_parser_primary_expression,
193 cp_parser_primary_expression, cp_parser_unqualified_id,
194 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
195 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
196 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
197 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
198 cp_parser_jump_statement, cp_parser_block_declaration,
199 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
200 cp_parser_function_specifier_opt, cp_parser_decltype,
201 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
202 cp_parser_mem_initializer_id, cp_parser_template_parameter,
203 cp_parser_type_parameter, cp_parser_template_id,
204 cp_parser_template_name, cp_parser_template_argument): Likewise.
206 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
209 * pt.c (tsubst_function_type): Remove warning for type qualifiers
210 on function return type.
212 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
215 * pt.c (tsubst_function_type): Don't warn for type qualifiers
216 on function return type in case of system header.
218 2008-07-09 Raksit Ashok <raksit@google.com>
220 * parser.c (cp_parser_postfix_expression): New warning based on flag
221 warn_disallowed_functions.
223 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
226 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
227 functions declared with a storage class qualifier.
229 2008-07-03 Richard Guenther <rguenther@suse.de>
232 * typeck.c (cp_build_function_call): Move code to verify
233 builtin function arguments ...
234 * call.c (build_cxx_call): ... here.
236 2008-07-02 Jason Merrill <jason@redhat.com>
238 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
240 Implement WG21 N2672, Initializer List proposed wording
241 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
242 (struct lang_type_class): Add has_list_ctor bitfield.
243 (TYPE_HAS_LIST_CTOR): New macro.
244 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
245 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
246 (LOOKUP_NO_NARROWING): New macro.
247 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
248 * parser.c (cp_parse_braced_list): Split out from...
249 (cp_parser_initializer_clause): ...here.
250 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
252 (cp_lexer_next_token_is_not_keyword): New fn.
253 (cp_parser_parenthesized_expression_list): Handle { }.
254 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
255 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
256 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
257 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
258 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
259 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
260 (cp_parser_save_member_function_body): Likewise.
261 * call.c (conversion_kind): Add ck_list, ck_aggr.
262 (struct conversion): Add check_narrowing bitfield, conversion list.
263 (build_list_conv): New fn.
264 (build_aggr_conv): New fn.
265 (implicit_conversion): Call them.
266 (standard_conversion): Set check_narrowing if appropriate.
267 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
268 (build_user_type_conversion_1): When converting from an init list,
269 we allow additional conversions except when calling a copy ctor.
270 (convert_like_real): Calling an explicit ctor for an init list is
271 ill-formed. Handle ck_list and ck_addr. Check narrowing.
272 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
273 class doesn't have a list ctor, break the {} into a TREE_LIST.
274 (compare_ics): ck_list is better than other UDCs.
275 (set_up_extended_ref_temp): Split out from initialize_reference.
276 (is_std_init_list): New fn.
277 (is_list_ctor): New fn.
278 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
279 (reshape_init_array_1): Pass it to build_constructor.
280 (reshape_init_class): Ditto.
281 (initialize_artificial_var): Pass the appropriate type.
282 (build_aggr_init_full_exprs): Split out from...
283 (check_initializer): ...here. Handle new semantics.
284 (build_init_list_var_init): New subroutine of check_initializer.
285 (grokdeclarator): Converting constructors can have more than one parm.
286 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
287 * init.c (expand_default_init): Only do digest_init for aggregates.
288 * rtti.c (tinfo_base_init): Pass init_list_type_node to
289 build_constructor_from_list.
290 (generic_initializer, ptr_initializer): Ditto.
291 (ptm_initializer, class_initializer): Ditto.
292 (get_pseudo_ti_init): Ditto.
293 * error.c (dump_type): Handle init_list_type_node.
294 (maybe_warn_cpp0x): New fn.
295 (maybe_varn_variadic_templates): Call it.
296 * cvt.c (ocp_convert): Handle conversion from { }.
297 * tree.c (build_array_of_n_type): New fn.
298 * typeck2.c (store_init_value): Use init_list_type_node.
299 (digest_init): Likewise.
300 (check_narrowing): New fn.
301 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
302 of vector of constructor elts. Handle non-aggregate types. Make
303 constant literals static.
304 * pt.c: (tsubst_copy_and_build): Adjust.
306 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
308 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
310 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
311 (comp_ptr_ttypes_const): Likewise.
313 2008-07-01 Andrew Haley <aph@redhat.com>
315 * decl.c (finish_constructor_body): Don't set the return value of
316 the constructor if the constructor is that of a Java type.
318 2008-06-30 Jakub Jelinek <jakub@redhat.com>
321 * decl2.c (is_late_template_attribute): If the first attribute
322 argument is IDENTIFIER_NODE, don't consider it when checking
323 if arguments are value or type dependent.
325 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
328 * pt.c (do_type_instantiation): In c++0x mode do not warn for
331 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
333 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
335 2008-06-28 Jakub Jelinek <jakub@redhat.com>
338 * repo.c (repo_emit_p): Put const static data members initialized
339 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
342 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
345 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
348 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
351 * typeck.c (cp_build_function_call): Show example syntax in
354 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
356 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
357 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
358 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
359 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
360 pedwarn to permerror.
361 * init.c (perform_member_init, build_new_1, build_new): Likewise.
362 * decl.c (warn_extern_redeclared_static, duplicate_decls,
363 * identify_goto, check_previous_goto_1, check_goto, define_label,
364 check_tag_decl, start_decl, check_class_member_definition_namespace,
365 grokfndecl, grokdeclarator): Likewise.
366 * except.c (check_handlers): Likewise.
367 * typeck2.c (digest_init): Likewise.
368 * pt.c (check_specialization_namespace,
369 check_explicit_instantiation_namespace,
370 maybe_process_partial_specialization, check_explicit_specialization,
371 convert_template_argument, do_decl_instantiation,
372 do_type_instantiation, instantiate_decl): Likewise.
373 * semantics.c (finish_template_type_parm): Likewise.
374 * name-lookup.c (pushdecl_maybe_friend,
375 check_for_out_of_scope_variable): Likewise.
376 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
377 coerce_new_type): Likewise.
378 * parser.c (cp_parser_nested_name_specifier_opt,
379 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
380 cp_parser_class_head, cp_parser_check_class_key): Likewise.
381 (cp_parser_parameter_declaration): Check flag_permissive instead of
382 flag_pedantic_errors.
383 * call.c (joust): Change pedwarn to warning.
384 * friend.c (make_friend_class): Likewise.
386 2008-06-16 Jan Hubicka <jh@suse.cz>
388 * method.c: Include cgraph.h.
389 (use_thunk): Use cgraph_add_new_function instead of calling backend
392 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
394 * parser.c: Fix comment typo.
396 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
399 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
400 grokdeclarator and apply it to the created declaration.
401 * cp-tree.h (grokbitfield): Update prototype.
402 * parser.c (cp_parser_member_declaration): Don't apply the attributes
403 since they are now applied in grokbitfield. Adjusted the call to
405 (cp_parser_objc_class_ivars): Likewise.
407 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
410 * class.c (type_requires_array_cookie): Do not consider delete[]
411 operators with an ellipsis as second argument.
413 2008-06-09 Jakub Jelinek <jakub@redhat.com>
416 * semantics.c (stmt_expr_value_expr): Don't crash on empty
419 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
422 * pt.c (maybe_process_partial_specialization): Check the tree
423 returned by push_template_decl for error_mark_node.
424 * parser.c (cp_parser_class_head): Likewise, check the tree
425 returned by the latter.
427 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
430 * decl.c (grokdeclarator): In case of wrong return type return
431 immediately error_mark_node.
433 2008-06-06 Jakub Jelinek <jakub@redhat.com>
435 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
436 dependent_omp_for_p, begin_omp_task, finish_omp_task,
437 finish_omp_taskwait): New prototypes.
438 (cxx_omp_clause_default_ctor): Add outer argument.
439 (finish_omp_for): Add new clauses argument.
440 * cp-gimplify.c (cxx_omp_finish_clause): New function.
441 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
442 (cxx_omp_clause_default_ctor): Add outer argument.
443 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
444 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
445 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
446 Add par_clauses argument. If decl is present in parallel's
447 lastprivate clause, change that clause to shared and add
448 a lastprivate clause for decl to OMP_FOR_CLAUSES.
449 Fix wording of error messages. Adjust finish_omp_for caller.
450 Add clauses argument. Parse loops with random access iterators.
451 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
453 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
454 cp_parser_omp_for_loop callers.
455 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
457 (cp_parser_omp_clause_name): Handle collapse and untied
459 (cp_parser_omp_clause_schedule): Handle auto schedule.
460 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
461 and PRAGMA_OMP_CLAUSE_UNTIED.
462 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
463 (OMP_TASK_CLAUSE_MASK): Define.
464 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
465 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
466 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
468 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
469 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
470 (tsubst_omp_for_iterator): New function.
471 (dependent_omp_for_p): New function.
472 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
473 loops. Adjust finish_omp_for caller. Handle loops with random
474 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
475 (tsubst_expr): Handle OMP_TASK.
476 * semantics.c (cxx_omp_create_clause_info): New function.
477 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
479 (cxx_omp_predetermined_sharing): Removed.
480 * semantics.c (finish_omp_for): Allow pointer iterators. Use
481 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
482 collapsed for loops. Adjust c_finish_omp_for caller. Add new
483 clauses argument. Fix check for type dependent cond or incr.
484 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
485 fold_convert to convert incr amount to difference_type. Only
486 fold if not in template. If decl is mentioned in lastprivate
487 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
488 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
490 (finish_omp_threadprivate): Allow static class members of the
492 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
493 finish_omp_taskwait): New functions.
495 * parser.c (cp_parser_binary_expression): Add prec argument.
496 (cp_parser_assignment_expression): Adjust caller.
497 * cp-tree.h (outer_curly_brace_block): New prototype.
498 * decl.c (outer_curly_brace_block): No longer static.
500 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
503 * pt.c (push_template_decl_real): Consistently return error_mark_node
506 2008-06-02 Tomas Bily <tbily@suse.cz>
508 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
509 (cp_build_unary_op): Likewise.
510 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
511 (maybe_warn_about_returning_address_of_local): Likewise.
513 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
516 * pt.c (tsubst_initializer_list): Consistently check the tree
517 returned by tsubst_pack_expansion for error_mark_node.
519 2008-05-27 Michael Matz <matz@suse.de>
522 * call.c (build_new_op): Make warning conditional on
525 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
528 * call.c (convert_like_real): Convert bitfield to desired type
529 before creating temporary.
531 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
533 * Makefile.in: Adjusted dependencies on c-incpath.o.
535 2008-05-23 Jakub Jelinek <jakub@redhat.com>
538 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
539 fold_build_cleanup_point_expr on build_call_a results.
542 * semantics.c (omp_clause_info_fndecl): New function.
543 (finish_omp_clauses): Use it.
545 2008-05-21 Jakub Jelinek <jakub@redhat.com>
548 * cp-tree.h (check_array_initializer): New prototype.
549 * decl.c (check_array_initializer): New function.
550 (check_initializer): Call it.
551 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
553 2008-05-21 Tom Tromey <tromey@redhat.com>
555 * mangle.c (save_partially_mangled_name): Remove.
556 (restore_partially_mangled_name): Likewise.
557 (write_encoding): Update.
558 (write_unqualified_name): Likewise.
559 (start_mangling): Always use name_obstack. Remove 'ident_p'
561 (get_identifier_nocopy): Remove.
562 (finish_mangling_internal): Rename from finish_mangling.
563 (finish_mangling): New function.
564 (finish_mangling_get_identifier): Likewise.
565 (partially_mangled_name, partially_mangled_name_len): Remove.
566 (mangle_decl_string): Change return type. Update.
567 (mangle_decl, mangle_type_string, mangle_special_for_type,
568 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
569 mangle_ref_init_variable): Update.
571 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
574 * semantics.c (begin_class_definition): Extend checks on the first
577 2008-05-12 Tomas Bily <tbily@suse.cz>
579 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
580 * call.c (build_over_call): Likewise.
581 * error.c (dump_expr): Use CASE_CONVERT.
582 * class.c (fixed_type_or_null): Likewise.
584 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
586 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
588 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
591 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
593 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
594 DECL_LOOPING_CONST_OR_PURE_P attributes.
595 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
598 2008-05-02 Simon Baldwin <simonb@google.com>
601 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
603 2008-05-01 Simon Baldwin <simonb@google.com>
605 * typeck.c (build_array_ref): Call warn_array_subscript_range.
607 2008-04-30 Jakub Jelinek <jakub@redhat.com>
610 * pt.c (more_specialized_fn): Stop the loop even if there are no
611 arguments before ellipsis.
613 2008-04-29 Jakub Jelinek <jakub@redhat.com>
616 * parser.c (cp_parser_lookup_name): Look through single function
620 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
621 COMPOUND_EXPR if the second argument would be error_mark_node.
623 2008-04-28 Jason Merrill <jason@redhat.com>
624 Liu Guanwei <liu_gw@163.com>
627 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
628 in default arguments.
630 2008-04-25 Jan Hubicka <jh@suse.cz>
632 * typeck.c (check_return_expr): Update.
633 * decl.c (start_preparsed_function): Update.
634 * method.c (use_thunk): Update.
636 2008-04-24 Jakub Jelinek <jakub@redhat.com>
639 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
640 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
641 * decl2.c (is_late_template_attribute): Only make vector_size
642 late tmpl attribute if argument is type or value dependent.
643 (cp_reconstruct_complex_type): New function.
645 2008-04-24 Richard Guenther <rguenther@suse.de>
647 * typeck.c (cp_build_function_call): Call
648 check_builtin_function_arguments.
650 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
652 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
653 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
654 * init.c (build_zero_init): Don't set TREE_INVARIANT.
655 * class.c (build_base_path): Don't set TREE_INVARIANT.
656 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
657 (build_vtbl_initializer): Don't set TREE_INVARIANT.
658 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
659 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
660 (generic_initializer): Don't set TREE_INVARIANT.
661 (ptr_initializer): Don't set TREE_INVARIANT.
662 (ptm_initializer): Don't set TREE_INVARIANT.
663 (class_initializer): Don't set TREE_INVARIANT.
664 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
665 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
666 (build_template_parm_index): Don't set TREE_INVARIANT.
667 (reduce_template_parm_level): Don't set TREE_INVARIANT.
668 (process_template_parm): Don't set TREE_INVARIANT.
670 2008-04-22 Jason Merrill <jason@redhat.com>
673 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
674 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
675 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
677 2008-04-22 Jakub Jelinek <jakub@redhat.com>
680 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
681 expression is errorneous.
683 2008-04-21 Jason Merrill <jason@redhat.com>
686 * tree.c (cp_tree_equal): Handle FIXED_CST.
689 * pt.c (template_template_parm_bindings_ok_p): Set
690 processing_template_decl while in this function.
692 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
694 * cvt.c (type_promotes_to): Support char16_t and char32_t.
695 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
696 char16_t and char32_t.
697 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
698 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
699 extended builtin type "u8char{16,32}_t".
700 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
702 (cp_lexer_print_token): Support CPP_STRING{16,32}.
703 (cp_parser_is_string_literal): Idem.
704 (cp_parser_string_literal): Idem.
705 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
707 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
708 * tree.c (char_type_p): Support char16_t and char32_t as char types.
709 * typeck.c (string_conv_p): Support char16_t and char32_t.
711 2008-04-17 Jason Merrill <jason@redhat.com>
714 * call.c (build_user_type_conversion_1): Represent second step of
715 copy-init with an rvalue conversion.
716 (convert_like_real) [ck_user]: Don't implicitly add it here.
718 2008-04-15 Jakub Jelinek <jakub@redhat.com>
721 * decl.c (layout_var_decl): If extern or static var has variable
722 size, set TREE_TYPE (decl) to error_mark_node.
724 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
727 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
730 2008-04-09 Jason Merrill <jason@redhat.com>
733 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
734 not a pushed variable.
736 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
738 * call.c (build_op_delete_call): Fix quotation in warning message.
739 * decl.c (grokdeclarator): Quote keyword in error message.
740 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
743 * parser.c (cp_parser_check_type_definition): Print error string
744 directly rather than using "%s".
745 (cp_parser_postfix_expression): Fix quotation.
746 (cp_parser_decltype): Likewise.
747 (cp_parser_sizeof_operand): Fix quotation. Simplify.
749 * parser.c (cp_parser_non_integral_constant_expression): Build error
750 message with CONCAT rather than using "%s".
751 (cp_parser_primary_expression): Fix quotation.
752 (cp_parser_postfix_expression): Likewise.
753 (cp_parser_postfix_dot_deref_expression): Likewise.
754 (cp_parser_unary_expression): Likewise.
755 (cp_parser_new_expression): Likewise.
756 (cp_parser_delete_expression): Likewise.
758 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
759 as `)', not as `('. Fix quotation.
760 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
761 (cp_parser_primary_expression): Likewise.
762 (cp_parser_nested_name_specifier_opt): Likewise.
763 (cp_parser_postfix_expression): Likewise.
764 (cp_parser_postfix_open_square_expression): Likewise.
765 (cp_parser_parenthesized_expression_list): Likewise.
766 (cp_parser_pseudo_destructor_name): Likewise.
767 (cp_parser_new_expression): Likewise.
768 (cp_parser_direct_new_declarator): Likewise.
769 (cp_parser_delete_expression): Likewise.
770 (cp_parser_cast_expression): Likewise.
771 (cp_parser_question_colon_clause): Likewise.
772 (cp_parser_builtin_offsetof): Likewise.
773 (cp_parser_trait_expr): Likewise.
774 (cp_parser_label_for_labeled_statement): Likewise.
775 (cp_parser_compound_statement): Likewise.
776 (cp_parser_selection_statement): Likewise.
777 (cp_parser_condition): Likewise.
778 (cp_parser_iteration_statement): Likewise.
779 (cp_parser_already_scoped_statement): Likewise.
780 (cp_parser_simple_declaration): Likewise.
781 (cp_parser_linkage_specification): Likewise.
782 (cp_parser_static_assert): Likewise.
783 (cp_parser_decltype): Likewise.
784 (cp_parser_conversion_function_id): Likewise.
785 (cp_parser_operator_function_id): Likewise.
786 (cp_parser_operator): Likewise.
787 (cp_parser_type_parameter): Likewise.
788 (cp_parser_template_id): Likewise.
789 (cp_parser_explicit_instantiation): Likewise.
790 (cp_parser_explicit_specialization): Likewise.
791 (cp_parser_enum_specifier): Likewise.
792 (cp_parser_namespace_definition): Likewise.
793 (cp_parser_namespace_alias_definition): Likewise.
794 (cp_parser_using_declaration): Likewise.
795 (cp_parser_using_directive): Likewise.
796 (cp_parser_asm_definition): Likewise.
797 (cp_parser_direct_declarator): Likewise.
798 (cp_parser_ptr_operator): Likewise.
799 (cp_parser_parameter_declaration_clause): Likewise.
800 (cp_parser_initializer_clause): Likewise.
801 (cp_parser_class_specifier): Likewise.
802 (cp_parser_member_specification_opt): Likewise.
803 (cp_parser_member_declaration): Likewise.
804 (cp_parser_pure_specifier): Likewise.
805 (cp_parser_constant_initializer): Likewise.
806 (cp_parser_base_clause): Likewise.
807 (cp_parser_exception_specification_opt): Likewise.
808 (cp_parser_try_block): Likewise.
809 (cp_parser_function_try_block): Likewise.
810 (cp_parser_handler): Likewise.
811 (cp_parser_throw_expression): Likewise.
812 (cp_parser_asm_operand_list): Likewise.
813 (cp_parser_attributes_opt): Likewise.
814 (cp_parser_label_declaration): Likewise.
815 (cp_parser_constructor_declarator_p): Likewise.
816 (cp_parser_template_declaration_after_export): Likewise.
817 (cp_parser_single_declaration): Likewise.
818 (cp_parser_objc_message_expression): Likewise.
819 (cp_parser_objc_message_args): Likewise.
820 (cp_parser_objc_encode_expression): Likewise.
821 (cp_parser_objc_defs_expression): Likewise.
822 (cp_parser_objc_protocol_expression): Likewise.
823 (cp_parser_objc_selector_expression): Likewise.
824 (cp_parser_objc_protocol_refs_opt): Likewise.
825 (cp_parser_objc_typename): Likewise.
826 (cp_parser_objc_method_keyword_params): Likewise.
827 (cp_parser_objc_superclass_or_category): Likewise.
828 (cp_parser_objc_try_catch_finally_statement): Likewise.
829 (cp_parser_objc_synchronized_statement): Likewise.
830 (cp_parser_objc_throw_statement): Likewise.
831 (cp_parser_omp_var_list_no_open): Likewise.
832 (cp_parser_omp_clause_default): Likewise.
833 (cp_parser_omp_clause_if): Likewise.
834 (cp_parser_omp_clause_num_threads): Likewise.
835 (cp_parser_omp_clause_reduction): Likewise.
836 (cp_parser_omp_clause_schedule): Likewise.
837 (cp_parser_omp_critical): Likewise.
838 (cp_parser_omp_for_loop): Likewise.
839 (cp_parser_omp_sections_scope): Likewise.
841 * parser.c (cp_parser_template_parameter_list): Simplify.
843 2008-04-07 James E. Wilson <wilson@tuliptree.org>
845 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
847 2008-04-07 Jason Merrill <jason@redhat.com>
850 * class.c (type_has_user_nondefault_constructor): A template
851 counts as a nondefault constructor.
853 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
855 * decl.c (cxx_push_function_context): Delete.
856 (cxx_pop_function_context): Delete.
857 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
859 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
860 LANG_HOOKS_FUNCTION_FINAL): Delete.
861 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
862 LANG_HOOKS_MISSING_NORETURN_OK_P.
863 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
865 * semantics.c (current_stmt_tree): Fix comment.
867 2008-04-03 Jakub Jelinek <jakub@redhat.com>
870 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
871 before calling fold_offsetof.
873 2008-04-03 Tom Tromey <tromey@redhat.com>
875 * Make-lang.in (c++_OBJS): New variable.
877 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
879 * optimize.c (clone_body): New, from tree-inline.c.
881 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
883 * method.c (synthesize_method): Use {push,pop}_function_context.
884 * name-lookup.c (push_to_top_level): Likewise.
885 * parser.c (cp_parser_late_parsing_for_member): Likewise.
887 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
890 * parser.c (cp_parser_decl_specifier_seq): Add location to error
893 2008-03-27 Tom Tromey <tromey@redhat.com>
895 * Make-lang.in: Revert automatic dependency patch.
897 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
900 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
901 (build_compound_expr): New, for compatibility with C
903 (cp_build_compound_expr): Renamed from build_compound_expr.
904 (build_c_cast): New, for compatibility with C build_c_cast.
905 (cp_build_c_cast): Renamed from build_c_cast.
906 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
907 * decl.c (cxx_maybe_build_cleanup): Ditto.
908 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
909 (cp_build_compound_expr): Renamed from build_compound_expr.
910 (build_c_cast): Add C-compatible prototype.
911 (cp_build_c_cast): Renamed from build_c_cast.
912 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
913 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
915 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
917 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
918 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
919 ending in a pack expansion, both of which can occur when
920 substituting into a nested template.
921 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
922 instantiating the sizeof...(X) form, make tsubst_copy do the work.
923 * parser.c (cp_parser_template_parameter): Deal with unnamed
924 non-type template parameter packs identified by pack expansions in
927 2008-03-26 Jakub Jelinek <jakub@redhat.com>
930 * pt.c (apply_late_template_attributes): Don't call tsubst on
931 first attribute argument if it is IDENTIFIER_NODE.
934 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
935 and LTGT_EXPR to pp_expression.
937 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
939 * pt.c (coerce_template_template_parm): Moved the body of the loop
940 of coerce_template_template_parms here, to make iteration over a
941 template argument pack simpler.
942 Also, allow matching of a template parameter pack in the template
943 template parameter to a template parameter in the template
945 (coerce_template_template_parms): Deal with variadic template
946 template parameters. Use coerce_template_template_parm.
947 (unify): Make sure we coerce the template template argument's
948 template arguments to the template template parameter's template
949 parameters, not the other way around.
951 2008-03-25 Tom Tromey <tromey@redhat.com>
953 * Make-lang.in: Remove .o targets.
954 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
956 (c++_OBJS): New variable.
957 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
959 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
961 * typeck.c (composite_pointer_type_r): Add SFINAE support.
962 (composite_pointer_type): Ditto.
963 (common_type): Fix call to composite_pointer_type.
964 (cxx_sizeof_nowarn): New; used to be a macro.
965 (cxx_sizeof_expr): Add SFINAE support.
966 (cxx_alignof_expr): Ditto.
967 (decay_conversion): Fix calls for SFINAE support.
968 (rationalize_conditional_expr): Add SFINAE support.
969 (build_class_member_access_expr): Ditto.
970 (finish_class_member_access_expr): Ditto.
971 (build_x_indirect_ref): Ditto.
972 (build_indirect_ref): Original version renamed to
973 cp_build_indirect_ref; new version provides a bridge from
975 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
977 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
978 (build_function_call): Original version renamed to
979 cp_build_function_call; new version provides a bridge from
981 (cp_build_function_call): Was build_function_call; added SFINAE
983 (convert_arguments): Add SFINAE support.
984 (build_x_binary_op): Ditto.
985 (build_binary_op): Original version renamed to cp_build_binary_op;
986 new version provides a bridge from c-common.
987 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
988 (pointer_diff): Fix calls for SFINAE.
989 (build_x_unary_op): Add SFINAE support.
990 (condition_conversion): Fix calls for SFINAE.
991 (build_unary_op): Original version renamed to cp_build_unary_op;
992 new version provides a bridge from c-common.
993 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
994 (unary_complex_lvalue): Fix calls for SFINAE.
995 (build_x_conditional_expr): Add SFINAE support.
996 (build_x_compound_expr_from_list): Fix calls for SFINAE.
997 (build_x_compound_expr): Add SFINAE support.
998 (convert_ptrmem): Fix calls for SFINAE.
999 (build_static_cast_1): Add SFINAE support.
1000 (build_static_cast): Ditto.
1001 (build_reinterpret_cast_1): Ditto.
1002 (build_reinterpret_cast): Ditto.
1003 (build_const_cast_1): Ditto.
1004 (build_const_cast): Ditto.
1005 (build_c_cast): Ditto.
1006 (build_modify_expr): Original version renamed to
1007 cp_build_modify_expr; new version provides a bridge from c-common.
1008 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1010 (build_x_modify_expr): Add SFINAE support.
1011 (build_ptrmemfunc): Fix calls for SFINAE.
1012 (convert_for_assignment): Add SFINAE support.
1013 (convert_for_initialization): Ditto.
1014 (check_return_expr): Fix calls for SFINAE.
1015 (lvalue_or_else): Add SFINAE support.
1016 * init.c (perform_member_init): Fix calls for SFINAE.
1017 (emit_mem_initializers): Ditto.
1018 (expand_virtual_init): Ditto.
1019 (expand_cleanup_for_base): Ditto.
1020 (build_aggr_init): Add SFINAE support.
1021 (expand_default_init): Ditto.
1022 (expand_aggr_init_1): Fix calls for SFINAE.
1023 (build_offset_ref): Ditto.
1024 (build_new_1): Add SFINAE support.
1026 (build_vec_delete_1): Fix calls for SFINAE.
1027 (get_temp_regvar): Ditto.
1028 (build_vec_init): Add SFINAE support.
1029 (build_dtor_call): Fix calls for SFINAE.
1030 (build_delete): Ditto.
1031 (push_base_cleanups): Ditto.
1032 (build_vec_delete_1): Ditto.
1033 * class.c (build_base_path): Fix calls for SFINAE.
1034 (build_simple_base_path): Ditto.
1035 (convert_to_base_statically): Ditto.
1036 (build_vfn_ref): Ditto.
1037 (resolve_address_of_overloaded_function): Ditto.
1038 * decl.c (check_initializer): Fix calls for SFINAE.
1039 (register_dtor_fn): Ditto.
1040 (compute_array_index_type): Ditto.
1041 (finish_enum): Ditto.
1042 (start_preparsed_function): Ditto.
1043 (cxx_maybe_build_cleanup): Ditto.
1044 * call.c (convert_like): Add COMPLAIN argument.
1045 (convert_like_with_context): Ditto.
1046 (build_this): Fix calls for SFINAE.
1047 (build_user_type_conversion): Ditto.
1048 (resolve_args): Ditto.
1049 (build_new_function_call): Add SFINAE support.
1050 (build_operator_new_call): Fix calls for SFINAE.
1051 (build_object_call): Add SFINAE support.
1052 (build_conditional_expr): Ditto.
1053 (build_new_op): Ditto.
1054 (build_op_delete_call): Fix calls for SFINAE.
1055 (build_temp): Ditto.
1056 (convert_like_real): Add SFINAE support.
1057 (build_x_va_arg): Fix calls for SFINAE.
1058 (convert_default_arg): Ditto.
1059 (build_over_call): Add SFINAE support.
1060 (build_java_interface_fn_ref): Fix calls for SFINAE.
1061 (build_special_member_call): Add SFINAE support.
1062 (build_new_method_call): Ditto.
1063 (perform_implicit_conversion): Ditto.
1064 (perform_direct_initialization_if_possible): Ditto.
1065 (initialize_reference): Fix calls for SFINAE.
1066 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1067 * rtti.c (build_headof): Fix calls for SFINAE.
1068 (get_tinfo_decl_dynamic): Ditto.
1069 (get_typeid): Ditto.
1070 (build_dynamic_cast_1): Add SFINAE support.
1071 (build_dynamic_cast): Ditto.
1072 (tinfo_base_init): Fix calls for SFINAE.
1073 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1074 (do_end_catch): Ditto.
1075 (initialize_handler_parm): Ditto.
1076 (expand_start_catch_block): Ditto.
1077 (do_allocate_exception): Ditto.
1078 (do_free_exception): Ditto.
1079 (build_throw): Ditto.
1080 * cvt.c (build_up_reference): Fix calls for SFINAE.
1081 (convert_to_reference): Ditto.
1082 (ocp_convert): Ditto.
1083 (convert_to_void): Add SFINAE support.
1084 * tree.c (build_dummy_object): Fix calls for SFINAE.
1085 (stabilize_expr): Ditto.
1086 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1088 (build_new_method_call): Ditto.
1089 (build_special_member_call): Ditto.
1090 (build_new_op): Ditto.
1091 (perform_implicit_conversion): Ditto.
1092 (perform_direct_initialization_if_possible): Ditto.
1093 (convert_to_void): Ditto.
1094 (build_aggr_init): Ditto.
1096 (build_vec_init): Ditto.
1097 (build_dynamic_cast): Ditto.
1098 (finish_call_expr): Ditto
1099 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1100 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1101 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1102 (finish_class_member_access_expr): Ditto.
1103 (build_x_indirect_ref): Ditto.
1104 (cp_build_indirect_ref): New.
1105 (cp_build_function_call): Add tsubst_flags_t parameter.
1106 (build_x_unary_op): Ditto.
1107 (cp_build_unary_op): New.
1108 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1109 (build_x_compound_expr): Ditto.
1110 (build_compound_expr): Ditto.
1111 (build_static_cast): Ditto.
1112 (build_reinterpret_cast): Ditto.
1113 (build_const_cast): Ditto.
1114 (build_c_cast): Ditto.
1115 (build_x_modify_expr): Ditto.
1116 (cp_build_modify_expr): New.
1117 (convert_for_initialization): Add tsubst_flags_t parameter.
1118 (cp_build_binary_op): Remove macro; add function declaration.
1119 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1120 (lvalue_or_else): Ditto.
1121 (build_functional_cast): Ditto.
1122 * typeck2.c (digest_init): Fix calls for SFINAE.
1123 (process_init_constructor_array): Ditto.
1124 (process_init_constructor_record): Ditto.
1125 (build_x_arrow): Ditto.
1126 (build_m_component_ref): Ditto.
1127 (build_functional_cast): Add SFINAE support.
1128 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1129 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1130 (finish_expr_stmt): Ditto.
1131 (finish_for_expr): Ditto.
1132 (finish_asm_stmt): Ditto.
1133 (finish_non_static_data_member): Ditto.
1134 (finish_qualified_id_expr): Ditto.
1135 (finish_call_expr): Add SFINAE support.
1136 (finish_increment_expr): Fix calls for SFINAE.
1137 (finish_unary_op_expr): Ditto.
1138 (simplify_aggr_init_expr): Ditto.
1139 (finish_omp_clauses): Ditto.
1140 (finish_omp_for): Ditto.
1141 (finish_omp_barrier): Ditto.
1142 (finish_omo_flush): Ditto.
1143 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1144 (build_anon_union_vars): Ditto.
1145 (get_guard_cond): Ditto.
1147 (one_static_initialization_or_destruction): Ditto.
1148 (do_static_initialization_or_destruction): Ditto.
1149 (generate_ctor_or_dtor_function): Ditto.
1150 (build_offset_ref_call_from_tree): Ditto.
1151 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1152 (cp_parser_postfix_dot_deref_expression): Ditto.
1153 (cp_parser_unary_expression): Ditto.
1154 (cp_parser_new_expression): Ditto.
1155 (cp_parser_cast_expression): Ditto.
1156 (cp_parser_binary_expression): Ditto.
1157 (cp_parser_question_colon_clause): Ditto.
1158 (cp_parser_assignment_expression): Ditto.
1159 (cp_parser_expression): Ditto.
1160 (cp_parser_builtin_offsetof): Ditto.
1161 (cp_parser_template_argument): Ditto.
1162 (cp_parser_functional_cast): Ditto.
1164 2008-03-24 Tom Tromey <tromey@redhat.com>
1166 * lex.c (handle_pragma_interface): Don't copy the filename.
1167 (handle_pragma_implementation): Copy filename using xstrdup.
1169 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1171 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1172 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1173 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1174 (PROMOTES_TO_AGGR_TYPE): Remove.
1175 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1176 * typeck.c (unary_complex_lvalue, build_modify_expr,
1177 convert_for_initialization): Adjust.
1178 * init.c (is_aggr_type): Remove.
1179 (is_class_type): Add.
1180 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1181 build_delete): Adjust.
1182 * lex.c (make_aggr_type): Remove.
1183 (make_class_type): Add.
1184 (cxx_make_type): Adjust.
1185 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1187 * decl.c (build_typename_type, make_typename_type,
1188 make_unbound_class_template, cxx_init_decl_processing,
1189 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1190 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1191 grok_op_properties, xref_tag, check_function_type): Adjust.
1192 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1193 add_builtin_candidate, add_builtin_candidates,
1194 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1195 is_subseq, compare_ics): Adjust.
1196 * method.c (use_thunk): Adjust.
1197 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1198 create_tinfo_types): Adjust.
1199 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1200 build_up_reference, convert_to_reference, convert_from_reference,
1201 ocp_convert, build_expr_type_conversion): Adjust.
1202 * tree.c (bind_template_template_parm, error_type): Adjust.
1203 * dump.c (cp_dump_tree): Adjust.
1204 * search.c (lookup_member): Adjust.
1205 * friend.c (make_friend_class, do_friend): Adjust.
1206 * typeck2.c (store_init_value, process_init_constructor_array,
1207 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1208 build_functional_cast): Adjust.
1209 * pt.c (finish_member_template_decl, process_template_parm,
1210 lookup_template_class, tsubst_function_type, tsubst,
1211 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1213 * semantics.c (begin_class_definition, finish_base_specifier,
1214 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1216 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1217 do_class_using_decl, lookup_qualified_name,
1218 maybe_process_template_type_declaration): Adjust.
1219 * decl2.c (grok_array_decl, check_member_template,
1220 constrain_class_visibility): Adjust.
1221 * parser.c (cp_parser_class_name): Adjust.
1223 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1225 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1227 2008-03-17 Jason Merrill <jason@redhat.com>
1230 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1231 a temp directly to a reference as per DR391.
1233 2008-03-12 Richard Guenther <rguenther@suse.de>
1237 2008-02-04 Richard Guenther <rguenther@suse.de>
1240 * decl.c (record_builtin_java_type): Make jboolean a
1241 integer type again where its mode doesn't match that of bool.
1243 2008-01-25 Richard Guenther <rguenther@suse.de>
1246 * decl.c (record_builtin_java_type): Make __java_boolean
1248 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1249 after TYPE_MAIN_VARIANT check.
1251 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1254 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1258 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1259 DECL_P in not a variable and appears more than once error messages.
1261 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1265 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1269 * typeck.c (structural_comptypes): Call cp_comptypes.
1270 (comptypes): New; called from the C/C++ common bits to perform
1272 (cp_comptypes): Renamed from comptypes, which is already used,
1273 with a different signature, by the C++ front end.
1274 (build_reinterpret_cast_1): Call cp_comptypes.
1275 (ptr_reasonably_similar): Ditto.
1276 * decl.c (decls_match): Ditto.
1277 * cvt.c (convert_to_reference): Ditto.
1278 * cp-tree.h (same_type_p): Ditto.
1279 (same_or_base_type_p): Ditto.
1280 (comptypes): Rename to cp_comptypes.
1281 * pt.c (canonical_type_parameter): Call cp_comptypes.
1283 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1285 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1286 test for equivalence between pointer and references.
1288 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1291 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1292 (check_field_decls): Likewise.
1293 (note_name_declared_in_class): Likewise.
1294 * call.c (build_new_op): Likewise.
1295 (convert_like_real): Likewise.
1296 (build_over_call): Likewise.
1297 * lex.c (unqualified_fn_lookup_error): Likewise.
1298 * parser.c (cp_parser_template_id): Likewise.
1299 * cvt.c (warn_ref_binding): Likewise.
1300 (convert_to_reference): Likewise.
1301 (ocp_convert): Likewise.
1302 (convert_to_void): Use error instead of pedwarn.
1303 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1304 * decl.c (compute_array_index_type): Use constant_expression_error.
1306 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1308 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1309 that auto is either a storage class or a simple type specifier,
1310 depending on the dialect.
1311 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1312 specifier in C++98 mode, error in C++0x mode (since we don't
1313 support auto as a type specifier, yet).
1314 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1315 storage specifier in C++0x mode.
1316 (cp_parser_simple_type_specifier): Parse `auto' as a
1317 simple-type-specifier, but error because we don't support it yet.
1319 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1321 * parser.c (cp_parser_nonclass_name): New.
1322 (cp_parser_pseudo_destructor_name): Use it instead of
1323 cp_parser_type_name.
1324 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1326 2008-02-29 Tom Tromey <tromey@redhat.com>
1328 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1329 (cp_lexer_get_preprocessor_token): Update.
1330 (cp_lexer_set_source_position_from_token): Don't call
1331 restore_input_file_stack.
1332 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1334 2008-02-28 Richard Guenther <rguenther@suse.de>
1337 2008-02-26 Richard Guenther <rguenther@suse.de>
1339 * decl.c (duplicate_decls): Remove decl from global mapping
1340 before ggc_freeing it.
1342 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1345 * rtti.c: Include c-pragma.h.
1346 (push_abi_namespace, pop_abi_namespace): New functions.
1347 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1348 create_tinfo_types, emit_support_tinfos): Use them.
1349 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1351 2008-02-26 Jason Merrill <jason@redhat.com>
1354 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1355 to name the struct for linkage purposes even if it has attributes.
1356 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1358 2008-02-26 Tom Tromey <tromey@redhat.com>
1360 * parser.c (eof_token): Remove old location code.
1361 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1362 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1364 (cp_write_global_declarations): Likewise.
1365 * lex.c (cxx_init): Remove old location code.
1366 (handle_pragma_implementation): Remove test of
1367 USE_MAPPED_LOCATION.
1368 * pt.c (tsubst): Remove old location code.
1369 * error.c (cp_print_error_function): Remove test of
1370 USE_MAPPED_LOCATION.
1371 * decl.c (pop_label): Remove old location code.
1372 (finish_function): Likewise.
1374 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1377 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1379 2008-02-26 Richard Guenther <rguenther@suse.de>
1381 * decl.c (duplicate_decls): Remove decl from global mapping
1382 before ggc_freeing it.
1384 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1387 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1389 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1391 * typeck.c (build_class_member_access_expr): Add appropriate
1392 OPT_W* parameter to warning.
1393 (build_reinterpret_cast_1): Likewise.
1394 * name-lookup.c (push_overloaded_decl): Likewise.
1396 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1399 * error.c (dump_expr): Handle CONJ_EXPR.
1401 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1404 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1405 (dump_expr): Handle FIXED_CST.
1407 2008-02-24 Jason Merrill <jason@redhat.com>
1409 * parser.c (cp_parser_declaration): Handle "inline namespace".
1410 (cp_parser_namespace_definition): Likewise.
1413 * name-lookup.c (arg_assoc_namespace): Look down into inline
1416 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1418 * typeck.c (check_for_casting_away_constness): Use 1 single
1419 argument, the type of cast, to decide what diagnostics generate.
1420 (build_static_cast_1): Remove unused code. Update call to
1421 check_for_casting_away_constness.
1422 (build_reinterpret_cast_1): Update call to
1423 check_for_casting_away_constness.
1424 (build_const_cast_1): Likewise.
1426 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1428 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1429 VEC_NEW_EXPR), forward to pp_expression.
1430 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1432 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1435 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1437 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1440 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1441 template decls' function decl.
1443 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1447 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1450 * pt.c (determine_specialization): In case of function templates,
1451 when the type of DECL does not match FN there is no match.
1453 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1456 * typeck.c (build_binary_op): Warn about floating point
1457 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1459 2008-02-19 Jason Merrill <jason@redhat.com>
1462 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1463 while we look for possible bindings.
1465 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1468 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1472 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1473 vars. Afterwards ensure v is VAR_DECL.
1476 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1477 call cp_finish_decl.
1478 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1481 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1486 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1487 is error_mark_node, return an error early.
1488 (find_parameter_packs_r): Pass the pointer set along to recursive
1489 calls of cp_walk_subtrees; don't try to manage the pointer set
1491 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1492 (make_pack_expansion): Ditto.
1493 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1494 a second pass through the tree with find_parameter_packs_r; that
1495 second pass no longer does anything.
1496 (push_template_decl_real): If we have an erroneous declaration,
1497 set its type to error_mark_node before returning an error.
1499 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1502 * pt.c (tsubst_initializer_list): Deal with the use of
1503 VOID_TYPE_NODE to indicate value-initialization of the bases.
1505 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1506 Jason Merrill <jason@redhat.com>
1510 * class.c (type_has_user_nondefault_constructor): New fn.
1511 * cp-tree.h: Declare it.
1512 * init.c (emit_mem_initializers): Use it for -W warning about
1513 missing base initializer.
1515 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1518 * pt.c (determine_specialization): In case of function templates,
1519 when the type of DECL does not match FN there is no match.
1521 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1522 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1525 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1526 are not identifier :: ~, return before calling cp_parser_type_name.
1528 2008-02-13 Jason Merrill <jason@redhat.com>
1530 PR c++/34962, c++/34937, c++/34939
1531 * decl2.c (is_late_template_attribute): Always defer attributes
1532 vector_size and weak.
1535 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1536 of enumerators, too.
1538 2008-02-12 Jason Merrill <jason@redhat.com>
1541 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1542 if we're doing conversions to call a user-defined conversion function.
1544 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1547 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1550 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1553 * init.c (build_new_1): Don't create placement_expr before
1554 constructing alloc_call. Verify that the pointer is passed by
1555 value to operator new.
1557 2008-02-11 Jason Merrill <jason@redhat.com>
1560 * pt.c (tsubst): Don't look up a template typedef in an explicit
1563 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1566 * tree.c (cp_build_qualified_type_real): When building a
1567 cv-qualified array type, build it as a unique type with
1568 build_cplus_array_type_1 and then adopt the unqualified type's
1571 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1574 * decl.c (groktypename): Check grokdeclarator return.
1576 2008-02-10 Jason Merrill <jason@redhat.com>
1579 * decl2.c (cp_write_global_declarations): Don't write out static
1580 data members with DECL_IN_AGGR_P set.
1582 2008-02-08 Jason Merrill <jason@redhat.com>
1585 * tree.c (build_target_expr_with_type): Handle void initializer.
1586 (bot_manip): Remap slot before recursing.
1588 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1591 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1593 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1596 * tree.c: Include tree-flow.h.
1597 (build_target_expr): Check type compatibility.
1598 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1599 * call.c (convert_like_real): Convert bitfield to expected type.
1601 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1605 * typeck.c (structural_comptypes): Call cp_comptypes.
1606 (comptypes): New; called from the C/C++ common bits to perform
1608 (cp_comptypes): Renamed from comptypes, which is already used,
1609 with a different signature, by the C++ front end.
1610 (build_reinterpret_cast_1): Call cp_comptypes.
1611 (ptr_reasonably_similar): Ditto.
1612 * decl.c (decls_match): Ditto.
1613 * cvt.c (convert_to_reference): Ditto.
1614 * cp-tree.h (same_type_p): Ditto.
1615 (same_or_base_type_p): Ditto.
1616 (comptypes): Rename to cp_comptypes.
1617 * pt.c (canonical_type_parameter): Call cp_comptypes.
1619 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1622 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1623 value dependent expression.
1625 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1628 * decl2.c (save_template_attributes): When we're modifying the
1629 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1630 all of the other variants to add those same attributes. Otherwise,
1631 the main variant will be inconsistent with those other variants.
1633 2008-02-04 Richard Guenther <rguenther@suse.de>
1636 * decl.c (record_builtin_java_type): Make jboolean a
1637 integer type again where its mode doesn't match that of bool.
1639 2008-02-02 Jason Merrill <jason@redhat.com>
1640 Mark Mitchell <mark@codesourcery.com>
1643 * init.c (build_value_init_1): New function.
1644 (build_value_init): New function.
1645 * typeck2.c (build_functional_cast): Call it.
1646 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1648 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1649 TYPE_HAS_CONSTRUCTOR.
1650 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1651 add_implicitly_declared_members): Adjust.
1652 (check_field_decls): Adjust. Remove warnings about reference/const
1653 in class without constructor.
1654 (check_bases_and_members): Adjust. Give those warnings here instead.
1655 * decl.c (fixup_anonymous_aggr): Adjust.
1656 (check_initializer): Adjust, clarify logic slightly.
1657 (grok_special_member_properties): Adjust, only set if user-provided.
1658 * rtti.c (create_tinfo_types): Don't set.
1659 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1660 Use same_type_ignoring_top_level_qualifiers_p.
1661 * pt.c (check_explicit_specialization): Adjust.
1662 (instantiate_class_template): Adjust.
1664 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1665 Jakub Jelinek <jakub@redhat.com>
1669 * typeck.c (structural_comptypes): Handle comparisons of
1670 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1672 * mangle.c (write_builtin_type): Map down to the canonical type,
1673 which will be one of the predefined type nodes.
1675 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1678 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1679 bits to allow for expansion of the number of middle end tree
1682 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1693 * typeck.c (check_return_expr): Tweak call to
1694 check_for_bare_parameter_packs.
1695 * class.c (add_method): Be careful with error_mark_nodes.
1696 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1698 * pt.c (struct find_parameter_pack_data): Remove
1700 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1701 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1702 (make_pack_expansion): Ditto.
1703 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1705 (process_template_parm): Tweak call to
1706 check_for_bare_parameter_packs.
1707 (push_template_decl_real): Tweak calls to
1708 check_for_bare_parameter_packs. If bare parameter packs are found
1709 in the list of exceptions, clear out that list after giving an
1711 * semantics.c (finish_cond): Tweak call to
1712 check_for_bare_parameter_packs.
1713 (finish_expr_stmt): Ditto.
1714 (finish_for_expr): Ditto.
1715 (finish_switch_cond): Ditto.
1716 (finish_mem_initializers): Ditto.
1717 (finish_member_declaration): Ditto.
1718 (finish_static_assert): Check for bare parameter packs in the
1720 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1721 attributes of a declaration.
1722 * parser.c (cp_parser_using_declaration): Tweak call to
1723 check_for_bare_parameter_packs.
1724 (cp_parser_base_clause): Ditto.
1726 2008-01-28 Jason Merrill <jason@redhat.com>
1729 * class.c (build_base_path): Fix !want_pointer case.
1731 2008-01-27 Jason Merrill <jason@redhat.com>
1734 * class.c (build_base_path): Fix previous change.
1736 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1739 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1742 2008-01-26 Richard Guenther <rguenther@suse.de>
1745 * typeck.c (build_binary_op): Remove code to shorten compares.
1747 2008-01-25 Richard Guenther <rguenther@suse.de>
1750 * decl.c (record_builtin_java_type): Make __java_boolean
1752 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1753 after TYPE_MAIN_VARIANT check.
1755 2008-01-25 Jason Merrill <jason@redhat.com>
1758 * class.c (build_base_path): Don't mess with virtual access if
1760 * call.c (standard_conversion): Don't check whether source type
1763 * decl2.c (is_late_template_attribute): Don't defer attribute
1764 visibility just because the type is dependent.
1766 2008-01-25 Jason Merrill <jason@redhat.com>
1767 Mark Mitchell <mark@codesourcery.com>
1770 * call.c (standard_conversion): Allow conversion from integer/real
1772 (compare_ics): Such a conversion is worse than a normal arithmetic
1775 2008-01-25 Richard Guenther <rguenther@suse.de>
1778 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1781 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1784 * pt.c (push_template_decl_real): Return error_mark_node in case
1785 of template definition of non-template.
1787 2008-01-24 Jason Merrill <jason@redhat.com>
1790 * decl2.c (is_late_template_attribute): Defer any attribute with
1791 dependent args. Also defer type attributes if the type is dependent.
1793 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1794 Alexandre Oliva <aoliva@redhat.com>
1797 * call.c (reference_binding): For bitfields use the declared bitfield
1799 (add_builtin_candidates): Likewise.
1800 * class.c (layout_class_type): For bitfields copy over the
1801 original type quals.
1803 2008-01-22 Jason Merrill <jason@redhat.com>
1806 * decl.c (groktypename): Also ignore attributes on dependent
1807 possibly-class types.
1810 * friend.c (do_friend): Check for prior declaration of a friend
1811 function of a local class.
1812 * name-lookup.c (lookup_name_innermost_nonclass_level):
1814 * name-lookup.h: Declare it.
1816 2008-01-22 Tom Tromey <tromey@redhat.com>
1819 * init.c (build_new_1): Only disallow Java aggregates.
1821 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1824 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1825 if decl or init is error_mark_node.
1828 * error.c (dump_expr): Handle VECTOR_CST.
1830 2008-01-21 Jason Merrill <jason@redhat.com>
1833 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1836 * pt.c (retrieve_local_specialization): Robustify.
1837 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1840 * pt.c (tsubst): Only call retrieve_local_specialization if the
1841 original typedef was in a function template.
1844 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1846 2008-01-21 Richard Guenther <rguenther@suse.de>
1849 * error.c (cp_print_error_function): Deal with recursive
1852 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1855 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1857 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1861 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1862 on non-IS_AGGR_TYPE scope.
1863 (constructor_name_p): Assert IS_AGGR_TYPE.
1865 2008-01-18 Ian Lance Taylor <iant@google.com>
1868 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1869 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1870 DECL_IS_OPERATOR_NEW flag.
1872 2008-01-16 Richard Guenther <rguenther@suse.de>
1875 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1876 for conversions to type variants.
1878 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1880 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1881 declaration and code. Update copyright year.
1883 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1886 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1887 know we have a class type.
1889 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1892 * pt.c (coerce_template_parameter_pack): When substituting into
1893 the type of a non-type template parameter pack. use the
1894 deduced/substituted arguments.
1895 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1896 can be a parameter pack with the ellipsis following it. When we
1897 have an erroneous declaration, allow it to be a parameter pack.
1898 (cp_parser_template_parameter): Complain about default
1899 arguments on non-type template parameter packs, and parse them
1900 using the new cp_parser_default_argument.
1901 (cp_parser_parameter_declaration): Complain about parameter packs
1902 with default arguments. Move parsing of default arguments into a
1903 new function, cp_parser_default_argument.
1904 (cp_parser_default_argument): New; extracted from
1905 cp_parser_parameter_declaration.
1907 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1913 * typeck.c (check_return_expr): If there are bare parameter packs
1914 in the return value, set it to error_mark_node.
1915 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1916 * pt.c (find_parameter_packs_r): Look at the type of
1917 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1918 (check_for_bare_parameter_packs): Flip the result: now returns
1919 TRUE when there were bare parameter packs, FALSE otherwise.
1920 (push_template_decl_real): Deal with flipped result of
1921 check_for_bare_parameter_packs.
1922 * semantics.c (finish_cond): If there are bare parameter packs in
1923 the conditional, set it to error_mark_node.
1924 (finish_expr_stmt): If there are bare parameter packs in the
1925 expression, set it to error_mark_node.
1926 (finish_for_expr): Ditto.
1927 (finish_switch_cond): If there are bare parameter packs in
1928 the conditional, set it to error_mark_node.
1929 (finish_mem_initializers): If there are bare parameter packs in
1930 the member initializer, set it to error_mark_node.
1931 (finish_member_declaration): Check the attributes of the
1932 declaration for bare parameter packs, and remove the attributes if
1933 any have bare parameter packs.
1934 * parser.c (cp_parser_using_declaration): Check the using
1935 declaration for bare parameter packs.
1936 (cp_parser_base_clause): If there are bare parameter packs in a
1937 base specifier, don't add it to the chain.
1939 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1942 * error.c (dump_simple_decl): Display ellipsis for template
1943 non-type parameter packs.
1944 (dump_decl): Display ellipsis for template type parameter packs.
1945 (dump_template_decl): Display ellipsis for template template
1947 * pt.c (redeclare_class_template): When redeclaring a class
1948 template, check for collisions between template parameters and
1949 template parameter packs.
1951 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1954 * pt.c (process_partial_specialization): Don't mark template
1955 parameters that occur in non-deduced contexts.
1956 (struct pair_fn_data): Add include_nondeduced_p.
1957 (for_each_template_parm_r): Only visit non-deduced contexts if
1958 include_nondeduced_p is set.
1959 (for_each_template_parm): Added parameter include_nondeduced_p,
1960 which states whether template parameters found in non-deduced
1961 contexts should be visited.
1962 (uses_template_parms): Visit all template parameters, even those
1963 in non-deduced contexts.
1965 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1968 * pt.c (check_default_tmpl_args): Check for parameter packs that
1969 aren't at the end of a primary template.
1970 (push_template_decl_real): Remove check for parameter packs that
1971 aren't at the end of a primary template; that now happens in
1972 check_default_tmpl_args.
1973 * semantics.c (finish_template_template_parm): Use
1974 check_default_tmpl_args to check for errors in the template
1977 2008-01-12 Doug Kwan <dougkwan@google.com>
1979 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1980 instead of OPT_Wreturn_type in warning due to ignored return type
1982 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1983 instead of OPT_Wreturn_type in warning due to ignored return type
1986 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1989 * semantics.c (finish_omp_for): Don't call
1990 fold_build_cleanup_point_expr if processing_template_decl.
1992 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1993 Jakub Jelinek <jakub@redhat.com>
1996 * error.c (dump_template_argument): Deal with TREE_LIST.
1998 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2000 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2001 long" in C++0x mode; change the warning to note that "long long"
2002 is only unsupported in C++98 mode.
2004 2007-12-20 Jason Merrill <jason@redhat.com>
2007 * call.c (standard_conversion): Derived-to-base is considered a
2008 standard conversion.
2010 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2013 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2014 call cp_parser_statement rather than
2015 cp_parser_already_scoped_statement.
2017 2007-12-18 Jason Merrill <jason@redhat.com>
2020 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2022 (dependent_type_p_r): Handle the domain of an array.
2024 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2025 Jakub Jelinek <jakub@redhat.com>
2030 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2031 bindings of template template parameters after all template
2032 arguments have been deduced.
2033 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2035 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2036 (unify): Deal with variadic, bound template template parameters.
2037 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2039 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2042 * decl.c (grokdeclarator): Reject friend sfk_constructor
2045 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2048 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2051 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2054 * cp-lang.c (cp_classify_record): New.
2055 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2057 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2060 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2063 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2064 dynamic_cast in a template.
2066 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2069 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2070 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2072 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2075 * error.c (dump_type_prefix, dump_type_suffix): Handle
2076 TYPE_PACK_EXPANSION.
2079 * error.c (dump_expr): Handle ABS_EXPR.
2081 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2085 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2086 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2087 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2088 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2089 flag_use_repository and repo_emit_p returned 2.
2091 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2094 * tree.c (stabilize_call, stabilize_init): Do nothing if
2095 processing_template_decl.
2097 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2100 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2101 error instead of assertion failure.
2102 * parser.c (cp_parser_decltype): If closing paren is not found,
2103 return error_mark_node.
2105 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2108 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2110 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2111 since arg_assoc_template_arg will deal with them (better).
2113 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2116 * pt.c (tsubst_exception_specification): Handle substitutions into
2117 member templates, where tsubst_pack_expansion returns a
2118 TYPE_PACK_EXPANSION.
2120 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2123 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2124 bindings for the template parameter pack, don't try to keep the
2125 empty deduced arguments.
2126 (unify): If a parameter is a template-id whose template argument
2127 list contains a pack expansion that is not at the end, then we
2128 cannot unify against that template-id.
2130 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2133 * pt.c (current_template_args): Use error_operand_p.
2135 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2138 * error.c (dump_decl): Handle TREE_BINFO.
2140 2007-12-01 Ollie Wild <aaw@google.com>
2143 * typeck.c (build_binary_op): Add conversion of pointers to function
2144 members appearing as operands to the equality operators.
2146 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2149 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2151 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2154 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2156 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2161 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2163 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2166 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2168 PR tree-optimization/34181
2169 * method.c (use_thunk): Don't inline the call in the thunk.
2172 * tree.c (decl_linkage): Static data members and static member
2173 functions in anonymous ns classes are lk_external.
2175 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2178 * decl.c (start_preparsed_function): Pass
2179 processing_template_decl for the new allocate_struct_function
2182 2007-11-25 Richard Guenther <rguenther@suse.de>
2184 * decl.c (poplevel): Use BLOCK_CHAIN.
2186 2007-11-24 Ollie Wild <aaw@google.com>
2188 * typeck.c (delta_from_ptrmemfunc): New function.
2189 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2190 (build_binary_op): Call delta_from_ptrmemfunc.
2192 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2196 * decl.c (cp_finish_decl): Disallow variable or field
2197 definitions if extern "Java" aggregates.
2198 (grokparms): Disallow parameters with extern "Java"
2200 (check_function_type): Disallow function return values
2201 with extern "Java" aggregates.
2202 * init.c (build_new_1): Disallow placement new with
2203 extern "Java" aggregates.
2205 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2206 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2209 * call.c (convert_like_real): Build a zero constant when __null is
2210 converted to an integer type.
2212 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2215 * decl2.c (cp_write_global_declarations): Issue error about static
2216 data members in anonymous namespace which are declared and used,
2219 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2222 * parser.c (cp_parser_class_head): Reject function template ids.
2225 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2226 when processing_template_decl to build_array_type.
2229 * pt.c (more_specialized_fn): Don't segfault if one or
2230 both argument list end with ellipsis.
2232 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2235 * semantics.c (finish_call_expr): Set
2236 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2237 or OVERLOAD with all noreturn functions.
2239 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2242 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2245 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2252 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2253 set to error_mark_node the outermost POINTER_TYPE to the pack if
2254 it is seen in a POINTER_TYPE.
2255 (push_template_decl_real): If check_for_bare_parameter_packs
2256 fails for function return type, set the return type to
2257 integer_type_node. If check_for_bare_parameter_packs failed
2258 for non-function, return error_mark_node.
2261 * call.c (build_new_op): Call resolve_args before calling
2264 2007-11-11 Tom Tromey <tromey@redhat.com>
2267 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2269 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2272 * pt.c (redeclare_class_template): Update error message. Use a
2273 note to show the previous declaration.
2274 (tsubst_friend_class): Use the location of the friend template as
2275 the input location before calling redeclare_class_template.
2277 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2280 * semantics.c (finish_pseudo_destructor_expr): Handle
2281 object == error_mark_node.
2283 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2286 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2287 is not scalar type, let finish_class_member_access_expr handle
2288 diagnostics. Pass BIT_NOT_EXPR argument to
2289 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2291 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2294 * decl.c (cp_complete_array_type): If any of the initializer
2295 elements are pack expansions, don't compute the array size yet.
2297 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2300 * tree.c (decl_linkage): Fields have no linkage.
2302 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2304 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2306 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2311 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2312 Be careful with ERROR_MARK_NODEs.
2313 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2316 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2319 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2322 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2326 * tree.c (c_build_qualified_type): Define bridge to
2327 cp_build_qualified_type.
2329 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2340 * typeck.c (check_return_expr): Pass address of retval to
2341 check_for_bare_parameter_packs.
2342 * class.c (build_base_field): Tolerate bases that have no layout
2344 (end_of_base): Ditto.
2345 * tree.c (canonical_type_variant): Be careful with
2347 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2349 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2350 which states whether parameter packs should be replaced with
2352 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2353 possible. If set_packs_to_error is set true, replace the parameter
2354 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2355 (uses_parameter_packs): Don't set parameter packs to
2357 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2358 which may be modified (if it is a parameter pack). Instructs
2359 find_parameter_packs_r to replace parameter packs with
2360 ERROR_MARK_NODE (so that they won't cause errors later on).
2361 (process_template_parm): Pass pointer to
2362 check_for_bare_parameter_packs.
2363 (process_partial_specialization): Replace pack expansions before
2364 the end of the template argument list with ERROR_MARK_NODE.
2365 (push_template_decl_real): Pass pointer to
2366 check_for_bare_parameter_packs. Replace parameter packs not at the
2367 end of the template parameter list with ERROR_MARK_NODE.
2368 (convert_template_argument): Be more careful about using DECL_NAME
2369 on only declarations.
2370 (unify): Can't unify against ERROR_MARK_NODE.
2371 * semantics.c (finish_cond): Pass pointer to
2372 check_for_bare_parameter_packs.
2373 (finish_expr_stmt): Ditto.
2374 (finish_for_expr): Ditto.
2375 (finish_switch_cond): Pass pointer to
2376 check_for_bare_parameter_packs, and call it before we put the
2377 condition into the statement.
2378 (finish_mem_initializers): Pass pointer to
2379 check_for_bare_parameter_packs.
2380 (finish_member_declaration): Ditto.
2381 * parser.c (cp_parser_base_clause): Ditto.
2383 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2386 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2387 with the final TREE_READONLY flag in place. processing_template_decl
2388 is known to be 0 in this part of function.
2391 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2392 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2393 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2394 * semantics.c (finish_omp_atomic): Revert most of the
2395 2007-02-05 changes, just keep the new representation of
2396 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2398 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2401 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2404 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2409 * typeck.c (merge_types): Don't lose rvalue references when
2411 * call.c (build_over_call): Don't elide move constructors just
2412 because the copy constructor is trivial (!).
2413 (compare_ics): If comparing cv-qualifiers fails, we can still order
2414 based on binding lvalues vs. rvalues.
2416 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2419 * pt.c (unify_pack_expansion): bring handling of function call
2420 arguments into line with type_unification_real.
2422 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2424 * typeck.c (build_binary_op): Use pedwarn instead of error for
2427 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2430 * parser.c (cp_parser_unary_expression): For &&label call
2431 cp_parser_non_integral_constant_expression and return error_mark_node
2432 if it returned true.
2435 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2436 is neither FUNCTION_TYPE nor METHOD_TYPE.
2438 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2441 * parser.c (cp_parser_nested_name_specifier_opt): Use
2442 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2443 typedef of currently open class.
2445 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2448 * error.c (dump_expr): Deal specially with statements.
2450 2007-11-01 Jason Merrill <jason@redhat.com>
2453 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2455 (lookup_template_class): Use it to get the outer template args
2456 for instantiating one.
2459 * pt.c (reduce_template_parm_level): tsubst the parameters
2460 of a template template parm.
2462 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2465 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2467 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2470 * parser.c (cp_parser_postfix_dot_deref_expression): If
2471 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2472 first and if that succeeds and type is SCALAR_TYPE_P, create
2476 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2477 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2478 as for std::type_info.
2480 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2483 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2484 pp_cxx_delete_expression): Change to static linkage.
2485 * cxx-pretty-print.h: Adjust declarations.
2486 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2487 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2488 MODOP_EXPR): Forward to pp_expression.
2490 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2493 2007-10-31 Christian Bruel <christian.bruel@st.com>
2494 Mark Mitchell <mark@codesourcery.com>
2497 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2498 if retval is volatile.
2500 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2503 * decl2.c (build_offset_ref_call_from_tree): Call
2504 build_non_dependent_expr on object prior to building ADDR_EXPR from it
2505 if FN is DOTSTAR_EXPR.
2507 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2511 * pt.c (find_parameter_packs_r): Fix typo in comment.
2512 (convert_template_argument): Look at the pattern of a pack
2513 expansion to determine what kind of entity we're converting.
2514 (coerce_template_parameter_pack): When we have coerced a non-type
2515 template parameter pack, substitute into the type of that pack.
2516 (tsubst_pack_expansion): When our substitution of a parameter pack
2517 is a "trivial" substitution of itself, just substitute into the
2518 pack expansion rather than actually expanding.
2520 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2523 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2524 for non-integral type bitfields. Return true if bitfield is correct, false
2525 error has been diagnosed.
2526 (check_field_decls): If check_bitfield_decl returned false, call also
2529 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2530 Mark Mitchell <mark@codesourcery.com>
2533 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2534 class member error out and return.
2536 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2538 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2539 to current_function_decl rather than 0.
2542 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2544 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2546 2007-10-27 Jason Merrill <jason@redhat.com>
2549 * call.c (convert_default_arg): Detect recursion.
2551 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2554 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2555 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2557 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2559 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2561 2007-10-26 Jason Merrill <jason@redhat.com>
2564 * pt.c (get_template_info): New fn.
2565 (template_class_depth): Use it.
2566 (push_template_decl_real): Check that the template args of the
2567 definition match the args of the previous declaration.
2569 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2572 * decl2.c (coerce_new_type): Do not allow a default argument for
2573 the first parameter.
2575 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2578 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2579 don't see the leading '('. Only lookup names if we get an
2582 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2585 * parser.c (cp_parser_parenthesized_expression_list): Set
2586 greater_than_is_operator_p to true in between the parens.
2588 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2591 * decl.c (grokdeclarator): In case of conflicting specifiers
2592 just return error_mark_node.
2594 2007-10-26 Ollie Wild <aaw@google.com>
2596 * expr.c (cxx_expand_expr): Removed.
2597 * cp-tree.h (exx_expand_expr): Removed.
2598 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2601 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2604 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2606 2007-10-23 Jason Merrill <jason@redhat.com>
2608 PR c++/25950 (DR 391)
2609 * call.c (struct conversion): Remove check_copy_constructor_p.
2610 (reference_binding): Always bind a reference directly to a
2611 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2613 (check_constructor_callable): Remove.
2614 (convert_like_real): Don't call it.
2615 (initialize_reference): Don't call check_constructor_callable.
2616 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2617 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2618 conversions if LOOKUP_NO_TEMP_BIND.
2619 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2620 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2622 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2624 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2627 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2628 before checking if its type is integral.
2630 2007-10-22 Jason Merrill <jason@redhat.com>
2633 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2634 * pt.c (apply_late_template_attributes): Splice out dependent
2635 attributes from DECL_ATTRIBUTES.
2637 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2639 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2641 * typeck.c (build_binary_op) : Use appropriate warning option
2642 instead of unnamed warning.
2644 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2647 * pt.c (current_template_args): Do not change TREE_LIST elements
2648 with a TREE_VALUE of error_mark_node.
2650 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2652 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2653 * decl.c (start_decl): Tidy.
2654 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2656 (grokdeclarator): Clarify comment.
2658 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2661 * decl.c (grokfndecl): Return NULL after the "definition of
2662 implicitly-declared" error happened.
2664 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2667 * call.c (build_user_type_conversion_1): Do not consider conversion
2668 functions to convert a (possibly cv-qualified) object to the (possibly
2669 cv-qualified) same object type (or a reference to it), to a (possibly
2670 cv-qualified) base class of that type (or a reference to it).
2672 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2674 * pt.c (tsubst): Use template_parm_level_and_index.
2676 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2679 * parser.c (cp_parser_compound_statement): Handle label-declarations
2680 at the beginning of the compound statement.
2681 (cp_parser_block_declaration): Issue diagnostics about __label__
2682 not at the beginning of a block.
2684 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2687 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2688 to convert_template_argument.
2689 (coerce_template_parms): Return error_mark_node after fixed-length
2691 (tsubst_decl): Check for error_mark_node the return value of the
2692 first tsubst in 'case VAR_DECL'.
2694 2007-10-08 Ollie Wild <aaw@google.com>
2696 * typeck2.c (digest_init): Call cplus_expand_constant after
2697 convert_for_initialization.
2698 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2699 * expr.c (cplus_expand_constant): Updated function description.
2701 2007-10-04 Jason Merrill <jason@redhat.com>
2704 * call.c (initialize_reference): Handle local static reference
2707 2007-10-03 Jason Merrill <jason@redhat.com>
2710 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2711 (push_namespace): Here.
2712 (handle_namespace_attrs): New fn for the attr code.
2713 (leave_scope): Don't pop_visibility.
2714 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2715 * parser.c (cp_parser_namespace_definition): Call
2716 handle_namespace_attrs and pop_visibility as appropriate.
2719 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2721 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2723 * decl.c (duplicate_decls): Preserve linkage flags for mere
2724 redeclarations of gnu_inline definitions.
2726 2007-10-03 Jason Merrill <jason@redhat.com>
2729 * decl.c (wrap_cleanups_r): New fn.
2730 (wrap_temporary_cleanups): New fn.
2731 (initialize_local_var): Call it.
2733 2007-09-29 Jason Merrill <jason@redhat.com>
2736 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2737 constant to not have DECL_EXTERNAL if it's file-local.
2739 2007-09-28 Ollie Wild <aaw@google.com>
2742 2007-09-27 Ollie Wild <aaw@google.com>
2744 * typeck2.c (digest_init): Call cplus_expand_constant after
2745 convert_for_initialization.
2746 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2747 * expr.c (cplus_expand_constant): Updated function description.
2749 2007-09-28 Jason Merrill <jason@redhat.com>
2752 * class.c (layout_empty_base): Take rli parameter, update
2753 rli->record_align if empty base has user-specified alignment.
2754 (build_base_field): Pass rli to it.
2756 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2759 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2761 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2764 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2765 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2766 (dump_parameters): Just call dump_type for argument packs too.
2768 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2771 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2772 qualification by creating qualified PACK_EXPANSION_PATTERN and
2773 then calling make_pack_expansion on it.
2775 2007-09-27 Ollie Wild <aaw@google.com>
2777 * typeck2.c (digest_init): Call cplus_expand_constant after
2778 convert_for_initialization.
2779 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2780 * expr.c (cplus_expand_constant): Updated function description.
2782 2007-09-27 Jason Merrill <jason@redhat.com>
2785 * decl2.c (is_late_template_attribute): Don't crash on unknown
2788 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2791 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2792 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2793 spaces in the formatting.
2794 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2796 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2798 * error.c (cxx_print_error_function): Add third argument, pass
2799 it over to lhd_print_error_function.
2800 (cp_print_error_function): If diagnostic->abstract_origin, print
2802 * cp-tree.h (struct diagnostic_info): New forward decl.
2803 (cxx_print_error_function): Add third argument.
2805 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2808 * name-lookup.c (pushtag): Do not create an implicit typedef before
2809 the associated type declaration is known to be valid.
2811 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2813 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2814 rather than pointers.
2816 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2819 * search.c (check_final_overrider): Fail if
2820 targetm.comp_type_attributes returns 0.
2822 2007-09-24 Jason Merrill <jason@redhat.com>
2825 * pt.c (resolve_typename_type): Don't look things up in the original
2826 template if it would mean losing template arguments.
2828 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2831 * cp-tree.h (cxx_type_hash_eq): New prototype.
2832 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2833 * tree.c (cxx_type_hash_eq): New function.
2835 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2838 * tree.c (cp_build_qualified_type_real): Build a canonical
2839 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2841 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2845 * tree.c (cplus_array_compare): Compare pointers, not types.
2846 (build_cplus_array_type_1): Store new array type into the hash
2847 table before building the canonical type; build the canonical type
2849 (cp_build_qualified_type_real): Put all of the array types with
2850 cv-qualified element types into the C++ array hash table, built as
2851 variants of the unqualified versions.
2853 2007-09-23 Jason Merrill <jason@redhat.com>
2856 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2857 for deprecation warnings.
2859 2007-09-22 Jason Merrill <jason@redhat.com>
2862 * call.c (build_over_call): Warn about deprecated virtuals.
2865 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2866 (MAYBE_TAGGED_TYPE_P): Remove.
2867 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2868 instead of calling is_late_template_attribute again.
2869 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2870 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2871 Don't crash on typedefs from non-template classes.
2872 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2873 (is_late_template_attribute): All attributes applied to template
2874 parms or typename types are dependent. Static.
2875 (splice_template_attributes): Pass decl through.
2876 (save_template_attributes): Likewise.
2878 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2881 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2882 returned from tsubst_pack_expansion.
2883 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2884 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2886 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2889 * semantics.c (finish_id_expression): Use consistently
2890 context_for_name_lookup.
2891 * decl.c (fixup_anonymous_aggr): Fix error message for
2892 anonymous struct (vs union).
2894 2007-09-19 Jason Merrill <jason@redhat.com>
2897 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2898 (retrieve_specialization): Only tagged types use
2899 DECL_TEMPLATE_INSTANTIATIONS.
2900 (instantiate_class_template): Push nested classes too.
2901 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2903 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2904 * init.c (is_aggr_type): Remove redundant tests.
2905 * class.c (push_nested_class): Use CLASS_TYPE_P.
2907 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2910 * init.c (build_zero_init): If, recursively, build_zero_init
2911 returns a NULL_TREE, do not append it to the VEC of constructors.
2913 2007-09-18 Jason Merrill <jason@redhat.com>
2916 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2917 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2918 ATTR_FLAG_TYPE_IN_PLACE.
2919 (tsubst): Do unqualified lookup to find typedefs from current class.
2920 [ARRAY_TYPE]: Propagate alignment info.
2921 * decl2.c (is_late_template_attribute): Only defer handling of
2922 attribute aligned if the expression is dependent.
2923 (save_template_attributes): If we're deferring any attributes,
2924 make this a naming typedef.
2926 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2928 PR c++/33462 (again)
2929 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2930 va_arg instead of __builtin_va_arg.
2932 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2935 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2936 (pp_cxx_primary_expression): Use it.
2937 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2938 * error.c (dump_expr): Use it.
2940 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2943 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2944 out case TYPEID_EXPR to...
2945 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2946 and pp_cxx_right_paren.
2947 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2948 * error.c (dump_expr): Use it.
2950 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2953 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2954 (pp_cxx_primary_expression): Use it.
2955 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2956 * error.c (dump_expr): Use it.
2958 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2961 * init.c (build_new): Remove warning for zero-element
2964 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2967 * call.c (maybe_handle_implicit_object): Set this_p, clear
2968 rvaluedness_matches_p.
2969 (compare_ics): Do not compare rvaluedness matching when one of the
2970 operands is an implicit object.
2972 2007-09-14 Jason Merrill <jason@redhat.com>
2974 PR c++/17743, c++/19163
2975 * decl2.c (is_late_template_attribute): New fn.
2976 (splice_template_attributes, save_template_attributes): New fns.
2977 (cplus_decl_attributes): Call save_template_attributes.
2978 * pt.c (apply_late_template_attributes): New fn.
2979 (instantiate_class_template, tsubst_decl): Use it.
2980 * cp-tree.h: Declare is_late_template_attribute.
2982 2007-09-13 Tom Tromey <tromey@redhat.com>
2984 * parser.c (cp_lexer_new_main): Don't use
2985 c_lex_return_raw_strings.
2986 (cp_lexer_get_preprocessor_token): Update. Add special case when
2989 2007-09-11 Jan Hubicka <jh@suse.cz>
2991 * method.c (use_thunk): Use tree_rest_of_compilation
2992 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2993 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2994 * cp-tree.h (expand_body): Kill.
2995 (emit_associated_thunks): Declare.
2996 * semantics.c (emit_associated_thunks): Export.
2997 (expand_body): Kill.
2999 2007-09-09 David Daney <ddaney@avtrex.com>
3002 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3003 to calculate cookie_ptr.
3005 2007-09-08 Jason Merrill <jason@redhat.com>
3008 * pt.c (most_specialized_class): Set processing_template_decl
3009 while tsubsting partial spec args.
3011 2007-09-06 Jason Merrill <jason@redhat.com>
3013 * decl2.c (get_guard): Copy visibility from the guarded variable.
3015 2007-09-06 Jan Hubicka <jh@suse.cz>
3017 * semantics.c (expand_body): Do not mark arguments of clones used.
3019 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3022 * decl.c (cp_finish_decl): When processing_template_decl,
3023 deal correctly with init as TREE_LIST.
3025 2007-09-06 Tom Tromey <tromey@redhat.com>
3027 * decl.c (finish_function): Put return's location on line zero of
3030 2007-09-05 Jason Merrill <jason@redhat.com>
3033 * except.c (prepare_eh_type): Use type_decays_to.
3036 * init.c (build_delete): Use build_headof to get the address of the
3037 complete object if we aren't using the deleting destructor.
3038 * rtti.c (build_headof): No longer static.
3039 * cp-tree.h: Declare it.
3041 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3043 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3044 decl if a prototype for XX is provided with throw().
3047 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3048 on __*_chk non-__builtin_* decls.
3050 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3053 * semantics.c (finish_id_expression): Use context_for_name_lookup
3054 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3055 * class.c (finish_struct_anon): Deal correctly with anonymous
3056 structs (vs unions, as GNU extension) in error messages.
3058 2007-09-05 Jan Hubicka <jh@suse.cz>
3060 * sematics.c (expand_body): Remove unnecesary import_export_decl
3061 call, DECL_EXTERNAL checks and current_function_decl saving.
3063 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3065 PR c++/29731 (again)
3066 * parser.c (cp_parser_primary_expression): Return error_mark_node
3067 when a statement-expression is found in a template-argument list.
3069 2007-09-04 Jason Merrill <jason@redhat.com>
3071 * except.c (initialize_handler_parm): Use
3072 fold_build_cleanup_point_expr.
3075 * call.c (reference_binding): Don't look for user-defined conversions
3079 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3080 the MUST_NOT_THROW_EXPR.
3082 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3084 * decl.c (cp_finish_decl): Call determine_visibility before
3085 make_rtl_for_nonlocal_decl.
3087 2007-09-04 Jason Merrill <jason@redhat.com>
3090 * pt.c (most_specialized_class): Substitute outer template
3091 arguments into the arguments of a member template partial
3093 (strip_innermost_template_args): New fn.
3095 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3097 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3099 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3101 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3102 * decl.c (cp_make_fname_decl): Likewise,
3103 * parser.c (cp_parser_string_literal): Likewise,
3104 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3105 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3108 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3111 * typeck.c (build_unary_op): Fix error message for
3112 Boolean expression as operand to operator--.
3114 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3116 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3117 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3120 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3123 * init.c (build_default_init): Make extern.
3124 * cp-tree.h (build_default_init): Declare here.
3125 * pt.c (tsubst_expr): When the instantiation of the initializer of
3126 a variable results in an empty list, default-initialize the
3128 (tsubst_copy_and_build): When the instantiation of the initializer
3129 in a new expression results in an empty initializer list,
3130 default-initialize it.
3132 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3134 * mangle.c (write_type): Change mangling of rvalue reference from
3137 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3139 * decl.c (duplicate_decls): Remove duplicated line.
3141 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3144 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3145 BOUND_TEMPLATE_TEMPLATE_PARM.
3147 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3150 * search.c (lookup_member): Check the name argument for
3153 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3156 * parser.c (cp_parser_trait_expr): Check rerurn value of
3159 2007-08-30 Ollie Wild <aaw@google.com>
3161 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3162 convert_ptrmem for pointer to member conversions.
3163 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3164 (ocp_convert): Update cp_convert_to_pointer call.
3165 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3167 (build_static_cast_1): Check can_convert for conversions in either
3169 (get_delta_difference_1): New function.
3170 (get_delta_difference): Refactor to call get_delta_difference_1.
3172 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3174 * decl.c (start_preparsed_function): Set
3175 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3177 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3180 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3181 BOUND_TEMPLATE_TEMPLATE_PARM.
3183 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3187 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3188 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3190 2007-08-27 Jason Merrill <jason@redhat.com>
3193 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3194 Look inside STMT_EXPR.
3195 * semantics.c (stmt_expr_value_expr): New fn.
3196 * cp-tree.h: Declare it.
3199 * decl.c (groktypename): Ignore attributes applied to class type.
3201 2007-08-28 Richard Guenther <rguenther@suse.de>
3203 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3205 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3207 * error.c (dump_expr): Handle COMPLEX_CST.
3208 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3209 (pp_cxx_expression): Likewise.
3211 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3213 * decl.c (GNU_INLINE_P): New.
3214 (duplicate_decls): Handle gnu_inline. Merge attributes and
3215 some flags in overriding definitions.
3216 (redeclaration_error_message): Handle gnu_inline.
3217 (start_preparsed_function): Likewise.
3219 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3221 * call.c (sufficient_parms_p): Constify.
3222 * class.c (same_signature_p): Likewise.
3223 * cp-gimplify.c (is_invisiref_parm,
3224 cxx_omp_privatize_by_reference): Likewise.
3225 * cp-objcp-common.c (has_c_linkage): Likewise.
3226 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3227 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3228 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3229 num_artificial_parms_for, comp_template_parms,
3230 template_parameter_pack_p, any_dependent_template_arguments_p,
3231 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3232 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3233 zero_init_p, member_p, cp_lvalue_kind,
3234 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3235 varargs_function_p, is_dummy_object, special_function_kind,
3236 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3237 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3238 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3239 cp_has_mutable_p, at_least_as_qualified_p,
3240 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3241 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3242 * except.c (nothrow_libfn_p): Likewise.
3243 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3245 * pt.c (comp_template_parms, template_parameter_pack_p,
3246 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3247 any_dependent_template_arguments_p): Likewise.
3248 * repo.c (repo_export_class_p): Likewise.
3249 * semantics.c (anon_aggr_type_p): Likewise.
3250 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3251 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3252 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3253 zero_init_p, special_function_p): Likewise.
3254 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3255 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3256 compparms, invalid_nonstatic_memfn_p,
3257 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3258 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3259 cp_has_mutable_p, lvalue_or_else): Likewise.
3261 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3263 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3264 * cp-objcp-common.c (cp_tree_size): Ditto.
3265 * tree.c (cp_walk_subtrees): Ditto
3266 * cp-tree.def (TINST_LEVEL): Go away.
3267 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3268 move together with other non-tree structs.
3269 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3270 (union lang_tree_node): Eliminate tinst_level field.
3271 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3272 (current_instantiation, outermost_tinst_level): Return
3273 a "struct tinst_level *".
3275 * error.c (print_instantiation_partial_context): Change second
3276 parameter to a "struct tinst_level *". Replace accessor macros
3278 (print_instantiation_full_context): Likewise.
3279 * lex.c (in_main_input_context): Likewise.
3281 * pt.c (struct pending_templates): New.
3282 (pending_templates, last_pending_template): Use it as a type.
3283 (current_tinst_level): Change typo to "struct tinst_level *"
3284 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3285 (add_pending_template): Construct a "struct pending_template".
3286 Replace TINST_LEVEL accessor macros with field access.
3287 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3288 (pop_tinst_level): Likewise.
3289 (instantiate_pending_templates): Likewise. Factor common code used
3290 when an instantiation has been done.
3291 (outermost_tinst_level): Replace tree_last with loop.
3292 (current_instantiation): Return a "struct tinst_level *".
3294 2007-08-24 Ollie Wild <aaw@google.com>
3296 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3297 * name-lookup.h (cp_binding_level): Remove vtables member.
3299 2007-08-24 Richard Guenther <rguenther@suse.de>
3301 * tree.c (cp_cannot_inline_tree_fn): Remove.
3302 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3303 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3306 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3309 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3310 error_mark_node right away if build_expr_type_conversion
3314 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3315 is error_mark_node rather than NULL_TREE.
3316 * pt.c (check_explicit_specialization): Likewise.
3319 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3320 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3322 2007-08-22 Jason Merrill <jason@redhat.com>
3325 * pt.c (outermost_tinst_level): New function.
3326 * lex.c (in_main_input_context): New function.
3327 * cp-tree.h: Declare it.
3328 * decl2.c (constrain_class_visibility): Use it to avoid warning
3329 about uses of the anonymous namespace in the main input file.
3331 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3333 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3335 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3338 * class.c (finish_struct_1): Warn when a class has virtual
3339 functions and accessible non-virtual destructor.
3341 2007-08-20 Richard Guenther <rguenther@suse.de>
3345 * call.c (build_new_method_call): Convert initializer to
3347 * init.c (build_aggr_init): Do not fiddle with types.
3348 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3349 * except.c (build_throw): Do not drop qualifiers for the
3351 * typeck.c (get_member_function_from_ptrfunc): Do not
3352 fiddle with types, instead convert.
3353 (build_ptrmemfunc1): Convert to the target type for
3355 (gfc_trans_allocate): Convert result to target type.
3356 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3357 pointer-to-member structures shall have alias set zero as well.
3359 2007-08-20 Richard Guenther <rguenther@suse.de>
3361 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3363 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3364 (nonstatic_local_decl_p): Likewise.
3365 * tree.c (cp_auto_var_in_fn_p): Remove.
3366 * decl.c (nonstatic_local_decl_p): Remove.
3368 2007-08-20 Richard Guenther <rguenther@suse.de>
3370 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3372 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3373 cp_walk_subtrees lh parameter.
3374 (cp_walk_tree_without_duplicates): New define to
3375 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3376 * tree.c (count_trees): Call
3377 cp_walk_tree_without_duplicates.
3378 (verify_stmt_tree): Call cp_walk_tree.
3379 (break_out_target_exprs): Likewise.
3380 (WALK_SUBTREE): Likewise.
3381 * cp-gimplify.c (cp_genericize): Likewise.
3382 * cp-pt.c (find_parameter_packs_r): Likewise.
3383 (uses_parameter_packs): Likewise.
3384 (make_pack_expansion): Likewise.
3385 (check_for_bare_parameter_packs): Likewise.
3386 (for_each_template_parm): Likewise.
3387 * decl.c (check_default_argument): Call
3388 cp_walk_tree_without_duplicates.
3389 * except.c (build_throw): Likewise.
3390 * decl2.c (type_visibility): Likewise.
3391 * semantics.c (expand_or_defer_fn): Likewise.
3392 (finalize_nrv): Call cp_walk_tree.
3394 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3397 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3398 Initialize it with save_expr rather than get_temp_regvar.
3400 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3403 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3406 2007-08-17 Ollie Wild <aaw@google.com>
3409 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3410 declarations into appropriate slots for comparison. Fix type
3413 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3416 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3417 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3419 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3422 * parser.c (cp_parser_class_head): Improve error message.
3424 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3426 * pt.c (instantiate_decl): Set input_location
3427 for the function end.
3429 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3431 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3433 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3434 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3435 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3436 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3437 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3438 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3439 * typeck.c (cp_type_quals): Likewise.
3440 * typeck2.c (cxx_incomplete_type_diagnostic,
3441 cxx_incomplete_type_error): Likewise.
3443 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3446 * pt.c (tsubst_friend_function): When check_classfn
3447 returns error_mark_node likewise return it.
3449 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3452 * typeck.c (check_return_expr): Don't NRV optimize vars in
3454 * decl.c (finish_function): Comment fix.
3456 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3459 * pt.c (push_template_decl_real): Depending on TYPE_P
3460 use either TYPE_CONTEXT or DECL_CONTEXT.
3462 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3464 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3465 constructors and destructors return this.
3467 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3470 * decl2.c (check_classfn): Return error_mark_node in case of error;
3471 in that case, do not call add_method.
3472 * decl.c (start_decl): Deal with check_classfn returning
3474 (grokfndecl): Likewise.
3475 * pt.c (tsubst_friend_function): Likewise.
3477 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3480 * typeck.c (build_binary_op): Disallow vector float types with
3481 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3483 2007-08-11 Ian Lance Taylor <iant@google.com>
3485 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3487 * cp-tree.h (cxx_get_alias_set): Update declaration.
3489 2007-08-10 Ollie Wild <aaw@google.com>
3491 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3493 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3495 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3496 (lookup_using_namespace): Fix ambiguous_decl call.
3497 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3499 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3501 * call.c (name_as_c_string): Use CONST_CAST.
3502 * decl.c (build_decl): Likewise.
3503 * parser.c (cp_parser_string_literal): Likewise.
3505 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3508 * error.c (dump_expr): Consistently use the *_cxx_*
3509 variants of the pretty-print functions.
3511 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3514 * decl.c (check_special_function_return_type): Just error
3515 on return type specified for conversion operator.
3517 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3519 * typeck2.c (readonly_error): Handle general expressions.
3520 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3522 2007-08-06 Dan Hipschman <dsh@google.com>
3524 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3525 access function name.
3527 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3530 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3531 * g++spec.c (lang_specific_driver): Check them.
3533 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3536 * pt.c (inline_needs_template_parms): Fix comment; change return type
3539 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3542 2007-03-26 Dirk Mueller <dmueller@suse.de>
3544 * parser.c (cp_parser_member_declaration): Pedwarn
3545 about stray semicolons after member declarations.
3547 2007-08-02 Lee Millward <lee.millward@gmail.com>
3552 * parser.c (cp_parser_asm_definition): Detect and discard asm
3553 statements with invalid inputs or outputs.
3554 (cp_parser_asm_operand_list): Return error mark node if any
3555 of the operands are invalid. Adjust documentation.
3557 2007-08-02 Nick Clifton <nickc@redhat.com>
3559 * typeck.c: Change copyright header to refer to version 3 of the
3560 GNU General Public License and to point readers at the COPYING3
3561 file and the FSF's license web page.
3562 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3563 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3564 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3565 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3566 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3567 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3568 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3569 name-lookup.h, parser.c: Likewise.
3571 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3574 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3576 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3579 * semantics.c (finish_label_stmt): Reject the __label__
3580 extension outside function scopes.
3582 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3584 * parser.c (eof_token): Un-constify.
3585 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3586 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3589 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3591 * pt.c, tree.c, typeck2.c: Fix comment typos.
3593 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3594 Mark Mitchell <mark@codesourcery.com>
3597 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3598 hidden due to friend declarations in local classes.
3600 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3602 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3603 * cp-tree.def (DECLTYPE_TYPE): New.
3604 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3605 (dump_type_prefix): Ditto.
3606 (dump_type_suffix): Ditto.
3607 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3608 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3609 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3611 (DECLTYPE_TYPE_EXPR): New.
3612 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3613 (finish_declared_type): Declare.
3614 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3615 DECLTYPE_TYPE nodes.
3616 (pp_cxx_type_id): Ditto.
3617 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3618 (tsubst): Substitute into a DECLTYPE_TYPE node.
3619 (tsubst_copy): Ditto.
3620 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3622 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3623 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3624 structural equality (because we can't hash the expressions).
3625 (finish_declared_type): New.
3626 * lex.c (reswords): Add "decltype" keyword.
3627 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3628 (cp_parser_postfix_expression): Add member_access_only_p to
3629 restrict postfix expression to member access expressions.
3630 (cp_parser_unary_expression): Update call to
3631 cp_parser_postfix_expression to reflect new parameter.
3632 (cp_parser_declared_type): New.
3633 (cp_parser_simple_type_specifier): Parse decltype types.
3635 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3638 * call.c (convert_for_arg_passing): Only widen bitfields to their
3639 declared types if necessary.
3641 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3643 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3646 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3648 * decl.c (typename_hash, typename_compare): Constify.
3649 * mangle.c (hash_type, compare_type): Likewise.
3650 * pt.c (eq_local_specializations, hash_local_specialization):
3652 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3653 list_hash): Likewise.
3654 * typeck2.c (pat_compare): Likewise.
3656 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3658 * method.c (implicitly_declare_fn): Increase alignment if member
3659 function pointer format requires it.
3661 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3664 * typeck.c (check_return_expr): Do not pass a null argument
3667 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3670 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3673 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3676 * typeck.c (convert_arguments): Only use default args if we have
3680 * typeck.c (structural_comptypes): No need to check
3681 resolve_typename_type return value here.
3682 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3683 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3684 original type rather than error_mark_node in case of failure.
3685 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3686 resolve_typename_type result check.
3687 (cp_parser_direct_declarator, cp_parser_head,
3688 cp_parser_constructor_declarator_p): Likewise.
3690 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3692 * pt.c (template_parms_variadic_p): Remove.
3693 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3695 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3698 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3699 argument to dump_aggr_init_expr_args instead of false.
3701 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3703 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3704 canonical types; otherwise, fall back to structural type
3705 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3706 internal compiler error if the canonical types are wrong.
3708 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3711 * parser.c (cp_parser_make_indirect_declarator): When the
3712 the code argument is ERROR_MARK return cp_error_declarator.
3714 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3717 * decl.c (cxx_init_decl_processing): Don't set
3718 force_align_functions_log.
3719 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3720 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3721 FUNCTION_DECL, return its alignment.
3723 2007-07-09 Richard Guenther <rguenther@suse.de>
3725 * decl.c (start_preparsed_function): Do not promote return type.
3727 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3730 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3732 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3735 * pt.c (resolve_overloaded_unification): Robustify. Return a
3737 (type_unification_real): Adjust accordingly.
3739 2007-07-06 Richard Guenther <rguenther@suse.de>
3741 * init.c (build_new_1): Use the correct pointer type.
3742 * typeck2.c (build_m_component_ref): Likewise.
3744 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3747 * init.c (build_zero_init): Always build an initializer for
3749 * typeck2.c (build_functional_cast): Use build_zero_init.
3752 * init.c (build_new_1): Always pass the allocation function to
3753 build_op_delete_call.
3754 * call.c (build_op_delete_call): Handle operator delete with a
3755 variable-argument list. Do not issue an error when no matching
3756 deallocation function is available for a new operator.
3759 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3760 * decl.c (value_dependent_init_p): New function.
3761 (cp_finish_decl): Use it.
3762 * pt.c (value_dependent_expression_p): Use
3763 any_value_dependent_elements_p.
3764 * parser.c (cp_parser_primary_expression): Add comment about
3765 treating dependent qualified names as integral
3766 constant-expressions.
3768 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3770 * decl.c (build_ptrmemfunc_type): Always use structural equality
3771 tests when comparing pointer-to-member-function types, because the
3772 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3775 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3777 * init.c (build_new): Tweak comment.
3779 2007-06-29 Dave Brolley <brolley@redhat.com>
3782 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3783 type to its base type and number of elements here.
3784 * init.c (build_new): Call complete_type_or_else to ensure that the
3785 type is complete and to issue a diagnostic if it is not.
3786 (build_new_1): Don't call complete_type_or_else here.
3788 2007-07-03 Richard Guenther <rguenther@suse.de>
3791 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3794 2007-07-02 Simon Baldwin <simonb@google.com>
3796 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3797 for inner-style nested forward declarations that don't declare
3800 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3803 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3804 DECL_P in not a variable and appears more than once error messages.
3806 2007-07-01 Ollie Wild <aaw@google.com>
3808 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3809 (select_decl): Remove function.
3810 (unqualified_namespace_lookup): Populate binding by calling
3811 ambiguous_decl. Remove select_decl call.
3812 (lookup_qualified_name): Remove select_decl call.
3813 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3814 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3815 generation when name lookup is ambiguous.
3817 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3820 * init.c (build_new_1): Use structural equality on the copy of the
3823 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3825 * decl2.c (determine_visibility): Implement
3826 flag_visibility_ms_compat effect on type info.
3827 * decl.c (cxx_init_decl_processing): Implement
3828 global effect of flag_visibility_ms_compat.
3830 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3832 * decl2.c (start_objects): Mark constructor-running function
3835 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3838 * decl.c (grokdeclarator): Reset friendp for member functions declared
3839 friend of their own class.
3841 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3843 * decl2.c (determine_visibility): Don't look for dllexport here.
3844 (determine_visibility_from_class): Tidy.
3846 2007-06-18 Simon Baldwin <simonb@google.com>
3849 * parser.c (cp_parser_single_declaration): Added check for storage
3850 class other than sc_none in parsed declaration, and a flag to indicate
3851 if the call is part of an explicit template specialization parse.
3852 * (cp_parser_explicit_specialization): Specialization check flag added
3853 to call to cp_parser_single_declaration(), set true.
3854 * (cp_parser_template_declaration_after_export): Specialization check
3855 flag added to call to cp_parser_single_declaration(), set false.
3856 * pt.c (check_explicit_specialization): Added code to copy visiblity
3857 and linkage from the templated function to the explicit specialization.
3859 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3861 * typeck.c (build_binary_op): For templates build the
3862 expression in pieces to avoid the assert in build2_stat.
3863 (get_member_function_from_ptrfunc):
3864 Change over to using POINTER_PLUS_EXPR and convert
3865 the second operand to sizetype.
3866 * typeck2.c (build_m_component_ref): Likewise.
3867 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3868 instead of PLUS_EXPR for pointers.
3869 (build_new_1): Likewise.
3870 (build_vec_delete_1): Likewise.
3871 (build_vec_delete): Likewise.
3872 * class.c (build_base_path): Likewise.
3873 (build_base_path): Likewise.
3874 (convert_to_base_statically): Likewise.
3875 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3876 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3877 instead of PLUS_EXPR.
3878 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3879 instead of PLUS_EXPR for pointers.
3880 * call.c (build_special_member_call): Likewise.
3881 * rtti.c (build_headof): Likewise.
3882 Use sizetype instead of ptrdiff_type_node.
3883 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3884 instead of PLUS_EXPR for pointers.
3885 * except.c (expand_start_catch_block): Do a
3886 NEGATIVE and then a POINTER_PLUS_EXPR instead
3888 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3889 PLUS_EXPR on pointer types over to use
3890 POINTER_PLUS_EXPR and remove the conversion
3891 to the pointer types.
3892 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3893 adding to a pointer type. Use size_int instead of
3894 ssize_int. Convert the index to sizetype before
3895 adding it to the pointer.
3897 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3899 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3900 (DECL_ANON_UNION_VAR_P): New macro.
3901 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3902 than DECL_VAR_MARKED_P, to keep track of which variables we have
3904 * decl.c (redeclaration_error_message): Complain about redeclaring
3905 anonymous union members at namespace scope.
3906 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3908 2007-06-14 Geoff Keating <geoffk@apple.com>
3910 * decl2.c (determine_visibility): Ensure that functions with
3911 hidden types as parameters are hidden.
3914 * decl2.c (determine_visibility): Remove duplicate code for
3917 2007-06-12 Ian Lance Taylor <iant@google.com>
3920 * init.c (avoid_placement_new_aliasing): New static function.
3921 (build_new_1): Call it.
3923 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3925 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3926 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3928 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3931 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3932 on init, the non-decl cond operand and increment value.
3934 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3937 * decl.c (check_initializer): Report an error when a brace enclosed
3938 initializer is used for a non-aggregate type in C++98.
3939 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3941 (grokdeclarator): Likewise.
3942 (move_fn_p): Likewise.
3943 * typeck.c (check_return_expr): Likewise.
3944 * call.c (reference_binding): Likewise.
3945 * error.c (cp_cpp_error): Likewise.
3946 * pt.c (check_default_tmpl_args): Likewise.
3948 * lex.c (init_reswords): Likewise.
3949 * parser.c (p_parser_primary_expression): Likewise.
3950 (TOKEN_PRECEDENCE): Likewise.
3951 (cp_parser_init_declarator): Likewise.
3952 (cp_parser_ptr_operator): Likewise.
3953 (cp_parser_parameter_declaration): Likewise.
3954 (cp_parser_enclosed_template_argument_list): Likewise.
3955 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3956 (cp_parser_next_token_ends_template_argument_p): Likewise.
3958 2007-06-04 Simon Baldwin <simonb@google.com>
3960 * decl.c (grokdeclarator): Readability change. Moved case labels
3961 into direct switch statement scope.
3963 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3965 * call.c (convert_like_real): Remove pointless code.
3967 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3969 * decl.c (get_atexit_fn_ptr_type): New function.
3970 (get_atexit_node): Use it.
3971 (start_cleanup_fn): Likewise.
3972 (register_dtor_fn): Use the object's destructor, instead of a
3973 separate cleanup function, where possible.
3974 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3975 (atexit_fn_ptr_type_node): New macro.
3976 * decl2.c (build_cleanup): Use build_address.
3978 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3980 * typeck.c (build_binary_op): Include types in error.
3982 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3985 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3986 needs runtime initialization.
3988 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3991 * semantics.c (finish_trait_expr): Complete the types.
3993 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3994 Douglas Gregor <doug.gregor@gmail.com>
3995 Pedro Lamarao <pedro.lamarao@mndfck.org>
3996 Howard Hinnant <howard.hinnant@gmail.com>
4000 * typeck.c (comptypes): Don't consider rvalue and lvalue
4001 reference types to be equivalent.
4002 (check_return_expr): Move from certain lvalues when returning
4004 * decl.c (grokdeclarator): Implement reference collapsing.
4005 (copy_fn_p): Don't consider constructors taking rvalue references
4006 to be copy constructors.
4008 * call.c (conversion): New "rvaluedness_matches_p" member.
4009 (convert_class_to_reference): Require reference type as first
4010 parameter instead of base type.
4011 (reference_binding): Add logic to handle rvalue references.
4012 (implicit_conversion): Update inaccurate comment.
4013 (convert_like_real): Disable creation of temporaries that are
4014 impossible to initialize for types with move constructors.
4015 (build_over_call): Elide move constructors when possible.
4016 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4017 (maybe_handle_ref_bind): Return conversion instead of type node.
4018 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4019 determine preferred conversion sequences.
4020 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4021 (LOOKUP_PREFER_RVALUE): New.
4022 (DECL_MOVE_CONSTRUCTOR_P): New.
4023 (struct cp_declarator): Add "reference" member for reference
4024 types, with new "rvalue_ref" flag.
4025 (cp_build_reference_type): Declare.
4026 (move_fn_p): Declare.
4027 * error.c (dump_type_prefix): Format rvalue reference types
4028 correctly in error messages.
4029 * except.c (build_throw): Move from certain lvalues when
4031 * mangle.c (write_type): Mangle rvalue references differently
4032 than regular references.
4033 * parser.c (make_reference_declarator): Add boolean parameter for
4035 (cp_parser_make_indirect_declarator): New.
4036 (cp_parser_new_declarator_opt): Call
4037 cp_parser_make_indirect_declarator.
4038 (cp_parser_conversion_declarator_opt): Ditto.
4039 (cp_parser_declarator): Ditto.
4040 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4042 * pt.c (tsubst): Implement reference collapsing.
4043 (maybe_adjust_types_for_deduction): Implement special template
4044 parameter deduction rule for rvalue references.
4045 (type_unification_real): Update calls to
4046 maybe_adjust_types_for_deduction.
4047 (try_one_overload): Ditto.
4048 (unify_pack_expansion): Ditto.
4049 * tree.c (lvalue_p_1): Handle rvalue reference types.
4050 (cp_build_reference_type): New.
4052 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4055 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4056 variables that need runtime initialization.
4058 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4061 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4062 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4063 case POSTDECREMENT_EXPR>): Return the error_mark_node
4064 if either the real or imaginary parts would an
4067 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4068 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4071 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4072 token is a closing brace, false if there are no tokens left.
4073 (cp_parser_namespace_alias_definition): Only consume the next token if
4074 it is a closing brace.
4076 * parser.c (cp_parser_class_specifier): Likewise.
4078 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4080 * semantics.c (finish_member_declaration): Fix a typo in the
4083 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4095 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4096 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4097 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4098 whether everything was okay. Fix indentation.
4099 (push_template_decl_real): Check for bare parameter packs in
4100 function parameters; where errors occur, mark the parameter types
4101 with ERROR_MARK_NODEs to avert ICEs.
4102 (coerce_template_parameter_pack): New.
4103 (coerce_template_parms): Moved parameter pack coercion into
4104 coerce_template_parameter_pack, and permit it anywhere in the
4105 template parameter list (not just at the end). Parameter and
4106 argument indices can vary (somewhat) separately now, so add
4107 PARM_IDX and ARG_IDX.
4108 (fn_type_unification): Don't set an argument pack as incomplete if
4109 no argument pack was deduced.
4110 (type_unification_real): If a type parameter is a parameter pack
4111 and has not otherwise been deduced, it will be deduced to an empty
4113 (more_specialized_fn): Use the actual lengths of the argument
4114 lists when comparing against expansions.
4115 * semantics.c (finish_member_declaration): If a field's type has
4116 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4118 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4121 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4123 2007-05-22 Ollie Wild <aaw@google.com>
4125 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4126 (unqualified_namespace_lookup): Adds check for hidden types.
4128 2007-05-22 Ollie Wild <aaw@google.com>
4130 * decl.c (duplicate_decls): Verify namespace names are unique.
4132 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4134 * decl.c (cxx_maybe_build_cleanup): Handle
4135 __attribute__((cleanup)).
4137 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4139 * cvt.c (cp_convert_and_check): Don't check warnings if the
4142 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4144 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4146 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4149 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4150 type only if is a class type (5.2.8/4).
4152 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4154 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4155 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4156 c_common_unsigned_type.
4158 2007-05-11 Silvius Rus <rus@google.com>
4160 * typeck.c (build_indirect_ref): Add call to
4161 strict_aliasing_warning.
4162 (build_reinterpret_cast_1): Condition call to
4163 strict_aliasing_warning.
4165 2007-05-11 Jan Hubicka <jh@suse.cz>
4167 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4168 * decl2.c (start_objects): ctors and dtors are no longer public.
4169 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4171 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4173 * typeck.c (build_unary_op): Remove code that used to
4174 handle non lvalue increments/decrements.
4176 2007-05-07 Mike Stump <mrs@apple.com>
4178 * parser.c (check_empty_body): Add.
4179 (cp_parser_iteration_statement): Add call to check_empty_body.
4181 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4184 * mangle.c (write_mangled_name): Mangle static variable names.
4185 (write_unqualified_name): Use local-source-name for
4186 namespace-scope static variables.
4188 2007-05-04 Dirk Mueller <dmueller@suse.de>
4190 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4193 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4196 * decl2.c (constrain_class_visibility):
4197 Use strip_pointer_or_array_types instead of strip_array_types.
4199 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4202 * decl.c (reshape_init_r): Don't reshape the first element if it
4203 is a pointer to member function.
4205 2007-04-27 Simon Baldwin <simonb@google.com>
4207 * decl.c (grokparms): Changed message format from %qD to %qE.
4209 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4211 * error.c (maybe_warn_variadic_templates): Variadic templates are
4212 now in C++0x, so only warn about them in C++98 mode.
4214 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4217 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4218 integeral types from vectors types.
4220 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4223 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4224 for type dependent OMP_CLAUSE_DECLs.
4226 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4229 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4230 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4231 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4232 * init.c (build_zero_init): Adjust, as
4233 COMPLEX_TYPE is now a SCALAR_TYPE.
4234 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4235 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4237 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4239 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4240 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4241 (trait_expr_value): Adjust.
4243 2007-04-23 Simon Baldwin <simonb@google.com>
4245 * decl.c (grokparms): Added new error for duplicate function
4246 parameters names in function prototypes, to match gcc behavior.
4248 2007-04-23 Jan Hubicka <jh@suse.cz>
4250 * decl2.c (finish_objects): Do not call target constructor/destructor
4253 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4255 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4256 instead of checking GIMPLE_STMT_P in chain_next.
4258 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4261 * call.c (convert_for_arg_passing): Convert bitfields to their
4264 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4267 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4269 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4272 * decl2.c (constrain_class_visibility):
4273 Do not warn about the use of anonymous namespace in the main input file.
4275 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4277 * cp-tree.h (current_template_parms): Fix typo in comment.
4279 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4281 * cp-tree.h, error.c: Fix comment typos.
4283 2007-04-13 Jason Merrill <jason@redhat.com>
4286 * call.c (reference_binding): Add c_cast_p parm. If true,
4287 add quals to TO as needed to make it reference-compatible.
4289 2007-04-11 Jan Hubicka <jh@suse.cz>
4291 * class.c (convert_to_base_statically): Fold produced tree; verify
4292 that we are not processing template_decl.
4294 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4297 * class.c (build_base_path): Ensure that the converted pointer has
4298 the same cv-qualification as the input.
4300 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4302 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4304 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4306 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4308 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4309 * tree.c (cp_add_pending_fn_decls): Remove.
4310 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4312 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4314 Revert change removing staticp.
4316 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4318 * cp-objcp-common.c (cxx_staticp): Remove.
4319 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4320 * cp-tree.h (cxx_staticp):
4322 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4324 * class.c (check_for_override): Don't remove dllmport attribute
4327 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4330 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4331 type issue error and return early.
4333 2007-03-30 Jason Merrill <jason@redhat.com>
4336 * typeck.c (cp_type_readonly): New fn.
4337 * cp-tree.h: Declare it.
4338 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4339 (cp_finish_decl): Not here.
4341 2007-03-31 Richard Guenther <rguenther@suse.de>
4343 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4346 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4351 * parser.c (declarator_can_be_parameter_pack): New.
4352 (cp_parser_template_parameter): Only parse the `...' if the
4353 declarator can be a parameter pack.
4354 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4356 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4357 types (they could be used as array bounds).
4358 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4359 (tsubst_pack_expansion): Handle failure to expand parameter
4362 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4365 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4366 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4367 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4368 (CLASS_TYPE_NON_UNION_P): Add.
4369 (struct lang_type_class): Add has_complex_dflt.
4370 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4371 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4372 * cp-tree.def: Add TRAIT_EXPR.
4373 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4374 * lex.c (struct resword): Add __has_nothrow_assign,
4375 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4376 __has_trivial_constructor, __has_trivial_copy,
4377 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4378 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4379 __is_pod, __is_polymorphic, __is_union.
4380 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4381 (cp_parser_trait_expr): New.
4382 * semantics.c (finish_trait_expr, trait_expr_value
4383 classtype_has_nothrow_copy_or_assign_p): New.
4384 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4386 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4387 * class.c (check_bases, check_field_decl, check_bases_and_members):
4388 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4389 * pt.c (uses_template_parms, tsubst_copy_and_build,
4390 value_dependent_expression_p, type_dependent_expression_p): Deal with
4392 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4394 2007-03-29 Richard Guenther <rguenther@suse.de>
4396 * tree.c (cp_walk_subtrees): Do not set input_location.
4398 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4401 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4404 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4406 * parser.c (struct cp_parser): Update comment for
4407 greater_than_is_operator_p.
4408 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4409 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4410 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4411 !GREATER_THAN_IS_OPERATOR_P.
4412 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4413 `>>' operators that will become two `>' tokens in C++0x.
4414 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4415 mode, allowing it to terminate default arguments.
4416 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4417 `>>' like two consecutive `>' tokens.
4418 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4419 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4420 ends a template argument.
4422 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4424 * decl.c (redeclaration_error_message): Complain when redeclaring
4425 a friend function with default template arguments (C++0x mode only).
4426 * cp-tree.h (check_default_tmpl_args): Declare.
4427 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4428 template arguments in function templates. Add support for checking
4429 the default template arguments of friend templates.
4430 (push_template_decl_real): Fix call to check_default_tmpl_args.
4431 (type_unification_real): If a template parameter has not been
4432 deduced but provides a default template argument, substitute into
4433 that default template argument.
4434 * parser.c (cp_parser_init_declarator): When declaring (but not
4435 defining!) a function template in C++0x mode, check for default
4438 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4441 * decl.c (grokdeclarator): Deal with cv-qualified function type
4442 typedefs in the same way for member and non-member functions.
4444 2007-03-26 Dirk Mueller <dmueller@suse.de>
4446 * parser.c (cp_parser_member_declaration): Pedwarn
4447 about stray semicolons after member declarations.
4449 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4452 * pt.c (instantiate_decl): Set in_system_header.
4454 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4456 * cp-tree.h (current_tempalte_parms): Improve documentation.
4457 * pt.c (current_template_args): Likewise.
4460 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4461 not consume tokens when failing.
4463 2007-03-22 Jim Wilson <wilson@specifix.com>
4464 Mark Mitchell <mark@codesourcery.com>
4467 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4468 consistent with FROM.
4470 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4472 * error.c (dump_expr): Handle dependent names that designate types.
4473 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4475 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4477 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4479 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4481 * cvt.c (cp_convert_and_check) : Define.
4482 * cp-tree.h (cp_convert_and_check): Declare.
4483 * call.c (convert_conversion_warnings): Rename to
4484 conversion_null_warnings. The warning for floating-point to
4485 integer is handled by convert_and_check in convert_like_real.
4486 (convert_like_real): convert_conversion_warnings was renamed as
4487 conversion_null_warnings.
4488 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4489 overflow and changes of value during conversion.
4491 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4494 * parser.c (cp_parser_statement): If 'namespace' is found, this
4495 only can be a namespace alias definition, so parse it now.
4496 (cp_parser_namespace_alias_definition): if we find an open brace
4497 instead of '=', then this is actually a misplaced namespace
4500 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4503 * decl.c (cxx_init_decl_processing): Move command-line options
4504 processing to c-opts.c.
4506 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4508 * ptree.c (cxx_print_type): Use formatting markup for integers
4509 when printing template parameter index/level/orig level.
4510 (cxx_print_xnode): Ditto.
4511 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4512 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4513 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4515 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4516 rather than a HOST_WIDE_INT.
4517 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4518 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4520 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4521 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4522 IN_BASE_INITIALIZER bool bitfields.
4523 (struct cp_declarator): Make KIND a 4-bit field. Make
4524 PARAMETER_PACK_P a bool bitfield just after KIND.
4525 * pt.c (uses_parameter_packs): Destroy the pointer set.
4526 (make_pack_expansion): Ditto.
4527 (check_for_bare_parameter_packs): Ditto.
4528 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4530 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4533 * call.c (convert_default_arg): Instead of copying the node,
4536 2007-03-15 Dirk Mueller <dmueller@suse.de>
4539 * call.c (convert_conversion_warnings): New..
4540 (convert_like_real): .. factored out from here.
4541 (convert_conversion_warnings): Add warning about
4542 false being converted to NULL in argument passing.
4544 2007-03-14 Dirk Mueller <dmueller@suse.de>
4546 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4547 (finish_do_body): Warn about empty body in do/while statement.
4549 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4551 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4553 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4556 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4559 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4561 * repo.c (init_repo): Initialize random_seed saved options.
4562 (finish_repo): Adjust.
4564 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4567 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4570 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4572 * decl.c (compute_array_index_type): New warning flag warn_vla.
4574 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4577 * call.c (convert_default_arg): Copy non-constant arguments.
4579 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4582 * parser.c (cp_parser_postfix_expression): Disallow compound
4583 literals in constant expressions.
4586 * semantics.c (finish_typeof): Use unlowered_expr_type.
4588 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4591 * cp-tree.h (unlowered_expr_type): New function.
4592 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4593 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4594 (unlowered_expr_type): New function.
4595 (build_unary_op): Disallow predecrements of bool bitfields.
4596 * call.c (build_conditional_expr): Use unlowered_expr_type.
4597 * pt.c (type_unification_real): Likewise.
4599 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4602 * typeck.c (check_return_expr): Check for bare parameter packs.
4603 (comptypes): Compare template parameter packs and
4604 type pack expansions.
4605 * decl.c (grokdeclarator): Deal with the declaration of function
4607 (grokparms): Verify that the (optional) function parameter pack is
4608 at the end of the parameter list.
4609 (xref_basetypes): Handle pack expansions in the base class.
4610 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4611 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4612 (NONTYPE_ARGUMENT_PACK): New.
4613 (TYPE_PACK_EXPANSION): New.
4614 (EXPR_PACK_EXPANSION): New.
4615 (ARGUMENT_PACK_SELECT): New.
4616 * cp-objcp-common.c (cp_tree_size): Compute size of
4617 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4618 ARGUMENT_PACK_SELECT.
4619 * error.c (dump_template_argument): Print template argument packs.
4620 (dump_template_argument_list): Ditto.
4621 (dump_template_parameter): Dump `...' for template type parameter
4623 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4624 (dump_parameters): Print function parameter packs.
4625 (dump_template_parms): Print template argument packs.
4626 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4627 (maybe_warn_variadic_templates): New.
4628 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4629 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4630 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4632 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4633 (write_template_arg): Write argument packs as separate arguments.
4634 * cp-tree.h (struct template_parm_index_s): Add flag that
4635 indicates that the template parameter is actually a parameter
4637 (struct tree_argument_pack_select): New.
4638 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4639 (union lang_tree_node): Add argument_pack_select.
4640 (FUNCTION_PARAMETER_PACK_P): New.
4641 (PACK_EXPANSION_P): New.
4642 (PACK_EXPANSION_PATTERN): New.
4643 (SET_PACK_EXPANSION_PATTERN): New.
4644 (PACK_EXPANSION_PARAMETER_PACKS): New.
4645 (ARGUMENT_PACK_P): New.
4646 (ARGUMENT_PACK_ARGS): New.
4647 (SET_ARGUMENT_PACK_ARGS): New.
4648 (ARGUMENT_PACK_INCOMPLETE_P): New.
4649 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4650 (TEMPLATE_PARM_PARAMETER_PACK): New.
4651 (TEMPLATE_TYPE_PARAMETER_PACK): New.
4652 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4653 (ARGUMENT_PACK_SELECT_INDEX): New.
4654 (ARGUMENT_PACK_SELECT_ARG): New.
4655 (struct cp_declarator): Add parameter_pack_p flag.
4656 (maybe_warn_variadic_templates): Declare.
4657 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4658 indicate a template parameter pack.
4659 (uses_parameter_packs): Declare.
4660 (template_parameter_pack_p): Declare.
4661 (template_parms_variadic_p): Declare.
4662 (make_pack_expansion): Declare.
4663 (check_for_bare_parameter_packs): Declare.
4664 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4665 sizeof... expressions.
4666 (pp_cxx_expression): Print pack expansions and non-type argument
4668 (pp_cxx_exception_specification): Print pack expansions.
4669 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4670 (pp_cxx_ctor_initializer): Print pack expansions.
4671 (pp_cxx_type_id): Print pack expansions.
4672 (pp_cxx_template_argument_list): Print argument packs.
4673 (pp_cxx_template_parameter): Print ellipsis for template parameter
4675 * pt.c (comp_template_parms): Compare template parameter packs.
4676 (template_parameter_pack_p): New.
4677 (template_parms_variadic_p): New.
4678 (template_args_variadic_p): New.
4679 (make_ith_pack_parameter_name): New.
4680 (struct find_parameter_pack_data): New.
4681 (find_parameter_packs_r): New.
4682 (uses_parameter_packs): New.
4683 (make_pack_expansion): New.
4684 (check_for_bare_parameter_packs): New.
4685 (expand_template_argument_pack): New.
4686 (reduce_template_parm_level): Propagate parameter pack flag.
4687 (process_template_parm): Add is_parameter_pack parameter to state
4688 when the parameter is actually a parameter pack. Create template
4689 parameter packs when is_parameter_pack is true.
4690 (current_template_args): The argument for a template parameter
4691 pack is an argument pack containing a single pack expansion.
4692 (process_partial_specialization): When checking that non-type
4693 argument expressions do not involve template parameters, loop over
4694 the arguments in argument packs separately.
4695 (push_template_decl_real): Check that the type of the declaration
4696 does not have any bare parameter packs. Check that primary
4697 templates have no more than one parameter pack, and that it comes
4698 at the end of the template parameter list.
4699 (convert_template_argument): Handle coercions for pack expansion
4700 expressions by coercing the pattern then rebuilding the expansion.
4701 (coerce_template_parms): When coercing the arguments for a
4702 variadic template, pack "extra" arguments into an argument pack.
4703 (coerce_template_template_parms): Cannot coerce between parameter
4704 packs and non-pack parameters.
4705 (template_args_equal): Compare PACK_EXPANSION_P expressions.
4706 (comp_template_args): Expand all template arguments packs before
4707 comparing template argument lists.
4708 (mangle_class_name_for_template): Make argument packs as separate
4710 (for_each_template_parm_r): No need to handle BASELINK.
4711 (instantiate_class_template): Handle pack expansions in the base
4713 (tsubst_pack_expansion): New.
4714 (tsubst_template_args): Handle substitutions of argument packs and
4715 pack expansion into template argument lists.
4716 (tsubst_decl): Expand function parameter packs into separate
4717 function parameters.
4718 (tsubst_arg_types): Expand a type pack expansion into separate
4720 (tsubst_exception_specification): Handle pack expansions in
4721 exception specifiers.
4722 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
4723 replacing a template parameter with its argument. If we encounter
4724 a substitution for an argument pack, just return the parameter
4726 (tsubst_copy): sizeof(X...) returns the number of elements in
4727 parameter pack X. See through ARGUMENT_PACK_SELECT when the
4728 PARM_DECL is a parameter pack.
4729 (tsubst_expr): Expression pack expansions and argument packs
4730 cannot show up here; they will all be handled through function
4731 calls, sizeof, and template argument lists.
4732 (tsubst_copy_and_build): sizeof(X...) returns the number of
4733 elements in parameter pack X. Handle pack expansions in TREE_LIST
4734 and CONSTRUCTOR nodes.
4735 (fn_type_unification): Handle "incomplete" explicit template
4736 argument lists that specify some of the arguments for a template
4738 (type_unification_real): Unify arguments against pack expansions.
4739 (template_parm_level_and_index): New, helper function.
4740 (unify_pack_expansion): New.
4741 (unify): Unify argument packs on an argument-by-argument basis,
4742 handling variadic argument packs as well.
4743 (more_specialized_fn): Handle unification of function parameter
4744 packs. All things being equal, prefer non-variadic function
4745 templates to variadic function templates.
4746 (more_specialized_class): Prefer the variadic class template
4747 partial specialization that binds fewer arguments to a parameter
4749 (regenerate_decl_from_template): Expand function parameter packs
4750 into separate parameters.
4751 (instantiate_decl): Ditto.
4752 (tsubst_initializer_list): Handle pack expansions for base-class
4754 (dependent_type_p_r): Determine dependent types in argument packs
4755 and pack expansions.
4756 (value_dependent_expression_p): Determine value-dependence of
4757 non-type argument packs.
4758 (dependent_template_arg_p): Handle argument packs.
4759 * semantics.c (finish_cond): Check for bare parameter packs.
4760 (finish_expr_stmt): Ditto.
4761 (finish_for_expr): Ditto.
4762 (finish_switch_cond): Ditto.
4763 (finish_mem_initializers): Ditto.
4764 * name-lookup.c (arg_assoc_type): Handle pack expansions and
4766 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4767 * parser.c (make_declarator): Declarator is not an expansion.
4768 (make_pointer_declarator): Transfer parameter pack flag to outer
4770 (make_reference_declarator): Ditto.
4771 (make_ptrmem_declarator): Ditto.
4772 (make_call_declarator): Ditto.
4773 (make_array_declarator): Ditto.
4774 (cp_parser_postfix_expression): Allow pack expansion expressions
4775 in the argument list for a call expression.
4776 (cp_parser_parenthesized_expression_list): Add new parameter
4777 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4778 into separate arguments."
4779 (cp_parser_new_placement): Allow pack expansion expressions.
4780 (cp_parser_new_initializer): Ditto.
4781 (cp_parser_mem_initializer_list): Allow ellipsis to create a
4782 base-class initializer expansion.
4783 (cp_parser_mem_initializer): Ditto.
4784 (cp_parser_template_parameter_list): Keep track of whether the
4785 template parameter is a template parameter pack.
4786 (cp_parser_template_parameter): Parse the ellipsis to indicate a
4787 template parameter pack.
4788 (cp_parser_type_parameter): Ditto.
4789 (cp_parser_template_argument_list): Parse the ellipsis to indicate
4791 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4792 this declarator is a parameter pack.
4793 (cp_parser_parameter_declaration): The ellipsis does not end the
4794 parameter declaration, because it might be a parameter pack. Parse
4795 the ellipsis to indicate a parameter pack.
4796 (cp_parser_initializer): Allow pack expansions.
4797 (cp_parser_initializer_list): Allow ellipsis to create an
4798 initializer expansion.
4799 (cp_parser_base_clause): Allow ellipsis to create a base specifier
4801 (cp_parser_type_id_list): Allow ellipsis to create an exception
4802 specifier expansion.
4803 (cp_parser_attribute_list): Don't allow pack expansions.
4804 (cp_parser_functional_cast): Allow pack expansions.
4805 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4806 compute the length of a parameter pack.
4807 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4808 end a template argument.
4809 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4810 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4813 2007-03-09 Dirk Mueller <dmueller@suse.de>
4815 * call.c (build_new_op): Call warn_logical_operator.
4817 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4820 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4823 * pt.c (any_template_arguments_need_structural_equality_p):
4826 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4828 * decl.c (grokdeclarator): Disable warnings for anonymous
4831 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4833 * typeck2.c (readonly_error): Always emit a hard error.
4834 Remove last argument.
4835 * cp-tree.h (readonly_error): Adjust prototype.
4836 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4837 * typeck.c (build_unary_op): Likewise.
4838 (build_modify_expr): Likewise.
4840 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4843 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4845 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4848 * parser.c (struct cp_parser): New IN_IF_STMT.
4849 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4850 returning if parsing the body of an 'if' statement or issuing an
4851 error and continuing.
4852 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4854 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4856 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4859 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4862 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4864 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4865 Objective-C++. Don't exit early if -shared-libgcc needs to be
4868 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4870 * typeck.c (common_base_type): Delete unused function.
4872 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4874 * Make-lang.in: Add dummy lang.install-pdf target.
4876 2007-03-01 Simon Baldwin <simonb@google.com>
4879 * decl.c (check_tag_decl): Added new warning for typedef ignored
4880 when it precedes an otherwise valid non-typedef declaration.
4882 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4884 * typeck.c (build_function_call): Store converted arguments
4885 in a stack-allocated array instead of building a list.
4886 (convert_arguments): Store arguments in the array passed in as an
4887 argument, and return the actual number of arguments.
4888 * call.c (build_call): Delete, and replace with...
4889 (build_call_n, build_call_a): New.
4890 (build_op_delete_call): Rewrite to avoid constructing argument lists.
4891 (build_over_call): Store converted arguments in a stack-allocated
4892 array instead of building a list.
4893 (build_cxx_call): Pass arguments in an array instead of as a list.
4894 (build_java_interface_fn_ref): Rewrite to avoid constructing
4896 * tree.h: Update declarations to reflect above changes.
4897 * method.c (use_thunk): Use a stack-allocated array to hold
4898 the arguments instead of a list.
4899 * rtti.c (throw_bad_cast): Update call to cxx_call.
4900 (throw_bad_typeid): Likewise.
4901 (build_dynamic_cast_1): Likewise.
4902 * init.c (build_builtin_delete_call): Use build_call_n.
4903 * decl.c (expand_static_init): Likewise.
4904 * except.c (cp_protect_cleanup_actions): Likewise.
4905 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4906 (gimplify_must_not_throw_expr): Likewise.
4907 (cxx_omp_apply_fn): Use build_call_a.
4909 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4911 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4912 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4914 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4916 * cp-tree.h (static_ctors): Remove.
4917 * cp-tree.h (static_dtors): Likewise.
4918 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4919 refactoring of tree_map hierarchy.
4920 (decl_shadowed_for_var_insert): Likewise.
4921 * semantics.c (expand_body): Use c_expand_body.
4922 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4923 * decl2.c (static_ctors): Remove.
4924 (static_dtors): Likewise.
4925 (generate_ctor_or_dtor_function): Pass NULL_TREE to
4926 objc_generate_static_init_call. Do not call static_[cd]tors.
4927 (generate_ctor_and_dtor_functions_for_priority): Do not check for
4929 (cp_write_global_declarations): Likewise.
4931 2007-02-23 Richard Guenther <rguenther@suse.de>
4933 * class.c (note_name_declared_in_class): Make declaration
4934 changes meaning a pedwarn.
4936 2007-02-22 Michael Matz <matz@suse.de>
4939 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4940 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4941 dump_function_decl): Guard emitting outer scopes by new flag.
4942 * cp-lang.c (cxx_dwarf_name): New function.
4943 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4944 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4946 (push_template_decl_real, lookup_template_class): Remove calls
4949 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4951 * call.c (build_new_method_call): Ensure that explicit calls of
4952 destructors have type "void".
4954 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4956 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4957 and -Walways-true with -Waddress.
4958 * cvt.c (convert_to_void): Replace unconditional warning with
4961 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4963 * decl.c, tree.c: Fix comment typos.
4965 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4968 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4969 statement expression if we had an error mark node.
4971 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4972 Brooks Moses <brooks.moses@codesourcery.com>
4973 Lee Millward <lee.millward@codesourcery.com>
4975 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4976 Change class to tcc_vl_exp.
4978 * call.c (build_call): Use build_call_list instead
4980 (build_over_call): Likewise.
4981 (build_new_method_call): Use build_min_non_dep_call_list
4982 instead of build_min_non_dep.
4984 * error.c (dump_call_expr_args): New function.
4985 (dump_aggr_init_expr_args): New function.
4986 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
4987 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4989 * cvt.c (convert_to_void): Use build_call_array instead
4990 of build3; use new AGGR_INIT_EXPR accessor macros.
4992 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4993 instead of TREE_CODE_LENGTH.
4995 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4996 AGGR_INIT_EXPR accessor macros.
4998 * cp-gimplify.c (cp_gimplify_init_expr): Use
4999 AGGR_INIT_EXPR_SLOT to set the slot operand.
5001 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5002 (AGGR_INIT_EXPR_SLOT): New macro.
5003 (AGGR_INIT_EXPR_ARG): New macro.
5004 (aggr_init_expr_nargs): New macro.
5005 (AGGR_INIT_EXPR_ARGP): New macro.
5006 (aggr_init_expr_arg_iterator): New.
5007 (init_aggr_init_expr_arg_iterator): New.
5008 (next_aggr_init_expr_arg): New.
5009 (first_aggr_init_expr_arg): New.
5010 (more_aggr_init_expr_args_p): New.
5011 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5012 (stabilize_aggr_init): New declaration.
5013 (build_min_non_dep_call_list): Likewise.
5015 * tree.c (process_aggr_init_operands): New function.
5016 (build_aggr_init_array) New function.
5017 (build_cplus_new): Update to use new CALL_EXPR and
5018 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5019 build_aggr_init_array.
5020 (build_min_non_dep_call_list) New function.
5021 (build_min_nt): Assert input code parameter is not a variable
5022 length expression class.
5023 (build_min, build_min_non_dep): Likewise.
5024 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5025 to check for equality instead of recursing. Handle tcc_vl_exp
5027 (stabilize_call): Update to only handle CALL_EXPRs, not
5028 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5029 (stabilize_aggr_init): New function.
5030 (stabilize_init): Use it.
5032 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5033 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5034 AGGR_INIT_EXPR accessor macros and argument iterators.
5036 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5037 build_vl_exp. Iterate through the operands, recursively
5038 processing each one.
5039 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5040 CALL_EXPR accessor macros.
5041 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5042 tree code classes. Use TREE_OPERAND_LENGTH instead of
5045 * semantics.c (finish_call_expr): Use build_nt_call_list
5046 instead of build_nt.
5047 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5048 accessor macros. Use build_call_array to construct the
5049 CALL_EXPR node instead of build3
5051 * decl2.c (build_offset_ref_call_from_tree): Use
5052 build_nt_call_list and build_min_non_dep_call_list instead
5053 of build_min_nt and build_min_non_dep.
5055 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5056 Use build_nt_call_list instead of build_min_nt.
5058 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5061 * call.c (build_conditional_expr): Improve error message.
5063 2007-02-13 Dirk Mueller <dmueller@suse.de>
5065 * friend.c (do_friend): Annotate warning about friend
5066 declarations in templates with OPT_Wnon_template_friend.
5067 Convert informal message from warning() to inform().
5069 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5070 Mark Mitchell <mark@codesourcery.com>
5073 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5074 instantiations for variables.
5076 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5079 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5080 Check warn_unused_value just once.
5082 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5085 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5086 (fn_type_unificiation): Likewise.
5087 (get_bindings): Likewise.
5089 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5092 * decl.c (finish_function): Use DECL_REPLACEABLE.
5093 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5095 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5097 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5099 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5101 * decl.c (grokvardecl): Don't error if !have_tls.
5102 (grokdeclarator): Likewise.
5103 * parser.c (cp_parser_omp_threadprivate): Likewise.
5105 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5108 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5109 parameters and result decls in omp clauses.
5110 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5113 2007-02-05 Dirk Mueller <dmueller@suse.de>
5116 * parser.c (cp_parser_class_specifier): Always initialize bases.
5118 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5120 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5121 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5122 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5124 * semantics.c (finish_omp_atomic): Store a whole expression node
5125 in operand 1, and integer_zero_node in operand 0, for dependent
5126 OMP_ATOMIC. Rewrite to make flow easier to understand.
5128 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5130 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5132 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5134 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5135 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5137 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5139 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5140 keyword warning to -Wc++0x-compat.
5142 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5144 * decl.c (grokdeclarator): Update documentation.
5146 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5149 * decl.c (grokdeclarator): If __thread is used together with
5150 a storage class other than extern and static, clear thread_p
5151 after issuing diagnostics and fall through to checking the
5154 2007-01-30 Roger Sayle <roger@eyesopen.com>
5156 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5157 calculating the size of an array (to avoid recursive errors).
5159 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5162 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5164 * call.c (convert_like_real): Don't warn when converting to
5167 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5169 * decl.c (pop_label): Replace warning with call to
5170 warn_for_unused_label.
5172 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5175 * semantics.c (finish_pseudo_destructor_expr): Check the
5176 destrutor name by calling check_dtor_name.
5178 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5180 * lex.c (D_CPP0X): Rename.
5182 (reswords): D_CPP0X -> D_CXX0X.
5183 (init_reswords): Ditto.
5184 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5185 of C++0x keywords as identifiers.
5187 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5190 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5193 2007-01-23 Ian Lance Taylor <iant@google.com>
5195 * typeck.c (convert_for_assignment): Only warn about a = b = c
5196 when converting to bool.
5198 2007-01-23 Roger Sayle <roger@eyesopen.com>
5200 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5202 * typeck.c (ignore_overflows): Remove the remaining uses of
5203 TREE_CONSTANT_OVERFLOW.
5205 2007-01-20 Jan Hubicka <jh@suse.cz>
5207 * decl2.c (start_objects, start_static_storage_duration_function):
5208 Do not make the functions uninlinable.
5210 2007-01-17 Ian Lance Taylor <iant@google.com>
5212 * class.c (add_method): Call VEC_reserve_exact rather than passing
5213 a negative size to VEC_reserve.
5215 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5218 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5220 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5223 * decl.c (make_typename_type): If the qualified name is not a
5224 type, issue an error.
5225 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5228 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5230 * rtti.c: Include target.h.
5231 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5232 don't emit typeinfo for fundamental types as weak.
5233 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5235 2007-01-08 Richard Guenther <rguenther@suse.de>
5237 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5239 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5241 * call.c (standard_conversion): Pass flag to
5242 vector_types_convertible_p to disallow emission of note.
5243 * typeck.c (convert_for_assignment): Pass flag to
5244 vector_types_convertible_p to allow emission of note.
5245 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5246 to disallow emission of note.
5248 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5251 * typeck.c (build_binary_op): Call overflow_warning if
5252 TREE_OVERFLOW_P is true for the result and not for any of the
5255 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5258 * class.c (add_method): Don't wait until template
5259 instantiation time to complain about duplicate methods.
5261 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5264 * semantics.c (finish_unary_op_expr): Warn only if result
5265 overflowed and operands did not.
5267 2007-01-05 Ian Lance Taylor <iant@google.com>
5269 * typeck.c (build_binary_op): Warn about comparing a non-weak
5272 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5274 * pt.c (tsubst): Propagate the need for structural equality checks
5275 when reducing the level of template parameters.
5277 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5279 * pt.c: Fix a comment typo.
5281 2007-01-02 Ian Lance Taylor <iant@google.com>
5283 * semantics.c (maybe_convert_cond): Optionally warn when using an
5284 assignment as a condition.
5285 * typeck.c (convert_for_assignment): Optionally warn about
5286 assigning the result of an assignment to a bool.
5288 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5290 * pt.c (canonical_template_parms): Correct typo in comment.
5292 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5294 * typeck.c (structural_comptypes): Renamed from "comptypes".
5295 (comptypes): Use canonical type information to perform fast type
5296 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5297 canonical type comparison returns the same results as we would see
5298 from the current, structural check. Support COMPARE_STRUCTURAL
5299 when we need structural checks.
5300 * decl.c (typename_compare): Fix comment.
5301 (build_typename_type): TYPENAME_TYPE nodes require structural
5302 equality checks, because they resolve different based on the
5304 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5305 require structural equality checks (for now).
5306 (build_ptrmemfunc_type): Build the canonical pointer to member
5308 (compute_array_index_type): Whenever we build a new index type
5309 to represent the size of an array in a template, we need to mark
5310 this index type as requiring structural equality. This goes for
5311 arrays with value-dependent sizes with the current ABI, or all
5313 * tree.c (cplus_array_hash): New.
5314 (struct cplus_array_info): New.
5315 (cplus_array_compare): New.
5316 (cplus_array_htab): New.
5317 (build_cplus_array_type_1): Use a hash table to cache the array
5318 types we build. Build the canonical array type for each array
5320 (cp_build_qualified_type_real): When building a cv-qualified array
5321 type, use the hash table of array types and build canonical array
5323 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5324 use structural equality (for now).
5325 * cp-tree.h (COMPARE_STRUCTURAL): New.
5326 * pt.c (canonical_template_parms): New.
5327 (canonical_type_parameter): New.
5328 (process_template_parm): Find the canonical type parameter.
5329 (lookup_template_class): When we have named the primary template
5330 type, set the canonical type for our template class to the primary
5331 template type. If any of the template arguments need structural
5332 equality checks, the template class needs structural equality
5334 (tsubst): When reducing the level of a template template
5335 parameter, we require structural equality tests for the resulting
5336 parameter because its template parameters have not had their types
5337 canonicalized. When reducing a template type parameter, find the
5338 canonical reduced type parameter.
5339 (any_template_arguments_need_structural_equality_p): New.