1 2002-08-30 Richard Henderson <rth@redhat.com>
4 * tree.c: Include target.h.
5 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7 * Makefile.in (tree.o): Update.
9 2002-08-27 Mark Mitchell <mark@codesourcery.com>
11 * class.c (layout_virtual_bases): Warn about bugs in G++ that
12 result in incorrect object layouts.
13 (layout_class_type): Likewise.
15 2002-08-24 Matt Austern <austern@apple.com>
17 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
19 (real_lvalue_p): Update caller.
21 (non_cast_lvalue_or_else): New.
23 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
25 2002-08-22 Mark Mitchell <mark@codesourcery.com>
27 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
28 and COND_EXPR specially; fix error message output.
30 2002-08-22 Jason Merrill <jason@redhat.com>
32 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
33 * semantics.c (nullify_returns_r): Likewise.
35 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
38 * typeck.c (finish_class_member_access_expr): Diagnose cases where
39 name lookup finds nothing.
41 2002-08-15 Jason Merrill <jason@redhat.com>
43 * semantics.c (finish_then_clause): Remove redundant assignment.
44 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
45 extra binding level outside the if/switch statement.
46 (finish_while_cond, finish_for_cond): Rewrite complex condition
49 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
51 * parse.y (sizeof, alignof, typeof): New non-terminals to
52 increment skip_evaluation. Replace terminals with them and
53 decrement skip_evaluation at the end of rules using them.
54 * decl2.c (mark_used): Don't assemble_external if
57 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
60 * parse.y (parse_finish_call_expr): Handle incomplete
61 type used to name a scope.
63 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
66 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
67 regression caused by my 2002-08-08 patch.
69 2002-08-13 Mark Mitchell <mark@codesourcery.com>
71 * decl.c (pushdecl_class_level): Honor requests to bind names to
74 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
76 * decl2.c (build_call_from_tree): Fix uninitialized variable.
77 * parse.y (parse_finish_call_expr): Likewise.
78 * repo.c (old_args, old_dir, old_main): Const-ify.
80 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
82 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
83 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
84 * optimize.c (maybe_clone_body): Likewise.
85 * pt.c (tsubst_enum): Likewise.
86 (lookup_template_class): Likewise.
87 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
89 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
91 * lang-specs.h: Remove -ansi.
93 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
95 * tree.c (maybe_dummy_object): Replace // with /* */
97 2002-08-09 Mark Mitchell <mark@codesourcery.com>
99 * call.c (standard_conversion): Use build_ptrmem_type.
100 * cp-tree.h (build_ptrmem_type): New function.
101 (adjust_result_of_qualified_name_lookup): Likewise.
102 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
104 (build_ptrmem_type): New function.
105 (grokdeclarator): Do not use build_offset_type when encountering a
107 * parse.y (parse_finish_call_expr): Use
108 adjust_result_of_qualified_name_lookup.
109 * search.c (adjust_result_of_qualified_name_lookup): New function.
110 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
111 accessing OFFSET_TYPEs directly.
113 2002-08-08 Mike Stump <mrs@apple.com>
115 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
116 (type_decays_to): Likewise.
117 * class.c (find_final_overrider): Likewise.
118 (maybe_note_name_used_in_class): Likewise.
119 * decl.c (current_tmpl_spec_kind): Likewise.
120 (add_binding): Likewise.
121 (push_class_binding): Likewise.
122 (duplicate_decls): Likewise.
123 (layout_var_decl): Likewise.
124 (grokfndecl): Likewise.
125 (grokdeclarator): Likewise.
126 (check_default_argument): Likewise.
127 * decl2.c (handle_class_head): Likewise.
128 * error.c (dump_template_decl): Likewise.
129 * init.c (build_offset_ref): Likewise.
130 * pt.c (check_specialization_scope): Likewise.
131 (determine_specialization): Likewise.
132 (check_explicit_specialization): Likewise.
133 (maybe_check_template_type): Likewise.
134 (process_partial_specialization): Likewise.
135 (check_default_tmpl_args): Likewise.
136 (push_template_decl_real): Likewise.
137 (convert_template_argument): Likewise.
138 (try_class_unification): Likewise.
139 (get_bindings_real): Likewise.
140 (do_decl_instantiation): Likewise.
141 * semantics.c (begin_function_definition): Likewise.
142 (finish_member_declaration): Likewise.
143 (check_multiple_declarators): Likewise.
144 * typeck.c (comp_array_types): Likewise.
145 (comptypes): Likewise.
146 (expr_sizeof): Likewise.
147 (build_binary_op): Likewise.
148 (dubious_conversion_warnings): Likewise.
149 (check_return_expr): Likewise.
151 2002-08-08 Mark Mitchell <mark@codesourcery.com>
153 * typeck.c (build_class_member_access_expr): Do not return
154 error_mark_node when no error has occurred.
156 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
158 * typeck.c (build_component_addr): Remove.
159 (build_unary_op): Just check it's not a bitfield, and then build
162 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
164 * class.c (convert_to_base): Correct check for error_mark_node.
165 (create_vtable_ptr): Remove unused VFUNS_P parm.
167 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
169 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
171 2002-08-07 Mark Mitchell <mark@codesourcery.com>
173 Rework build_component_ref.
174 * call.c (build_vfield_ref): Do not go through build_component_ref.
175 (build_field_call): Use build_class_member_access_expr.
176 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
177 (build_object_call): Likewise.
178 * class.c (convert_to_base): New function.
179 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
180 (instantiate_type): Handle BASELINKs.
181 * cp-tree.def (BASELINK): New tree code.
182 * cp-tree.h (BASELINK_P): Reimplement.
183 (SET_BASELINK_P): Remove.
184 (BASELINK_BINFO): Reimplement.
185 (BASELINK_FUNCTIONS): Likewise.
186 (BASELINK_ACCESS_BINFO): Likewise.
187 (BASELINK_OPTYPE): Likewise.
188 (convert_to_base): New function.
190 (build_object_ref): Remove.
191 (build_component_ref_1): Likewise.
192 (build_component_ref): Likewise.
193 (build_x_component_ref): Likewise.
194 (build_class_member_access_expr): New function.
195 (finish_class_member_access_expr): Likewise.
196 (build_ptrmemfunc_access_expr): Likewise.
197 * decl.c (grokdeclarator): Handle BASELINKs.
198 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
199 finish_class_member_access_expr.
200 (arg_assoc): Handle BASELINKs.
201 (do_class_using_decl): Likewise.
202 * error.c (dump_decl): Likewise.
203 (dump_expr): Use build_ptrmemfunc_access_expr.
204 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
206 (build_throw): Use BASELINK_FUNCTIONS.
207 * init.c (perform_member_init): Use
208 build_class_member_access_expr.
209 (build_offset_ref): Handle BASELINKs. Use
210 build_class_member_access_expr.
211 * method.c (hack_identifier): Likewise.
212 * parse.y (do_id): Use BASELINK, not TREE_LIST.
213 (primary): Remove uses of build_object_ref.
214 * pt.c (lookup_template_function): Handle BASELINKs.
215 (resolve_overloaded_unification): Likewise.
216 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
217 (lookup_field): Use BASELINK, not TREE_LIST.
218 (lookup_fnfiels): Likewise.
219 (setup_class_bindings): Likewise.
220 * semantics.c (finish_object_call_expr): Do not use
221 build_method_call when we already know what function is being
223 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
224 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
226 (name_p): New function.
227 * typeck.c (build_object_ref): Remove.
228 (build_component_ref_1): Likewise.
229 (build_x_component_ref): Likewise.
230 (build_class_member_access_expr): New function.
231 (finish_class_member_access_expr): Likewise.
232 (build_ptrmemfunc_access_expr): Likewise.
233 (get_member_function_from_ptrfunc): Use
234 build_ptrmemfunc_access_expr.
235 (build_binary_op): Likewise.
236 (build_unary_op): Likewise.
237 (build_ptrmemfunc): Likewise.
238 (pfn_from_ptrmemfunc): Likewise.
239 * typeck2.c (build_m_component_ref): Adjust comment.
241 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
243 * Make-lang.in (CXX_C_OBJS): Update.
244 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
245 * cp-tree.h (cxx_decode_option): Remove.
246 * decl2.c (compare_options, lang_f_options, unsupported_options,
247 cxx_decode_option): Remove.
249 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
251 * typeck.c (build_x_unary_op): Handle pointer-to-member.
253 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
255 * class.c: Don't include obstack.h.
257 * decl2.c: Delete bogus comment.
258 * error.c: Don't include obstack.h.
259 * except.c: Likewise.
260 (dump_type): Correct comment.
261 * method.c: Don't include obstack.h.
264 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
267 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
268 expressions to pointer-to-data-member of pointer-to-member-functions.
270 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
272 * cvt.c (ocp_convert): Delete obsolete code.
273 * parse.y (permanent_obstack): Delete declaration.
274 * pt.c (permanent_obstack): Delete declaration.
275 * repo.c (permanent_obstack): Delete declaration.
276 (open_repo_file): Use xmalloc instead of permanent_obstack.
277 (init_repo): Use xstrdup instead of permanent_obstack.
279 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
281 * cp-tree.h (VF_DERIVED_VALUE): Remove.
282 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
284 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
287 C++ ABI change - vfunc ordering.
288 * class.c (add_virtual_function): Remove.
289 (dfs_modify_all_vtables): Take list of all declared
290 virtuals. Assign all that are not in primary base.
291 (check_for_override): Adjust comments.
292 (create_vtable_ptr): Take single list of virtuals. Build chain
293 of declared virtuals here.
294 (layout_class_type): Take single list of virtuals. Adjust.
295 (finish_struct_1): Keep virtuals on single list. Adjust.
297 2002-08-02 Mark Mitchell <mark@codesourcery.com>
299 * init.c (build_member_call): Use build_new_method_call, not
302 2002-08-02 Krister Walfridsson <cato@df.lth.se>
304 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
306 2002-08-02 Mark Mitchell <mark@codesourcery.com>
308 * call.c (build_method_call): Issue a more helpful error message
309 about ambiguous method names.
311 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
313 * tree.c (build_shared_int_cst): Make cache file scope, and
316 2002-08-02 Jason Merrill <jason@redhat.com>
318 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
319 (cp_expr_size): New fn.
320 * call.c (build_over_call): Lose empty class hackery.
321 (convert_arg_to_ellipsis): Promote non-POD warning to error.
322 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
324 * semantics.c (expand_body): Do tree optimization in the function
327 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
329 * cp-tree.h: Move all warning and flag declarations to c-common.h.
330 * decl.c: Move all warning and flag variables to c-common.c.
331 * decl2.c: Move all warning and flag variables to c-common.c.
332 * lex.c (flag_digraphs): Remove.
333 (warn_traditional): Now in c-common.c.
335 2002-07-31 Mark Mitchell <mark@codesourcery.com>
337 * call.c (build_field_call): Do not look up the field by name.
338 (build_method_call): Simplify.
339 (struct z_candidate): Add access_path and conversion_path. Remove
341 (convert_class_to_reference): Adjust use of
342 add_function_candidate.
343 (add_candidate): Add conversion_path argument.
344 (add_function_candidate): Use it.
345 (add_conv_dndidate): Likewise.
346 (build_builtin_candidate): Likewise.
347 (add_template_candidate_real): Add conversion_path argument.
348 (add_template_conv_candidate): Likewise.
349 (add_template_candidate): Likewise.
350 (build_user_type_conversion_1): Use it.
351 (build_new_function_call): Remove name lookup code. Adjust use of
352 add_template_candidate and add_function_candidate.
353 (build_new_op): Likewise.
354 (convert_like_real): Use build_special_member_call.
355 (build_over_call): Use cand->conversion_path.
356 (build_special_member_call): New method.
357 (build_new_method_call): Remove name lookup code.
358 * cp-tree.def (OFFSET_REF): Update documentation.
359 (TEMPLATE_ID_EXPR): Likewise.
360 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
361 (BASELINK_OPTYPE): Likewise.
362 (build_new_method_call): Adjust prototype.
363 (build_special_member_call): New method.
364 (build_baselink): New method.
365 (build_offset_ref_call_from_tree): Likewise.
366 (build_call_from_tree): Likewise.
367 (finish_qualified_call_expr): Remove.
368 (finish_call_expr): Adjust prototype.
369 (build_x_function_call): Remove.
370 * cvt.c (ocp_convert): Use build_special_member_call.
371 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
372 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
374 (build_offset_ref_call_from_tree): New function.
375 (build_call_from_tree): Likewise.
376 * init.c (expand_cleanup): Use build_special_member_call.
377 (expand_default_init): Likewise.
378 (build_member_call): Use finish_call_expr.
379 (build_new_1): Use build_special_member_call.
380 (push_base_cleanups): Likewise.
381 * method.c (do_build_assign_ref): Likewise.
382 * parse.y (template_id): Do not pass a COMPONENT_REF to
383 lookup_template_function.
384 (primary): Use parse_finish_call_epxr, not finish_call_expr.
385 (parse_finish_call_expr): New function.
386 * pt.c (lookup_template_function): Add assertions.
387 * search.c (lookup_base): Allow T to be a binfo.
388 (build_baselink): New function.
389 (lookup_member): Use it.
390 * semantics.c (finish_call_expr): Do not do name lookup.
391 (finish_object_call_expr): Remove #if 0'd code.
392 (finish_qualified_call_expr): Remove.
393 * typeck.c (build_x_function_call): Remove.
394 (build_static_case): Use build_special_member_call.
395 * typeck2.c (build_functional_cast): Likewise.
397 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
399 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
401 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
403 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
405 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
407 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
410 2002-07-29 Alan Modra <amodra@bigpond.net.au>
412 * cp-tree.h: Comment typo fix.
414 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
416 * spew.c (space_for_token): Allocate zeroed memory for a new token
419 2002-07-27 Roger Sayle <roger@eyesopen.com>
421 * decl.c (builtin_function_1): No need to explicitly mark
422 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
424 2002-07-27 Roger Sayle <roger@eyesopen.com>
426 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
428 2002-07-26 Jason Merrill <jason@redhat.com>
430 * call.c (build_over_call): Likewise.
431 (cp_convert_parm_for_inlining): New fn.
432 (convert_for_arg_passing): New fn.
433 (convert_default_arg, build_over_call): Use it.
434 (type_passed_as): New fn.
435 * pt.c (tsubst_decl): Use it.
436 * decl2.c (cp_build_parm_decl): New fn.
437 (build_artificial_parm): Use it.
438 (start_static_storage_duration_function): Likewise.
439 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
440 (grokparms): Don't mess with DECL_ARG_TYPE.
441 * typeck.c (convert_arguments): Use convert_for_arg_passing.
442 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
444 * cp-tree.h: Declare new fns.
446 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
448 * cp-tree.h (flag_operator_names): Remove.
449 * decl2.c (flag_operator_names): Remove.
450 (lang_f_options): Remove operator-names.
451 * lex.c (D_OPNAME): Remove.
452 (reswords): Remove operator names.
453 (rid_to_yy): Remove operator names.
454 (init_reswords): No need to handle D_OPNAME.
455 * spew.c (read_process_identifier): There are no operator
458 2002-07-26 Jason Merrill <jason@redhat.com>
460 * dump.c (cp_dump_tree): Call c_dump_tree.
461 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
463 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
465 * error.c (print_whitespace): Remove.
466 * g++spec.c (LIBUNWIND): Move.
467 * mangle.c (mangled_position, write_signed_number): Remove.
469 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
471 * decl2.c (cxx_decode_option): Similarly.
473 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
475 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
476 (cxx_sizeof_or_alignof_type): Take a third argument.
477 (cxx_sizeof): Adjust definition.
478 (cxx_alignof): Likewise.
479 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
480 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
482 (c_sizeof_nowarn): Remove definition.
483 (build_unary_op): Use cxx_sizeof_nowarn.
485 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
487 * tree.c (cp_build_qualified_type_real): When copying
488 pointer-to-method types, unshare the record that holds
489 the cached pointer-to-member-function type.
491 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
493 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
495 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
498 * typeck.c (cxx_sizeof_or_alignof_type): New function.
499 (c_sizeof): Remove definition.
500 (expr_sizeof): Use cxx_sizeof.
501 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
502 * decl.c (finish_destructor_body): Use cxx_sizeof.
503 * semantics.c (finish_alignof): Likewise.
504 (finish_alignof): Use cxx_alignof.
505 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
506 (cxx_sizeof_or_alignof_type): Declare.
507 (my_friendly_assert): Move to ../c-common.h.
509 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
511 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
513 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
515 PR c++/7347, c++/7348
516 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
517 * decl.c (make_typename_type): Use it.
518 (make_unbound_class_template): Likewise.
519 (lookup_name_real): Don't call type_access_control if scope is
520 template parameter dependent.
521 * parse.y (template_arg): Call make_unbound_class_template with
523 (nest_name_specifier): Call make_typename_type with tf_parsing set.
524 (typename_sub0): Likewise.
525 (typename_sub1): Likewise.
526 (instantiate_decl): Push class scope.
527 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
528 for both static variable and member function template.
529 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
531 * search.c (type_access_control): Do type access for TEMPLATE_DECL
534 2002-07-20 Roger Sayle <roger@eyesopen.com>
536 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
537 test by using positive_option. Make whitespace consistent.
539 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
541 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
542 members with 'locus'. Adjust use throughout.
543 (struct feed): Likewise.
544 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
546 (snarf_defarg): Use error(), not error_with_file_and_line().
548 2002-07-19 Chris Demetriou <cgd@broadcom.com>
550 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
551 cpp_options is included.
553 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
555 PR c++/2862, c++/2863
556 * pt.c (determine_specialization): Compare the length of
557 TYPE_ARG_TYPES. Tidy.
559 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
562 * decl.c (duplicate_decls): Don't propagate inlining parameters from
563 olddecl to newdecl when newdecl is a specialization of the
564 instantiation olddecl.
566 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
568 PR c++/4802, c++/5387
569 * decl.c (make_typename_type): Use enforce_access.
571 2002-07-17 Scott Snyder <snyder@fnal.gov>
574 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
576 2002-07-12 Mark Mitchell <mark@codesourcery.com>
578 * class.c (add_method): Correct handling of conversion operators.
580 2002-07-11 Mark Mitchell <mark@codesourcery.com>
583 * class.c (add_method): Simplify.
585 2002-07-11 Jason Merrill <jason@redhat.com>
588 * tree.c (cp_copy_res_decl_for_inlining): Also copy
591 2002-07-10 Graham Stott <graham.stott@btinternet.com>
593 * pt.c (template_parm_this_level_p, push_template_decl_real):
594 Pass depth as int pointer.
596 2002-07-11 Tim Josling <tej@melbpc.org.au>
598 Remove front end hard coding from gengtype.c.
600 * config-lang.in (gtfiles): Add files needed for this front end.
602 2002-07-10 Mark Mitchell <mark@codesourcery.com>
604 * cp-tree.h (unqualified_name_lookup_error): Declare it.
605 (begin_function_definition): Adjust prototype.
606 * lex.c (unqualified_name_lookup_error): New function, split out
608 (do_identifier): ... here.
609 * parse.y (parse_begin_function_definition): New function.
611 * semantics.c (begin_function_definition): Accept decl-specifiers
612 and attributes as separate parameters.
614 2002-07-10 Jason Merrill <jason@redhat.com>
617 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
618 modifying the old one.
620 2002-07-09 Mark Mitchell <mark@codesourcery.com>
622 * cp-tree.h (constructor_name_p): Declare it.
623 (check_template_template_default_arg): Likewise.
624 * class.c (handle_using_decl): Use constructor_name_p.
625 * decl.c (grokdeclarator): Likewise.
626 * decl2.c (constructor_name_p): Define it.
627 * init.c (build_member_call): Use constructor_name_p.
628 * parse.y (template_parm): Use check_template_template_default_arg.
629 * pt.c (check_explicit_specialization): Use constructor_name_p.
630 * semantics.c (check_template_template_default_arg): New function.
632 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
634 * pt.c (can_complete_type_without_circularity): Add static to
637 2002-07-08 Mark Mitchell <mark@codesourcery.com>
639 * cp-tree.h (have_extern_spec): Declare it
640 * decl.c (have_extern_spec): Define it.
641 (start_decl): Eliminate use of used_extern_spec.
642 (start_function): Likewise.
643 * parse.y (have_extern_spec): Remove declaration.
644 (used_extern_spec): Likewise.
645 (frob_specs): Eliminate use of used_extern_spec.
646 (.hush_warning): Likewise.
648 2002-07-07 Mark Mitchell <mark@codesourcery.com>
650 * Make-lang.in (cp/parse.o): Depend on decl.h.
651 * cp-tree.h (do_decl_instantiation): Change prototype.
652 * parse.y: Include decl.h.
653 (parse_decl_instantiation): New function.
654 (explicit_instantiation): Use it.
655 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
658 2002-07-07 Roger Sayle <roger@eyesopen.com>
660 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
661 constructor and destructor tests when passed a TEMPLATE_DECL.
663 2002-07-05 Jason Merrill <jason@redhat.com>
665 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
669 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
671 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
673 Repair damage on weak-impared targets caused by my previous patch.
674 * cp-tree.h (import_export_tinfo): Add parameter.
675 * decl2.c (import_export_tinfo): Add parameter, post adjust
677 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
680 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
683 * init.c (build_aggr_init): Remove qualifiers of init before calling
685 (build_vec_init): Flatten multi-dimensional array during cleanup.
686 (build_vec_delete_1): Abort if the type of each element is array.
688 2002-07-03 Graham Stott <graham.stott@btinternet.com>
690 * pt.c (instantiate_class_template): Fix typo.
692 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
694 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
695 by CVS conflict in my last patch.
697 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
700 * pt.c (can_complete_type_without_circularity): New function.
701 (instantiate_class_template): Use it.
702 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
703 message due to incomplete fields.
705 2002-07-01 Mark Mitchell <mark@codesourcery.com>
708 * mangle.c (write_expression): Add mangling for sizeof when
710 * operators.def: Remove stale comment.
712 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
714 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
715 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
716 (tinfo_decl_type): Replace with ...
717 (type_info_ptr_type): ... this.
718 (import_export_tinfo): Declare.
719 (tinfo_decl_p): Rename to ...
720 (unemitted_tinfo_decl_p): ... this.
721 * decl2.c (import_export_decl): Break out tinfo handling into ...
722 (import_export_tinfo): ... here. New function.
723 (finish_file): Adjust.
724 * rtti.c (TINFO_REAL_NAME): New macro.
725 (init_rtti_processing): Create the tinfo types.
726 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
727 (get_tinfo_decl): Adjust.
728 (get_tinfo_ptr): New function.
729 (get_type_id): Use it.
730 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
731 (ptr_initializer): Use get_tinfo_ptr.
732 (ptm_initializer): Likewise.
733 (synthesize_tinfo_var): Break into ...
734 (get_pseudo_ti_init): ... this. Just create the initializer.
735 (get_pseudo_ti_desc): .. and this.
736 (create_real_tinfo_var): Remove.
737 (create_pseudo_type_info): Don't create the vtable decl here.
738 (get_vmi_pseudo_type_info): Remove.
739 (create_tinfo_types): Adjust.
740 (tinfo_decl_p): Rename to ...
741 (unemitted_tinfo_decl_p): ... here. Adjust.
742 (emit_tinfo_decl): Adjust. Create the initializer.
744 2002-06-27 Mark Mitchell <mark@codesourcery.com>
747 * pt.c (tsubst_friend_class): Substitute into the context of the
748 friend before using it.
750 2002-06-26 Mark Mitchell <mark@codesourcery.com>
752 * cp-tree.h (xref_tag): Change prototype.
753 (handle_class_head): Likewise.
754 (build_x_component_ref): Likewise.
755 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
756 (xref_tag): Take attributes as a separate parameter.
757 (xref_tag_from_type): Adjust call to xref_tag.
758 * decl2.c (build_expr_from_tree): Adjust call to
759 build_x_component_ref.
760 (handle_class_head): Take attributes as a separate parameter.
761 * parse.y (parse_xref_tag): New function.
762 (parse_handle_class_head): Likewise.
763 (primary): Use parse_xref_tag.
764 (class_head_decl): Use parse_handle_class_head.
765 (class_head_defn): Likewise.
766 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
767 (build_dynamic_cast_1): Likewise.
768 (create_pseudo_type_info): Likewise.
769 (emit_support_tinfos): Likewise.
770 * typeck.c (build_object_ref): Adjust call to
771 build_x_component_ref.
772 (build_x_component_ref): Remove protect parameter.
774 2002-06-25 Mark Mitchell <mark@codesourcery.com>
776 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
777 * class.c (handle_using_decl): Likewise.
778 (instantiate_type): Likewise.
779 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
780 (xref_basetypes): Change prototype.
781 (begin_mem_initializers): New function.
782 (get_overloaded_fn): Likewise.
783 * decl.c (xref_basetypes): Simplify.
784 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
785 * init.c (build_offset_ref): Likewise.
786 * parse.y (base_init): Use begin_mem_initializers().
787 (structsp): Adjust call to xref_basetypes.
788 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
789 (instantiate_class_template): Adjust call to xref_basetypes.
790 * semantics.c (begin_mem_initializers): New function.
791 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
792 (really_overlaoded_fn): Likewise.
793 (get_overloaded_fn): New function.'
794 (get_first_fn): USe BASELINK_FUNCTIONS.
796 2002-06-24 Mark Mitchell <mark@codesourcery.com>
798 * cp-tree.h (SCALAR_TYPE_P): New macro.
799 (check_for_out_of_scope_variable): New function.
800 (at_class_scope_p): Likewise.
801 (finish_fname): Likewise.
802 * class.c (finish_struct): Use at_function_scope_p.
803 * decl.c (check_for_out_of_scope_variable): New function, split
804 out from do_identifier.
805 (finish_enum): Use at_function_scope_p.
806 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
807 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
808 (primary): Use at_function_scope_p.
809 * search.c (at_class_scope_p): New function.
810 * semantics.c (finish_fname): Likewise.
811 (check_multiple_declarators): Use at_function_scope_p.
813 2002-06-23 Mark Mitchell <mark@codesourcery.com>
815 * parse.y (parse_scoped_id): New function.
817 * cp-tree.h (do_scoped_id): Adjust declaration.
818 * lex.c (do_scoped_id): Remove call to yylex.
819 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
820 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
823 2002-06-23 Matt Thomas <matt@3am-software.com>
825 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
828 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
830 * mangle.c (integer_type_codes): Const-ify.
832 2002-06-20 Richard Henderson <rth@redhat.com>
835 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
836 Call put_var_into_stack.
838 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
840 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
841 array size calculation.
843 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
846 * pt.c (tsubst_expr): Handle FILE_STMT.
848 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
851 * pt.c (lookup_template_class): Don't build complete argument of
852 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
855 2002-06-19 Akim Demaille <akim@epita.fr>
857 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
859 * spew.c, lex.c: Adjust.
860 * parse.y (explicit_instantiation): Add empty action to override
861 the default $$ = $1 where it introduces a type clash.
863 2002-06-14 Jason Merrill <jason@redhat.com>
865 * semantics.c (begin_for_stmt): Push the 'for' scope before
869 * class.c (build_base_field): Set DECL_PACKED.
870 (layout_class_type): Don't use tail padding of PODs.
871 * mangle.c (write_unqualified_name): Fix template conversion op
874 2002-06-16 Richard Henderson <rth@redhat.com>
877 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
878 after template instantiation.
880 2002-06-16 Richard Henderson <rth@redhat.com>
882 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
884 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
886 * cp-tree.h (compiler_error): Remove declaration.
887 * lex.c (compiler_error): Remove definition.
889 2002-06-14 Steve Ellcey <sje@cup.hp.com>
891 * g++spec.c (LIBUNWIND): New.
892 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
894 2002-06-13 Jessica Han <jessica@cup.hp.com>
896 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
897 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
898 (build_vbase_offset_vtbl_entries): Likewise.
899 * rtti.c (build_headof): Likewise.
900 (get_tinfo_decl_dynamic): Likewise.
901 (create_pseudo_type_info): Likewise.
903 2002-06-12 Stan Shebs <shebs@apple.com>
905 * mpw-config.in: Remove file, no longer used.
906 * mpw-make.sed: Ditto.
908 2002-06-07 Zack Weinberg <zack@codesourcery.com>
910 * decl2.c: Update call to cpp_handle_option.
912 2002-06-07 H.J. Lu (hjl@gnu.org)
914 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
916 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
918 * error.c (cp_error_at): Fix typo.
920 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
922 * error.c (cp_diagnostic_starter): Adjust call.
923 (maybe_print_instantiation_context): Change prototype to take a
925 (print_instantiation_full_context): Likewise.
926 (print_instantiation_partial_context): Likewise.
927 (cp_diagnostic_starter): Likewise.
928 (cp_diagnostic_finalizer): Likewise.
929 (cp_print_error_function): Likewise.
930 (cp_printer): Take a secondary parameter as a 'text_info *'.
931 Remove output_state savings. Adjust calls.
933 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
935 * pt.c (inline_parm_levels): Mark for GC.
937 * mangle.c (start_mangling): Allocate G.substitutions here...
938 (init_mangle): ... rather than here.
939 (finish_mangling): Clear the varray pointer when done with it.
940 * spew.c (yylexstring): Don't use VARRAY_FREE.
941 * search.c (bfs_walk): Don't use VARRAY_FREE.
942 * decl2.c (pending_statics): Use gengtype to mark.
943 (deferred_fns): Likewise.
944 (ssdf_decls): Likewise.
945 (init_decl2): Delete.
946 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
947 (cxx_init_decl_processing): Don't call init_decl2.
948 (cxx_pop_function_context): Don't use VARRAY_FREE.
949 * cp-tree.h (struct saved_scope): No need for special marking
951 (struct language_function): Likewise.
952 (local_classes): Use gengtype to mark.
953 (init_decl2): Delete prototype.
954 * class.c (init_class_processing): Don't use
955 ggc_add_tree_varray_root.
956 (build_vtbl_initializer): Don't use VARRAY_FREE.
958 * decl.c (typename_compare): Don't use same_type_p.
960 * decl.c: Include hashtab.h instead of hash.h.
961 (typename_hash): Update to use htab_h.
962 (typename_compare): Likewise.
963 (typename_htab): Use gengtype to mark.
964 (build_typename_type): Update to use htab_h.
965 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
967 * Make-lang.in (gt-cp-tree.h): New rule.
968 (cp/tree.o): Depend on gt-cp-tree.h.
969 * config-lang.in (gtfiles): Add cp/tree.c.
970 * tree.c: Include gt-cp-tree.h.
971 (list_hash_table): Use gengtype to mark.
972 (init_tree): Use gengtype to mark trees.
974 * Make-lang.in (cp/decl.o): Add debug.h dependency.
975 * call.c (struct z_candidate): Use gengtype.
976 (USER_CONV_CAND): Use WRAPPER_ZC.
977 (convert_class_to_reference): Use build_zc_wrapper.
978 (build_type_conversion_1): Likewise.
979 (build_over_call): Use WRAPPER_ZC.
980 (add_warning): Use build_zc_wrapper.
981 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
982 * cp-tree.h (struct lang_identifier): Use gengtype.
983 (struct template_parm_index_s): Likewise.
984 (struct ptrmem_cst): Likewise.
985 (struct tree_binding): Likewise.
986 (struct tree_overload): Likewise.
987 (struct tree_srcloc): Likewise.
988 (struct tree_wrapper): Likewise. Also modify to have a pointer
989 to struct z_candidate rather than void.
990 (enum cp_tree_node_structure_enum): New.
991 (union lang_tree_node): New.
992 (cxx_mark_tree): Delete prototype.
993 (cp_tree_node_structure): New prototype.
994 (build_ptr_wrapper): Delete prototype.
995 (build_int_wrapper): Delete prototype.
996 (build_zc_wrapper): New prototype.
997 * decl.c: Include debug.h
998 (cxx_mark_tree): Delete.
999 (cp_tree_node_structure): New.
1000 * tree.c (build_ptr_wrapper): Delete.
1001 (build_int_wrapper): Delete.
1002 (build_zc_wrapper): New.
1004 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1005 Correct typo. Patch from k_fukui@highway.ne.jp.
1007 * semantics.c (current_stmt_tree): Update for change to
1008 struct language_function.
1009 (finish_mem_initializers): Likewise.
1010 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1011 * cp-tree.h (struct language_function): Rename from
1012 cp_language_function. Change all uses.
1013 (cp_function_chain): Don't need to cast.
1015 * class.c (duplicate_tag_error): Reset discriminator.
1016 (check_bases_and_members): Update for data structure changes.
1017 * cp-tree.h (struct lang_id2): Use gengtype.
1018 (flagged_type_tree): Likewise.
1019 (SET_LANG_ID): Use GGC on struct lang_id2.
1020 (struct cp_language_function): Use gengtype. Remove field
1021 'x_vcalls_possible_p'.
1022 (current_vcalls_possible_p): Delete.
1023 (struct lang_type_header): New.
1024 (struct lang_type_class): Rename from struct lang_type. Include
1025 struct lang_type_header.
1026 (struct lang_type_ptrmem): New.
1027 (struct lang_type): New.
1028 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
1029 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
1030 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1031 (struct lang_decl_flags): Use gengtype. Add discriminators.
1032 (struct lang_decl): Use gengtype. Add and use discriminators.
1033 Update the macros that reference moved fields.
1034 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
1035 (SET_DECL_THUNK_P): Set discriminator too.
1036 (clear_inline_text_obstack): Delete prototype.
1037 (finish_inline_definitions): Delete prototype.
1038 (mark_pending_inlines): Delete prototype.
1039 (lang_check_failed): New prototype.
1040 * decl.c (struct named_label_use_list): Use gengtype.
1041 (struct named_label_list): Likewise.
1042 (mark_binding_level): Delete.
1043 (mark_named_label_lists): Delete.
1044 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1045 (cxx_init_decl_processing): Use generated marker routine.
1046 (begin_destructor_body): Delete dead set to
1047 current_vcalls_possible_p.
1048 (mark_lang_function): Delete.
1049 (mark_cp_function_context): Delete.
1050 (lang_mark_tree): Use generated marker routines.
1051 * decl2.c (start_objects): Set discriminator when setting
1052 GLOBAL_INIT_PRIORITY.
1053 * lex.c (retrofit_lang_decl): Set discriminators.
1054 (copy_lang_type): Update for changes to lang_type structure.
1055 (cp_make_lang_type): Set discriminator.
1056 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
1057 * search.c: Include ggc.h.
1058 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1059 (finish_inline_definitions): Delete.
1060 * spew.c (struct token): Use gengtype.
1061 (struct token_chunk): New.
1062 (struct unparsed_text): Use gengtype. Store tokens in chunks.
1063 (struct feed): Use gengtype.
1064 (feed_obstack): Delete.
1065 (feed): Mark as GC root.
1066 (pending_inlines): Mark as GC root.
1067 (pending_inlines_tail): Likewise.
1068 (processing_these_inlines): Likewise.
1069 (token_obstack): Make static.
1070 (first_token): Likewise.
1071 (init_spew): Don't initialise deleted things; use gengtype for roots.
1072 (clear_inline_text_obstack): Delete.
1073 (feed_input): Use GC for struct feed. Update for changes to
1074 struct unparsed_text.
1075 (mark_pending_inlines): Delete.
1076 (next_token): Rename from add_token. Change all callers. Update
1077 for changes to struct unparsed_text.
1078 (space_for_token): New.
1079 (remove_last_token): New.
1080 (alloc_unparsed_text): New.
1081 (snarf_block): Take an unparsed_text. Update for changes to struct
1083 (snarf_method): Update for changes to struct unparsed_text.
1084 (snarf_defarg): Update for changes to struct unparsed_text.
1085 * tree.c (lang_check_failed): New.
1087 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
1088 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
1089 (cp/spew.o): Add dependency on gt-<filename>.h.
1090 (cp/decl2.o): Add dependency on gt-<filename>.h.
1091 (cp/call.o): Add dependency on gt-<filename>.h.
1092 (cp/pt.o): Add dependency on gt-<filename>.h.
1093 (cp/repo.o): Add dependency on gt-<filename>.h.
1094 (cp/parse.o): Add dependency on gt-<filename>.h.
1095 * call.c: Use gengtype for roots.
1096 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
1097 decl2.c parse.y pt.c repo.c spew.c.
1098 * cp-tree.h: Use gengtype for roots.
1099 (struct saved_scope): Use GGC, gengtype.
1100 (cp_parse_init): Delete prototype.
1101 (init_pt): Delete prototype.
1102 * decl.c: Use gengtype for roots.
1103 (mark_saved_scope): Delete.
1104 (cxx_init_decl_processing): Don't call deleted initilisation
1106 (signed_size_zero_node): Delete, unused.
1107 * decl.h: Use gengtype for roots.
1108 * decl2.c: Use gengtype for roots.
1109 * lex.h: Use gengtype for roots.
1110 * parse.y: Use gengtype for roots.
1111 (cp_parse_init): Delete.
1112 * pt.c: Use gengtype for roots.
1114 * repo.c: Use gengtype for roots.
1115 * spew.c: Use gengtype for roots.
1117 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
1118 (cp/decl.o): Add dependency on gtype-cp.h.
1119 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
1120 Include gtype-cp.h. Allow for filename changes.
1122 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
1123 (cp/decl.o): Add cp/gt-decl.h dependency.
1124 * config-lang.in (gtfiles): New.
1125 * tree.h: Rename struct binding_level to struct cp_binding_level.
1126 * decl.c: Rename struct binding_level to struct cp_binding_level.
1127 Include cp/gt-decl.h.
1128 (struct cp_binding_level): Use gengtype.
1129 (make_binding_level): Use GGC on struct cp_binding_level.
1130 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
1131 (cxx_init_decl_processing): Mark free_binding_level as
1134 * decl.c (mark_cp_function_context): Update calling sequence.
1136 * decl.c (start_function): Don't free 'struct
1137 cp_language_function'.
1138 (pop_cp_function_context): Likewise.
1139 (save_function_data): Allocate it using GC.
1140 * semantics.c (genrtl_start_function): Don't free 'struct
1141 cp_language_function'.
1143 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
1145 * lang-specs.h: Use cpp_debug_options.
1147 2002-05-28 Zack Weinberg <zack@codesourcery.com>
1149 * mangle.c, tree.c: Include real.h.
1150 * Make-lang.in: Update dependency lists.
1152 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
1154 * lex.c: Don't include c-lex.h.
1155 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
1157 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
1159 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
1161 2002-05-22 Richard Henderson <rth@redhat.com>
1163 * decl.c (obscure_complex_init): Check for VAR_DECL
1164 before using DECL_THREAD_LOCAL.
1166 2002-05-22 Richard Henderson <rth@redhat.com>
1168 * decl.c (check_tag_decl): Handle RID_THREAD.
1169 (obscure_complex_init): Reject run-time init of tls.
1170 (grokvardecl, grokdeclarator): Handle RID_THREAD.
1171 * lex.c (reswords): Add __thread.
1172 (rid_to_yy): Map RID_THREAD to SCSPEC.
1174 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
1176 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
1177 * cp-tree.h (cxx_post_options): Kill.
1178 * cp-lex.c (cxx_post_options): Kill.
1180 2002-05-21 Richard Henderson <rth@redhat.com>
1182 * lex.c (rid_to_yy): Add RID_THREAD.
1184 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
1186 * init.c (build_vec_init): Test for trivial copy-assignment when
1187 copy-assigning arrays.
1189 2002-05-20 Andreas Jaeger <aj@suse.de>
1191 * init.c (build_default_init): Remove unused variable.
1193 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
1195 * call.c (any_strictly_viable): New.
1196 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
1198 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1200 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
1202 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1205 * pt.c (do_decl_instantiation): Don't complain explicit
1206 instantiation after explicit specialization.
1207 (do_type_instantiation): Likewise.
1209 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
1211 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
1213 (complete_type_or_else): ... this. Redefined as macro.
1214 (cxx_incomplete_type_diagnostic): Declare.
1215 (cxx_incomplete_type_error): Define as macro.
1216 * init.c (build_delete): Warn about incomplete types other than
1217 void, and use the built-in operator delete for them.
1218 * typeck.c (complete_type_or_diagnostic): Renamed from
1219 complete_type_or_else. Added warn_only argument, passed to...
1220 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
1221 warnings or errors depending on new warn_only argument. Renamed
1223 (cxx_incomplete_type_error): ... this. New implementation in
1224 terms of cxx_incomplete_type_diagnostic.
1226 2002-05-18 Jason Merrill <jason@redhat.com>
1229 * decl2.c (import_export_decl): If we clear
1230 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
1232 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1235 * pt.c (verify_class_unification): Don't check if PARM is template
1236 parameter dependent. Simplify.
1237 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
1238 parameter dependent expression.
1240 2002-05-14 Jason Merrill <jason@redhat.com>
1242 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
1244 (synthesize_tinfo_var): Take the public decl.
1245 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
1246 (emit_tinfo_decl): Adjust. Call import_export_decl.
1247 * decl2.c (import_export_decl): Simplify tinfo decl handling.
1249 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
1251 * cp-tree.h (struct lang_type): Added non_zero_init.
1252 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
1253 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
1254 * class.c (check_field_decls): Test non_zero_init.
1255 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
1256 zero-to-NULL conversions.
1257 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
1258 type that needs zero-initialization without zeros.
1259 (check_initializer_decl): Compute zero-initializer for types
1260 that require a non-trivial one.
1261 * init.c (build_forced_zero_init): New function.
1262 (build_default_init): Use it.
1263 * tree.c (zero_init_p): New function.
1264 * typeck2.c (force_store_init_value): New function.
1265 (process_init_constructor): Create non-trivial zero-initializers
1266 for array members and class fields.
1268 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
1270 * lang-specs.h: Remove redundant -lang-c++.
1272 2002-05-13 Jason Merrill <jason@redhat.com>
1274 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
1275 (fixed_type_or_null): See through reference vars.
1276 (build_base_path): Vtable contents are constant.
1277 * typeck.c (get_member_function_from_ptrfunc): Likewise.
1279 2002-05-12 Jason Merrill <jason@redhat.com>
1281 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
1284 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
1286 * cp-tree.h (flag_ansi): Remove.
1287 * decl2.c (flag_ansi): Remove.
1288 (cxx_decode_option): Set flag_iso and flag_undef.
1290 2002-05-09 Jason Merrill <jason@redhat.com>
1292 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
1293 Use subtraction rather than a bitmask to get the index.
1294 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
1296 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
1298 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
1300 * Make-lang.in (decl2.o): Update.
1301 * cp-tree.h (warn_multichar): Remove.
1302 * decl2.c: Include c-common.h.
1303 (warn_multichar): Remove.
1305 2002-05-03 Jason Merrill <jason@redhat.com>
1307 * tree.c (build_cplus_array_type): Only const and volatile get
1310 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
1312 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1314 ABI change, returning simple classes from functions.
1315 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
1316 TYPE_HAS_TRIVIAL_INIT_REF is false or
1317 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
1319 2002-04-30 Jason Merrill <jason@redhat.com>
1322 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
1323 anonymous class with a typedef if there are attributes.
1325 2002-04-29 Paul Eggert <eggert@twinsun.com>
1327 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
1329 2002-04-29 Jakub Jelinek <jakub@redhat.com>
1332 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
1335 2002-04-29 Mark Mitchell <mark@codesourcery.com>
1338 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
1339 enter that scope before name lookup.
1342 * method.c (do_build_copy_constructor): Avoid building
1343 cv-qualified reference types.
1345 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
1348 * decl.c (grok_op_properties): Assignment ops don't have to return
1349 by value. operator% should.
1351 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1354 * decl.c (duplicate_decls): Call merge_weak.
1356 2002-04-26 Richard Henderson <rth@redhat.com>
1358 * parse.y (malloced_yyss, malloced_yyvs): New.
1359 (yyoverflow): Re-add. Set them.
1360 (free_parser_stacks): New.
1362 2002-04-26 Mark Mitchell <mark@codesourcery.com>
1365 * method.c (do_build_assign_ref): Pass a derivation to
1366 build_method_call when calling base class assignment operators.
1368 2002-04-26 Richard Henderson <rth@redhat.com>
1370 * parse.y (yyoverflow): Revert.
1372 2002-04-26 Richard Henderson <rth@redhat.com>
1375 * parse.y (string): Remove. Update all uses to use STRING
1376 instead, and not call combine_strings.
1377 * rtti.c (tinfo_name): Use fix_string_type.
1378 * semantics.c (finish_asm_stmt): Don't call combine_strings.
1379 * spew.c (yylexstring): New.
1380 (read_token): Use it.
1382 2002-04-25 Richard Henderson <rth@redhat.com>
1385 * parse.y (yyoverflow): New.
1387 2002-04-25 Jason Merrill <jason@redhat.com>
1390 * search.c (check_final_overrider): No longer static.
1391 * class.c (update_vtable_entry_for_fn): Call it.
1392 * cp-tree.h: Adjust.
1394 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
1396 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
1397 * cp-tree.h (cxx_set_yydebug): Die.
1398 * lex.c (YYDEBUG): Get from c-lex.h.
1399 (cxx_set_yydebug): Remove.
1400 * parse.y: Include c-lex.h.
1401 (YYDEBUG): Get from c-lex.h.
1403 2002-04-24 Mark Mitchell <mark@codesourcery.com>
1406 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
1409 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
1411 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
1412 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
1414 * cp-tree.h (cp_attribute_table): Rename.
1415 * decl.c (lang_attribute_table): Remove declaration.
1416 (cxx_init_decl_processing): Don't set it.
1417 * tree.c (cp_attribute_table): Rename.
1419 2002-04-24 Jason Merrill <jason@redhat.com>
1422 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
1423 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
1424 The pedwarn for array assignment is now unconditional.
1425 * tree.c (build_cplus_array_type_1): Still process simple array types
1426 normally in templates.
1429 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
1432 2002-04-23 Jakub Jelinek <jakub@redhat.com>
1434 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
1435 node with attributes.
1437 2002-2-23 David O'Brien <obrien@FreeBSD.org>
1439 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
1440 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
1442 2002-04-23 Mark Mitchell <mark@codesourcery.com>
1445 * pt.c (tsubst_friend_class): Handle templates with explicit
1449 * typeck.c (merge_types): Remember the cv-qualification of pointer
1450 types when merging them.
1452 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
1454 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
1455 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
1456 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
1457 cxx_mark_function_context): New.
1458 * decl.c (push_cp_function_context, pop_cp_function_context,
1459 mark_cp_function_context): Rename for consistency.
1460 (cxx_init_decl_processing): Don't set old hooks.
1462 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
1464 * call.c (convert_type_from_ellipsis): Rename, update.
1465 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
1466 * cp-tree.h (convert_type_from_ellipsis): Rename.
1467 * decl.c (cxx_init_decl_processing): Don't set hook.
1469 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
1471 * call.c (build_new_method_call): Update.
1472 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
1473 * cp-tree.h (cxx_incomplete_type_error): New.
1474 * decl.c (grokdeclarator, grokparms): Update.
1475 * decl2.c (check_classfn): Update.
1476 * pt.c (tsubst): Update.
1477 * typeck.c (complete_type_or_else, expr_sizeof,
1478 decay_conversion): Update.
1479 * typeck2.c (incomplete_type_error): Rename.
1480 (add_exception_specifier): Update.
1482 2002-04-18 Jason Merrill <jason@redhat.com>
1485 * search.c (setup_class_bindings): A class template qualifies as a
1488 2002-04-17 Jakub Jelinek <jakub@redhat.com>
1491 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
1494 2002-04-16 Mark Mitchell <mark@codesourcery.com>
1496 * init.c (begin_init_stmts): Remove commented out code.
1497 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
1498 * semantics.c (begin_gobal_stmt_expr): Adjust call to
1499 expand_start_stmt_expr.
1501 2002-04-15 Mark Mitchell <mark@codesourcery.com>
1503 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
1504 dso_handle itself, to __cxa_atexit.
1506 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1508 * error.c (cxx_print_error_function): Adjust call to macros.
1510 2002-04-14 Jakub Jelinek <jakub@redhat.com>
1512 * class.c (layout_virtual_bases): Do all dsize computation on trees.
1514 2002-04-14 Jason Merrill <jason@redhat.com>
1516 * typeck.c (get_member_function_from_ptrfunc): Don't do
1517 gratuitious division and multiplication on
1518 ptrmemfunc_vbit_in_delta targets.
1520 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1523 * semantics.c (finish_expr_stmt): Remember the type of the
1524 expression before any conversions are performed.
1526 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1529 * call.c (add_template_candidate_real): Do not treat member
1530 templates as copy constructors.
1532 2002-04-12 Mark Mitchell <mark@codesourcery.com>
1534 * decl.c (duplicate_decls): Do not copy the RTL for a variable
1535 declaration if the old variable had an incomplete type and the new
1537 (complete_vars): Do not call layout_decl for completed variables.
1539 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
1541 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
1542 with an explicit one.
1543 (follow_tag_typedef): New.
1544 (lookup_tag): Use it to extract the tag of an explicit typedef.
1545 (xref_tag): Likewise.
1547 2002-04-11 Andrew Haley <aph@redhat.com>
1549 * typeck.c (type_after_usual_arithmetic_conversions):
1550 If two types have the same variant, return immediately.
1551 When two floating-point operands are the same precision:
1552 convert to float if one of the operands is float;
1553 if neither operand is one of the standard types, return the type
1554 of the first operand.
1556 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
1559 * decl.c (make_typename_type): Remove implicit typenameness.
1561 2002-04-09 Jason Merrill <jason@redhat.com>
1563 PR optimization/6189
1564 * semantics.c (genrtl_start_function): Don't free
1565 DECL_SAVED_FUNCTION_DATA for inline functions.
1567 * init.c (build_member_call): For now, don't convert to
1568 intermediate base if it would cause an error.
1570 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
1572 * parse.y (namespace_qualifier, maybe_identifier,
1573 begin_explicit_instantiation, end_explicit_instantiation,
1574 apparent_template_type, .finish_template_type,
1575 do_id, maybe_init, defarg_again, component_decl_1):
1576 Add ending ';', in accordance with POSIX.
1578 2002-04-06 Mark Mitchell <mark@codesourcery.com>
1581 * class.c (layout_class_type): Remember incomplete static
1583 (finish_struct_1): Call complete_vars, not
1584 hack_incomplete_structures.
1585 * cp-tree.h (hack_incomplete_structures): Rename to ...
1586 (complete_vars): ... this.
1587 (struct saved_scope): Remove incomplete.
1588 (namespace_scope_incomplete): Remove.
1589 * decl.c (struct binding_level): Remove incomplete.
1590 (incomplete_vars): New variable.
1591 (mark_binding_level): Don't mark incomplete.
1592 (print_binding_level): Don't print it.
1593 (mark_saved_scope): Don't mark incomplete.
1594 (pushdecl): Use maybe_register_incopmlete_var.
1595 (cxx_init_decl_processing): Register incomplete_vars for GC.
1596 (start_decl_1): Clarify error message.
1597 (hack_incomplete_vars): Remove.
1598 (maybe_register_incomplete_var): New function.
1599 (complete_vars): Likewise.
1601 2002-04-06 Jason Merrill <jason@redhat.com>
1604 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
1605 set before checking it.
1608 * init.c (build_member_call): Use build_scoped_ref.
1609 (resolve_offset_ref): Likewise.
1610 * call.c (build_scoped_method_call): Likewise.
1611 * tree.c (maybe_dummy_object): Kludge around current_class_type being
1613 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
1614 * cp-tree.h: Adjust.
1616 * init.c (push_base_cleanups): Just use build_scoped_method_call.
1619 * method.c (implicitly_declare_fn): Pass unqualified type to
1620 synthesize_exception_spec.
1622 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
1624 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1625 * cvt.c: Update comment.
1626 * init.c (expand_cleanup_for_base): Update.
1627 * semantics.c (finish_parenthesized_expr): Update.
1628 * typeck.c (cp_truthvalue_conversion): Update.
1630 2002-04-04 Jason Merrill <jason@redhat.com>
1632 * semantics.c (finish_eh_cleanup): New fn.
1633 * cp-tree.h: Add prototype.
1634 * init.c (perform_member_init, expand_cleanup_for_base): Use
1636 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
1637 * cp-tree.h: Remove references.
1638 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
1639 * dump.c (cp_dump_tree): Likewise.
1640 * pt.c (tsubst_expr): Likewise.
1641 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
1642 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
1643 * tree.c (cp_statement_code_p): Likewise.
1645 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
1648 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
1652 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
1654 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
1656 2002-04-03 Richard Henderson <rth@redhat.com>
1658 * cp-lang.c (cxx_warn_unused_global_decl): New.
1659 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
1661 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
1663 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
1664 * tree.c (init_tree): Don't set hook.
1666 2002-04-03 Roger Sayle <roger@eyesopen.com>
1669 * decl.c (duplicate_decls): Don't mess with assembler names when
1670 redeclaring builtin functions as static.
1672 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1674 * call.c (build_addr_func): Update.
1675 * class.c (resolve_address_of_overloaded_function): Update.
1676 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1677 * cp-tree.h (cxx_mark_addressable): New.
1678 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
1679 * decl2.c (build_cleanup): Update.
1680 * except.c (build_throw): Update.
1681 * init.c (resolve_offset_ref): Update.
1682 * pt.c (convert_nontype_argument): Update.
1683 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
1684 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
1685 unary_complex_lvalue): Update.
1686 (mark_addressable): Rename.
1688 2002-04-01 Roger Sayle <roger@eyesopen.com>
1691 * decl.c (duplicate_decls): Overwrite the RTL when (and only
1692 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
1693 but follow the SET_DECL_RTL idiom used elsewhere in the function.
1695 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
1697 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1698 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1699 * decl.c (grokdeclarator): Update.
1700 * mangle.c (write_integer_cst): Update.
1701 * typeck.c (build_binary_op): Update.
1703 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1705 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
1706 * lex.c (cxx_init): Don't set hook.
1708 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
1710 * Make-lang.in (error.o): Update.
1711 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1712 * cp-tree.h (struct diagnostic_context): Predeclare.
1713 (cxx_print_error_function): New.
1714 * error.c: Include langhooks-def.h.
1715 (lang_print_error_function): Rename. Update.
1716 (init_error): Don't set hook.
1718 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1720 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
1722 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
1723 * decl.c (finish_enum): Similarly.
1724 * error.c (dump_type): Similarly.
1725 * lex.c (cxx_init): Similarly.
1726 * mangle.c (write_builtin_type): Similarly.
1727 * typeck.c (comptypes): Similarly.
1729 2002-03-28 Roger Sayle <roger@eyesopen.com>
1732 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
1733 in the g++ front-end.
1734 (duplicate_decl): Allow redefinition of anticipated built-ins.
1735 Fix inlining problem by over-writing the old DECL_RTL.
1736 (lookup_namespace_name): Fail to find an identifier in the
1737 specified namespace if its still anticipated.
1738 (builtin_function_1): New function split out from builtin_function
1739 to create a builtin in the current namespace with given context.
1740 (builtin_function): Call builtin_function_1 to define the
1741 appropriate builtins in both the std and global namespaces.
1742 (select_decl): Don't test for anticipated decls here.
1743 (unqualified_namespace_lookup): Instead ignore them whilst
1744 searching through scopes and namespaces.
1745 * decl2.c (do_nonmember_using_decl): If a using declaration
1746 specifies an anticipated built-in function, mark it as no longer
1747 anticipated in that scope.
1748 (ambiguous_decl): Avoid resolving to an anticipated decl.
1749 * lex.c (do_scoped_id): Fail to find an identifier in the global
1750 namespace if its still anticipated.
1752 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
1754 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
1755 * cp-tree.h (cp_make_lang_type): Rename.
1756 * lex.c (cp_make_lang_type): Rename.
1757 (make_aggr_type): Update.
1758 * tree.c (init_tree): Don't set make_lang_type_fn.
1760 2002-03-29 Jakub Jelinek <jakub@redhat.com>
1763 * class.c (finish_struct_1): Update static field's DECL_MODE even
1764 if its type is a variant of t.
1766 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1768 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
1769 * cp-tree.h (cxx_insert_default_attributes): New.
1770 * decl.c (insert_default_attributes): Rename.
1772 2002-03-27 Mark Mitchell <mark@codesourcery.com>
1775 * call.c (build_op_delete_call): Allow for the fact the placement
1776 may be a COMPOUND_EXPR.
1778 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
1780 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1781 * cp-tree.h (init_cplus_expand): Remove.
1782 (cxx_expand_expr): New.
1783 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
1785 (init_cplus_expand): Remove.
1786 * lex.c (cxx_init): Don't call init_cplus_expand.
1788 2002-03-26 Mark Mitchell <mark@codesourcery.com>
1791 * init.c (build_new_1): Allow for the fact the result of
1792 build_function_call may be a COMPOUND_EXPR.
1794 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
1797 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
1798 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1799 (dfs_skip_nonprimary_vbases_markedp): Remove.
1800 * search.c (get_shared_vbase_if_not_primary): Remove.
1801 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1802 (dfs_skip_nonprimary_vbases_markedp): Remove.
1803 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
1804 (dfs_marked_real_bases_queue_p): Likewise.
1806 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
1808 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1809 * cp-tree.h (cxx_mark_tree): New.
1810 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
1812 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
1814 * cp-tree.h (cxx_maybe_build_cleanup): New.
1815 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
1816 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
1817 * tree.c (build_target_expr): Update.
1818 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
1820 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
1822 * decl2.c (cxx_decode_option): Handle -E.
1823 * lang-specs.h (default_compilers): Preprocess with cc1plus.
1824 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
1826 2002-03-23 Jakub Jelinek <jakub@redhat.com>
1829 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
1831 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1833 * error.c (dump_type): Be careful about implicit typenames.
1835 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1838 * semantics.c (finish_base_specifier): Handle erronous base
1841 2002-03-22 Zack Weinberg <zack@codesourcery.com>
1843 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
1846 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
1848 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
1849 an index into the vtable_entry array regardless of
1850 TARGET_PTRMEMFUNC_VBIT_LOCATION.
1852 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
1854 * tree.c (cp_cannot_inline_tree_fn): Same.
1856 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
1858 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1859 insert_block, getdecls, global_bindings_p): New.
1861 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
1864 * mangle.c (struct globals) Add internal_mangling_p member.
1865 (write_template_param): Do internal mangling, if needed.
1866 (mangle_conv_op_name_for_type): Request internal mangling.
1868 2002-03-20 Jason Merrill <jason@redhat.com>
1871 * init.c (build_delete): Check access for a member op delete here.
1872 * decl2.c (delete_sanity): Not here.
1874 2002-03-19 Jason Merrill <jason@redhat.com>
1877 * class.c (get_vfield_name): Use the constructor_name.
1879 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
1881 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1882 * cp-tree.h (lang_printable_name): Rename.
1883 * error.c (lang_decl_name): Use new hook.
1884 * lex.c (cxx_init): Remove old hook.
1885 * pt.c (tsubst_decl): Use new hook.
1886 * tree.c (lang_printable_name): Rename.
1888 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
1891 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
1892 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
1893 only after recording the declaration.
1895 2002-03-18 Jason Merrill <jason@redhat.com>
1898 * init.c (resolve_offset_ref): Hand off to build_component_ref.
1900 PR c++/4222, c++/5995
1901 * call.c (build_over_call): Fix empty class logic.
1904 * cp-tree.h (struct saved_scope): Add last_parms field.
1905 * decl.c (maybe_push_to_top_level): Save last_function_parms.
1906 (pop_from_top_level): Restore it.
1909 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
1913 * pt.c (tsubst_friend_function): Use decl_namespace_context.
1915 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
1916 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
1917 type with a nontrivial destructor.
1919 2002-03-17 Jason Merrill <jason@redhat.com>
1922 * class.c (build_base_path): Virtual base layout is fixed in
1925 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
1927 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
1928 * parse.y (yyparse): Remove macro.
1930 2002-03-17 Jason Merrill <jason@redhat.com>
1933 * init.c (build_new_1): Pass the right pointer to op delete.
1935 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
1938 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
1939 conversion operators go.
1940 (struct lang_decl_flags): Add template_conv_p and unused
1942 (DECL_TEMPLATE_CONV_FN_P): New macro.
1943 * call.c (build_user_type_conversion_1): Don't check second type
1944 conversion of overload set first.
1945 * class.c (add_method): Make sure templated conversion operators
1946 all end up on slot 2.
1947 * lex.c (do_identifier): A conversion operator token might be
1948 satisfied by a templated conversion operator.
1949 * pt.c (check_explicit_specialization): Use
1950 CLASSTYPE_FIRST_CONVERSION_SLOT.
1951 (template_parm_this_level_p): New function.
1952 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
1953 * search.c (lookup_fnfields_1): Template conversions will be on
1955 * typeck.c (build_component_ref): Preserve the type of an
1956 conversion operator name on the overload type.
1957 (build_x_function_call): Retrieve the conversion operator name.
1959 2002-03-15 Richard Henderson <rth@redhat.com>
1961 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
1963 2002-03-15 Mark Mitchell <mark@codesourcery.com>
1965 * cp-tree.h (CLEANUP_DECL): Remove.
1966 (CLEANUP_EXPR): Likewise.
1967 * decl.c (destroy_local_var): Simplify.
1968 (maybe_build_cleanup): Tidy.
1969 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
1970 * semantics.c (cp_expand_stmt): Likewise.
1971 * cp/tree.c (cp_statement_code_p): Likewise.
1973 2002-03-15 Jason Merrill <jason@redhat.com>
1976 * decl.c (duplicate_decls): Use merge_types instead of common_type.
1977 * typeck.c (common_type): Just hand off to
1978 type_after_usual_arithmetic_conversions and
1979 composite_pointer_type.
1980 (merge_types): New fn.
1981 (commonparms): Use it instead of common_type.
1982 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
1983 (composite_pointer_type): Also handle attributes.
1984 * cp-tree.h: Declare merge_types.
1986 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
1988 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
1990 2002-03-14 Richard Henderson <rth@redhat.com>
1992 * decl.c: Include c-pragma.h.
1993 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
1994 * Make-lang.in: Update dependencies.
1996 2002-03-14 Jakub Jelinek <jakub@redhat.com>
1999 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2000 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2002 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2004 * mangle.c (write_builtin_type): Handle 128-bit integers even if
2005 they are not a standard integer type.
2007 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2009 * cp-tree.h (init_init_processing): Remove declaration.
2010 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2011 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2013 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2015 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2017 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2019 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2020 cplus_tree_code_name): Delete.
2021 (cxx_init): Don't call add_c_tree_codes, instead set
2022 lang_unsafe_for_reeval. Don't try to copy into the various
2025 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
2028 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2029 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2032 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2034 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
2035 DR209 is now not a defect.
2036 * cp-tree.h (skip_type_access_control): Remove.
2037 * decl.c (grokdeclarator): Do type access control for friend
2039 * semantics.c (decl_type_access_control): Don't reset
2040 current_type_lookups.
2041 (save_type_access_control): Always save the lookups.
2042 (skip_type_access_control): Remove.
2043 (finish_class_definition): Don't change type_lookups.
2045 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2047 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
2049 * typeck.c (build_static_cast): Compare non-qualified types
2050 with pointer to member conversions.
2052 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
2053 Daniel Berlin <dan@dberlin.org>
2055 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2056 (cxx_get_alias_set): Use it.
2058 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2060 * cp-tree.h (stabilize_expr): Prototype.
2062 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
2064 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2065 conditional return void.
2067 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
2069 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2070 * cp-tree.h (cxx_unsave): New.
2071 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2072 (init_tree): Update.
2074 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2076 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2077 explicit sizeof/sizeof.
2078 * decl2.c (cxx_decode_option): Likewise.
2079 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2081 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
2084 * decl.c (lookup_tag): Only reject enum/class mismatch, not
2085 class/union mismatch.
2086 * parse.y (check_class_key): New function.
2087 (structsp): Call it.
2089 2002-03-01 Michael Matz <matz@suse.de>
2091 * typeck.c (cp_pointer_int_sum): Complete inner type which is
2092 used later by size_in_bytes().
2094 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
2096 * cp-tree.h: Require __GNUC__ to be #defined.
2097 (build_init): Add missing prototype.
2099 2002-03-01 Jason Merrill <jason@redhat.com>
2101 * except.c: Don't include decl.h or obstack.h. Do include
2103 (build_throw): Destroy temporaries from the thrown
2104 expression before calling __cxa_throw. Construct a thrown
2105 temporary directly into the exception object.
2106 (stabilize_throw_expr): New function.
2107 (wrap_cleanups_r): New function.
2108 * tree.c (stabilize_expr): New function.
2109 * init.c (build_init): New function.
2110 * Make-lang.in (cp/except.o): Adjust .h deps.
2112 2002-02-28 Jason Merrill <jason@redhat.com>
2114 * search.c (lookup_base_r): Don't clear is_non_public just because
2115 we found a friendly scope.
2117 * decl.c (finish_function): Only warn about missing return
2118 statement with -Wreturn-type.
2120 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
2122 * class.c (build_clone): Update.
2123 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2124 * cp-tree.h (cxx_dup_lang_specific_decl): New.
2125 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
2126 (copy_decl): Update.
2127 * method.c (make_thunk): Update.
2129 2002-02-27 Zack Weinberg <zack@codesourcery.com>
2131 * decl2.c: Delete traditional-mode-related code copied from
2132 the C front end but not used, or used only to permit the
2135 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
2138 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
2141 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2144 * semantics.c (finish_switch_cond): Don't call get_unwidened
2147 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
2150 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
2152 (make_typename_type): Use tsubst_flags_t.
2153 * decl.c (make_typename_type): Adjust. Return non-artificial
2154 TYPE_DECLs, if required.
2155 (grokdeclarator): Simplify CVR qualification handling. Allow bad
2156 qualifiers on typedef types.
2157 * decl2.c (handle_class_head): Adjust make_typename_type call.
2158 * parse.y (nested_name_specifier): Likewise.
2159 (typename_sub0): Likewise.
2160 (typename_sub1): Likewise.
2161 * pt.c (convert_template_argument): Adjust make_typename_type
2163 (tsubst): Adjust cp_build_qualified_type_real calls.
2164 (check_cv_quals_for_unify): Cope with alowing bad qualifications
2165 on template type parms.
2166 (instantiate_decl): Recheck substitutions to give warnings on bad
2168 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
2170 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
2172 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
2174 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
2175 unless DECL_ALWAYS_INLINE.
2177 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2179 * typeck.c (cp_pointer_int_sum): Renamed from
2180 pointer_int_sum, call pointer_int_sum.
2182 2002-02-20 Jakub Jelinek <jakub@redhat.com>
2184 * decl.c (duplicate_decls): Return 0 if issued error about
2187 2002-02-19 Jason Merrill <jason@redhat.com>
2189 ABI change: Mangle `void (A::*)() const' as
2190 M1AKFvvE, not MK1AFvvE.
2191 * mangle.c (write_function_type): Write cv-quals for member
2193 (write_pointer_to_member_type): Not here.
2195 2002-02-18 Jason Merrill <jason@redhat.com>
2197 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
2198 (do_decl_instantiation): Likewise.
2200 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
2203 * decl.c (duplicate_decls): Make warning unconditional
2204 if duplicate default argument declarations are present.
2206 2002-02-17 Jakub Jelinek <jakub@redhat.com>
2208 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
2211 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
2213 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
2214 remove incorrect comment. Move #if 0'd code to common path. Use
2215 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
2217 2002-02-13 Jason Merrill <jason@redhat.com>
2219 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
2220 (finish_function): Don't warn if current_function_returns_null.
2222 * typeck2.c (digest_init): Do handle values of vector type.
2224 * typeck2.c (digest_init, process_init_constructor): Treat vectors
2227 2002-02-11 Jason Merrill <jason@redhat.com>
2229 * parse.y (reserved_declspecs): Don't handle attributes.
2230 (reserved_typespecquals): Handle them here.
2231 * Make-lang.in (parse.c): Adjust expected conflicts.
2233 2002-02-08 Jakub Jelinek <jakub@redhat.com>
2235 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
2236 instead of compstmt.
2237 (compstmt_or_stmtexpr): Renamed from compstmt.
2238 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
2240 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2242 Rename instantiate_type_flags to tsubst_flags_t & expand use.
2243 * cp-tree.h (instantiate_type_flags): Rename to ...
2244 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
2245 add tf_warning flag.
2246 (instantiate_type): Adjust prototype.
2247 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
2248 do_type_instantiation, cp_build_qualified_type_real): Likewise.
2249 cp_build_qualified_type: Adjust.
2250 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
2252 * call.c (standard_conversion): Rename itf_* to tf_*.
2253 (reference_binding): Likewise.
2254 (convert_like_real): Likewise.
2255 * cvt.c (cp_convert_to_pointer): Likewise.
2256 (convert_to_reference): Likewise.
2257 * decl.c (lookup_namespace_name): Use tf_* flags.
2258 (make_typename_type): Likewise.
2259 (grokdeclarator): Likewise.
2260 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
2261 (coerce_template_template_parms, convert_template_argument,
2262 coerce_template_parms, maybe_get_template_decl_from_type_decl,
2263 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
2264 instantiate_class_template, tsubst_template_arg_vector,
2265 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
2266 tsubst_decl, tsubst_arg_types, tsubst_function_type,
2267 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
2268 instantiate_template, fn_type_unification,
2269 resolve_overloaded_unification, verify_class_unification,
2270 unify, get_bindings_real, do_type_instantiation,
2271 regenerate_decl_from_template, instantiate_decl,
2272 tsubst_initializer_list, tsubst_enum,
2273 get_mostly_instantiated_function_type,
2274 invalid_nontype_parm_type_p): Likewise.
2275 * tree.c (cp_build_qualified_type_real): Likewise.
2276 * typeck.c (build_binary_op): Rename itf_* to tf_*.
2277 (build_ptrmemfunc): Likewise.
2278 (convert_for_assignment): Likewise.
2280 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
2283 * decl.c (grokdeclarator): Allow friend declarations from
2285 * decl2.c (handle_class_head): Don't push into template parm contexts.
2286 * pt.c (push_template_decl_real): Template parm contexts are never
2289 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
2291 * class.c: Include target.h.
2292 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
2293 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
2295 * Make-lang.in: Adjust deps.
2297 2002-02-05 Jason Merrill <jason@redhat.com>
2299 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
2301 2002-02-04 Jakub Jelinek <jakub@redhat.com>
2303 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
2304 (finish_switch_cond): Set SWITCH_TYPE.
2306 2002-02-04 Richard Henderson <rth@redhat.com>
2308 * method.c (use_thunk): Always initialize the block tree. Reindent.
2309 * semantics.c (expand_body): Emit thunks after function, not before.
2311 2002-02-04 Jason Merrill <jason@redhat.com>
2313 * decl.c (start_function): Call cplus_decl_attributes immediately
2314 after grokdeclarator.
2316 * decl.c (start_function): Combine DECL_RESULT handling code.
2318 2002-02-03 Jason Merrill <jason@redhat.com>
2321 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
2322 (cp/xref.o): Remove dependencies.
2323 * class.c (finish_struct_1, check_methods): Don't call xref fns.
2324 (finish_struct_1): Likewise.
2325 * friend.c (make_friend_class): Likewise.
2326 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
2327 * spew.c (read_process_identifier): Likewise.
2329 2002-02-01 Jason Merrill <jason@redhat.com>
2332 * decl.c (finish_function): Warn about a non-void function with
2333 no return statement and no abnormal exit.
2334 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
2335 (current_function_returns_abnormally): New macro.
2336 * call.c (build_call): Set it.
2338 * typeck.c (build_component_ref): Always complain about offsetof
2339 constructs on non-PODs. Only make it an error for members of
2342 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
2343 (dump_function_decl): Always dump parms.
2345 * decl2.c (finish_static_data_member_decl): Complain about a local
2346 class with a static data member.
2349 * search.c (lookup_field_1): Don't xref a static data member
2350 just because we looked it up.
2352 2002-01-31 Jason Merrill <jason@redhat.com>
2354 * Make-lang.in (parse.c): Handle .output file.
2357 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
2359 * semantics.c (finish_class_definition): Adjust.
2361 Allow attributes in parms and casts.
2362 * parse.y (named_parm): Don't strip attrs.
2363 (declmods): Remove 'attributes' production.
2364 (nonempty_cv_qualifiers): Accept attributes.
2365 (ATTRIBUTE): Give precedence.
2366 * decl.c (groktypename): Handle attributes.
2367 (grokparms): Likewise.
2369 2002-01-29 Jakub Jelinek <jakub@redhat.com>
2371 * decl2.c (cxx_decode_option): Pass 0 as last argument to
2373 * lang-specs.h: Use cpp_unique_options instead of cpp_options
2374 when used together with cc1_options.
2376 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
2379 * typeck2.c (digest_init): Make sure non-array core type is
2381 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
2382 constructor, rather than build a new one.
2383 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
2384 PURPOSE of constructor elts.
2386 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2388 * Make-lang.in (parse.c): Adjust expected number of
2389 shift-reduce conflicts.
2390 (decl.o): Depend on diagnostic.h.
2391 * decl.c: Include diagnostic.h.
2392 (grokdeclarator): Check for null pointer.
2393 (finish_function): Don't abort when
2394 current_binding_level->parm_flag != 1, if errors have
2395 occurred; throw away the statement tree and extra binding
2396 levels, and continue.
2397 * lex.c (note_list_got_semicolon): Check for null pointer.
2398 * method.c (hack_identifier): Just return error_mark_node if
2399 value is error_mark_node.
2400 * parse.y (primary: TYPEID(type_id)): No need to use
2401 TYPE_MAIN_VARIANT here.
2402 (handler_seq): Accept an empty list of catch clauses and
2403 generate a fake handler block to avoid later crashes.
2404 (ansi_raise_identifier): Accept the error token too.
2405 * semantics.c (begin_class_definition,
2406 finish_class_definition): Check for error_mark_node.
2408 2002-01-23 Zack Weinberg <zack@codesourcery.com>
2410 * typeck2.c (friendly_abort): Delete definition.
2411 * cp-tree.h (friendly_abort): Don't prototype.
2412 (my_friendly_assert): Use fancy_abort.
2414 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2416 * cp-tree.h (my_friendly_abort): Remove.
2418 2002-01-23 Jakub Jelinek <jakub@redhat.com>
2420 * spew.c (pending_inlines, pending_inlines_tail,
2421 processing_these_inlines): Make static.
2422 (mark_pending_inlines): Remove static.
2423 (begin_parsing_inclass_inline): If in function, save pi
2424 for GC to cp_function_chain->unparsed_inlines instead.
2425 (process_next_inline): Likewise.
2426 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
2427 (mark_pending_inlines): Add prototype.
2428 * decl.c (spew_debug): Remove unused extern.
2429 (mark_lang_function): Call mark_pending_inlines.
2431 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
2433 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
2434 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
2435 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
2436 Change my_fancy_abort() to abort().
2438 2002-01-23 Jason Merrill <jason@redhat.com>
2441 * class.c (fixed_type_or_null): Fix thinko.
2444 * init.c (resolve_offset_ref): Use build_indirect_ref.
2446 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
2448 2002-01-22 Jason Merrill <jason@redhat.com>
2450 * parse.y (function_body): Suppress the block for the outermost
2452 * decl.c (pushdecl): Don't try to skip it.
2453 (begin_function_body): Keep the block we create, not the next one.
2454 * init.c (emit_base_init): Don't mess with keep_next_level.
2456 * class.c (build_base_path): Tweak formatting.
2458 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
2460 Fix regression introduced with patch for c++/775
2461 * parse.y (class_head_defn): Check for template specializations
2462 with a different class-key.
2464 2002-01-17 Jason Merrill <jason@redhat.com>
2466 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
2467 (begin_function_body): Call them and keep_next_level.
2468 * init.c (emit_base_init): Call keep_next_level.
2469 * semantics.c (setup_vtbl_ptr): Lose.
2470 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
2471 (vtbls_set_up_p): Lose.
2472 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
2473 * method.c (do_build_copy_constructor): Likewise.
2474 (synthesize_method): Call finish_mem_initializers.
2475 * parse.y (nodecls): Likewise.
2477 * error.c (dump_type_suffix): Print the exception specs before
2479 (dump_function_decl): Here, too.
2481 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2483 2002-01-10 Ira Ruben <ira@apple.com>
2486 * decl.c (start_method): Handle attrlist.
2488 2002-01-10 Jakub Jelinek <jakub@redhat.com>
2490 * decl2.c (max_tinst_depth): Increase default limit to 500.
2492 2002-01-10 Graham Stott <grahams@redhat.com>
2494 * spew.c (YYCHAR): Uppercase macro parameter and add
2497 (NAME): Uppercase macro parameter.
2499 2002-01-09 Graham Stott <grahams@redhat.com>
2501 * decl.h (grokdeclarator): Wrap long line.
2503 * semantics.c (FINISH_COND): Uppercase macro paramaters and
2506 2002-01-08 Graham Stott <grahams@redhat.com>
2508 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
2509 (PALLOC): Uppercase macro parameter and whitespace.
2510 (SALLOC): Uppercase macro parameter.
2511 (SFREE): Uppercase macros parameter, add parenthese and
2513 (STREQL): Uppercase macro parameter and whitespace.
2520 * call.c (convert_like): Add parenthesis and wrap.
2521 (convert_like_with_context): Likewise.
2522 (ICS_RANK): Whitespace.
2523 (NEED_TEMPORARY_P): Remove parenthesis.
2525 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
2527 (VTT_MARKED_BINFO_P): Likewise.
2529 * decl.c (BINDING_LEVEL): Add parenthesis.
2530 (DEF_OPERATOR): Likewise.
2532 * mangle.c (MANGLE_TRACE): Add parenthesis.
2533 (MANGLE_TRACE_TREE): Likewise.
2534 (write_signed_number): Likewise.
2535 (write_unsigned_number): Likewise.
2537 * pt.c (ccat): Uppercase macro parameter.
2540 * search.c (SET_BINFO_ACCESS): Add parenthesis.
2542 2002-01-07 Jason Merrill <jason@redhat.com>
2544 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
2548 * method.c (make_thunk): If !flag_weak, give the thunk the
2550 (use_thunk): Here, too.
2552 2002-01-07 Graham Stott <grahams@redhat.com>
2554 * error.c: Update copyright date.
2555 (print_scope_operator): Add parenthesis.
2556 (print_left_paren): Likewise.
2557 (print_right_paren): Likewise.
2558 (print_left_bracket): Likewise.
2559 (print_right_bracket): Likewise.
2560 (print_template_argument_list_start): Likewise.
2561 (print_template_argument_list_end): Likewise.
2562 (print_non_consecutive_character): Likewise.
2563 (print_tree_identifier): Likewise.
2564 (print_identifier): Likewise.
2565 (NEXT_CODE): Uppercase macro parameter.
2566 (ident_fndecl): Delete unused.
2567 (GLOBAL_THING): Likewise.
2569 2002-01-06 Graham Stott <grahams@redhat.com>
2571 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
2572 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
2573 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
2574 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
2575 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
2576 (C_IS_RESERVED_WORD): Uppercase macro parameter.
2577 (C_RID_YYCODE) Likewise.
2578 (ptrmem_cst): Use rtx.
2579 (LOCAL_BINDING_P): Add whitespace.
2580 (INHERITED_VALUE_BINDING_P): Likewise.
2581 (BINDING_SCOPE): Wrap long line.
2582 (BINDING_HAS_LEVEL_P): Remove parenthesis.
2583 (BINDING_VALUE): Wrap long line.
2584 (BINDING_TYPE): Whitespace.
2585 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
2586 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
2587 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
2588 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
2589 (same_type_p): Uppercase macro parameters.
2590 (same_type_ignoring_top_level_qualifiers_p): Likewise.
2591 (OVL_FUNCTION): Wrap long line.
2592 (OVL_CHAIN): Whitespace.
2593 (OVL_CURRENT): Add parenthesis and whitespace.
2594 (OVL_NEXT): Whitespace.
2595 (OVL_USED): Likewise.
2596 (IDENTIFIER_TYPE_VALUE): Likewise.
2597 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
2598 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
2599 (LANG_ID_FIELD): Whitespace.
2600 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
2601 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
2602 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
2603 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
2604 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
2605 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
2606 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
2607 (IDENTIFIER_VIRTUAL_P): Likewise.
2608 (IDENTIFIER_OPNAME_P): Likewise.
2609 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
2610 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
2611 (C_SET_EXP_ORIGINAL_CODE): Likewise.
2612 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
2613 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2614 (IS_AGGR_TYPE): Uppercase macro parameter.
2615 (CLASS_TYPE_P): Likewise.
2616 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
2617 (IS_AGGR_TYPE_2): Whitespace.
2618 (TAGGED_TYPE_P): Uppercase macro parameter.
2619 (TYPE_BUILT_IN): Whitespace.
2620 (TYPE_FOR_JAVA): Likewise.
2621 (FUNCTION_ARG_CHAIN): Remove parenthesis.
2622 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
2623 (FUNCTION_FIRST_USER_PARAM): Likewise.
2624 (PROMOTES_TO_AGGR_TYPE): Whitespace.
2625 (DERIVED_FROM_P): Add parenthesis and wrap.
2626 (UNIQUELY_DERIVED_FROM_P): Likewise.
2627 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
2628 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2629 (CLASSTYPE_USE_TEMPLATE): Whitespace.
2630 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
2631 (TYPE_GETS_DELETE): Add parenthesis.
2632 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
2633 (TYPE_HAS_ASSIGN_REF): Likewise,
2634 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
2635 (TYPE_HAS_INIT_REF): Likewise.
2636 (TYPE_HAS_CONST_INIT_REF): Likewise.
2637 (TYPE_BEING_DEFINED): Likewise.
2638 (TYPE_LANG_SPECIFIC): Likewise.
2639 (CLASSTYPE_RTTI): Likewise.
2640 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
2641 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2642 (TYPE_OVERLOADS_ARROW): Likewise.
2643 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
2644 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
2645 (CLASSTYPE_METHOD_VEC): Likewise.
2646 (CLASSTYPE_MARKED_N): Likewise.
2647 (CLASSTYPE_MARKED): Likewise.
2648 (CLASSTYPE_MARKED2): Likewise.
2649 (CLASSTYPE_MARKED3): Likewise.
2650 (CLASSTYPE_MARKED4): Likewise.
2651 (CLASSTYPE_MARKED5): Likewise.
2652 (CLASSTYPE_MARKED6): Likewise.
2653 (SET_CLASSTYPE_MARKED): Whitespace.
2654 (CLEAR_CLASSTYPE_MARKED): Likewise.
2655 (SET_CLASSTYPE_MARKED2): Likewise.
2656 (CLEAR_CLASSTYPE_MARKED2): Likewise.
2657 (SET_CLASSTYPE_MARKED3): Likewise.
2658 (CLEAR_CLASSTYPE_MARKED3): Likewise.
2659 (SET_CLASSTYPE_MARKED4): Likewise.
2660 (CLEAR_CLASSTYPE_MARKED4): Likewise.
2661 (SET_CLASSTYPE_MARKED5): Likewise.
2662 (CLEAR_CLASSTYPE_MARKED5): Likewise.
2663 (SET_CLASSTYPE_MARKED6): Likewise.
2664 (CLEAR_CLASSTYPE_MARKED6): Likewise.
2665 (CLASSTYPE_TAGS): Likewise.
2666 (CLASSTYPE_VSIZE): Likewise.
2667 (CLASSTYPE_VBASECLASSES): Likewise.
2668 (CANONICAL_BINFO): Add parenthesis.
2669 (CLASSTYPE_SIZE(NODE): Likewise.
2670 (CLASSTYPE_SIZE_UNIT): Likewise.
2671 (CLASSTYPE_ALIGN(NODE): Likewise.
2672 (CLASSTYPE_USER_ALIGN): Likewise.
2673 (TYPE_JAVA_INTERFACE): Likewise.
2674 (CLASSTYPE_PURE_VIRTUALS): Likewise.
2675 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
2676 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2677 (CLASSTYPE_HAS_MUTABLE): Likewise.
2678 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
2679 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
2680 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
2681 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
2682 (CLASSTYPE_INTERFACE_ONLY): Likewise.
2683 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2684 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2685 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2686 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2687 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2688 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
2689 (BINFO_UNSHARED_MARKED): Whitespace.
2690 (BINFO_MARKED): Whitespace and wrap.
2691 (SET_BINFO_MARKED): Likewise.
2692 (CLEAR_BINFO_MARKED): Likewise.
2693 (BINFO_VTABLE_PATH_MARKED): Likewise.
2694 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
2695 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
2696 (BINFO_SUBVTT_INDEX): Remove parenthesis.
2697 (BINFO_VPTR_INDEX): Likewise.
2698 (BINFO_PRIMARY_BASE_OF): Likewise,
2699 (CLASSTYPE_VFIELDS): Whitespace.
2700 (VF_DERIVED_VALUE): Wrap long line.
2701 (NAMESPACE_LEVEL): Whitespace.
2702 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
2703 (DEFARG_POINTER): Whitespace.
2704 (DECL_NEEDED_P): Remove parenthesis.
2705 (DECL_LANGUAGE): Whitespace.
2706 (SET_DECL_LANGUAGE): Add parenthesis.
2707 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
2708 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
2709 (DECL_IN_AGGR_P): Whitespace.
2710 (DECL_FRIEND_P): Likewise.
2711 (DECL_BEFRIENDING_CLASSES): Likewise.
2712 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
2713 (DECL_NONCONVERTING_P): Whitespace.
2714 (DECL_PURE_VIRTUAL_P): Likewise.
2715 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
2716 (DECL_PENDING_INLINE_INFO): Whitespace.
2717 (DECL_SORTED_FIELDS): Likewise.
2718 (DECL_DEFERRED_FN): Likewise.
2719 (DECL_TEMPLATE_INFO): Likewise.
2720 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
2721 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
2722 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
2723 (TMPL_ARGS_LEVEL): Likewise.
2724 (SET_TMPL_ARGS_LEVEL): Likewise.
2725 (INNERMOST_TEMPLATE_PARMS): Whitespace.
2726 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
2727 (INTEGRAL_CODE_P(CODE): Add parenthesis.
2728 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
2729 (TYPE_HAS_CONSTRUCTOR): Whitespace.
2730 (TREE_HAS_CONSTRUCTOR): Likewise.
2731 (TYPE_HAS_DESTRUCTOR): Likewise.
2732 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
2733 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
2734 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2735 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
2736 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2737 (TYPE_PTRMEMFUNC_P): Likewise.
2738 (TYPE_PTRMEMFUNC_FLAG): Likewise.
2739 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
2740 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2741 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
2742 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2743 (DECL_ACCESS): Whitespace.
2744 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
2745 (DECL_GLOBAL_DTOR_P): Likewise.
2746 (GLOBAL_INIT_PRIORITY): Likewise.
2747 (DECL_TEMPLATE_PARMS): Likewise.
2748 (DECL_TEMPLATE_RESULT): Likewise.
2749 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
2750 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
2751 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
2752 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2753 (PRIMARY_TEMPLATE_P): Add parenthesis.
2754 (DECL_USE_TEMPLATE): Whitespace.
2755 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2756 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2757 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2758 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2759 (CALL_DECLARATOR_PARMS): Remove parenthesis.
2760 (CALL_DECLARATOR_QUALS): Likewise.
2761 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2762 (TEMP_NAME_P): Wrap.
2763 (VFIELD_NAME_P): Likewise.
2764 (B_SET): Uppercase macro parameters and add parenthesis.
2767 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
2768 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
2769 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
2770 (same_or_base_type_p): Likewise.
2771 (cp_deprecated): Likewise.
2773 2002-01-05 Richard Henderson <rth@redhat.com>
2775 * semantics.c (expand_body): Revert last change.
2777 2002-01-04 Jason Merrill <jason@redhat.com>
2780 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
2783 * class.c (build_vtbl_initializer): Check for a lost primary
2784 before calculating the vtable entry to throw away.
2786 2002-01-02 Jason Merrill <jason@redhat.com>
2788 * semantics.c (expand_body): Call outlining_inline_function when
2789 emitting an inline function out of line.
2791 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2793 PR c++/5116, c++/764 reversion
2794 * call.c (build_new_op): Revert the instantiations. They are
2797 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2800 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2802 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2805 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
2806 (tsubst, case POINTER_TYPE): Handle pmfs here.
2807 (tsubst, case OFFSET_TYPE): Check it is not an offset to
2808 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
2810 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2813 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
2814 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
2815 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
2817 (tsubst_template_parms): Break up loop statements.
2818 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
2819 parm PARM_DECLs don't get promoted.
2821 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2824 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
2825 (build_x_function_call): Cope with a COMPONENT_REF containing a
2828 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2831 * pt.c (convert_template_argument): Be more careful determining
2832 when RECORD_TYPE templates are or are not templates.
2834 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2837 * cp-tree.h (handle_class_head): Adjust prototype.
2838 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
2839 parameters. Use for all class heads.
2840 * parse.y (named_class_head_sans_basetype, named_class_head,
2841 named_complex_class_head_sans_basetype,
2842 named_class_head_sans_basetype_defn,
2843 unnamed_class_head): Remove.
2844 (class_head, class_head_apparent_template): Recognize class heads
2845 (class_head_decl, class_head_defn): New reductions. Process class
2847 (structsp): Adjust class definition and class declaration
2849 (maybe_base_class_list): Give diagnostic on empty list.
2851 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2854 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
2855 single non-static member.
2856 (unary_complex_lvalue): If it cannot be a pointer to member, don't
2857 make it so. Check it is not pointer to reference.
2859 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2862 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
2863 are processing a template decl.
2865 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
2867 PR c++/5116, c++/764
2868 * call.c (build_new_op): Make sure template class operands are
2869 instantiated. Simplify arglist construction.
2871 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2873 * call.c (build_user_type_conversion_1): Use my_friendly_assert
2874 rather than if ... abort.
2875 * cvt.c (convert_to_reference): Likewise.
2876 * semantics.c (setup_vtbl_ptr): Likewise.
2877 * pt.c (lookup_template_class): Comment typo.
2879 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2882 * pt.c (push_template_decl_real): Make sure DECL has
2885 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
2888 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
2889 for non-reference fields.
2890 * typeck.c (require_complete_type): Use resolve_offset_ref).
2892 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
2895 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
2897 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
2900 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
2901 up. Don't stabilize_references when initializing a reference.
2903 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2905 * decl2.c (lang_f_options): Const-ify.
2907 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
2909 * config-lang.in (diff_excludes): Remove.
2911 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
2914 * typeck.c (build_function_call_real): Use original function
2915 expression for errors.
2917 2001-12-18 Jason Merrill <jason@redhat.com>
2920 * class.c (add_method): Do compare 'this' quals when trying to match a
2921 used function. Don't defer to another used function.
2923 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
2925 * pt.c (instantiate_clone): Remove, fold into ...
2926 (instantiate_template): ... here. Simplify by removing mutual
2928 * typeck2.c (build_m_component_ref): Don't cv qualify the function
2929 pointed to by a pointer to function.
2930 * class.c (delete_duplicate_fields_1): Typo.
2932 2001-12-18 Jason Merrill <jason@redhat.com>
2934 C++ ABI change: destroy value arguments in caller.
2935 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
2936 create an extra binding level for the parameters.
2937 * decl.c (store_parm_decls): Don't do parameter cleanups.
2939 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
2941 * call.c (build_new_method_call): Use '%#V'.
2942 * error.c (cv_to_string): Use V parameter to determine padding.
2944 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2946 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
2947 spellings in messages.
2949 2001-12-17 Zack Weinberg <zack@codesourcery.com>
2951 * cp-tree.h: Delete #defines for cp_error, cp_warning,
2952 cp_pedwarn, and cp_compiler_error.
2953 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
2954 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
2955 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2956 typeck2.c: Change calls to the above macros to use their
2957 language-independent equivalents: error, warning, pedwarn, and
2958 internal_error respectively.
2960 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
2962 * decl2.c (finish_file): Remove back_end_hook.
2964 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
2966 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
2967 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
2968 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
2970 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
2972 * lang-options.h: Use American spelling in messages.
2974 2001-12-13 Jason Merrill <jason@redhat.com>
2976 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
2978 Use cleanups to run base and member destructors.
2979 * init.c (push_base_cleanups): New function, split out from...
2980 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
2981 * decl.c (finish_destructor_body): Move vbase destruction code to
2983 (begin_function_body, finish_function_body): New fns.
2984 (finish_function): Move [cd]tor handling and call_poplevel to
2985 finish_function_body.
2986 (pushdecl): Skip the new level.
2987 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
2988 (setup_vtbl_ptr): Call push_base_cleanups.
2989 * method.c (synthesize_method): Call {begin,end}_function_body.
2990 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
2991 * cp-tree.h: Declare new fns.
2992 * parse.y (function_body, .begin_function_body): New nonterminals.
2993 (fndef, pending_inline, function_try_block): Use function_body.
2994 (ctor_initializer_opt, function_try_block): No longer has a value.
2995 (base_init): Remove .set_base_init token.
2996 (.set_base_init, compstmt_or_error): Remove.
2997 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
2999 * optimize.c (maybe_clone_body): Fix parameter updating.
3001 2001-12-12 Jason Merrill <jason@redhat.com>
3003 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3004 * semantics.c (genrtl_start_function): Don't pass
3005 parms_have_cleanups or push an extra binding level.
3006 (genrtl_finish_function): Lose cleanup_label cruft.
3008 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3009 (ctor_label): Remove.
3010 * semantics.c (finish_return_stmt): Lose ctor_label support.
3011 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
3012 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
3015 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3017 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3019 * decl.c (finish_function): Check VMS_TARGET, not VMS.
3021 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3022 (end_cleanup_fn): And poplevel.
3024 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3025 if we're in a template.
3027 2001-12-12 Jakub Jelinek <jakub@redhat.com>
3029 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3030 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3031 THIS_NAME_P): Delete.
3032 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3033 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3034 with internal naming scheme.
3035 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3037 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
3039 * decl.c (grokdeclarator): Deprecated implicit typename use.
3041 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
3044 * parse.y (frob_specs): Indicate it is a language linkage which
3045 contained the extern.
3046 * decl.c (grokdeclarator): Allow extern language linkage with
3049 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
3052 * decl.c (add_binding): Don't reject duplicate typedefs involving
3053 template parameters.
3055 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
3057 * parse.y, semantics.c: Similarly.
3059 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
3062 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3063 (copy_args_p): Rename to ...
3064 (copy_fn_p): ... here.
3065 (grok_special_member_properties): New function.
3066 (grok_op_properties): Lose VIRTUALP parameter.
3067 (copy_assignment_arg_p): Remove.
3068 * call.c (build_over_call): Use copy_fn_p.
3069 * decl.c (grokfndecl): Reformat. Adjust call to
3071 (copy_args_p): Rename to ...
3072 (copy_fn_p): ... here. Reject template functions. Check for pass
3074 (grok_special_member_properties): Remember special functions.
3075 (grok_ctor_properties): Don't remember them here, just check.
3076 (grok_op_properties): Likewise.
3077 (start_method): Call grok_special_member_properties.
3078 * decl2.c (grokfield): Likewise.
3079 (copy_assignment_arg_p): Remove.
3080 (grok_function_init): Don't remember abstract assignment here.
3081 * pt.c (instantiate_class_template): Call
3082 grok_special_member_properties.
3083 (tsubst_decl): Adjust grok_op_properties call.
3085 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
3087 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
3088 RID_TYPES_COMPATIBLE_P.
3090 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
3092 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
3093 call to build_aggr_init.
3094 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
3096 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
3098 * parse.y: Replace uses of the string non-terminal with STRING.
3099 Don't perform string concatentaion here.
3100 (string): Remove non-terminal.
3101 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
3103 2001-12-05 Jason Merrill <jason@redhat.com>
3105 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
3106 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
3107 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
3108 * pt.c (push_tinst_level): No longer static.
3109 * cp-tree.h: Declare them.
3111 * init.c (resolve_offset_ref): Don't check access for the base
3112 conversion to access a FIELD_DECL.
3114 * cp-tree.h (TYPE_REFFN_P): New macro.
3115 * decl.c (bad_specifiers): Check it, too.
3117 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
3118 on the __*_type_info type if we haven't seen a definition.
3120 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
3122 * decl.c: Include c-common.h.
3123 (shadow_warning): Move to c-common.c.
3125 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3127 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
3129 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3131 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
3133 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
3136 * init.c (sort_base_init): Allow binfos to be directly specified.
3137 * method.c (do_build_copy_constructor): Explicitly convert to the
3139 (do_build_assign_ref): Likewise.
3141 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
3143 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
3144 declaration and initialization.
3146 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
3148 * typeck2.c: Remove leading capital from diagnostic messages, as
3149 per GNU coding standards.
3151 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
3154 * decl.c (xref_basetypes): Handle attributes between
3157 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
3160 * parse.y (named_complex_class_head_sans_basetype): Add new
3162 * Make-lang.in (parse.c): Adjust expected conflict count.
3164 2001-12-03 Jason Merrill <jason@redhat.com>
3166 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
3167 immediate binfos for our virtual bases.
3169 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
3171 * call.c (build_java_interface_fn_ref): Similarly.
3172 * except.c (is_admissible_throw_operand): Similarly.
3173 * init.c (build_java_class_ref): Similarly.
3174 * xref.c (open_xref_file): Similarly.
3176 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
3178 * class.c (finish_struct): Remove trailing periods from messages.
3179 * decl.c (check_tag_decl): Similarly.
3180 * lex.c (cxx_set_yydebug): Similarly.
3181 * typeck2.c (friendly_abort): Similarly.
3183 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3186 * cp-tree.h (ovl_member): Remove.
3187 * decl2.c (merge_functions): Handle extern "C" functions
3189 * tree.c (ovl_member): Remove.
3191 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3194 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
3195 FUNCTION_DECL, as input.
3196 (mark_overriders): Remove.
3197 (warn_hidden): Rework for the new ABI.
3199 2001-11-29 Mark Mitchell <mark@codesourcery.com>
3202 * call.c (convert_like_real): Do not build additional temporaries
3203 for rvalues of class type.
3205 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
3207 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
3208 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
3209 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
3210 (DERIVED_FROM_P): Likewise.
3211 (enum base_access): Renumber, add ba_quiet bit mask.
3212 (get_binfo): Remove.
3213 (get_base_distance): Remove.
3214 (binfo_value): Remove.
3215 (ACCESSIBLY_DERIVED_FROM_P): Remove.
3216 * call.c (standard_conversion): Use lookup_base.
3217 * class.c (strictly_overrides): Likewise.
3218 (layout_virtual_bases): Likewise.
3219 (warn_about_ambiguous_direct_bases): Likewise.
3220 (is_base_of_enclosing_class): Likewise.
3221 (add_vcall_offset_vtbl_entries_1): Likewise.
3222 * cvt.c (build_up_reference): Adjust comment.
3223 * init.c (build_member_call): Reformat.
3224 * search.c (get_binfo): Remove.
3225 (get_base_distance_recursive): Remove.
3226 (get_base_distance): Remove.
3227 (lookup_base_r): Tweak.
3228 (lookup_base): Add ba_quiet control. Complete the types here.
3229 (covariant_return_p): Use lookup_base.
3230 * tree.c (binfo_value): Remove.
3231 (maybe_dummy_object): Use lookup_base.
3232 * typeck.c (build_static_cast): Use lookup_base.
3233 (get_delta_difference): Likewise.
3234 * typeck2.c (binfo_or_else): Use lookup_base.
3235 (build_scoped_ref): Add back error_mark_check.
3236 (build_m_component_ref): Use lookup_base.
3238 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
3240 * Make-lang.in (c++.generated-manpages): New dummy target.
3242 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3244 * Make-lang.in (cp-lang.o): Depends on c-common.h.
3245 * cp-lang.c (c-common.h): Include.
3246 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
3247 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
3248 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
3250 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
3252 * decl2.c (c_language): Move to c-common.c.
3253 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
3257 2001-11-26 Jason Merrill <jason@redhat.com>
3259 * call.c (joust): Remove COND_EXPR hack.
3261 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
3263 * search.c (lookup_base_r): Declare bk in variable declaration
3266 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
3269 * class.c (build_vbase_pointer): Remove.
3270 (build_vbase_path): Remove.
3271 (build_base_path): New function.
3272 * cp-tree.h (base_access, base_kind): New enumerations.
3273 (build_base_path): Declare.
3274 (convert_pointer_to_real): Remove.
3275 (convert_pointer_to): Remove.
3276 (lookup_base): Declare.
3277 (convert_pointer_to_vbase): Remove.
3278 * call.c (build_scoped_method_call): Use lookup_base &
3279 build_base_path instead of convert_pointer_to_real,
3280 get_base_distance & get_binfo.
3281 (build_over_call): Likewise.
3282 * cvt.c (cp_convert_to_pointer): Likewise.
3283 (convert_to_pointer_force): Likewise.
3284 (build_up_reference): Likewise.
3285 (convert_pointer_to_real): Remove.
3286 (convert_pointer_to): Remove.
3287 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
3288 instead of convert_pointer_to_vbase & build_vbase_path.
3289 (emit_base_init): Use build_base_path instead of
3290 convert_pointer_to_real.
3291 (expand_virtual_init): Lose unrequired conversions.
3292 (resolve_offset_ref): Use lookup_base and build_base_path
3293 instead of convert_pointer_to.
3294 * rtti.c (build_dynamic_cast_1): Use lookup_base &
3295 build_base_path instead of get_base_distance & build_vbase_path.
3296 * search.c (get_vbase_1): Remove.
3297 (get_vbase): Remove.
3298 (convert_pointer_to_vbase): Remove.
3299 (lookup_base_r): New function.
3300 (lookup_base): New function.
3301 * typeck.c (require_complete_type): Use lookup_base &
3302 build_base_path instead of convert_pointer_to.
3303 (build_component_ref): Likewise.
3304 (build_x_function_call): Likewise.
3305 (get_member_function_from_ptrfunc): Likewise.
3306 (build_component_addr): Likewise.
3307 * typeck2.c (build_scoped_ref): Likewise.
3309 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3311 * cp-tree.h (CP_TYPE_QUALS): Removed.
3312 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
3313 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
3314 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
3315 * dump.c (cp_dump_tree): Use void* dump_info argument to match
3316 lang-hooks prototype.
3317 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
3318 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
3319 CP_TYPE_QUALS changed to cp_type_quals.
3320 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
3321 (CXX_C_OBJS): Remove c-dump.o.
3323 2001-11-21 Mark Mitchell <mark@codesourcery.com>
3326 * pt.c (lookup_template_class): Ensure that all specializations
3327 are registered on the list corresponding to the most general
3330 2001-11-20 Mark Mitchell <mark@codesourcery.com>
3332 * call.c (non_reference): Add documentation.
3333 (convert_class_to_reference): Do not strip reference types
3334 from conversion operators.
3335 (maybe_handle_ref_bind): Simplify.
3336 (compare_ics): Correct handling of references.
3338 2001-11-19 John Wilkinson <johnw@research.att.com>
3340 * dump.c (dump_op): New function.
3341 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
3342 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
3343 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
3345 2001-11-19 Mark Mitchell <mark@codesourcery.com>
3348 * semantics.c (finish_sizeof): Make sure that expression created
3349 while processing a template do not have a type.
3350 (finish_alignof): Likewise.
3351 * typeck.c (c_sizeof): Likewise.
3352 (expr_sizeof): Likewise.
3354 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
3356 * lex.c (cxx_finish): Call c_common_finish.
3357 (finish_parse): Remove.
3359 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3361 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
3362 when displaying error message about missing array bounds.
3364 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3366 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
3368 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
3370 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
3372 * cp-tree.h (print_class_statistics): Restore.
3374 2001-11-15 Jason Merrill <jason@redhat.com>
3376 * method.c (use_thunk): Don't emit debugging information for thunks.
3378 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
3379 * decl.c (make_typename_type): Handle getting a class template.
3380 * search.c (lookup_field_r): A class template is good enough for
3383 * call.c (convert_like_real): Only use cp_convert for the bad part.
3384 (standard_conversion): Also allow bad int->enum.
3385 * typeck.c (ptr_reasonably_similar): Also allow functions to
3386 interconvert. Pointers to same-size integers are reasonably
3389 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
3392 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
3395 * init.c (sort_base_init): Remove unreachable code.
3396 (expand_member_init): Adjust comment to reflect reality. Simplify
3397 and remove unreachable code.
3399 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
3401 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
3402 (cxx_init): Update prototype.
3403 * decl.c (init_decl_processing): Rename. Move null node init
3404 to its creation time.
3405 * lex.c (cxx_init_options): Update.
3406 (cxx_init): Combine with old init_parse; also call
3407 cxx_init_decl_processing.
3409 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
3411 * decl.c (check_initializer): Try to complete the type of an
3412 array element before checking whether it's complete. Don't
3413 complain about arrays with complete element types but an
3415 (cp_finish_decl): Build the hierarchical constructor before
3416 calling maybe_deduce_size_from_array_init.
3418 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
3420 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
3422 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
3425 * parse.y (already_scoped_stmt): Remove.
3426 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
3428 2001-11-12 H.J. Lu <hjl@gnu.org>
3430 * cvt.c (ocp_convert): Don't warn the address of a weak
3431 function is always `true'.
3433 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3435 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3436 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3437 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
3438 * cp-tree.h (print_class_statistics): Remove.
3439 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
3440 cxx_print_identifier, cxx_set_yydebug): New.
3441 * lex.c (set_yydebug): Rename c_set_yydebug.
3442 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
3443 lang_print_xnode): Rename.
3444 * tree.c (print_lang_statistics): Rename.
3446 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3448 * class.c (dump_array): Fix format specifier warning.
3450 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3452 * cp-lang.c (LANG_HOOKS_NAME): Override.
3453 (struct lang_hooks): Constify.
3454 * lex.c (cxx_init_options): Update.
3455 (lang_identify): Remove.
3456 * parse.y (language_string): Remove.
3458 2001-11-08 Andreas Franck <afranck@gmx.de>
3460 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
3461 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
3462 suggested by autoconf.
3463 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
3464 (c++.install-common): Use the transformed target alias names.