1 1999-11-23 Mark Mitchell <mark@codesourcery.com>
3 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
5 1999-11-22 Mark Mitchell <mark@codesourcery.com>
7 * cp-tree.def (CTOR_COMPLETE): New tree node.
8 * decl.c (finish_constructor_body): Add it, to mark the end of the
10 (finish_function): Don't call end_protect_partials here.
11 * ir.texi (CTOR_COMPLETE): Document it.
12 * semantics.c (expand_stmt): Handle it.
14 * cp-tree.def (FUNCTION_NAME): New tree node.
15 * cp-tree.h (current_function_name_declared): Tweak documentation.
16 (lang_decl_flags): Add pretty_function_p, adjust dummy.
17 (DECL_PRETTY_FUNCTION_P): New macro.
18 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
19 etc., in a template function. Use at_function_scope_p instead of
21 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
23 (tsubst): Handle FUNCTION_NAME.
24 (tsubst_copy): Likewise.
25 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
26 etc. in instantiation.
27 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
28 even in template functions.
29 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
30 conditional scope at the top of a destructor.
32 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
35 1999-11-22 Nathan Sidwell <nathan@acm.org>
37 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
38 when actually negative.
40 * typeck.c (convert_for_assignment): Expand comment about
41 strange NULL check, moved from ...
42 (convert_for_initialization): ... here. Remove unneeded
45 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
47 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
48 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
49 Always destruct virtual bases of array components, but never
51 (build_vec_init): Adjust invocations.
52 (build_delete): Likewise.
53 * decl2.c (delete_sanity): Likewise.
55 1999-11-19 Nathan Sidwell <nathan@acm.org>
57 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
58 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
59 * decl2.c (grok_method_quals): Accept `restrict' as applying to
60 the object pointer. Return such qualifiers.
61 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
64 1999-11-18 Mark Mitchell <mark@codesourcery.com>
66 * except.c (expand_end_catch_block): Fix typo.
67 (expand_exception_blocks): Simplify. Don't call
68 expand_leftover_cleanups.
70 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
72 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
73 * pt.c (tsubst, case INTEGER_TYPE): Call it.
74 Check uses_template_parms.
76 * class.c (finish_struct): If we're a local class in a template
77 function, add a TAG_DEFN.
78 * pt.c (lookup_template_class): If this is a local class in a
79 template function, call pushtag.
80 (tsubst_expr, case TAG_DEFN): Handle classes, too.
82 Emit debug info with the vtable.
83 * search.c (maybe_suppress_debug_info): New function...
84 * class.c (finish_struct_1): ...split out from here.
85 * cp-tree.h: Declare it.
86 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
87 if we're writing out the vtable.
88 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
89 note_debug_info_needed): #if 0 out.
91 1999-11-14 Mark Mitchell <mark@codesourcery.com>
93 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
94 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
96 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
97 * decl2.c (lookup_arg_dependent): Use it.
99 * cp-tree.h (cp_finish_decl): Change prototype.
100 (finish_static_data_member_decl): Likewise.
101 (push_permanent_obstack): Remove declaration.
102 (push_expression_obstack): Likewise.
103 (push_scratch_obstack): Likewise.
104 (DECL_TEMPLATE_PARM_P): Robustify.
105 (SET_DECL_TEMPLATE_PARM_P): New macro.
106 * class.c (add_method): Don't manipulate obstacks.
107 (finish_vtbls): Likewise.
108 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
109 * decl.c (binding_for_name): Don't manipulate obstacks.
110 (maybe_push_to_top_level): Likewise.
111 (pop_from_top_level): Likewise.
112 (duplicate_decls): Likewise.
113 (pushdecl): Likewise.
114 (implicitly_declare): Likewise.
115 (build_typename_type): Likewise.
116 (start_decl): Likewise.
117 (cp_finish_decl): Likewise.
118 (finish_decl): Likewise.
119 (destroy_local_static): Likewise.
120 (expand_static_init): Likewise.
121 (complete_array_type): Likewise.
122 (grokvardecl): Likewise.
123 (build_ptrmemfnc_type): Likewise.
124 (grokdeclarator): Likewise.
125 (xref_tag): Likewise.
126 (xref_basetypes): Likewise.
127 (start_enum): Likewise.
128 (finish_enum): Likewise.
129 (start_function): Likewise.
130 (finish_function): Likewise.
131 (start_method): Adjust call to cp_finish_decl.
132 * decl2.c (finish_static_data_member_decl): Don't manipulate
134 (grokfield): Likewise.
135 (grokbitfield): Likewise.
136 (get_temp_name): Likewise.
137 (get_sentry): Likewise.
138 (fnish_file): Likewise.
139 (lookup_arg_dependent): Likewise.
140 * except.c (call_eh_info): Likewise.
141 (push_eh_info): Likewise.
142 (do_pop_exception): Likewise.
143 (initialize_handler_parm): Likewise.
144 (expand_end_eh_spec): Likewise.
145 (alloc_eh_object): Likewise.
146 (expand_throw): Likewise.
147 * expr.c (extract_scalar_init): Likewise.
148 * init.c (build_java_class_ref): Likewise.
149 * lex.c (get_time_identifier): Likewise.
150 (snarf_defarg): Likewise.
151 (add_defarg_fn): Likewise.
152 (is_global): Simplify.
153 (do_identifier): Don't check TREE_PERMANENT.
154 * method.c (emit_thunk): Don't manipulate obstacks.
155 * parse.y (condition): Adjust call to cp_finish_decl.
158 (initdcl0_innards): Likewise.
159 (nomods_initdcl0): Likewise.
160 * pt.c (push_inline_template_parms_recursive): Use
161 SET_DECL_TEMPLATE_PARM_P.
162 (process_template_parm): Likewise.
163 (lookup_template_class): Don't manipulate obstacks.
164 (instantiate_class_template): Adjust call to
165 finish_static_data_member_decl.
166 (tsubst_decl): Don't manipulate obstacks.
167 (tsubst_expr): Likewise.
168 (instantiate_template): Likewise.
169 (instantiate_decl): Adjust calls to cp_finish_decl.
170 * rtti.c (call_void_fn): Don't manipulate obstacks.
171 (get_tinfo_var): Likewise.
172 (get_tinfo_fn_unused): Likewise.
173 (build_dynamic_cast_1): Likewise.
174 (expand_si_desc): Likewise.
175 (expand_class_desc): Likewise.
176 (expand_ptr_desc): Likewise.
177 (expand_attr_desc): Likewise.
178 (expand_generic_desc): Likewise.
179 (synthesize_tinfo_fn): Likewise.
180 * search.c (expand_upcast_fixups): Likewise.
181 * semantics.c (finish_asm_stmt): Likewise.
182 (finish_named_return_value): Likewise.
183 (begin_class_definition): Likewise.
184 (finish_class_definition): Likewise.
185 (finish_typeof): Likewise.
186 * tree.c (build_cplus_method_type): Likewise.
187 (reverse_path): Likewise.
188 (copy_template_template_parm): Likewise.
189 (build_expr_ptr_wrapper): Likewise.
190 (push_expression_obstack): Remove.
191 (push_permanent_obstack): Likewise.
192 * typeck.c (mark_addressable): Likewise.
194 1999-11-13 Mark Mitchell <mark@codesourcery.com>
196 * call.c (build_conditional_expr): Use build_target_expr_with_type.
197 (convert_like): Likewise.
198 (build_over_call): Likewise.
199 * cp-tree.h (build_target_expr): Remove.
200 (build_target_expr_with_type): New function.
201 * cvt.c (build_up_reference): Use get_target_expr.
202 * decl.c (build_target_expr): Move to ...
203 * tree.c (build_target_expr): Here. Make it static.
204 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
205 the temporary VAR_DECLs.
206 (get_target_expr): Use it.
208 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
210 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
211 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
212 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
213 * class.c (set_rtti_entry): Use it.
215 1999-11-12 Mark Mitchell <mark@codesourcery.com>
217 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
219 * semantics.c (finish_expr_stmt): Call it here instead. Move
220 default_conversion logic to semantic-analysis time.
222 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
224 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
226 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
228 * init.c (init_init_processing): Re-instated Nov 11 patch after
231 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
233 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
234 Patch had not been approved yet.
236 1999-11-12 Mark Mitchell <mark@codesourcery.com>
238 * decl.c (compute_array_index_type): New function, split out from
240 (create_array_type_for_decl): Likewise.
241 (grokdeclarator): Use them.
243 * semantics.c (expand_stmt): Don't suspend_momentary or
246 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
248 * init.c (init_init_processing): Header information for
249 arrays allocated via `new' should have the same alignment used by
252 1999-11-10 Mark Mitchell <mark@codesourcery.com>
254 * error.c (dump_function_name): Don't crash if given a friend
255 pseudo-instantiation.
257 * cp-tree.h (build_enumerator): Change prototype.
258 * decl.c (enum_next_value): Remove.
259 (enum_overflow): Likewise.
260 (init_decl_processing): Don't register enum_next_value as a root.
261 (start_enum): Clear TYPE_VALUES for a redefined enum.
262 (finish_enum): Reset the type of enumeration constants.
263 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
264 we don't need to. Maintain the TYPE_VALUES list and look there
265 for the previously defined enumeration constant. Let enumeration
266 constants have the type of their values until the enumeration type
268 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
270 * parse.c: Regenerated.
271 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
273 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
274 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
276 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
278 1999-11-09 Mark Mitchell <mark@codesourcery.com>
280 * cp-tree.h (language_function): Remove x_last_dtor_insn and
281 x_last_parm_cleanup_insn.
282 * decl.c (last_dtor_insn): Remove.
283 (last_parm_cleanup_insn): Likewise.
284 (expand_start_early_try_stmts): Don't set them.
285 (store_parm_decls): Likewise.
286 (save_function_data): Or save them.
287 (mark_lang_function): Or mark them.
289 1999-11-08 Mark Mitchell <mark@codesourcery.com>
291 * decl.c (store_parm_decls): Generate cleanup code at
292 semantic-analysis time. Destroy objects in the correct order.
294 1999-11-07 Mark Mitchell <mark@codesourcery.com>
296 * cp-tree.h (begin_new_placement): Remove.
297 (finish_new_placement): Likewise.
298 * class.c (finish_struct_1): Don't suspend_momentary or
300 * decl.c (grokdeclarator): Likewise.
301 (maybe_build_cleanup_1): Likewise.
302 * except.c (push_eh_cleanup): Likewise.
303 (build_terminate_handler): Likewise.
304 * init.c (build_new_1): Likewise.
305 * parse.y (parse_decl): Change prototype.
306 (initdecls, notype_initdecls, initdcl): Don't return int.
307 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
308 (.begin_new_placement): Remove.
309 (.finish_new_placement): Likewise.
310 (nonmomentary_expr): Likewise.
311 (suspend_mom): Likewise.
312 (condition): Don't suspend_momentary, resume_momentary, or keep
313 track of need to resume.
314 (unary_expr): Likewise.
315 (new_placement): Likewise.
317 (structsp): Likewise.
318 (new_type_id): Likewise.
319 (maybe_parmlist): Likewise.
320 (direct_after_type_declaration): Likewise.
321 (direct_new_declarator): Likewise.
322 (direct_abstract_declaration): Likewise.
323 * parse.c: Regenerated.
324 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
325 * semantics.c (begin_new_placement): Remove.
326 (finish_new_placement): Likewise.
328 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
330 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
331 (DECL_TEMPLATE_INFO): Use it.
332 * decl.c (warn_extern_redeclared_static): Do nothing for
334 * decl2.c (mark_used): Explicitly check for function or variable.
335 * semantics.c (finish_unary_op_expr): Check whether result is also
338 1999-11-05 Mark Mitchell <mark@codesourcery.com>
340 * Makefile.in (typeck2.o): Depend on output.h.
341 * typeck2.c: Include output.h.
343 * decl.c (flag_ansi): Remove declaration.
345 * pt.c (tinst_level_tick): Make it static.
346 (last_template_error_tick): Likewise.
348 * cp-tree.h (mapcar): Remove declaration.
349 (search_tree): Likewise.
350 (walk_tree_fn): New typedef.
351 (walk_tree): New function.
352 * tree.c (bot_manip): Change prototype. Adjust to be called via
354 (bot_replace): Likewise.
355 (no_linkage_helper): Likewise.
356 (copy_tree_r): New function.
357 (search_tree): Rename, and adjust, to become ...
358 (walk_tree): New function.
360 (target_remap): Remove.
361 (target_remap_count): Likewise.
362 (break_out_target_exprs): Use walk_tree.
363 * decl.c (local_variable_p): Change prototype.
364 (check_default_argument): Use walk_tree.
365 * pt.c (for_each_template_parm_r): New function, split out from ...
366 (for_each_template_parm): Here. Use it, via walk_tree.
368 1999-11-03 Mark Mitchell <mark@codesourcery.com>
370 * class.c (check_bitfield_decl): New function, split out from
372 (check_field_decl): Likewise. Recursively examine members of
374 (finish_struct_1): Use them.
375 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
377 1999-11-02 Mark Mitchell <mark@codesourcery.com>
379 * decl.c (grokfndecl): Remove dead code.
381 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
383 1999-11-02 Scott Snyder <snyder@fnal.gov>
385 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
387 * pt.c (tsubst_copy): Likewise.
389 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
391 * decl2.c (maybe_make_one_only): Always make things comdat on
394 1999-10-31 Mark Mitchell <mark@codesourcery.com>
396 * decl.c (finish_function): Call free_after_parsing for functions
397 we are not immediately turning into RTL.
399 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
401 * cp-tree.h (flag_dump_translation_unit): Add decl.
403 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
405 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
407 1999-10-30 Mark Mitchell <mark@codesourcery.com>
409 * decl.c (pop_cp_function_context): Don't call free on a NULL
411 * semantics.c: Include ggc.h.
412 (expand_body): Do garbage-collection after processing a template
413 function. Clear DECL_SAVED_TREE after generating RTL for a
415 * Makefile.in (semantics.o): Depend on ggc.h.
417 1999-10-29 Mark Mitchell <mark@codesourcery.com>
419 * cp-tree.h (make_typename_type): Change prototype.
420 * decl.c (make_typename_type): Only complain if so requested.
421 * parse.y (nested_name_specifier): Adjust calls.
422 (typename_sub0): Likewise.
423 (typename_sub1): Likewise.
424 * parse.c: Regenerated.
425 * pt.c (convert_template_argument): Pass complain to
429 1999-10-28 Mark Mitchell <mark@codesourcery.com>
431 * semantics.c (finish_handler): End the scope of the handler
432 before attaching it to the statement-tree.
434 1999-10-28 Ian Lance Taylor <ian@zembu.com>
436 * rtti.c (build_dynamic_cast_1): Give a better error message for
437 an attempt to dynamic_cast from a non-polymorphic type.
439 1999-10-27 Mark Mitchell <mark@codesourcery.com>
441 * cp-tree.h (make_temp_vec): Remove.
442 (make_scratch_vec): Likewise.
443 * call.c (add_function_candidate): Use make_tree_vec.
444 (add_conv_candidate): Likewise.
445 (build_builtin_candidate): Likewise.
446 (add_template_candidate_real): Likewise.
447 * class.c (resolve_address_of_overloaded_function): Likewise.
448 * decl.c (start_function): Don't fool with the momentary obstack.
449 (finish_function): Likewise.
450 * init.c (expand_direct_vtbls_init): Likewise.
451 (begin_init_stmts): Likewise.
452 (finish_init_stmts): Likewise.
453 * pt.c (add_to_template_args): Use make_tree_vec.
454 (check_explicit_specialization): Likewise.
455 (coerce_template_parms): Likewise.
456 (lookup_template_class): Don't fool with the momentary obstack.
457 (instantiate_class_template): Likewise.
458 (tsubst_template_arg_vector): Use make_tree_vec.
459 (tsubst_aggr_type): Don't fool with the momentary obstack.
460 (tsubst_decl): Likewise. Use make_tree_vec.
461 (try_one_overload): Likewise.
462 (try_class_unification): Don't fool with the momentary obstack.
463 (get_bindings_real): Use make_tree_vec.
464 (set_mangled_name_for_template_decl): Likewise.
465 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
466 * semantics.c (finish_expr_stmt): Likewise.
467 (finish_do_stmt): Likewise.
468 (finish_for_expr): Likewise.
469 (finish_switch_cond): Likewise.
470 (do_pushlevel): Likewise.
471 (do_poplevel): Likewise.
472 * tree.c (make_temp_vec): Remove.
474 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
475 CLEANUP_P for a TRY_BLOCK.
476 * ir.texi: Document SAVE_EXPR.
478 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
480 * call.c (build_over_call): Check that the built-in function is
481 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
482 * typeck.c (build_function_call_real): Similarly.
484 1999-10-26 Mark Mitchell <mark@codesourcery.com>
486 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
489 1999-10-24 Mark Mitchell <mark@codesourcery.com>
491 * decl.c (push_overloaded_decl_1): Use pushdecl.
493 * decl.c (auto_function): Replace #ifdef'd __inline with just
495 * lex.c (my_get_run_time): Likeise.
497 (identifier_type): Likewise.
498 * method.c (start_squangling): Likewise.
499 (end_squangling): Likewise.
501 (old_backref_index): Likewise.
502 (flush_repeats): Likewise.
503 (issue_ktype): Likewise.
504 * parse.y (empty_parms): Likewise.
505 * parse.c: Regenerated.
507 1999-10-21 Mark Mitchell <mark@codesourcery.com>
509 * dump.c (dequeue_and_dump): Replace several uses of
510 queue_and_dump_index with dump_child.
512 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
514 * expr.c: Include tm_p.h.
516 1999-10-21 Mark Mitchell <mark@codesourcery.com>
518 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
519 (pushlevel_temporary): Remove.
520 (add_scope_stmt): New function.
521 * decl.c (pushlevel_temporary): Remove.
522 (poplevel): Use add_scope_stmt.
523 (start_decl_1): Likewise.
524 * semantics.c (add_scope_stmt): New function.
525 (do_pushlevel): Use it.
526 (do_poplevel): Use it.
527 (expand_stmt): Check SCOPE_PARTIAL_P.
529 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
530 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
531 * expr.c (cplus_expand_expr): Expand it.
532 * ir.texi: Document EMPTY_CLASS_EXPR.
534 1999-10-20 Mark Mitchell <mark@codesourcery.com>
536 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
537 parameters as having namespace scope.
539 1999-10-19 Mark Mitchell <mark@codesourcery.com>
541 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
542 (mangling_flags): New type.
543 (build_overload_int): Change prototype.
544 (build_overload_value): Likewise.
545 (numeric_output_need_bar): Improve comment.
546 (mangle_expression): New function, broken out from ...
547 (build_overload_int): Here.
548 (build_overload_value): Adjust for use of mangling flags. Don't
549 warn about real-valued template parameters here. Do handle
550 complex expressions involving real-valued template parameters.
551 (build_template_parm_names): Encase non-type template parameters
552 in underscores, if necessary.
553 (process_overload_item): Remove conditional on
554 PARM_CAN_BE_ARRAY_TYPE.
556 1999-10-17 Mark Mitchell <mark@codesourcery.com>
558 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
560 * ir.texi: Clean up documentation of RETURN_INIT.
562 1999-10-15 Greg McGary <gkm@gnu.org>
564 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
565 (lang_init): Set default for flag_bounds_check if still "unspecified".
567 1999-10-13 Andrew Haley <aph@cygnus.com>
569 * class.c (finish_struct_1): Force alignment of non-bitfields to
572 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
574 * typeck2.c (process_init_constructor): Handle empty constructors.
576 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
578 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
580 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
583 1999-10-13 Mark Mitchell <mark@codesourcery.com>
585 * decl.c (make_rtl_for_local_static): Don't create register RTL
586 for addressable constants.
588 1999-10-13 Nathan Sidwell <nathan@acm.org>
590 * cp-tree.h (build_x_va_arg): Prototype new function.
591 * call.c (build_x_va_arg): Define it.
592 * parse.y (unary_expr): Call build_x_va_arg.
594 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
595 * call.c (convert_type_from_ellipsis): Define it.
596 * decl.c (init_decl_processing): Set lang_type_promotes_to.
598 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
600 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
602 * class.c (fixed_type_or_null): Always set *nonnull.
604 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
606 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
607 __GNUC__ and __GNUC_MINOR__.
609 1999-10-09 Mark Mitchell <mark@codesourcery.com>
611 * cp-tree.h (make_rtl_for_local_static): New function.
612 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
614 (make_rtl_for_local_static): Here.
615 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
617 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
619 * method.c: Include tm_p.h.
621 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
623 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
624 * lex.c (cp_make_lake_type): Likewise.
625 * tree.c (init_tree): Init make_lang_type_fn.
627 1999-10-07 Mark Mitchell <mark@codesourcery.com>
629 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
632 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
633 local statics if we don't really have them.
635 * ir.texi: Improve documentation for STMT_EXPR. Describe
638 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
640 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
642 1999-10-07 Greg McGary <gkm@gnu.org>
644 * class.c (finish_struct_1): Use simpler method of
645 removing elements of a singly-linked list which doesn't
646 lose for classes without data members.
648 1999-10-07 Mark Mitchell <mark@codesourcery.com>
650 * friend.c (make_friend_class): Robustify.
652 * semantics.c (finish_object_call_expr): Reject calls to template
655 1999-10-06 Mark Mitchell <mark@codesourcery.com>
657 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
659 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
660 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
662 * class.c (get_vfield_offset): Likewise.
663 (finish_base_struct): Likewise.
664 (modify_one_vtable): Likewise.
665 (fixup_vtable_deltas): Likewise.
666 (finish_struct_1): Likewise.
667 * init.c (expand_virtual_init): Likewise.
668 * search.c (lookup_field_1): Likewise.
669 (expand_upcast_fixups): Likewise.
670 * typeck.c (build_component_ref): Likewise.
671 (build_binary_op_nodefault): Likewise.
673 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
674 * ir.texi: Document TYPE_VFIELD.
676 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
678 * decl.c (grokdeclarator): Only warn about non-zero arrays if
679 !in_system_header (linux socketbits.h can give this for
680 __cmsg_data, which is using a GNU extension).
682 1999-10-05 Mark Mitchell <mark@codesourcery.com>
684 * decl2.c (start_static_storage_duration_function): Push the
685 function declaration so it ends up in namespace scope.
687 * dump.c (DUMP_CHILDREN): Remove.
688 (DUMP_BINFO): Adjust.
689 (struct dump_node_info): Remove dump_children_p.
690 (queue_and_dump_type): Remove dump_children_p parameter.
691 (queue): Don't set dump_children_p.
692 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
693 queue_and_dump_index.
694 (dequeue_and_dump): Unconditionally print children. Adjust calls
695 to functions mentioned above.
696 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
698 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
699 * dump.c (dequeue_and_dump): Dump them.
701 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
703 * decl.c (start_function): Set current_in_charge_parm for
704 constructors, too, where appropriate.
705 * search.c (fixup_all_virtual_upcast_offsets): New function.
706 (expand_indirect_vtbls_init): Use it.
708 1999-10-04 Nathan Sidwell <nathan@acm.org>
710 * decl2.c (grok_alignof): Don't decay lvalues.
712 * init.c (build_new): Remove unused variable.
714 1999-10-04 Mark Mitchell <mark@codesourcery.com>
716 * cp-tree.h (struct language_function): Remove static_labelno.
717 (static_labelno): Remove macro.
718 * method.c (build_overload_nested_name): Make static_labelno
721 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
722 to decide whether or not a function is defined.
724 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
725 situations where make_node will do it automatically.
726 * decl.c (grok_reference_init): Likewise.
727 (expand_static_init): Likewise.
728 (do_static_initialization): Likewise.
729 * init.c (perform_member_init): Likewise.
730 (expand_aggr_init_1): Likewise.
731 (build_new_1): Likewise.
732 * method.c (do_build_copy_constructor): Likewise.
733 (do_build_assign_ref): Likewise.
734 * search.c (expand_upcast_fixups): Likewise.
735 * semantics.c (finish_stmt_expr): Likewise.
736 * typeck.c (build_unary_op): Likewise.
737 (check_return_expr): Likewise.
739 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
741 * init.c (build_vec_delete_1): Fold COND_EXPRs.
743 1999-10-03 Mark Mitchell <mark@codesourcery.com>
745 * cp-tree.def (VEC_INIT_EXPR): Remove.
746 * cp-tree.h (struct stmt_tree): New type.
747 (struct saved_scope): Remove firstobj. Add x_saved_tree,
749 (class_cache_firstobj): Remove.
750 (struct language_function): Remove stmts_are_full_exprs_p,
751 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
752 (current_stmt_tree): New macro.
754 (last_expr_type): Likewise.
755 (doing_semantic_analysis_p): Simplify.
756 (stmts_are_full_exprs_p): Adjust.
757 (begin_tree): Remove prototype.
758 (end_tree): Likewise.
759 (begin_stmt_tree): Change prototype.
760 (finish_stmt_tree): Likewise.
761 (building_stmt_tree): Simplify.
762 * decl.c (mark_stmt_tree): New function.
763 (mark_saved_scope): Use it.
764 (start_function): Rearrange slightly to call begin_stmt_tree
766 (save_function_data): Tweak.
767 (finish_function): Adjust call to finish_stmt_tree.
768 (mark_lang_function): Use mark_stmt_tree.
769 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
770 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
771 (build_vec_init): Remove creation of stand-in intializer.
772 * pt.c (begin_tree): Remove.
773 (end_tree): Likewise.
774 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
775 (begin_compound_stmt): Handle a compound-statement outside of a
777 (begin_stmt_expr): Handle a statement-expression outsidef of a
779 (finish_stmt_expr): Likewise.
780 (begin_class_definition): Don't call begin_tree.
781 (finish_inline_definitions): Don't call end_tree.
782 (begin_stmt_tree): Take a pointer to tree, not a function as input.
783 (finish_stmt_tree): Likewise.
784 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
787 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
788 * parse.c: Regenerated.
790 * dump.c (dqueue_and_dump): Dump bitfieldness.
792 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
793 bitfields, rather than DECL_BIT_FIELD.
794 * ir.texi: Document how to tell whether or not a field is a
797 * lex.c (make_lang_type): Fix typo in comment.
799 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
801 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
803 1999-10-01 Mark Mitchell <mark@codesourcery.com>
805 * pt.c (tsubst_decl): If the type of a template instantiation is
806 bogus, so is the whole instantiation.
808 1999-09-30 Mark Mitchell <mark@codesourcery.com>
810 * decl.c (initialize_local_var): Handle static variables here.
811 (cp_finish_decl): Tweak handling of function-scope static
813 * semantics.c (expand_stmt): Handle DECL_STMTs for static
816 * method.c (emit_thunk): Don't crash when -fsyntax-only.
818 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
819 global_dtor_p. Add init_priority.
820 (DECL_ACCESS): Adjust accordingly.
821 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
822 (GLOBAL_INIT_PRIORITY): Likewise.
823 * decl.c (lang_mark_tree): Adjust accordingly.
824 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
825 and GLOBAL_INIT_PRIORITY.
826 * dump.c (dequeue_and_dump): Print them.
827 * ir.texi: Document them.
829 * decl2.c (struct priority_info_s): Remove initialization_sequence
830 and destruction_sequence.
831 (start_static_storage_duration_function): Return the body of the
832 function. Convert for function-at-a-time mode.
833 (generate_inits_for_priority): Remove.
834 (finish_static_storage_duration_function): Change prototype.
835 Adjust for function-at-a-time mode.
836 (do_static_initialization): Likewise.
837 (do_static_destruction): Likewise.
838 (do_static_initialization_and_destruction): Remove.
839 (start_static_initialization_or_destruction): New function.
840 (finish_static_initialization_or_destruction): Likewise.
841 (get_priority_info): Don't manipulation initialization_sequence or
842 destruction_sequence.
843 (prune_vars_needing_no_initialization): New function.
844 (write_out_vars): Likewise.
845 (finish_file): Use the various new functions instead of the old.
847 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
849 * cp-tree.h (warn_float_equal): Declare.
850 * decl2.c (warn_float_equal): Define.
851 (lang_decode_option): Recognize -W[no-]float-equal.
852 * typeck.c (build_binary_op_nodefault): Conditionally warn
853 about equality tests of floating point types.
855 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
857 Support normal type_info-based EH mechanisms with -fno-rtti.
858 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
859 (build_eh_type_type_ref): Likewise.
860 (build_eh_type): Remove.
861 (expand_throw): Call build_eh_type_type, not build_eh_type.
862 * decl2.c (import_export_decl): Don't associate the tinfo fn with
863 the vtable if -fno-rtti.
864 * decl.c (init_decl_processing): Always init_rtti_processing.
866 * rtti.c (get_typeid): Don't complain about -fno-rtti.
868 * class.c (class_cache_obstack, class_obstack): Remove.
869 (init_class_processing): Don't initialize class_obstack.
870 (push_cache_obstack): Remove.
871 (pushclass): Don't call it.
872 * cp-tree.h: Remove prototype for push_cache_obstack.
873 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
874 (pushlevel_class): Don't push_decl_level.
875 (poplevel_class): Don't pop_stack_level.
876 (push_class_level_binding): Don't push_cache_obstack.
877 (init_decl_processing): Don't intialize decl_obstack.
878 * search.c (push_class_decls): Don't push_cache_obstack.
879 * tree.c (list_hash_add): Put hash node on permanent_obstack.
880 (hash_tree_cons): Don't mess with obstacks.
881 (print_lang_statistics): Don't print stats for class_obstack and
884 1999-09-29 Mark Mitchell <mark@codesourcery.com>
886 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
887 * ir.texi: Document DECL_EXTERNAL.
889 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
890 * ir.texi: Document THUNK_DECLs.
892 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
893 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
894 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
895 * error.c (dump_template_bindings): Remove unused parameter.
896 Handle multiple levels of template parameters.
897 (dump_template_decl): Use `parms', not `args', for template
898 parameters. Fix thinko.
899 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
900 flags to dump_template_bindings.
901 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
902 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
903 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
904 (tsubst_copy): Clarify variable name.
905 (most_general_template): Robustify.
907 1999-09-29 Nathan Sidwell <nathan@acm.org>
909 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
910 to change primary template rendering.
912 1999-09-29 Mark Mitchell <mark@codesourcery.com>
914 * cp-tree.h (UPT_TEMPLATE): Remove.
915 (UPT_PARMS): Likewise.
916 (DECL_NEEDED_P): New macro.
917 * decl2.c (finish_vtable_vardecl): Use it.
918 (finish_objects): Don't crash with -fsyntax-only.
919 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
921 * pt.c (tsubst_friend_function): Remove FIXME that talks about
923 (tsubst_expr): Correct handling of function try-blocks.
924 * semantics.c: Include flags.h.
925 (expand_body): Don't do RTL generation if -fsyntax-only.
926 * Makefile.in (semantics.o): Depends on flags.h.
928 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
930 * pt.c (most_general_template): Adjust declaration.
932 * cp-tree.h: (most_general_template): Declare.
934 * error.c (dump_template_value): Rename to ...
935 (dump_template_argument): This.
936 (dump_template_argument_list): New function.
938 (dump_template_parameter): New function.
939 (dump_template_decl): Use it.
940 (dump_template_bindings): New function.
941 (dump_function_decl): Use it. Pretty print function template
944 1999-09-28 Nathan Sidwell <nathan@acm.org>
946 * decl.c (grokdeclarator): Distinguish parameter context for
947 diagnostics. Tidy up missing type diagnostic.
948 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
950 1999-09-28 Mark Mitchell <mark@codesourcery.com>
952 * ir.texi: Improve documentation for TARGET_EXPR.
954 1999-09-27 Nathan Sidwell <nathan@acm.org>
956 Augment stringification of trees.
957 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
958 (fndecl_as_string, type_as_string_real, args_as_string,
959 code_as_string, language_as_string, parm_as_string,
960 op_as_string, assop_as_string, cv_as_string): Remove.
961 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
962 (context_as_string): Declare new function.
963 * error.c (cp_printers): Move definition.
965 (OB_END_TEMPLATE_ID): Adjust.
966 (interesting_scope_p): Remove.
967 (dump_scope): New static function.
968 (dump_qualifiers): Adjust prototype, reimplement.
969 (dump_template_value): Use tree_string_flags.
970 (dump_type_real): Move back to dump_type.
971 (dump_type): Adjust prototype. Use tree_string_flags.
972 (dump_aggr_type): Likewise. Use dump_template_parms.
973 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
975 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
976 (dump_simple_decl): Likewise.
977 (dump_decl): Likewise. Use dump_template_decl.
978 (dump_template_decl): New static function broken out of dump_decl.
979 (dump_function_decl): Adjust prototype. Use tree_string_flags.
980 (dump_parameters): Likewise. Prefix space.
981 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
982 (dump_function_name): Likewise. Use dump_template_parms.
983 (dump_template_parms): New static function broken out of
985 (dump_expr_list): Adjust prototype. Use tree_string_flags.
986 (dump_expr): Likewise.
987 (fndecl_as_string): Removed
988 (type_as_string_real): Removed
989 (dump_binary_op): Adjust prototype. Use tree_string_flags.
990 (dump_unary_op): Likewise.
991 (type_as_string): Likewise.
992 (expr_as_string): Likewise.
993 (decl_as_string): Likewise.
994 (context_as_string): New function.
995 (lang_decl_name): Adjust.
996 (decl_to_string): New static print callback.
997 (expr_to_string): Likewise.
998 (fndecl_to_string): Likewise.
999 (code_as_string): Renamed to ...
1000 (code_to_string): ... here. Adjust.
1001 (language_as_string): Renamed to ...
1002 (language_to_string): ... here. Adjust.
1003 (parm_as_string): Renamed to ...
1004 (parm_to_string): ... here.
1005 (op_as_string): Renamed to ...
1006 (op_to_string): ... here.
1007 (assop_as_string): Renamed to ...
1008 (assop_to_string): ... here.
1009 (type_to_string): New static print callback.
1010 (args_as_string): Renamed to ...
1011 (args_to_string): ... here. Adjust.
1012 (cv_as_string): Renamed to ...
1013 (cv_to_string): ... here. Adjust.
1014 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1015 (print_template_context): Likewise.
1017 1999-09-26 Mark Mitchell <mark@codesourcery.com>
1019 * cp-tree.h (expand_throw): Remove prototype.
1020 * except.c (expand_throw): Make it static. Use tree-generation
1021 functions, rather than RTL-generation functions.
1022 (build_throw): Use it.
1023 * expr.c: Include except.h.
1024 (cplus_expand_expr): Don't call expand_throw here.
1025 * Makefile.in (expr.o): Depend on except.h.
1026 * ir.texi: Update documentation for THROW_EXPR.
1028 * decl.c (start_function): Set x_dont_save_pending_sizes rather
1029 than calling get_pending_sizes.
1030 * init.c (build_new): Don't save and restore
1031 immediate_size_expand; instead, assert that it has the expected
1034 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1036 * lex.c (compiler_error): Add missing call to va_end().
1038 1999-09-25 Mark Mitchell <mark@codesourcery.com>
1040 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1041 * ir.texi: Document RESULT_DECL and DECL_RESULT.
1043 * cp-tree.h (check_return_expr): New function.
1044 * decl.c (finish_constructor_body): New function.
1045 (pushdecl): Put global friend functions in namespace binding
1046 level, not the class binding level.
1047 (finish_destructor_body): Make sure the dtor_label is always
1048 defined. Fix typo in comment.
1049 (finish_function): Move generation of constructor-termination code
1050 to semantic-analysis time. Move generation of implicit `main'
1051 return value to semantic-analysis time.
1052 * semantics.c (finish_return_stmt): Generate goto's to
1053 ctor_label/dtor_label here. Use check_return_expr to do semantic
1054 analysis on the returned expression.
1055 * typeck.c (maybe_warn_about_returning_address_of_local): New
1056 function split out from c_expand_return.
1057 (check_return_expr): Likewise.
1058 (c_expand_return): Just generate the RTL for the return.
1060 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1062 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1063 (cleanup_type): Likewise.
1064 (search_tree): Change prototype.
1065 * decl.c (local_variable_p): Adjust for new interface to
1067 (check_default_argument): Likewise.
1068 * error.c (dump_expr): Handle INIT_EXPR.
1069 * except.c (expand_throw): Don't make cleanup_type a local static.
1070 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1071 * init.c (build_new): Call build_new_1 directly, rather than
1072 building a NEW_EXPR.
1073 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
1074 processing file-scope initializers.
1075 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1076 * tree.c: Include splay-tree.h
1077 (no_linkage_helper): Adjust for new interface to search_tree.
1078 (search_tree): Pass around pointers to tree nodes, rather than the
1079 nodes themselves. Handle VEC_INIT_EXPR.
1080 (no_linkage_check): Adjust for new interface to search_tree.
1081 (mapcar): Handle VEC_INIT_EXPR.
1082 (target_remap): New variable.
1083 (bot_manip): Use it.
1084 (bot_replace): New function.
1085 (break_out_target_exprs): Use it to remap all variables used in a
1086 default argument expression.
1087 * typeck.c (build_modify_expr): Don't crash when outside a
1088 function and presented with an INIT_EXPR assignment
1089 * Makefile.in (tree.o): Depend on splay-tree.h.
1091 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1093 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1095 (builtin_function): New arg CLASS. Arg CODE now of type int. All
1097 Set the builtin's DECL_BUILT_IN_CLASS.
1099 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1101 * decl.c (pushdecl): Don't make local declarations of extern
1102 variables give the variable a DECL_CONTEXT for the function.
1103 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
1104 Don't accidentally make RTL for local declarations.
1105 (emit_local_var): Handle declarations with asm-specifiers here.
1107 1999-09-23 Mark Mitchell <mark@codesourcery.com>
1109 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
1110 STMT_IS_FULL_EXPR_P.
1112 * cp-tree.h (language_function): Add cannot_inline.
1113 * decl.c (start_function): Restore current_function_cannot_inline
1114 from the saved value.
1115 (save_function_data): Save current_function_cannot_inline.
1116 * decl2.c (start_objects): Change prototype. Build the function
1117 in function-at-a-time mode.
1118 (finish_objects): Likewise.
1119 (generate_ctor_or_dtor_function): Adjust accordingly.
1121 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1122 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1123 Don't call expand_anon_union_decl here
1124 * semantics.c (exapnd_stmt): Call it here, instead.
1125 * typeck.c (mark_addressable): Addressed variables are implicitly
1128 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1130 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1131 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1132 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1133 * cp-tree.h: Add tree checking macros to various tree access
1135 * ptree.c (print_lang_decl): Test for function or variable
1136 before accessing template info.
1138 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
1140 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1141 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1142 * decl2.c (lang_f_options): Add -fshort-wchar.
1143 * cp-tree.h: Declare flag_short_wchar.
1144 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
1147 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1149 * ir.texi: Fix formatting errors and typos.
1151 1999-09-22 Mark Mitchell <mark@codesourcery.com>
1153 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1155 * decl.c (pushdecl): Do create a binding for extern "C" functions,
1156 but not for their DECL_ASSEMBLER_NAMEs.
1157 (lookup_name_current_level): Fix formatting.
1158 (xref_tag): Likewise.
1159 * decl2.c (start_objects): Mark static constructors and
1160 destructors as used.
1162 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
1164 * decl.c (define_case_label): Don't crash if we're not in a switch.
1166 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1167 * lang-options.h: Restore -fthis-is-variable. Remove help strings
1168 for unsupported flags.
1170 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
1172 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1173 Accept and warn about -fthis-is-variable.
1175 1999-09-21 Mark Mitchell <mark@codesourcery.com>
1177 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1178 CLEANUP_STMT, and SCOPE_STMT.
1180 * decl2.c (lang_decode_option): Adjust, in the wake of recent
1181 changes to option processing.
1183 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1185 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
1186 function pointer from pmfs with no object given.
1187 (convert_for_assignment): Do not return error when converting
1190 1999-09-21 Alex Samuel <samuel@codesourcery.com>
1192 * lex.c (internal_filename): New variable.
1193 (INTERNAL_FILENAME): New macro.
1194 (init_parse): Allocate internal_filename and mark as root. Use it
1195 instead of a string constant.
1197 1999-09-21 Nathan Sidwell <nathan@acm.org>
1199 Reimplement dynamic cast and catch matching.
1200 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
1201 * search.c (dynamic_cast_base_recurse): New function.
1202 (get_dynamic_cast_base_type): New function for dynamic cast.
1203 * rtti.c (build_dynamic_cast_1): Determine source and target
1204 class relationship. Call __dynamic_cast_2.
1205 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
1206 (__user_type_info::dyncast): New dynamic cast dispatcher.
1207 (__user_type_info::sub_kind): New nested enumeration.
1208 (__user_type_info::contained_p): sub_kind predicate.
1209 (__user_type_info::contained_public_p): Likewise.
1210 (__user_type_info::contained_nonpublic_p): Likewise.
1211 (__user_type_info::contained_nonvirtual_p: Likewise.
1212 (__user_type_info::upcast_result): New nested struct.
1213 (__user_type_info::dyncast_result): New nested struct.
1214 (*::do_upcast): New catch function.
1215 (*::do_dyncast): New dynamic cast function.
1216 (__user_type_info::find_public_subobj): New dynamic cast
1218 (*::do_find_public_subobj): New dynamic cast helper function.
1219 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
1220 (__user_type_info::dyncast): Define dynamic cast dispatcher.
1221 (*::do_upcast): Define catch function.
1222 (*::do_dyncast): Define dynamic cast function.
1223 (*::do_find_public_subobj): Define dynamic cast helper function.
1224 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
1225 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
1226 (__dynamic_cast_2): New dynamic cast runtime.
1228 1999-09-20 Mark Mitchell <mark@codesourcery.com>
1230 * cp-tree.h (finish_stmt_expr): Change prototype.
1231 * expr.c (cplus_expand_expr): Adjust call accordingly.
1232 * init.c (finish_init_stmts): Likewise.
1233 * parse.y (primary): Likewise.
1234 * pt.c (tsubst_copy): Likewise.
1235 * semantics.c (finish_stmt_expr): Don't take two parameters.
1236 Don't remove generated BLOCKs from the block-tree.
1238 Remove support for assigning to `this'.
1239 * NEWS: Note that fact.
1240 * class.c (build_vbase_path): Don't check flag_this_is_variable.
1241 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
1242 (language_function): Remove assigns_this, just_assigned_this, and
1243 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
1244 (base_init_expr): Remove.
1245 (current_vcalls_possible_p): New macro.
1246 (vtbls_set_up_p): Likewise.
1247 (emit_base_init): Change prototype.
1248 * decl.c (finish_destructor_body): New function, split out from
1250 (current_function_assigns_this): Remove.
1251 (current_function_just_assigned_this): Likewise.
1252 (start_function): Don't set them.
1253 (finish_function): Don't check them. Don't emit
1254 base-initialization code here. Generate code for destructors when
1255 doing semantic analysis.
1256 (finish_stmt): Don't check current_function_just_assigned_this.
1257 * decl2.c (lang_f_options): Remove this-is-variable.
1258 (lang_decode_option): Likewise.
1259 (grokclassfn): Don't check flag_this_is_variable.
1260 * init.c (emit_base_init): Return the expression generated.
1261 (construct_virtual_bases): Don't push/pop obstacks. Fix
1263 (build_new_1): Don't check flag_this_is_variable.
1264 (get_temp_regvar): Don't set DECL_REGISTER.
1265 (build_vec_init): Don't call use_variable.
1266 * lang-options.h: Remove "-fthis-is-variable" and
1267 "-fno-this-is-variable".
1268 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
1269 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
1271 * semantics.c (finish_expr_stmt_real): Rename to ...
1272 (finish_expr_stmt): This. Remove assigned_this parameter.
1273 (begin_if_stmt): Call do_pushlevel before starting the statement.
1274 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
1276 (setup_vtbl_ptr): Emit initialization code for bases and members
1277 at semantic-analysis time. Emit code to initialize vtables in
1279 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
1280 Don't handle CTOR_INITIALIZER any more.
1281 * typeck.c (build_modify_expr): Don't check for assignments to
1283 (c_expand_return): Don't suggest assigning to `this'.
1285 * Makefile.in (decl.o): Depend on RTL_H.
1286 (decl2.o): Likewise.
1287 (class.o): Likewise.
1289 (method.o): Likewise.
1290 (search.o): Likewise.
1294 * decl.c (duplicate_decls): When a builtin function is redeclared
1295 as static, make sure it is mangled correctly.
1297 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
1298 detail about the statement-tree.
1300 1999-09-20 Nathan Sidwell <nathan@acm.org>
1302 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
1304 1999-09-20 Nick Clifton <nickc@cygnus.com>
1306 * decl2.c (lang_decode_option): Extend comment.
1308 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1310 * typeck.c: Include "tm_p.h".
1312 1999-09-19 Mark Mitchell <mark@codesourcery.com>
1314 * ir.texi: New file.
1316 1999-09-19 Paul Burchard <burchard@pobox.com>
1318 * semantics.c (expand_stmt): Initialize return value.
1320 1999-09-18 Paul Burchard <burchard@pobox.com>
1322 * gxxint.texi: G++ now implements namespaces.
1324 1999-09-18 Mark Mitchell <mark@codesourcery.com>
1326 * decl.c (pop_label): Don't warn about unused labels more than
1328 * semantics.c (finish_goto_stmt): Always marked used labels as
1331 * decl.c (layout_var_decl): Change prototype. Call layout_decl
1332 even when the declaration is external.
1333 (cp_finish_decl): Adjust call to layout_var_decl.
1334 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
1336 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
1338 * typeck.c (get_member_function_from_ptrfunc): Always consider
1339 virtuality inside member pointer.
1341 1999-09-17 Mark Mitchell <mark@codesourcery.com>
1343 Turn on function-at-a-time processing.
1344 * cp-tree.h (doing_semantic_analysis_p): New macro.
1345 (SF_DEFAULT): Define to zero, not SF_EXPAND.
1346 (start_handler_parms): Change prototype.
1347 (expand_start_catch_block): Likewise.
1348 (expand_end_catch_block): Likewise.
1349 (expand_start_eh_spec): Likewise.
1350 (expand_end_eh_spec): Declare.
1351 (finish_handler_parms): Change prototype.
1352 (begin_catch_block): Declare.
1353 (finish_handler): Change prototype.
1354 (do_pushlevel): Declare.
1355 (do_poplevel): Likewise.
1356 * decl.c (pushlevel): Don't create
1357 binding levels when not doing semantic analysis.
1358 (poplevel): Don't pop them.
1359 (pushdecl): Assert that we are never called when not doing
1361 (pushdecl_top_level): Use push_to_top_level.
1362 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
1363 label when expanding.
1364 (cp_finish_decl): Only inject for-scope variables when doing
1365 semantic analysis. Add comments.
1366 (start_handler_parms): Return the handler parm.
1367 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
1368 already set. Reinitialize from saved function data if available.
1369 Don't pushlevel when not doing semantic analysis.
1370 (store_parm_decls): Only generate RTL when expanding. Only
1371 pushdecl when doing semantic analysis. Set
1372 current_eh_spec_try_block if appropriate.
1373 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
1374 Combine common code. Don't poplevel when not doing semantic
1376 (push_cp_function_context): Don't expand functions without an
1377 explicit call to expand_body.
1378 (mark_lang_function): Make eh_spec_try_block and
1380 * except.c (expand_end_eh_spec): Don't
1382 (process_start_catch_block): Likewise.
1383 (push_eh_cleanup): Use finish_decl_cleanup.
1384 (initialize_handler_parm): New function.
1385 (expand_start_catch_block): Use it.
1386 (expand_end_catch_block): Use tree-generation functions, not
1387 RTL-generation functions.
1388 (expand_start_eh_spec): Likewise.
1389 (expand_end_eh_spec): Likewise.
1390 (expand_exception_blocks): Simplify.
1391 (start_anon_func): Use do_pushlevel.
1392 (end_anon_func): Use do_poplvel. Call expand_body for the
1394 * expr.c (do_case): Don't call define_case_label.
1395 * init.c (create_temporary_var): Set DECL_CONTEXT for local
1397 * method.c (emit_thunk): Call expand_body for the
1399 (sythesize_method): Likewise.
1400 * parse.y (handler_args): Give it ttype.
1401 (eat_saved_input): Call expand_body.
1402 (base_init): Use do_pushlevel.
1403 (pending_inline): Call expand_body.
1404 (handler): Adjust calls to finish_handler_parms and
1406 (handler_args): Don't call expand_start_catch_block. Return the
1407 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
1408 * parse.c: Regenerated.
1409 * rtti.c (synthesize_tinfo_fn): Call finish_function.
1410 * semantics.c (do_pushlevel): Give it external linkage. Build
1412 (do_poplevel): Likewise.
1413 (finish_case_label): Call define_case_label when doing semantic
1415 (finish_goto_stmt): Create RTL for labels.
1416 (finish_function_try_block): Set in_function_try_handler
1418 (finish_function_handler_sequence): Unset it.
1419 (finish_handler_parms): Use expand_start_catch_block even when
1420 building a statement-tree.
1421 (begin_catch_block): New function.
1422 (finish_handler): Move a little RTL-generation logic here.
1423 (finish_decl_cleanup): Allow cleanups for empty declarations.
1424 (finish_named_return_value): Don't pushdecl when not doing
1426 (expand_stmt): Don't do semantic analysis for variable
1427 declarations. Handle START_CATCH_STMT. Call expand_label
1428 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
1429 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
1430 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
1431 RETURN_INIT and function try blocks.
1433 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
1434 x_scope_stmt_stack. Add x_in_charge_parm.
1435 (current_eh_spec_try_block): New macro.
1436 (current_scope_stmt_stack): Likewise.
1437 (current_in_charge_parm): Likewise.
1438 * decl.c (start_function): Initialize current_in_charge_parm.
1439 (finish_function): Use current_in_charge_parm rather than looking
1441 * search.c (expand_indirect_vtbls_init): Likewise.
1443 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
1444 (TRY_BLOCK): Likewise.
1445 (HANDLER): Likewise.
1446 (START_CATCH_STMT): New tree node.
1447 (SCOPE_STMT): Likewise.
1448 * cp-tree.h (SCOPE_BEGIN_P): New macro.
1449 (SCOPE_NULLIFIED_P): Likewise.
1450 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
1451 (struct lang_decl): Add saved_language_function.
1452 (DECL_PENDING_INLINE_INFO): Adjust documentation.
1453 (DECL_PENDING_INLINE_P): New macro.
1454 (TYPE_TI_ARGS): Fix typo in comment.
1455 (DECL_SAVED_TREE): Add to documentation.
1456 (DECL_SAVED_FUNCTION_DATA): New macro.
1457 (START_CATCH_TYPE): Likewise.
1458 (SCOPE_END_P): New macro.
1459 (declare_parm_level): Don't declare.
1460 * decl.c (mark_lang_function): New function, split out from
1461 mark_cp_function_context.
1462 (save_function_data): New function.
1463 (declare_parm_level): Remove.
1464 (finish_function): Use save_function_data to squirrel away
1465 important stuff for later use.
1466 (mark_cp_function_context): Use mark_function_data.
1467 (lang_mark_tree): Likewise.
1468 * lex.c (begin_definition_of_inclass_inline): Set
1469 DECL_PENDING_INLINE_P.
1470 (store_pending_inline): Clear it.
1471 * pt.c (tsubst_decl): Likewise.
1473 1999-09-17 Nathan Sidwell <nathan@acm.org>
1475 * call.c (perform_implicit_conversion): Deal with error_mark_node.
1477 1999-09-17 Mark Mitchell <mark@codesourcery.com>
1479 * decl.c (warn_extern_redeclared_static): Don't get confused by
1480 static member functions.
1481 (duplicate_decls): Merge DECL_THIS_STATIC.
1483 * decl.c (expand_static_init): Make sure assignments to local
1484 statics actually occur.
1486 1999-09-17 Mark Mitchell <mark@codesourcery.com>
1488 * cp-tree.h (poplevel_class): Declare.
1489 * class.c (popclass): Use poplevel_class, not poplevel.
1490 * decl.c (poplevel_class): Don't make it static. Don't return a
1492 (poplevel): Don't call poplevel_class; abort in a class
1493 binding level is seen.
1494 * semantics.c (finish_translation_unit): Use pop_everything.
1495 * parse.y (member_init): Allow errors.
1496 (pending_inline): Call finish_function.
1497 * parse.c: Regenerated.
1498 * Makefile.in (CONFLICTS): Adjust.
1500 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
1502 * error.c: Reduce code duplication.
1503 (dump_template_value): New function.
1504 (dump_type_real): Use it.
1505 (dump_decl): Likewise.
1506 (dump_function_name): Likewise.
1507 (dump_function_decl): Don't be too talkative about function return
1510 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1512 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
1514 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1516 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
1518 * decl2.c (finish_file): Also call check_global_declarations for
1519 the pending_statics list.
1521 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
1523 * lex.c (cp_pragma_implementation): Allow #pragma implementation
1526 1999-09-15 Richard Henderson <rth@cygnus.com>
1528 * lex.c (mark_impl_file_chain): Follow the next chain.
1530 1999-09-15 Mark Mitchell <mark@codesourcery.com>
1532 * decl.c (warn_extern_redeclared_static): Simplify. Catch
1533 problems with extern "C" functions redeclared as static.
1534 (duplicate_decls): When a builtin is redeclared static, make the
1535 new function have internal linkage.
1537 1999-09-15 Mark Mitchell <mark@codesourcery.com>
1539 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
1540 * pt.c (tsubst_copy): Likewise.
1541 * tree.c (search_tree): Likewise.
1544 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1546 * typeck2.c (ack): Don't declare progname.
1548 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
1550 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
1551 filenames with ggc_alloc_string.
1553 1999-09-14 Mark Mitchell <mark@codesourcery.com>
1555 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
1557 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
1559 * cvt.c (build_up_reference): Likewise.
1560 * tree.c (build_cplus_new): Likewise.
1561 (get_target_expr): Likewise.
1563 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
1565 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
1567 1999-09-13 Mark Mitchell <mark@codesourcery.com>
1569 * cp-tree.h (build_target_expr): New function.
1570 * call.c (build_conditional_expr): Use build_target_expr.
1571 (convert_like): Likewise.
1572 (build_over_call): Likewise.
1573 * cvt.c (build_up_reference): Likewise.
1574 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
1575 (destroy_local_var): Here.
1576 (build_target_expr): New function.
1577 * tree.c (build_cplus_new): Use it.
1578 (get_target_expr): Likewise.
1580 1999-09-13 Nathan Sidwell <nathan@acm.org>
1582 * typeck.c (expr_sizeof): Don't decay arrays and functions.
1583 Remove misleading comment.
1584 (build_compound_expr): Don't decay arrays.
1586 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
1588 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
1589 class rvalues again.
1591 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1593 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
1595 * g++spec.c: Include gcc.h.
1596 (lang_specific_driver): Constify a char*. Call xcalloc, not
1597 xmalloc/bzero. All calls to the function pointer parameter now
1598 explicitly call `fatal'.
1600 1999-09-12 Mark Mitchell <mark@codesourcery.com>
1602 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
1603 * cvt.c (ocp_convert): Complete the from and destination types.
1604 Adjust warning about functions always being `true' in conditionals.
1605 * decl.c (duplicate_decls): Don't play funny games with abort.
1606 * error.c (dump_expr): Handle OVERLOADs.
1607 * spew.c (probe_obstack): Remove.
1608 * typeck.c (condition_conversion): Use perform_implicit_conversion.
1610 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
1612 * cp-tree.h (auto_function, define_function): Adjust prototypes.
1613 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
1615 (auto_function): Likewise, for CODE arg.
1616 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
1617 (builtin_function): ... here.
1619 1999-09-11 Mark Mitchell <mark@codesourcery.com>
1621 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
1622 (init_decl_processing): Don't set TREE_PERMANENT for the
1624 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
1625 (grokdeclarator): Likewise.
1626 (grokparms): Don't check TREE_PERMANENT when building up lists.
1627 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
1628 (mark_inline_for_output): Likewise.
1629 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
1630 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
1631 * lex.c (check_newline): Don't check ggc_p; it is always one.
1632 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
1633 * spew.c (yylex): Don't copy_node or probe_obstacks for
1634 non-permanent CONSTANTs and STRINGs.
1635 * tree.c (build_cplus_array_type_1): Don't fuss with
1636 TREE_PERMANENT on ARRAY_TYPEs.
1638 * cp-tree.def (CLEANUP_STMT): New node.
1639 * cp-tree.h (language_function): Add name_declared.
1640 (current_function_name_declared): New macro.
1641 (CLEANUP_DECL): New macro.
1642 (CLEANUP_EXPR): Likewise.
1643 (emit_local_var): Likewise.
1644 (finish_decl_cleanup): New function.
1645 * cvt.c (build_up_reference): Simplify.
1646 (ocp_convert): Remove dead code.
1647 * decl.c (start_decl): Remove call to add_decl_stmt.
1648 (grok_reference_init): Adjust, to handle bindings temporaries to
1649 references. Remove dead code.
1650 (initialize_local_var): Don't generate RTL for
1651 declarations here, or build cleanups here. Don't fuss with
1652 obstacks. Replace expand_start_target_temps calls with explicit
1653 setting of stms_are_full_exprs_p.
1654 (destroy_local_var): New function.
1655 (emit_local_var): Likewise.
1656 (cp_finish_decl): Use them, as appropriate.
1657 (start_function): Announce template functions.
1658 (store_parm_decls): Don't call declare_function_name here.
1659 (finish_stmt): Don't start emit base-initialization code when just
1660 building the statement-tree.
1661 * init.c (create_temporary_var): Move add_decl_stmt call ...
1662 (get_temp_regvar): Here.
1663 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
1664 cp_finish_decl would expect. Don't call add_decl_stmt.
1665 * semantics.c (begin_compound_stmt): Call declare_function_name,
1667 (finish_decl_cleanup): New function.
1668 (expand_stmt): Use emit_local_var to output variables.
1669 (expand_body): Set current_funtion_name_declared.
1671 1999-09-10 Mark Mitchell <mark@codesourcery.com>
1673 * cp-tree.h (finish_cleanup_try_block): New function.
1674 * semantics.c (finish_cleanup_try_block): Add comment.
1676 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1678 * cp-tree.h: Delete declarations for all tree nodes now moved to
1680 * decl.c: Delete their definitions.
1681 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
1682 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
1684 (init_decl_processing): Call build_common_tree_nodes and
1685 build_common_tree_nodes_2 instead of building their nodes here.
1686 Don't add gc roots for them.
1688 1999-09-10 Mark Mitchell <mark@codesourcery.com>
1690 * cp-tree.h (language_function): Rename expanding_p to
1691 x_expanding_p. Rename named_label_uses to x_named_label_uses.
1692 (expanding_p): Adjust accordingly.
1693 (TREE_VIA_PRIVATE): Fix typo in comment.
1694 (DECL_REFERENCE_SLOT): Remove.
1695 (SET_DECL_REFERENCE_SLOT): Likewise.
1696 * decl.c (named_label_uses): Adjust. Remove chicken comment.
1697 (push_overloaded_decl): Don't truncate the chain of bindings when
1698 adding an overloaded function.
1699 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
1700 (initialize_local_var): Fix typo in comment.
1701 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
1702 * decl2.c (start_objects): Make the fact that we are expanding
1703 the generated function right away explicit.
1704 (start_static_storage_duration_function): Likewise.
1705 (finish_file): Fix typo in comment.
1706 * init.c (build_vec_init): Correct bugs in handling cleanups.
1707 * semantics.c (maybe_convert_cond): New function.
1708 (FINISH_COND): Always store the condition, even if there's
1710 (finish_if_stmt_cond): Use maybe_convert_cond.
1711 (finish_while_stmt_cond): Likewise.
1712 (finish_do_stmt): Likewise.
1713 (finish_for_cond): Likewise.
1714 (expand_cond): Adjust.
1716 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
1717 * init.c (perform_member_init): Remove obstack machinations.
1718 (expand_cleanup_for_base): Likewise.
1719 (finish_init_stmts): Mark the statement-expression as used.
1720 * method.c (emit_thunk): Use tree-generating functions, not
1722 (do_build_copy_constructor): Likewise.
1723 (do_build_assign_ref): Likewise.
1724 (synthesize_method): Likewise. Keep track of line numbers.
1725 * pt.c (tsubst_expr): Handle various kinds of try blocks.
1726 * semantics.c (expand_stmts): Remove.
1727 (begin_function_try_block): Set FN_TRY_BLOCK_P.
1728 (finish_function_try_block): Be careful rechaining
1729 function try blocks.
1730 (expand_stmt): Loop through all the statements at a given level.
1731 (exapnd_body): Be careful with line-numbers here too. Prepare for
1732 being called directly from the parser.
1734 * cp-tree.h (finish_function): Adjust prototype.
1735 * decl.c (finish_function): Return the function compiled.
1736 * pt.c (instantiate_decl): Don't play games with obstacks.
1737 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
1738 (search_tree): Likewise.
1739 * typeck.c: Fix typo in comment.
1740 * typeck2.c (store_init_value): Add comment.
1742 * cp-tree.h (CPTI_ATEXIT): New macro.
1743 (atexit_node): Likewise.
1744 * decl.c (destroy_local_static): New function, broken out from ...
1745 (expand_static_init): Here.
1747 * rtti.c (get_tinfo_var): These should always be global
1748 (expand_si_desc): Use tree, not RTL, functions to generate code.
1749 (expand_class_desc): Likewise.
1750 (expand_ptr_desc): Likewise.
1751 (expand_attr_desc): Likewise.
1752 (expand_generic_desc): Likewise.
1753 (synthesize_tinfo_fn): Likewise.
1755 1999-09-09 Mark Mitchell <mark@codesourcery.com>
1757 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
1758 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
1760 (RECHAIN_STMST_FROM_CHAIN): Likewise.
1762 * parse.y (simple_stmt): Fix typo in last change.
1764 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
1765 (STMT_IS_FULL_EXPR_P): Likewise.
1766 (STMT_LINENO_FOR_FN_P): Likewise.
1767 (prep_stmt): New function.
1768 (building_stmt_tree): Tweak for safety.
1769 * pt.c (tsubst_expr): Use prep_stmt throughout.
1770 (add_tree): Move it to semantics.c
1771 * semantics.c (add_tree): Move it here.
1772 (finish_expr_stmt_real): New function.
1773 (finish_expr_stmt): Use it.
1774 (finish_if_stmt_cond): Use FINISH_COND.
1775 (finish_while_stmt_cond): Likewise.
1776 (finish_for_cond): Likewise.
1777 (finish_stmt_tree): Tweak line-number handling.
1778 (prep_stmt): New function.
1779 (expand_stmt): Use it.
1781 * cp-tree.h (begin_switch_stmt): Adjust prototype.
1782 (finish_switch_cond): Likewise.
1783 * parse.y (simple_stmt): Adjust accordingly.
1784 * parse.c: Regenerated.
1785 * pt.c (tsubst_expr): Adjust accordingly.
1786 * semantics.c (expand_cond): New function.
1787 (FINISH_COND): New macro.
1788 (begin_switch_stmt): Build the SWITCH_STMT here.
1789 (finish_switch_stmt_cond): Not here.
1790 (expand_stmt): Adjust calls to begin_switch_stmt and
1791 finish_switch_cond. Use expand_cond throughout.
1793 * dump.c (dequeue_and_dump): Dump types for constants.
1794 Describe DECL_ARG_TYPE more intuitively.
1797 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1798 (lang_cleanup_tree): Remove.
1799 * lex.c (make_lang_type): Use ggc_alloc to allocate
1802 Reorganize per-function data.
1803 * cp-tree.h (saved_scope): Add function_decl, bindings.
1804 (language_function): Rename binding_level to bindings.
1805 (cp_function_chain): Use the current_function, not the
1806 outer_function_chain.
1807 (current_class_ptr): Make it work, even when there's no
1809 (current_class_ref): Likewise.
1810 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
1812 (clear_temp_name): Remove.
1813 * decl.c (check_function_type): New function, broken out from
1815 (current_binding_level): Adjust definition.
1816 (pushlevel): Simplify.
1817 (poplevel): Don't use named_label_uses when we're outside
1819 (mark_saved_scope): Mark function_decl and bindings.
1820 (maybe_push_to_top_level): Don't unconditionally push a new
1821 function context. Save bindings and the current_function_decl.
1822 Don't clear named_labels.
1823 (pop_from_top_level): Pop function context if appropriate.
1824 (init_decl_processing): Set init_lang_status and free_lang_status,
1825 rather than save_lang_status and restore_lang_status.
1826 (start_function): Take SF_* flags. Don't clear per-function data.
1827 Reorder and simplify to use new per-function data code. Add
1829 (store_parm_decls): Don't call init_function_start here.
1830 (finish_function): Adjust for new handling of per-function data.
1831 (push_cp_function_context): Simplify.
1832 (mark_cp_function_context): Change binding_level to bindings.
1833 * decl2.c (clear_temp_name): Remove.
1834 (start_objects): Use SF flags to start_function.
1835 (start_static_storage_duration_function): Likewise.
1836 * except.c (start_anon_func): Remove redundant calls to
1837 push_function_context_to. Use SF flags to start function.
1838 (end_anon_func): Remove redundant call to pop_function_context
1840 * lex.c (reinit_parse_for_function): Don't initialize per-function
1842 * method.c (emit_thunk): Clear current_function after calling
1843 assemble_end_function. Use SF flags for start_function.
1844 (synthesize_method): Use SF flags for start_function.
1845 * parse.c: Regenerated.
1846 * parse.y (fn.defpen): Likewise.
1847 (pending_inline): Clear current_function, even if something goes
1849 * pt.c (instantiate_decl): Use SF flags to start_function.
1850 Don't save and restore expanding_p.
1851 (add_tree): Handle the case where we are outside any function.
1852 (end_tree): Likewise.
1853 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1854 * semantics.c (begin_function_definition): Likewise.
1855 (expand_body): Likewise.
1857 1999-09-09 Nathan Sidwell <nathan@acm.org>
1859 * cp-tree.h (convert_to_void): Prototype new function.
1860 (require_complete_type_in_void): Remove prototype.
1861 * cvt.c (convert_to_void): New function.
1862 (ocp_convert): Use convert_to_void.
1863 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1865 * typeck.c (require_complete_type_in_void): Remove function.
1866 (build_compound_expr): Use convert_to_void.
1867 (build_static_cast): Likewise.
1868 (build_c_cast): Likewise.
1869 * semantics.c (finish_expr_stmt): Do not decay full expressions.
1871 * typeck.c (build_x_compound_expr): Add FIXME.
1873 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1875 * cp-tree.h (scratch_tree_cons): Remove.
1876 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1877 and perm_tree_cons with plain tree_cons.
1878 * class.c: Likewise.
1880 * decl2.c: Likewise.
1881 * except.c: Likewise.
1885 * method.c: Likewise.
1886 * parse.y: Likewise.
1890 * search.c: Likewise.
1891 * typeck.c: Likewise.
1892 * parse.c: Regenerated.
1893 * tree.c (build_srcloc): Simplify.
1895 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1897 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1899 (LANG_DECL_PERMANENT): Remove.
1900 * decl.c (duplicate_decls): Don't mess about with obstacks trying
1902 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1903 * lex.c (free_lang_decl_chain): Remove.
1904 (build_lang_decl): Don't use obstacks.
1905 (retrofit_lang_decl): Likewise.
1906 (copy_lang_decl): Likewise.
1908 * cp-tree.h (saved_scope): Remove old_binding_level and
1909 function_decl. Tidy up.
1910 * decl.c (mark_saved_scope): Don't set them.
1911 (maybe_push_to_top_level): Clear memory.
1913 * decl.c (layout_var_decl): Change prototype. Don't complete
1914 types for external objects.
1915 (check_initializer): Likewise. Tidy.
1916 (initialize_local_var): Complete types here.
1917 (cp_finish_decl): Not here. Reorganize a little.
1918 (grokvardecl): Don't complete types here.
1920 * decl.c (start_function): Clear last_dtor_insn and
1921 last_parm_cleanup_insn.
1922 (push_cp_function_context): Just copy over a little of
1923 the old context, not all of it.
1925 * cp-tree.h (copy_to_permanent): Remove.
1926 (permanent_p): Likewise.
1927 * decl.c (building_typename_type): Don't use copy_to_permanent.
1928 (start_decl): Likewise.
1929 (grok_reference_init): Likewise.
1930 (cp_finish_decl): Likewise.
1931 * init.c (build_new_1): Don't use mapcar.
1932 (build_vec_delete_1): Don't use copy_to_permanent.
1933 (build_vec_init): Likewise.
1934 * parse.y (primary): Likewise.
1935 * parse.c: Regenerated.
1936 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1937 (lookup_template_class): Likewise.
1938 (tsubst_friend_function): Likewise.
1939 (instantiate_class_template): Likewise.
1940 (tsubst_decl): Likewise.
1942 (instantiate_template): Likewise.
1944 * rtti.c (get_tinfo_fn): Likewise.
1945 (build_dynamic_cast): Likewise.
1946 * semantics.c (finish_if_stmt_cond): Likewise.
1947 (finish_while_stmt_cond): Likewise.
1948 (finish_do_stmt): Likewise.
1949 (finish_for_cond): Likewise.
1950 (finish_for_expr): Likewise.
1951 (finish_cleanup): Likewise.
1952 (add_decl_stmt): Likewise.
1953 (finish_named_return_value): Likewise.
1954 (finish_qualified_call_expr): Likewise.
1955 * tree.c (perm_manip): Remove.
1956 (build_exception_variant): Don't use copy_to_permanent.
1957 (permanent_p): Remove.
1958 (copy_to_permament): Remove.
1959 (build_min_nt): Don't use copy_to_permanent.
1960 (build_min): Likewise.
1961 (min_tree_cons): Likewise.
1962 * typeckc.c (build_static_cast): Likewise.
1963 (build_reinterpret_cast): Likewise.
1964 (build_const_cast): Likewise.
1966 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1968 * decl.c (ggc_p): Set it to 1.
1969 (mark_saved_scope): Add prototype.
1971 1999-09-07 Richard Henderson <rth@cygnus.com>
1973 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1974 * typeck.c (self_promoting_args_p): Delete.
1976 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
1978 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1979 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1981 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1983 * Makefile.in (tree.o): Depend on ggc.h.
1984 * class.c (make_method_vec): Remove.
1985 (free_method_vec): Likewise.
1986 (free_method_vecs): Remove.
1987 (add_method): Don't use them.
1988 * cp-tree.def (PTRMEM_CST): Make it longer.
1989 (TEMPLATE_PARM_INDEX): Make it shorter.
1990 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1991 (template_parm_index): Remove RTL field.
1992 (ptrmem_cst): Add RTL field.
1993 (finish_function): Removed parameter.
1994 (process_next_inline): Change prototype.
1995 (init_cplus_unsave): Rename to init_tree.
1996 (binding_init): Remove.
1997 * decl.c (free_binding_nodes): Remove.
1998 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
1999 (pop_binding): Don't use free_binding_nodes.
2000 (free_binding_vecs): Remove.
2001 (store_bindings): Don't use them.
2002 (pop_from_top_level): Likewise.
2003 (lookup_namespace_name): Simplify.
2004 (build_typename_type): Don't use obstack_free.
2005 (unqualified_namespace_lookup): Simplify.
2006 (lookup_name_real): Simplify.
2007 (start_function): Remove comment about leaks.
2008 (finish_function): Removed nested parameter. Call
2009 expand_end_bindings even when building_stmt_tree.
2010 Call ggc_push_context and ggc_pop_context around
2011 rest_of_compilation, if necessary.
2012 (mark_cp_function_context): Handle a NULL language-context.
2013 (lang_mark_false_label_stack): Fix typo.
2014 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2015 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
2016 pointer to method types.
2017 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2018 * decl2.c (finish_objects): Adjust call to finish_function.
2019 (finish_static_store_duration_function): Likewise.
2020 (do_nonmember_using_decl): Remove call to binding_init.
2021 * except.c (end_anon_func): Adjust call to finish_function.
2022 * lex.c (mark_impl_file_chain): New function.
2023 (init_parse): Call init_tree, not init_cplus_unsave.
2025 (cp_pramga_interface): Use xmalloc, not permalloc.
2026 (cp_pragma_implementation): Likewise.
2027 (begin_definition_of_inclass_inline): Simplify.
2028 (process_next_inline): Adjust prototype.
2029 (do_scoped_id): Don't call binding_init.
2030 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2031 * method.c (emit_thunk): Adjust call to finish_function.
2032 (synthesize_method): Likewise.
2033 * parse.y (%union): Add a new `pi' variant.
2034 (PRE_PARSED_FUNCTION_DECL): Use it.
2035 (fn.defpen): Likewise.
2036 (fndef): Adjust call to finish_function.
2037 * pt.c (instantiate_decl): Likewise.
2038 * rtti.c (syntheisze_tinfo_fn): Likewise.
2039 * semantics.c (expand_body): Likewise.
2040 * tree.c: Include ggc.h.
2041 (mark_list_hash): New function.
2042 (binding_init): Remove.
2043 (init_cplus_unsave): Rename to ...
2044 (init_tree): This. Add GC roots.
2046 1999-09-05 Mark Mitchell <mark@codesourcery.com>
2048 Get ready for garbage collection.
2049 * Makefile.in (CXX_TREE_H): Add varray.h
2050 (lex.o): Depend on ggc.h.
2052 (decl2.o): Likewise.
2053 (method.o): Likewise.
2054 (search.o): Likewise.
2057 * class.c: Include ggc.h.
2058 (current_class_name): Remove.
2059 (current_class_type): Likewise.
2060 (current_access_specifier): Likewise.
2061 (previous_class_type): Likewise.
2062 (previous_class_values): Likewise.
2063 (class_cache_firstobj): Likewise.
2064 (current_lang_base): Likewise.
2065 (current_lang_stack): Likewise.
2066 (current_lang_stacksize): Likewise.
2067 (lang_name_c): Likewise.
2068 (lang_name_cplusplus): Likewise.
2069 (lang_name_java): Likewise.
2070 (current_lang_name): Likewise.
2071 (base_layout_decl): Likewise.
2072 (access_default_node): Likewise.
2073 (access_public_node): Likewise.
2074 (access_protected_node): Likewise.
2075 (access_private_node): Likewise.
2076 (access_default_virtual_node): Likewise.
2077 (access_public_virtual_node): Likewise.
2078 (access_protected_virtual_node): Likewise.
2079 (access_private_virtual_node): Likewise.
2080 (signed_zero_node): Likewise.
2081 (init_class_processing): Don't build base_layout_decl.
2082 (push_lang_context): Adjust now that current_lang_base is a varray.
2083 (pop_lang_context): Likewise.
2084 * cp-tree.h: Include varray.h.
2085 (cp_global_trees): Add access_default, access_public,
2086 access_protected, access_private, access_default_virtual,
2087 access_public_virtual, access_protected_virtual,
2088 access_private_virtual, ctor_identifier, delta2_identifier,
2089 delta_identifier, dtor_identifier, in_charge_identifier,
2090 index_identifier, nelts_identifier, this_identifier,
2091 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2092 lang_name_c, lang_name_cplusplus, lang_name_java,
2093 empty_except_spec, null, jclass, minus_one, terminate.
2094 (saved_scope): Move here from decl.c. Define globals in terms of
2095 saved_scope: current_namespace, current_class_name,
2096 current_class_type, current_access_specifier, current_lang_stack,
2097 current_lang_base, current_lang_name, current_function_parms,
2098 current_template_parms, processing_template_decl,
2099 processing_specialization, processing_explicit_instantiation,
2100 previous_class_type, previous_class_values, class_cache_firstobj.
2101 (scope_chain): New variable.
2102 (init_pt): New function.
2103 * decl.c (current_namespace): Remove.
2104 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2105 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2106 (delta_identifier, delta2_identifier): Likewise.
2107 (pfn_or_delta2_identifier, tag_identifier): Likewise
2108 (vt_off_identifier, empty_except_spec, null_node): Likewise.
2109 (current_function_parms, current_lang_base): Remove.
2110 (current_lang_stack, previous_class_values): Remove.
2111 (class_binding_level): Macroize.
2112 (saved_scope): Remove.
2113 (current_saved_scope): Rename to scope_chain.
2114 (mark_saved_scope): Adjust for new scope structure.
2115 (maybe_push_to_top_level): Likewise.
2116 (pop_from_top_level): Likewise.
2117 (duplicate_decls): Adjust now that current_lang_base is a varray.
2118 (build_typename_type): Call ggc_add_tree_hash_table_root.
2119 (init_decl_processing): Call init_pt. Call push_to_top_level to
2120 set up globals. Add GC roots.
2121 (xref_basetypes): Adjust now that current_lang_base is a varray.
2122 * decl.h (this_identifier): Remove.
2123 (in_charge_identifier): Likewise.
2124 * decl2.c: Don't include varray.h.
2125 (current_namespace): Remove.
2126 (init_decl2): Add GC roots.
2127 * except.c (Terminate): Remove.
2128 (init_exception_processing): Use terminate_node instead.
2129 (build_terminate_handler): Likewise.
2130 * init.c (nc_nelts_field_id): Remove.
2131 (minus_one): Likewise.
2132 (init_init_processing): Use minus_one_node and nelts_identifier
2133 instead. Add GC roots.
2134 (jclass_node): Remove.
2135 (build_new_1): Use nelts_identifier.
2136 (build_vec_init): Likewise.
2137 (build_vec_delete): Likewise.
2138 * lex.c: Include ggc.h.
2139 (defarg_fn): Move declaration early.
2140 (defarg_parms): Likewise.
2141 (init_parse): Add GC roots.
2142 (handle_cp_pragma): Remove redundant declaration of
2144 * method.c: Include ggc.h.
2145 (btypelist): Make it a varray. All uses changed.
2146 (ktypelist): Likewise.
2147 (init_method): Add GC roots.
2148 * pt.c: Don't include varray.h. Include ggc.h.
2149 (current_template_parms): Remove.
2150 (processing_template_decl): Likewise.
2151 (processing_specialization): Likewise.
2152 (processing_explicit_instantiation): Likewise.
2153 (init_pt): New function.
2154 * repo.c: Include ggc.h.
2155 (init_repo): Add GC roots.
2156 * search.c: Don't include varray.h.
2157 (_vptr_name): Remove.
2158 (lookup_field_1): Use vtpr_identifier instead.
2159 (expand_indirect_vtbls_init): Remove redundant declaration of
2160 in_charge_identifier.
2161 (init_search_processing): Use vptr_identifier.
2163 1999-09-05 Richard Henderson <rth@cygnus.com>
2164 Bernd Schmidt <bernds@cygnus.co.uk>
2165 Mark Mitchell <mark@codesourcery.com>
2167 * Makefile.in (parse.o): Depend on ggc.h.
2168 (decl2.o): Depend on ggc.h.
2169 (init.o): Depend on ggc.h.
2170 * cp-tree.h (init_decl2): Declare.
2171 (cp_parse_init): Likewise.
2172 * decl.c (ggc_p): Define to zero.
2173 (mark_saved_scope): New function.
2174 (init_decl_processing): Call cp_parse_init, and cp_decl2.
2176 (expand_static_init): Add GC roots.
2177 * decl2.c: Include ggc.h.
2178 (init_decl2): New function.
2179 * init.c: Include ggc.h.
2180 (init_init_processing): Add GC roots.
2181 * parse.y: Include ggc.h.
2182 (cp_parse_init): New function.
2184 1999-09-04 Mark Mitchell <mark@codesourcery.com>
2186 * decl.c (init_decl_processing): Set mark_lang_status.
2187 (lang_mark_false_label_stack): Adjust prototype.
2188 * decl2.c (grok_function_init): Remove extraneous declaration of
2191 * Make-lang.in (cc1plus): Remove dependency on GGC.
2192 * Makefile.in (OBJS): Don't mention ggc-simple.o.
2193 (OBJDEPS): Don't mention ggc-simple.o.
2195 * Make-lang.in (cc1plus): Depend on $(GGC).
2196 * Makefile.in (OBJS): Add ggc-simple.o.
2197 (OBJDEPS): Likewise.
2198 * cp-tree.h (language_function): Rename members to `x_' versions;
2199 we now have x_named_labels, x_ctor_label, x_dtor_label,
2200 x_base_init_list, x_member_init_list, x_base_init_expr,
2201 x_current_class_ptr, x_current_class_ref, x_last_tree,
2202 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
2204 (dtor_label, ctor_label, current_base_init_list,
2205 current_member_init_list, base_init_expr, current_class_ptr,
2206 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
2207 * decl.c: Include ggc.h.
2208 (last_dtor_insn): Adjust to use x_ names.
2209 (last_parm_cleanup_insn): Likewise.
2210 (original_result_rtx): Likewise.
2211 (named_labels): Likewise.
2212 (mark_binding_level): New function.
2213 (mark_cp_function_context): Likewise.
2214 (mark_false_label_stack): Likewise.
2215 (lang_mark_tree): Likewise.
2216 (lang_cleanup_tree): Likewise.
2218 1999-09-03 Mark Mitchell <mark@codesourcery.com>
2220 * Makefile.in (CXX_TREE_H): Include function.h.
2221 (decl.o): Don't depend on function.h.
2222 (decl2.o): Likewise.
2223 (typeck.o): Likewise.
2225 (method.o): Likewise.
2226 * cp-tree.h: Include function.h.
2227 (cp_function): Rename to language_function. Remove next.
2228 (cp_function_chain): Make it a macro, not a variable.
2229 (push_cp_function_context): Don't declare.
2230 (pop_cp_function_context): Likewise.
2231 * decl.c: Don't include function.h.
2232 (push_cp_function_context): Make it static. Make it suitable for
2233 a save_lang_status callback.
2234 (pop_cp_function_context): Likewise.
2235 (maybe_push_to_top_level): Call push_function_context_to, not
2236 push_cp_function_context.
2237 (pop_from_top_level): Call pop_function_context_from, not
2238 pop_cp_function_context.
2239 (init_decl_processing): Set save_lang_status and
2240 restore_lang_status. Call push_function_context_to, not
2241 push_cp_function_context.
2242 (cp_function_chain): Remove.
2243 * decl2.c: Don't include function.h.
2244 * except.c: Don't include function.h.
2245 (start_anon_func): Call push_function_context_to, not
2246 push_cp_function_context.
2247 (end_anon_func): Call pop_function_context_from, not
2248 pop_cp_function_context.
2249 * init.c: Don't include function.h.
2250 * lex.c (begin_definition_of_inclass_inline): Call
2251 push_function_context_to, not push_cp_function_context.
2252 (process_next_inline): Call pop_function_context_from, not
2253 pop_cp_function_context.
2254 * method.c: Don't include function.h.
2255 (synthesize_method): Call push_function_context_to, not
2256 push_cp_function_context. Call pop_function_context_from, not
2257 pop_cp_function_context.
2258 * typeck.c: Don't include function.h.
2260 * decl.c (expand_static_init): Tweak handling of static
2261 initializations for objects without constructors.
2263 1999-09-03 Nathan Sidwell <nathan@acm.org>
2265 * typeck.c (build_indirect_ref): Reject dereference of pointer to
2268 1999-09-02 Mark Mitchell <mark@codesourcery.com>
2270 * cp-tree.h (cp_function): Move here, from decl.c.
2271 (cp_function_chain): Declare.
2272 (dtor_label): New macro, instead of variable.
2273 (ctor_label): Likewise.
2274 (current_base_init_list): Likewise.
2275 (current_member_init_list): Likewise.
2276 (base_init_expr): Likewise.
2277 (current_class_ptr): Likewise.
2278 (current_class_ref): Likewise.
2279 (last_tree): Likewise.
2280 (last_expr_type): Likewise.
2281 (current_function_returns_value): Likewise.
2282 (current_function_returns_null): Likewise.
2283 (current_function_just_assigned_this): Likewise.
2284 (current_function_parms_stored): Likewise.
2285 (temp_name_counter): Likewise.
2286 (static_labelno): Likewise.
2287 (expanding_p): Likewise.
2288 (stmts_are_full_exprs_p): Likewise.
2289 (in_function_try_handler): Likewise.
2290 (lang_type): Remove nested type_flags. All uses changed.
2291 * call.c (ctor_label): Remove.
2292 (dtor_label): Likewise.
2293 * class.c (current_class_ptr): Remove.
2294 (current_class_ref): Likewise.
2295 * decl.c (static_labelno): Remove.
2296 (dtor_label): Likewise.
2297 (last_dtor_insn): New macro, instead of variable.
2298 (last_parm_cleanup_insn): Likewise.
2299 (original_result_rtx): Likewise.
2300 (in_function_try_handler): Remove.
2301 (named_label_uses): New macro, instead of variable.
2302 (named_labels): Likewise.
2303 (current_function_returns_value): Remove.
2304 (current_function_returns_null): Likewise.
2305 (current_function_assigns_this): New macro, instead of variable.
2306 (current_function_just_assigned_this): Likewise.
2307 (current_binding_level): Likewise.
2308 (init_decl_processing): Call push_cp_function_context.
2309 (cp_function): Move to cp-tree.h
2310 (cp_function_chain): Make it global.
2311 (temp_name_counter): Remove.
2312 (push_cp_function_context): Simplify.
2313 (pop_cp_function_context): Likewise.
2314 * decl2.c (temp_name_counter): Remove.
2315 * init_c (current_base_init_list): Likewise.
2316 (current_member_init_list): Likewise.
2317 (base_init_expr): Likewise.
2318 * method.c (static_labelno): Likewise.
2319 * pt.c (last_tree): Likewise.
2320 * semantics.c (expanding_p): Likewise.
2321 (stmts_are_full_exprs_p): Likewise.
2322 (last_expr_type): Likewise.
2323 * typeck.c (dtor_label): Likewise.
2324 (ctor_label): Likewise.
2326 1999-09-01 Alex Samuel <samuel@codesourcery.com>
2328 * decl2.c (arg_assoc_template_arg): New prototype. New function.
2329 (arg_assoc_class): Use arg_assoc_template_arg for template
2331 (arg_assoc): Likewise.
2332 * pt.c (mangle_class_name_for_template): Allow member template
2335 1999-09-02 Nathan Sidwell <nathan@acm.org>
2337 * call.c (build_conditional_expr): Warn on enum mismatches.
2338 (convert_arg_to_ellipsis): Move non-pod check to after
2341 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2343 * gxx.gperf (hash, is_reserved_word): Add prototypes.
2345 * init.c (build_vec_init): Initialize variable `try_block'.
2347 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
2348 Likewise for bzero/memset.
2349 (token_getch, token_put_back): Add static prototypes. Remove
2350 `inline' from the definitions.
2351 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
2353 1999-09-01 Mark Mitchell <mark@codesourcery.com>
2355 * cp-tree.h (lang_type): Move align into type_flags.
2356 (CLASSTYPE_ALIGN): Adjust accordingly.
2357 * call.c (direct_reference_binding): Remove misleading comment.
2359 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2361 * parse.y (language_string): Constify.
2363 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2365 * repo.c (getpwd): Don't prototype.
2366 * xref.c (getpwd): Likewise
2368 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2370 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
2371 Remove hacks for stuff which now comes from libiberty.
2373 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
2375 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
2377 1999-08-30 Mark Mitchell <mark@codesourcery.com>
2379 * cp-tree.h (begin_init_stmts): Declare.
2380 (finish_init_stmts): Likewise.
2381 * cvt.c (build_up_reference): Wrap the declaration of a temporary
2382 in a statement-expression so that we will see it when expanding
2383 tree structure later.
2384 * init.c (begin_init_stmts): Don't make it static.
2385 (finish_init_stmts): Likewise.
2387 * cp-tree.h (start_handler_parms): New function.
2388 (expand_start_catch_block): Take only one parameter.
2389 (start_handler_parms): New function.
2390 * decl.c (start_handler_parms): Define it.
2391 * except.c (process_start_catch_block): Take only one parameter.
2392 Don't call grokdeclarator here.
2393 (expand_start_catch_block): Don't call grokdeclarator here,
2395 * parse.y (handler_args): Adjust call to
2396 expand_start_catch_block. Use start_handler_parms.
2397 * pt.c (push_template_decl_real): Make permanent lists have
2399 (tsubst_expr): Adjust calls to expand_start_catch_block
2401 * semantics.c (expand_stmt): Likewise.
2403 1999-08-29 Alex Samuel <samuel@codesourcery.com>
2405 * pt.c (push_template_decl_real): Use template declaration from
2406 class type if it exists.
2408 1999-08-29 Mark Mitchell <mark@codesourcery.com>
2410 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
2411 (maybe_inject_for_scope_var): Declare it.
2412 (initialize_local_var): Likewise.
2413 * decl.c (maybe_inject_for_scope_var): Make it global.
2414 (initialize_local_var): Likewise. Move cleanup handling here,
2415 from cp_finish_decl.
2416 (make_rtl_for_nonlocal_decl): Use
2417 push_obstacks_nochange/pop_obstacks, rather than
2418 end_temporary_allocation/resume_temporary_allocation.
2419 (cp_finish_decl): Try to complete the type of a variable when it
2420 is declared. Move cleanup-handling to initialize_local_var.
2421 (expand_static_init): Use tree-building code, rather than
2423 * decl2.c (get_temp_name): Assert non-initializedness of
2425 * init.c (create_temporary_var): Move RTL-assigning code to ...
2426 (get_temp_regvar): Here.
2427 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
2428 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
2429 call initialize_local_var to generate initialization code.
2431 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2433 * cp-tree.h (fndecl_as_string, type_as_string,
2434 type_as_string_real, args_as_string, decl_as_string,
2435 expr_as_string, code_as_string, language_as_string,
2436 parm_as_string, op_as_string, assop_as_string, cv_as_string,
2437 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
2439 * errfn.c (cp_printer): Likewise.
2441 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
2442 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
2443 cp_file_of, code_as_string, language_as_string, parm_as_string,
2444 op_as_string, assop_as_string, args_as_string, cv_as_string):
2447 * tree.c (lang_printable_name): Likewise.
2449 1999-08-28 Richard Henderson <rth@cygnus.com>
2451 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
2453 1999-08-28 Mark Mitchell <mark@codesourcery.com>
2455 * cp-tree.h (strip_array_types): New function.
2456 * decl.c (maybe_deduce_size_from_array_init): New function, split
2457 out from cp_finish_decl.
2458 (layout_var_decl): Likewise.
2459 (maybe_commonize_var): Likewise.
2460 (maybe_inject_for_scope_var): Likewise.
2461 (initialize_local_var): Likewise.
2462 (build_cleanup_on_safe_obstack): Likewise.
2463 (check_initializer): Likewise.
2464 (make_rtl_for_nonlocal_decl): Likewise.
2465 (cp_finish_decl): Use them.
2466 * typeck.c (strip_array_types): New function.
2468 * cp-tree.def (LABEL_STMT): New tree node.
2469 * cp-tree.h (LABEL_STMT_LABEL): New macro.
2470 (shadow_label): Remove.
2471 (declare_local_label): New function.
2472 (finish_label_decl): Likewise.
2473 * decl.c (make_label_decl): New function, split out from
2475 (shadowed_labels): Remove.
2476 (binding_level): Add shadowed_labels.
2477 (clear_binding_level): Remove.
2478 (push_binding_level): Just bzero the new binding level.
2479 (pushlevel): Fix indentation.
2480 (pop_label): New function.
2481 (pop_labels): Likewise, split out from poplevel.
2482 (poplevel): Pop local labels. Use pop_labels.
2483 (maybe_push_to_top_level): Don't clear shadowed_labels.
2484 (lookup_label): Use make_label_decl.
2485 (shadow_label): Remove.
2486 (declare_local_label): New function.
2487 (define_label): Simplify.
2488 (start_function): Don't clear shadowed_labels.
2489 (cp_function): Remove shadowed_labels.
2490 (push_cp_function_context): Don't save shadowed_labels.
2491 (pop_cp_function_context): Don't restore it.
2492 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
2493 * parse.y (label_decl): Use finish_label_decl.
2494 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
2496 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
2498 (finish_label_decl): New function.
2499 (expand_stmt): Handle LABEL_STMTs and local label declarations.
2501 1999-08-26 Mark Mitchell <mark@codesourcery.com>
2503 * decl.c (lookup_label): Build labels on the permanent obstack
2504 when building statement trees. Don't build RTL for labels when
2505 building statement trees.
2506 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
2507 building statement trees.
2508 (finish_label_stmt): Likewise.
2509 (expand_stmt): Adjust accordingly.
2510 * pt.c (tsubst_expr); Likewise.
2511 (do_decl_instantiation): Robustify.
2513 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
2514 * tree.c (build_cplus_new): Set it.
2515 * expr.c (cplus_expand_expr): Use it.
2516 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
2518 * decl.c (store_parm_decls): Reset immediate_size_expand.
2519 (finish_function): Likewise.
2521 * tree.c (cplus_unsave_expr_now): Don't return a value.
2523 * semantics.c (do_poplevel): Always initialize the return value.
2525 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
2527 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
2528 * tree.h (cplus_unsave_expr_now) : Same.
2530 1999-08-25 Mark Mitchell <mark@codesourcery.com>
2532 * decl.c (grokdeclarator): Amend comment.
2533 * except.c (expand_start_catch_block): Call push_template_decl for
2534 catch-block parameters.
2535 * method.c (synthesize_method): Build an empty compound statement
2536 for the body of a constructor.
2538 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
2540 * tree.c (cp_build_qualified_type_real): If we're asking for the
2541 same quals we already have, just return.
2543 1999-08-25 Mark Mitchell <mark@codesourcery.com>
2545 * cp-tree.def (SUBOBJECT): New tree node.
2546 * cp-tree.h (CLEANUP_P): New macro.
2547 (SUBOBJECT_CLEANUP): Likewise.
2548 (keep_next_level): Add parameter.
2549 (get_temp_regvar): Don't declare.
2550 (emit_base_init): Remove parameter.
2551 (expand_aggr_init): Rename to build_aggr_init.
2552 (expand_vec_init): Rename to build_vec_init.
2553 (do_pushlevel): Remove.
2554 (do_poplevel): Likewise.
2555 (finish_cleanup): New function.
2556 (finish_subobject): Likewise.
2557 (stmts_are_full_exprs_p): New variable.
2558 * decl.c (keep_next_level): Add parameter.
2559 (cp_finish_decl): Use build_aggr_init, not
2560 expand_aggr_init. Use finish_expr_stmt to expand the code.
2561 (expand_static_init): Use tree-generating, not RTL-generating,
2562 functions to handle the initialization.
2563 (start_function): Remove dead code. Always have a momentary
2564 obstack inside the function, even before hitting the first curly
2566 (cplus_expand_expr_stmt): Move calls to
2567 expand_{start,end}_target_temps into semantics.c.
2568 (cp_function): Add stmts_are_full_exprs_p.
2569 (push_cp_function_context): Save it.
2570 (pop_cp_function_context): Restore it.
2571 * decl2.c (get_temp_regvar): Move to init.c.
2572 (do_static_initialization): Use build_{aggr,vec}_init.
2573 (do_static_destruction): Fix typo in comment.
2574 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
2575 * except.c (expand_throw): Use create_temporary_var.
2576 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
2577 * init.c (expand_vec_init_try_block): Remove.
2578 (expand_vec_init_catch_clause): Likewise.
2579 (get_temp_regvar): New function.
2580 (begin_init_stmts): Likewise.
2581 (finish_init_stmts): Likewise.
2582 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
2584 (emit_base_init): Likewise. Remove unused parameter.
2585 (expand_virtual_init): Likewise.
2586 (expand_cleanup_for_base): Use finish_subobject.
2587 (expand_aggr_vbase_init_1): Simplify.
2588 (construct_virtual_bases): Use tree-generating functions to build
2590 (expand_aggr_init): Likewise. Rename to build_aggr_init.
2591 (expand_default_init): Likewise.
2592 (expand_aggr_init_1): Likewise.
2593 (expand_vec_init): Rename to build_vec_init.
2594 * method.c (do_build_copy_constructor): Use tree-generating
2595 functions. Don't call clear_last_expr.
2596 (do_build_assign_ref): Likewise.
2597 (synthesize_method): Call clear_last_expr here.
2598 * parse.y (base_init): Don't call clear_last_expr here.
2599 (nodecls): Likewise.
2600 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
2601 * semantics.c (do_pushlevel): Move to here.
2602 (do_poplevel): Likewise.
2603 (stmts_are_full_exprs_p): New variable.
2604 (finish_expr_stmt): Handle logic for temoprary cleanup here.
2605 (finish_for_stmt): Use finish_expr_stmt.
2606 (finish_cleanup): New function.
2607 (finish_function_try_block): Fix indentation.
2608 (finish_subobject): New function.
2609 (setup_vtbl_ptr): Call keep_next_level here.
2610 (finish_stmt_expr): Handle a block with no scope inside the
2611 statement-expression.
2612 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
2614 * tree.c (search_tree): Handle INIT_EXPR.
2616 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
2617 * typeck2.c (store_init_value): Change expand_aggr_init to
2618 build_aggr_init in comment.
2620 1999-08-25 Mark Mitchell <mark@codesourcery.com>
2622 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
2624 1999-08-25 Nathan Sidwell <nathan@acm.org>
2626 * decl2.c (handle_class_head): Be graceful about additional
2627 scope qualifiers. Adjust comments to reflect reality.
2629 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
2631 * call.c (build_conditional_expr): Fix typo.
2632 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
2633 lvalue before trying to mess with the sides.
2635 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
2637 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
2639 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
2641 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
2643 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
2644 Return arbitrary pointer or NULL.
2645 (check_eh_spec): Call __throw_type_match_rtti_2.
2646 * tinfo.h (*::dcast): Return int. Add valp parm.
2647 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
2648 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
2649 (__throw_type_match_rtti): Now just a wrapper.
2651 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
2652 (init_exception_processing): Don't initialize them.
2654 1999-08-23 Paul Burchard <burchard@pobox.com>
2656 * decl.c (check_default_argument): Fix typo.
2658 1999-08-22 Mark Mitchell <mark@codesourcery.com>
2660 * cp-tree.def (STMT_EXPR): Fix typo in node name.
2662 * dump.c (dump_next_stmt): New function.
2663 (dequeue_and_dump): Use it.
2665 * pt.c (tsubst_copy): Make sure to initialize return value for a
2666 STMT_EXPR, even when processing_template_decl.
2667 * semantics.c (finish_stmt_expr): A statement-expression whose
2668 last statement is not an expression-statement has type `void'.
2670 1999-08-20 Mark Mitchell <mark@codesourcery.com>
2672 * semantics.c (finish_stmt_expr): Fix typo in comment.
2673 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
2675 * init.c (build_vec_delete_1): Make the children of a permanent
2676 BIND_EXPR permanent.
2677 * pt.c (register_specialization): Don't register a specialization
2680 1999-08-18 Andrew Haley <aph@cygnus.com>
2682 * method.c (process_overload_item): Call build_mangled_C9x_name ()
2683 for all integer parameter types larger than long long.
2685 1999-08-19 Mark Mitchell <mark@codesourcery.com>
2687 * pt.c (redeclare_class_template): Merge default template
2688 arguments in both directions.
2690 * typeck.c (common_type): Undo 1999-08-18 change. Remove
2691 compiler_error message.
2693 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
2695 * cp-tree.h: Declare flag_use_repository.
2696 * pt.c (do_decl_instantiation): Don't complain about duplicate
2697 instantiation with -frepo.
2698 (do_type_instantiation): Likewise.
2700 * pt.c (push_template_decl_real): Complain about everything
2701 that isn't a valid template.
2703 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
2706 1999-08-19 Mark Mitchell <mark@codesourcery.com>
2708 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
2709 * decl2.c (build_expr_from_tree): Handle it.
2710 * error.c (dump_expr): Likewise.
2711 * pt.c (for_each_template_parm): Likewise.
2712 (tsubst_copy): Likewise.
2713 * tree.c (search_tree): Likewise.
2714 * semantics.c (finish_pseudo_destructor_call): Create it.
2716 1999-08-18 Mark Mitchell <mark@codesourcery.com>
2718 * search.c (setup_class_bindings): Robustify.
2719 * typeck.c (common_type): Use same_type_p, not pointer equality,
2722 * cp-tree.h (build_lang_field_decl): Remove.
2723 * class.c (build_vtable): Replace calls to build_lang_field_decl
2724 with build_lang_decl.
2725 (prepare_fresh_vtable): Likewise.
2726 (finish_struct_1): Likewise.
2727 (init_class_processing): Likewise.
2728 * decl.c (push_using_decl): Likewise.
2729 (init_decl_processsing): Likewise.
2730 (grokvardecl): Likewise.
2731 (build_ptrmemfunc_type): Likewise.
2732 (grokdeclarator): Likewise.
2733 (build_enumerator): Likewise.
2734 * decl2.c (grok_x_components): Likewise.
2735 (do_class_using_decl): Likewise.
2736 * except.c (call_eh_info): Likewise.
2737 * init.c (init_init_processing): Likewise.
2738 * rtti.c (expand_class_decl): Likewise.
2739 * tree.c (build_base_fields): Likewise.
2740 (build_vbase_pointer_fields): Likewise.
2741 * lex.c (build_lang_decl): Build declarations on the permanent
2742 obstack if we're building statmeent trees.
2743 (retrofit_lang_decl): Handle both the full lang_decl and also the
2744 smaller lang_decl_flags here.
2745 (build_lang_field_decl): Remove.
2746 * pt.c (push_template_decl_real): Issue errors for variable
2747 declarations that are not static members.
2749 1999-08-18 Richard Henderson <rth@cygnus.com>
2751 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
2754 1999-08-17 Mark Mitchell <mark@codesourcery.com>
2756 * cp-tree.h (back_end_hook): New variable.
2757 * decl2.c (back_end_hook): Define it.
2758 (finish_file): If it's non-NULL, call it.
2760 * decl.c (add_decl_to_level): New function.
2761 (push_local_binding): Use it.
2762 (find_binding): Fix typo in comment.
2763 (pushdecl): Use add_decl_to_level. Put templates on the
2764 corresponding namespace-scope binding levels.
2765 * dump.c (dequeue_and_dump): Print the specializations of a
2767 * pt.c (push_template_decl_real): Don't push a template multiple
2770 1999-08-17 Mark Mitchell <mark@codesourcery.com>
2772 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
2773 (CALL_DECLARATOR_QUALS): Likewise.
2774 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
2775 * decl.c (grokdeclarator): Adjust to use them.
2776 * decl2.c (grokfield): Likewise.
2777 (reparse_absdcl_as_casts): Likewise.
2778 * lex.c (make_call_declarator): Likewise.
2779 (set_quals_and_spec): Likewise.
2780 * pt.c (tsubst): Likewise.
2781 * tree.c (mapcar): Remove special hack to handle third operand of
2784 1999-08-16 Mark Mitchell <mark@codesourcery.com>
2786 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
2787 * class.c (build_vtable): Use build_lang_field_decl to build the
2788 VAR_DECLs for vtables.
2789 (prepare_fresh_vtable): Likewise.
2790 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2791 CAN_HAVE_FULL_LANG_DECL_P.
2792 (push_using_decl): Use build_lang_decl to build USING_DECLs.
2793 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2794 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2795 (build_lang_field_decl): Likewise.
2796 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2799 * cp-tree.def (STMT_EXPR): New tree node.
2800 * cp-tree.h (STMT_EXPR_STMT): New macro.
2801 (store_return_init): Change prototype.
2802 (finish_named_return_value): New function.
2803 (expand_stmt): Likewise.
2804 (expand_body): Likewise.
2805 (begin_stmt_tree): Likewise.
2806 (finish_stmt_tree): Likewise.
2807 (expanding_p): New variable.
2808 (last_expr_type): Likewise.
2809 (building_stmt_tree): New macro.
2810 * decl.c (start_function): Use building_stmt_tree, not
2811 processing_template_decl, where appropriate.
2812 (store_parm_decls): Likewise.
2813 (store_return_init): Move most of the body to semantics.c.
2814 (finish_function): Use building_stmt_tree.
2815 (finish_stmt): Clear last_expr_type here.
2816 (cp_function): Add expanding_p, last_tree, last_expr_type.
2817 (push_cp_function_context): Save them.
2818 (pop_cp_function_context): Restore them.
2819 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2820 * error.c (dump_expr): Handle STMT_EXPR.
2821 * except.c (expand_start_catch_block): Use building_stmt_tree.
2823 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2824 (do_case): Move add_tree call to semantics.c.
2825 * parse.y (return_init): Use finish_named_return_value.
2826 (for.init.statement): Use finish_expr_stmt.
2827 * parse.c: Regenerated.
2828 * pt.c (do_pushlevel): Move to semantics.c.
2829 (do_poplevel): Likewise.
2830 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2831 (tsubst_expr): Don't expand all the way to RTL here. Handle
2832 RETURN_INIT and CTOR_INITIALIZER.
2833 (instantiate_decl): Call expand_body after tsubst'ing into
2835 * semantics.c (expand_stmts): New function.
2836 (expanding_p): New variable.
2837 (last_expr_type): Likewise.
2838 (finish_expr_stmt): Use building_stmt_tree.
2839 (begin_if_stmt): Likewise.
2840 (finish_if_stmt_cond): Likewise.
2841 (finish_then_clause): Likewise.
2842 (begin_else_clause): Likewise.
2843 (finish_else_clause): Likewise.
2844 (begin_while_stmt): Likewise.
2845 (finish_while_stmt_cond): Likewise.
2846 (finish_while_stmt): Likewise.
2847 (finish_do_body): Likewise.
2848 (finish_do_stmt): Likewise.
2849 (finish_return_stmt): Likewise.
2850 (begin_for_stmt): Likewise.
2851 (fnish_for_init_stmt): Likewise.
2852 (finish_for_cond): Likewise.
2853 (finish_for_expr): Likewise.
2854 (finish_for_stmt): Likewise.
2855 (finish_break_stmt): Likewise.
2856 (finish_continue_stmt): Likewise.
2857 (finish_switch_cond): Likewise.
2858 (finish_switch_stmt): Likewise.
2859 (finish_case_label): Call add_tree here if necessary.
2860 (finish_goto_statement): Use building_stmt_tree.
2861 (begin_try_block): Likewise.
2862 (begin_function_try_block): Likewise.
2863 (finish_try_block): Likewise.
2864 (finish_function_try_block): Likewise.
2865 (finish_handler_sequence): Likewise.
2866 (finish_function_handler_sequence): Likewise.
2867 (begin_handler): Likewise.
2868 (finish_handler_parms): Likewise.
2869 (finish_handler): Likewise.
2870 (begin_compound_stmt): Likewise.
2871 (finish_compound_stmt): Likewise.
2872 (finish_asm_stmt): Likewise.
2873 (finish_label_stmt): Likewise.
2874 (finish_named_return_value): New function.
2875 (setup_vtbl_ptr): Moved here from decl2.c.
2876 (do_pushlevel): Moved here from pt.c.
2877 (do_poplevel): Likewise.
2878 (begin_stmt_expr): Use building_stmt_tree.
2879 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
2880 when building_stmt_tree.
2881 (begin_stmt_tree): New function.
2882 (finish_stmt_tree): Likewise.
2883 (expand_stmt): Likewise.
2884 (expand_body): Likewise.
2885 * tree.c (build_cplus_method_type): Make sure the argument types
2886 end up on the same obstack as the METHOD_TYPE.
2887 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2888 THROW_EXPR, STMT_EXPR.
2889 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
2890 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
2891 sorry, if an unsupported node is encountered.
2892 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2893 (c_expand_return): Don't call add_tree here.
2895 1999-08-15 Mark Mitchell <mark@codesourcery.com>
2897 * pt.c (check_default_tmpl_args): Don't check in local scopes.
2898 (tsubst_decl): Make sure the declaration is on a saveable
2899 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2901 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2903 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
2905 Speed up Koenig lookup.
2906 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
2907 to return namespaces we've looked at.
2908 * decl2.c (lookup_using_namespace): Likewise.
2909 (add_function): Don't call ovl_member.
2910 (lookup_arg_dependent): Initialize k.namespaces to the list of
2911 namespaces seen in unqualified lookup.
2912 * call.c (equal_functions): Move here from tree.c.
2913 (joust): Use it to handle duplicate candidates.
2914 * tree.c (ovl_member): Use ==.
2916 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2918 * cp-tree.def (DECL_STMT): Make it smaller.
2919 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2920 (lang_decl): ... here. Add next.
2921 (DECL_SAVED_TREE): Adjust accordingly.
2922 (DECL_IMPLICIT_TYPEDEF_P): New macro.
2923 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2924 (DECL_STMT_DECL): Likewise.
2925 (create_implicit_typedef): New function.
2926 (maybe_push_decl): Likewise.
2927 (tsubst_default_argument): New function.
2928 (at_function_scope_p): Likewise.
2929 (add_decl_stmt): Likewise.
2930 (push_permanent_obstack): Likewise.
2931 * call.c (convert_default_arg): Use tsubst_default_argument.
2932 * class.c (add_method): Use push_permanent_obstack.
2933 (build_self_reference): Create a TEMPLATE_DECL for the
2934 self-reference, if necessary.
2935 * decl.c (pseudo_global_level_p): Only look at the current binding
2937 (push_binding): Use push_permanent_obstack.
2938 (create_implicit_typedef): New function.
2940 (duplicate_decls): Use push_permanent_obstack.
2941 (maybe_push_decl): New function.
2942 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
2943 (start_decl_1): Remove dead code.
2944 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
2945 pseudo_global_level_p.
2946 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2948 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
2949 pseudo_global_level_p.
2950 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2952 (get_sentry): Use push_permanent_obstack.
2953 * dump.c (dequeue_and_dump): Enable DECL_STMT.
2954 * except.c (call_eh_info): Use push_permanent_obstack.
2955 (build_eh_type_ref): Likewise.
2956 (do_pop_exception): Likewise.
2957 (expand_eh_spec): Likewise.
2958 (alloc_eh_object): Likewise.
2959 (expand_throw): Likewise.
2960 * init.c (build_java_class_ref): Likewise.
2961 * lex.c (get_time_identifier): Likewise.
2962 (free_lang_decl_chain): Correct type.
2963 (retrofit_lang_decl): Adjust accordingly.
2964 (build_lang_field_decl): Likewise.
2965 * lex.h (free_lang_decl_chain): Likewise.
2966 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2967 * parse.c: Regenerated.
2968 * pt.c (tsubst_default_arguments): New function.
2969 (retrieve_local_specialization): Likewise.
2970 (register_local_specialization): Likewise.
2971 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
2972 pseudo_global_level_p to determine whether or not a template is
2974 (lookup_template_class): Likewise. Use create_implicit_typedef.
2975 (instantiate_class_template): Call tsubst_default_arguments for
2976 member functions, if appropriate.
2977 (tsubst_default_argument): New function.
2978 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
2979 * search.c (at_function_scope_p): New function.
2980 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2981 (finish_label_stmt): Likewise.
2982 (add_decl_stmt): New function.
2983 (begin_class_definition): Likewise.
2984 (finish_typeof): Likewise.
2985 * tree.c (copy_template_template_parm): Likewise.
2986 (copy_to_permanent): Likewise.
2987 (push_permanent_obstack): Define.
2988 (mark_addressable): Use it.
2989 * typeck.c (mark_addressable): Likewise.
2991 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
2993 * cp-tree.h (init_cplus_unsave): New.
2994 (cplus_unsave_expr_now): New.
2995 * lex.c (init_parse): Call init_cplus_unsave.
2996 * tree.c (init_cplus_unsave): New.
2997 (cplus_unsave_expr_now): New.
2999 1999-08-13 Mark Mitchell <mark@codesourcery.com>
3001 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
3002 decl_constant_value to simplify array bounds.
3004 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
3006 * lang-options.h: Add -fms-extensions.
3007 * cp-tree.h: Declare flag_ms_extensions.
3008 * decl2.c: Define it.
3009 * class.c (instantiate_type): Don't complain about taking the address
3010 of a bound member function if -fms-extensions.
3011 * typeck.c (build_unary_op): Likewise.
3012 * decl.c (grokdeclarator): Or about implicit int.
3013 * init.c (resolve_offset_ref): Or about implicit '&'.
3015 1999-08-11 Mark Mitchell <mark@codesourcery.com>
3017 * cp-tree.h (minimal_parse_mode): Remove.
3018 (finish_label_stmt): New function.
3019 * decl.c (saved_scope): Remove minimal parse mode.
3020 (maybe_push_to_top_level): Don't save it.
3021 (pop_from_top_level): Don't restore it.
3022 (define_label): Split out template-handling code to semantics.c.
3023 (start_decl): Don't use minimal_parse_mode.
3024 (cp_finish_decl): Likewise.
3025 (start_function): Don't increment it.
3026 (store_return_init): Don't use it.
3027 (finish_function): Don't decrement it.
3028 * parse.y (label_colon): Use finish_label_stmt throughout.
3029 * parse.c: Regenerated.
3030 * pt.c (minimal_parse_mode): Don't define it.
3031 (tsubst_expr): Use finish_label_stmt.
3032 * semantics.c (finish_label_stmt): New function.
3034 * dump.c (queue): Be careful when computing bitmasks.
3035 (dequeue_and_dump): Describe binfos as binfos, not as
3038 * parse.y (pedantic): Give it itype. Adjust usage accordingly
3040 * parse.c: Regenerated.
3042 * Make-lang.in (CXX_SRCS): Remove sig.c.
3043 * Makefile.in (CXX_OBJS): Remove sig.o.
3045 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3046 (CPTI_SIGNATURE_TYPE): Likewise.
3047 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3048 (opaque_type_node): Likewise.
3049 (signature_type_node): Likewise.
3050 (sigtable_entry_type): Likewise.
3051 (flag_handle_signatures): Likewise.
3052 (lang_type): Remove is_signature, is_signature_pointer,
3053 is_signature_reference, has_opaque_typedecls,
3054 sigtables_has_been_generated. Adjust dummy. Remove signature,
3055 signature_pointer_to, signature_reference_to.
3056 (IS_SIGNATURE): Remove.
3057 (SET_SIGNATURE): Remove.
3058 (CLEAR_SIGNATURE): Remove.
3059 (IS_SIGNATURE_POINTER): Remove.
3060 (IS_SIGNATURE_REFERENCE): Remove.
3061 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3062 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3063 (CLASSTYPE_SIGNATURE): Remove.
3064 (SIGNATURE_TYPE): Remove.
3065 (SIGNATURE_METHOD_VEC): Remove.
3066 (SIGNATURE_POINTER_TO): Remove.
3067 (SIGNATURE_REFERENCE_TO): Remove.
3068 (lang_decl_flags): Remove is_default_implementation. Rename
3069 memfunc_pointer_to to saved_tree.
3070 (IS_DEFAULT_IMPLEMENTATION): Remove.
3071 (DECL_MEMFUNC_POINTER_TO): Remove.
3072 (DECL_MEMFUNC_POINTING_TO): Remove.
3073 (DECL_SAVED_TREE): Adjust definition.
3074 (tag_types): Remove signature_type_node.
3075 (SIGNATURE_FIELD_NAME): Remove.
3076 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3077 (SIGNATURE_OPTR_NAME): Likewise.
3078 (SIGNATURE_SPTR_NAME): Likewise.
3079 (SIGNATURE_POINTER_NAME): Likewise.
3080 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3081 (SIGNATURE_REFERENCE_NAME): Likewise.
3082 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3083 (SIGTABLE_PTR_TYPE): Likewise.
3084 (SIGTABLE_NAME_FORMAT): Likewise.
3085 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3086 (SIGTABLE_TAG_NAME): Likewise.
3087 (SIGTABLE_VB_OFF_NAME): Likewise.
3088 (SIGTABLE_VT_OFF_NAME): Likewise.
3089 (finish_base_specifiers): Change prototype.
3090 (build_signature_pointer_type): Remove.
3091 (build_signature_reference_type): Remove.
3092 (build_signature_pointer_constructor): Remove.
3093 (build_signature_method_call): Remove.
3094 (build_optr_ref): Likewise.
3095 (append_signature_fields): Likewise.
3096 (signature_error): Likewise.
3097 * call.c (build_this): Remove signature support.
3098 (build_over_call): Likewise.
3099 (build_new_method_call): Likewise.
3100 * class.c (add_implicitly_declared_members): Likewise.
3101 (finish_struct_1): Likewise.
3102 (finish_struct): Likewise.
3103 * cvt.c (cp_convert_to_pointer): Likewise.
3104 (convert_to_pointer_force): Likewise.
3105 (ocp_convert): Likewise.
3106 * decl.c (sigtable_decl_p): Remove.
3107 (init_decl_processing): Remove support for signatures.
3108 (cp_finish_decl): Likewise.
3109 (grokdeclarator): Likewise.
3110 (grokparms): Likewise.
3111 (xref_tag): Likewise.
3112 (start_function): Likewise.
3113 (start_method): Likewise.
3114 * decl2.c (finish_sigtable_vardecl): Remove.
3115 (flag_handle_signatures): Remove.
3116 (lang_f_options): Remove handle-signatures.
3117 (grokfield): Remove support for signatures.
3118 (grokbitfield): Likewise.
3119 (finish_file): Likewise.
3120 (reparse_absdcl_as_casts): Likewise.
3121 * error.c (dump_type_real): Likewise.
3122 (dump_function_decl): Likewise.
3123 * friend.c (make_friend_class): Likewise.
3124 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3125 * hash.h: Regenerated.
3126 * init.c (build_new_1): Remove support for signatures.
3127 * lang-options.h: Remove -fhandle-signatures,
3128 -fno-handle-signatures.
3129 * lex.c (init_parse): Remove support for signatures.
3130 (yyprint): Likewise.
3131 * lex.h (rid): Remove RID_SIGNATURE.
3132 * method.c (build_decl_overload_real): Remove support for
3134 (hack_identifier): Likewise.
3135 * parse.y (base_class): Likewise.
3136 (base_class.1): Likewise.
3137 (access_specifier): Likewise.
3138 * search.c (lookup_member): Likewise.
3139 * semantics.c (finish_qualified_object_call_expr): Likewise.
3140 (finish_template_type_parm): Likewise.
3141 (begin_class_definition): Likewise.
3142 (finish_base_specifier): Likewise.
3144 * tree.c (build_cplus_method_type): Remove support for signatures.
3145 * typeck.c (require_complete_type): Likewise.
3146 (c_sizeof): Likewise.
3147 (c_alignof): Likewise.
3148 (build_object_ref): Likewise.
3149 (build_component_ref): Likewise.
3150 (build_indirect_ref): Likewise.
3151 (build_c_cast): Likewise.
3152 (build_modify_expr): Likewise.
3153 (convert_for_initialization): Likewise.
3154 * typeck2.c (signature_error): Remove.
3155 (store_init_value): Remove support for signatures.
3156 (digest_init): Likewise.
3157 (build_x_arrow): Likewise.
3158 (build_functional_cast): Likewise.
3159 * xref.c (GNU_xref_decl): Likewise.
3161 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
3163 * lex.c (do_identifier): Remove unnecessary lookup of class field.
3165 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
3167 * decl2.c (set_decl_namespace): Do not complain about non-matching
3168 decls if processing a template.
3170 1999-08-09 Mark Mitchell <mark@codesourcery.com>
3172 * decl.c (build_ptrmemfunc_type): Handle qualified
3173 pointer-to-member types here.
3174 * tree.c (cp_build_qualified_type_real): Simplify handling here.
3176 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3178 * lex.c (lang_identify): Likewise.
3180 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
3182 * Makefile.in: Update dependencies.
3183 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
3185 * decl.c: Include "function.h"
3186 (cleanup_label, return_label): Delete declarations.
3187 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
3188 (finish_function): Rename last_parm_insn variable to
3189 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
3190 * decl2.c: Include "function.h".
3191 (rtl_expr_chain): Delete declaration.
3192 * method.c: Include "function.h"
3193 * tree.c (build_vbase_pointer_fields): Don't initialize
3194 DECL_SAVED_INSNS with NULL_RTX.
3195 * typeck.c: Include "function.h"
3197 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
3199 * semantics.c (begin_function_try_block, finish_function_try_block,
3200 finish_function_handler_sequence): New fns.
3201 * parse.y (function_try_block): Use them.
3202 * pt.c (instantiate_decl): Likewise.
3204 * cp-tree.h: Declare in_function_try_handler.
3205 * decl.c: Define it.
3206 (start_function): Clear it.
3207 (struct cp_function, push_cp_function_context): Save it.
3208 (pop_cp_function_context): Restore it.
3209 * parse.y (function_try_block): Set and clear it.
3210 * except.c (expand_end_catch_block): Rethrow if we reach the end
3211 of a function-try-block handler in a ctor or dtor.
3212 * typeck.c (c_expand_return): Complain about returning from a
3213 function-try-block handler of a ctor.
3215 * parse.y (function_try_block): Call end_protect_partials
3216 before expand_start_all_catch.
3218 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
3220 * decl.c (struct binding_level): Add eh_region field.
3221 (push_binding_level): Set it.
3222 (define_label): Complain about jumping into an EH block.
3224 * ptree.c (print_lang_type): Print the real type of a PMF.
3225 Print what exceptions a fn type throws.
3227 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3229 * class.c (count_fields, add_fields_to_vec): Add static prototype.
3231 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
3232 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
3235 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
3238 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
3241 * dump.c (queue_and_dump_index, dump_int, dump_string,
3242 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
3244 (dump_stmt): Add static prototype.
3246 * errfn.c (cp_thing): Constify a char*.
3248 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
3249 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
3250 dump_expr): Constify a char*.
3252 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
3253 read_line_number): Add static prototype.
3254 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
3255 (real_yylex): Move label `letter' into the scope where it is used.
3257 * method.c (build_mangled_template_parm_index, build_overload_int,
3258 build_decl_overload_real, get_id_2): Constify a char*.
3260 * search.c (check_final_overrider): Make static.
3262 * typeck.c (composite_pointer_type): Constify a char*.
3264 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
3266 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
3267 we're looking at a class.
3269 * decl.c (lookup_name_real): Set the complain flag if we're
3270 looking for a namespace member.
3272 * lex.c (real_yylex): We can have a number with no digits.
3274 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
3276 * search.c (binfo_from_vbase): New fn.
3277 * cp-tree.h: Declare it.
3278 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
3279 from pointer to member of virtual base.
3280 * typeck.c (get_delta_difference): Likewise.
3282 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
3284 * pt.c (tsubst): Use build_index_type to build in-template array
3285 index type. Fixes g++.oliva/dwarf1.C.
3286 * decl.c (grokdeclarator): Likewise, just for consistency, as it
3287 doesn't seem to trigger the bug without it.
3289 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
3291 * typeck2.c (add_exception_specifier): Use complete_type.
3293 1999-08-06 Mark Mitchell <mark@codesourcery.com>
3295 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
3296 (dump_binary_op): Bulletproof.
3297 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
3298 * tree.c (search_tree): Don't enumerate all the nodes of classes
3299 `1', `2', and `<'; handle them generically. Don't be sorry about
3300 "unrecognized tree codes"; just abort.
3301 (no_linkage_check): Don't do linkage checks for templates.
3303 * tree.c (cp_build_qualified_type_real): Handle
3304 pointer-to-member-function types correctly.
3306 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
3308 * decl.c (pushdecl): Only give an error for shadowing a parm
3309 from *this* function.
3311 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
3313 * typeck2.c: Update URLs and mail addresses.
3315 1999-08-04 Nathan Sidwell <nathan@acm.org>
3317 * cp-tree.h (empty_except_spec): New global var.
3318 (compexcepttypes): Remove prototype.
3319 (comp_except_specs): Prototype new global function.
3320 (add_exception_specifier): Prototype new global function.
3321 * decl.c (empty_except_spec): Define new global var.
3322 (duplicate_decls): Use comp_except_specs, reword error message.
3323 (init_decl_processing): Initialize empty_except_spec.
3324 Adjust build_exception_variant calls.
3325 * parse.y (exception_specification_opt): Use empty_except_spec.
3326 (ansi_raise_identifier): Call check_for_new_type.
3327 (ansi_raise_identifiers): Use add_exception_specifier.
3328 * pt.c (tsubst): Use add_exception_specifier to build exception
3330 * search.c (check_final_overrider): New static function, broken
3331 out of get_matching_virtual. Check throw specifiers, reword
3333 (get_matching_virtual): Use check_final_overrider.
3334 * tree.c (build_exception_variant): Use comp_except_specs.
3335 * typeck.c (compexcepttypes): Remove.
3336 (comp_except_types): New static function, helper for
3337 comp_except_specs. Compare two types as exception specifiers.
3338 (comp_except_specs): New global function, compare two exception
3340 (comptypes): Adjust for comp_except_specs.
3341 * typeck2.c (add_exception_specifier): New global function.
3343 * class.c (check_for_override): Reword error message.
3345 1999-08-03 Nathan Sidwell <nathan@acm.org>
3347 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
3348 * cp-tree.h (struct lang_type): Added non_pod_class flag.
3349 (CLASSTYPE_NON_POD_P): New macro to access it.
3350 * class.c (finish_struct_1): Determine non-PODness.
3351 Check for arrays of pointers (-Weffc++).
3352 Remove array inspection duplicated code.
3353 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
3354 Use CLASSTYPE_NON_POD_P.
3356 1999-08-03 Nathan Sidwell <nathan@acm.org>
3358 * class.c (duplicate_tag_error): Preserve template information.
3360 1999-08-03 Nathan Sidwell <nathan@acm.org>
3362 * decl.c (start_enum): Show location of previous definition.
3363 * parse.y (enumlist_opt): New reduction.
3364 (structsp): Simplify enum rules to use enumlist_opt.
3366 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
3368 * lex.c (yyprint): Handle PFUNCNAME.
3370 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
3371 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
3373 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
3375 * decl.c (start_decl): Set attributes before duplicate_decls call.
3377 1999-08-02 Mark Mitchell <mark@codesourcery.com>
3379 * Make-lang.in (CXX_SRCS): Add dump.c.
3380 * Makefile.in (CXX_OBJS): Add dump.o.
3381 (dump.o): New target.
3382 * cp-tree.h (DECL_CONV_FN_P): Document.
3383 (DECL_OVERLOADED_OPERATOR_P): New function.
3384 (TYPE_PTRMEM_CLASS_TYPE): New macro.
3385 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3386 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
3387 (ASM_VOLATILE_P): New macro.
3388 (STMT_LINENO): Likewise.
3389 (cp_namespace_decls): New function.
3390 (dump_node_to_file): New function.
3391 * decl.c (cp_namespace_decls): New function.
3392 (walk_namespaces_r): Use it.
3393 (wrapup_globals_for_namespace): Likewise.
3394 * decl2.c (flag_dump_translation_unit): New variable.
3395 (lang_decode_option): Handle -fdump-translation-unit.
3396 (finish_file): If flag_dump_translation_unit is set, dump the
3399 * lang-options.h: Add -fdump-translation-unit.
3400 * pt.c (tsubst_template_parms): Robustify.
3401 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
3402 (tsubst_expr): Use STMT_LINENO.
3403 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
3404 for invalid cv-qualifiers even while building templates.
3406 1999-08-02 Richard Henderson <rth@cygnus.com>
3408 * call.c: Include defaults.h instead of expr.h.
3411 * typeck.c: Include defaults.h.
3413 1999-08-02 Mark Mitchell <mark@codesourcery.com>
3415 * lex.c (errorcount, sorrycount): Don't declare.
3416 * repo.c (errorcount, sorrycount): Likewise.
3417 * typeck2.c (errorcount, sorrycount): Likewise.
3419 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
3421 * call.c (convert_default_arg, build_over_call): Change all uses of
3422 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
3423 Ensure expr.h is included.
3424 * decl.c (grokparams): Ditto.
3425 * pt.c (tsubst_decl): Ditto.
3426 * typeck.c (convert_arguments): Ditto.
3428 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
3430 * class.c (mark_overriders): Fix order of args to overrides.
3431 (warn_hidden): Likewise. Fix for having virtual and non-virtual
3432 functions with the same name.
3434 1999-08-02 Richard Henderson <rth@cygnus.com>
3436 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
3438 1999-08-01 Mark Mitchell <mark@codesourcery.com>
3440 * call.c (build_conditional_expr): Fix typo in comment.
3442 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
3444 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
3445 case_stack; use in_control_zone_p.
3446 * typeck.c (c_expand_return): Likewise.
3448 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
3450 * except.c (catch_clauses): Delete declaration.
3452 1999-07-30 Mark Mitchell <mark@codesourcery.com>
3454 * call.c (build_conditional_expr): Call convert_from_reference to
3455 avoid reference/non-reference type confusion. Fix typo.
3457 1999-07-30 Richard Henderson <rth@cygnus.com>
3459 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
3460 * cp-tree.h (initializer_constant_valid_p): Remove.
3462 1999-07-28 Mark Mitchell <mark@codesourcery.com>
3464 * call.c (conditional_conversion): Don't build BASE_CONVs for
3465 conversions between things that have the same type.
3466 (build_conditional_expr): Tweak.
3467 (convert_like): Some BASE_CONVs really do require the generation
3470 * init.c (perform_member_init): Don't go through build_modify_expr
3471 for simple initializations.
3473 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
3475 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
3476 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
3477 virtual functions and MI. Simplify.
3479 * method.c: Remove prototype for largest_union_member.
3480 * pt.c (determine_specialization): Fix uninitialized warning.
3481 * lex.c (real_yylex): Likewise.
3483 1999-07-27 Mark Mitchell <mark@codesourcery.com>
3485 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
3488 * cp-tree.h (BINFO_VIRTUALS): Document new format.
3489 * class.c (modify_one_vtable): Change prototype accordingly.
3490 (modify_all_vtables): Likewise.
3491 (modify_all_direct_vtables): Likewise.
3492 (modify_all_indirect_vtables): Likewise.
3493 (build_vtable_entry_for_fn): New function.
3494 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
3495 (modify_vtable_entry): Likewise.
3496 (add_virtual_function): Likewise.
3497 (build_vtbl_initializer): New function.
3498 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
3499 (fixup_vtable_deltas1): Likewise.
3500 (fixup_vtable_deltas): Likewise.
3501 (override_one_vtable): Likewise.
3502 (finish_struct_1): Likewise.
3504 * error.c (dump_expr): Likewise.
3505 * search.c (get_abstract_virtuals_1): Likewise.
3506 (get_abstract_virtuals): Likewise.
3507 (expand_upcast_fixups): Likewise.
3508 * tree.c (debug_binfo): Likewise.
3509 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
3510 __pure_virtual here.
3512 1999-07-26 Mark Mitchell <mark@codesourcery.com>
3514 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
3515 as per 1999-07-26 change.
3517 * typeck.c (c_sizeof): Don't allow non-static data members.
3518 (expr_sizeof): Likewise.
3520 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
3522 * input.c (feed_input): Only touch lineno and input_filename
3523 if !USE_CPPLIB. Save the old values before setting the new ones.
3525 * input.c (feed_input): Add file, line parms.
3526 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
3527 (real_yylex): Check linemode before input_redirected().
3529 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
3530 from op new to warning.
3532 1999-07-26 Mark Mitchell <mark@codesourcery.com>
3534 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
3535 * call.c: All uses changed.
3536 * typeck.c: Likewise.
3538 1999-07-26 Nathan Sidwell <nathan@acm.org>
3540 * exception.cc (__cplus_type_matcher): Match __eh_matcher
3543 1999-07-26 Mark Mitchell <mark@codesourcery.com>
3545 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
3546 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
3547 (strip_top_quals): Declare.
3548 (ncp_convert): Likewise.
3549 (type_after_usual_arithmetic_converions): Likewise.
3550 (composite_pointer_type): Likewise.
3551 * call.c (strip_top_quals): Don't make it static.
3552 (promoted_arithmetic_type_p): New function.
3553 (conditional_conversion): Likewise.
3554 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
3555 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
3556 for converting a type to itself.
3557 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
3558 (implicit_conversion): Make sure the from and to types are
3560 (add_builtin_candidate): Correct handling of ?: operator.
3561 (add_builtin_candidates): Improve documentation.
3562 (build_conditional_expr): New function.
3563 (can_convert): Implement in terms of can_convert_arg.
3564 (ncp_convert): New function.
3565 * typeck.c (type_after_usual_arithmetic_conversions): New
3566 function, split out from common_type.
3567 (composite_pointer_type): New function, split out from
3568 build_conditional_expr.
3569 (common_type): Use type_after_usual_arithmetic_conversions.
3570 Remove redundant attribute merging.
3571 (comptypes): Tidy. Handle COMPLEX_TYPE.
3572 (build_binary_op_nodefault): Use null_ptr_cst_p.
3573 (build_conditional_expr): Remove.
3574 (convert_for_assignment): Use new conversion functions.
3576 * cp-tree.h (abstract_virtuals_error): Change declaration.
3577 * typeck2.c (abstract_virtuals_error): Check to see if an error
3578 ocurred, and return a boolean value accordingly.
3579 (build_functional_cast): Adjust accordingly.
3580 * class.c (finish_struct_1): Likewise.
3581 * cvt.c (ocp_convert): Likewise.
3582 * decl.c (cp_finish_decl): Likewise.
3583 (grokparams): Likewise.
3584 (grok_op_properties): Likewise.
3585 (start_function): Likewise.
3586 * init.c (build_new_1): Likewise.
3588 * pt.c (unify): Don't get confused by pointers-to-member functions.
3590 * search.c (build_cplus_new): Robustify.
3592 1999-07-24 Richard Henderson <rth@cygnus.com>
3594 * gxx.gperf (__builtin_va_arg): New.
3595 * parse.y (VA_ARG): New token.
3596 (unary_expr): Recognize it.
3598 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
3600 * g++FAQ.texi: Deleted per Joe Buck's request.
3601 * Makefile.in: Corresponding changes.
3603 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
3605 * lex.c: Sync with C frontend.
3606 (whitespace_cr): New fn.
3607 (skip_white_space): Use it.
3608 (init_parse): Reorder.
3609 (yyprint): Support CONSTANT.
3610 (pragma_getc, pragma_ungetc): Bring back.
3611 (read_line_number): Change in_system_header directly.
3612 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
3613 (parse_float): Update to C version.
3614 (yylex): Handle '$' under the letter case.
3615 Remove looking_for_typename handling.
3616 Support hex floating point constants.
3617 Follow C's lead for choosing type of integer constants.
3618 Rearrange stuff to match C frontend.
3619 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
3620 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
3622 1999-07-23 Mark Mitchell <mark@codesourcery.com>
3624 * call.c (reference_binding): Tweak.
3625 (mayble_handle_implicit_object): Use direct_reference_binding to
3626 create the right implicit conversion sequence.
3628 1999-07-22 Mark Mitchell <mark@codesourcery.com>
3630 * pt.c (convert_nontype_argument): Don't call decl_constant_value
3631 if we're converting to a reference type.
3633 * call.c (NEED_TEMPORARY_P): New macro.
3634 (standard_conversion): Set it, for derived-to-base conversions.
3635 (reference_related_p): New function.
3636 (reference_compatible_p): Likewise.
3637 (convert_class_to_reference): Likewise.
3638 (direct_reference_binding): Likewise.
3639 (reference_binding): Rework for standards-compliance.
3640 (convert_like): Adjust accordingly.
3641 (maybe_handle_ref_bind): Simplify; the right conversion sequences
3642 are now built up in reference_binding.
3643 (initialize_reference): New function.
3644 * cp-tree.h (ICS_USER_FLAG): Document.
3645 (ICS_THIS_FLAG): Likewise.
3646 (ICS_BAD_FLAG): Likewise.
3647 (NEED_TEMPORARY_P): Likewise.
3648 (cp_lvalue_kind): New type.
3649 (real_lvalue_p): Return it.
3650 * error.c (dump_expr): Provide more accurate representation for
3652 * init.c (expand_default_init): Do not try to perform implicit
3653 conversions for a brace-enclosed initializer.
3654 * search.c (lookup_conversions): Document.
3655 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
3657 (real_lvalue_p): Adjust accordingly.
3658 (lvalue_p): Likewise.
3659 (build_cplus_new): Don't allow the creation of an abstract class.
3660 * typeck.c (convert_for_initialization): Use initialize_reference.
3662 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
3664 * lex.c (real_yylex) : Correct the test for overflow when lexing
3667 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
3669 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
3670 not DECL_BUILT_IN, to determine if a function is internally declared.
3671 (duplicate_decls): Likewise. Improve handling of builtins.
3672 (push_overloaded_decl): Remove special handling of builtins.
3674 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
3676 * decl.c (grokdeclarator): Pull out decl_constant_value in
3679 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
3680 * cp-tree.h, pt.c, semantics.c: Adjust.
3681 * method.c (largest_union_member): Remove.
3683 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
3685 * lex.c (token_getch, token_put_back): New fns.
3686 (real_yylex): Use them.
3688 * lex.c (lang_init): Generalize.
3689 (lang_init_options): Tell cpplib this is C++.
3690 (nextchar): Remove. Replace uses with put_back.
3691 (skip_white_space): Handle linemode here. Optimize for cpplib.
3692 (extend_token_buffer_to): New fn.
3693 (extend_token_buffer): Use it.
3694 (read_line_number, check_newline): Just deal with tokens.
3695 (real_yylex): More cpplib optimizations. Simplify. Don't produce
3696 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
3697 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
3698 * parse.y (PAREN_STAR_PAREN): Remove.
3699 * input.c: Don't use the putback machinery with cpplib.
3700 (sub_getch): Fold back into getch.
3701 (getch): Don't handle linemode here.
3702 (feed_input): Unget any text in the token buffer.
3704 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
3705 nextyychar, nextyylval): Remove.
3707 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
3708 Jason Merrill <jason@yorick.cygnus.com>
3710 * lex.c (indent_level): New variable.
3711 (init_parse): Set cpp_token to CPP_DIRECTIVE.
3712 (consume_string): Make this smart about USE_CPPLIB.
3713 (yyungetc): Use put_back function.
3714 (pragma_getc, pragma_ungetc): Functions deleted.
3715 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
3716 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
3718 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
3719 Also, clean up cases where we redundantly set token_buffer[0].
3720 (read_line_number): New fn.
3721 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
3722 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
3723 (sub_getch): Conditionalize out code that's not appropriate if
3725 (put_back): Rewrite in case USE_CPPLIB is defined.
3726 (input_redirected): Ditto.
3728 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
3730 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
3731 c_global_trees and accessor macros defined in c-common.h.
3732 (cp_tree_index): New enumeration.
3733 (cp_global_trees): Declare new array. Add accessor macros for it, and
3734 delete declarations of tree nodes replaced by it.
3735 (builtin_function): Delete macro, add declaration for new function.
3737 * decl.c: Delete definitions for tree nodes that were replaced by
3738 cp_global_trees and c_global_trees.
3739 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
3740 to generate the common builtins here.
3741 (builtin_function): New function.
3742 * decl2.c (abort_fndecl): Delete declaration.
3743 * except.c (expand_builtin_return_address): Delete declaration.
3744 (builtin_return_address_fndecl): Delete variable.
3745 (const_ptr_type_node): Delete declaration.
3746 * lex.c (cons_up_default_function): Delete declaration of
3748 * parse.y (void_list_node): Delete declaration.
3749 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
3751 (const_string_type_node): Delete declaration.
3752 * search.c (abort_fndecl): Delete declaration.
3753 * Makefile.in: Update dependencies.
3755 1999-07-19 Mark Mitchell <mark@codesourcery.com>
3757 * pt.c (check_default_tmpl_args): Move test for missing default
3758 arguments here, from ...
3759 (end_template_parm_list): Here.
3761 1999-07-18 Mark Mitchell <mark@codesourcery.com>
3763 * decl.c (lookup_nested_type): Remove.
3764 (pushtag): Don't call it.
3766 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
3768 * Makefile.in (INTERFACE): Bump to 2.
3770 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
3772 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
3773 instructions to gcc.gnu.org. Removed e-mail address.
3775 1999-07-17 Mark Mitchell <mark@codesourcery.com>
3777 * pt.c (determine_specialization): Tighten error-checking.
3778 (end_template_parm_list): Likewise.
3780 1999-07-14 Mark Mitchell <mark@codesourcery.com>
3782 * pt.c (check_default_tmpl_args): Handle friends defined in the
3783 class just like member functions defined in the class.
3785 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
3786 Jason Merrill <jason@yorick.cygnus.com>
3788 * cp-tree.h (struct lang_decl): Added field for storing sorted
3789 FIELD_DECLs (used in TYPE_DECLs).
3790 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3791 (DECL_SORTED_FIELDS): New macro.
3792 * class.c (method_name_cmp): New function.
3793 (finish_struct_methods): Modified to support sorting and searching
3795 (finish_struct_anon): Changed code in inner loop to use ELT rather
3796 than UELT (which required an extra indirection for every reference).
3797 (field_decl_cmp): New function to support sorting FIELD_DECLs.
3798 (finish_struct_1): Sort fields.
3799 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
3800 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
3801 Also, switch to using array indexing rather than a changing pointer.
3802 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
3805 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
3807 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3808 casts in system headers or extern "C" blocks.
3810 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3813 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
3815 * decl2.c (write_virtuals): Deleted declaration.
3816 * cp-tree.h (write_virtuals): Deleted extern declaration.
3817 * class.c (finish_struct_1): Removed #if 0'd code that mentions
3819 * semantics.c (begin_class_definition): Rewrite code to not depend
3822 * lex.c (cp_pragma_interface): New function.
3823 (cp_pragma_implementation): Likewise.
3824 (handle_cp_pragma): Call them.
3826 * typeck.c (comptypes): Simplify C code in look_hard.
3828 * xref.c (PALLOC): Use xcalloc, not calloc.
3829 (SALLOC): Use xmalloc, not malloc.
3831 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3833 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3836 * decl.c (duplicate_decls): If a redeclaration doesn't match the
3837 initial declaration, then don't save the inline info and by all
3838 means don't mark the function as a builtin function.
3840 * decl.c (lookup_name_real): Set NONCLASS to 1 if
3841 CURRENT_CLASS_TYPE is 0.
3843 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3846 * ptree.c (print_lang_type): Added vtable-needs-writing.
3848 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
3850 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3852 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
3854 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3855 Merged into c-common.
3857 1999-07-05 Dave Brolley <brolley@cygnus.com>
3859 * lex.c (errorcount): Declare it.
3860 (finish_parse): Update errorcount for when using CPPLIB.
3862 1999-07-05 Mark Mitchell <mark@codesourcery.com>
3864 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3866 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3867 * decl.c (push_class_binding): Use it.
3868 (lookup_name_real): Likewise.
3870 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
3872 * cp-tree.h (widest_integer_literal_type_node,
3873 widest_unsigned_literal_type) : New.
3874 * decl.c (widest_integer_literal_type_node,
3875 widest_unsigned_literal_type) : New.
3876 (init_decl_processing): Handle/use the two new types.
3877 * lex.c (real_yylex): Same.
3878 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3881 1999-07-01 Mark Mitchell <mark@codesourcery.com>
3883 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3884 to anonymous cv-qualified types.
3886 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
3888 * lex.c (real_yylex) : Change integer literal overflow handling to
3891 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3893 1999-06-28 Richard Henderson <rth@cygnus.com>
3895 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3897 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
3899 * error.c (dump_type_real): Handle TREE_LIST again.
3901 * typeck.c (comp_target_parms): Don't complain about
3902 converting from () to (...) if !flag_strict_prototype.
3904 * decl.c (grokdeclarator): Update the names of all variants when
3907 1999-06-21 Mark Mitchell <mark@codesourcery.com>
3909 * init.c (expand_aggr_vbase_init): Rename to
3910 construct_virtual_bases. Conditionalize construction here,
3912 (emit_base_init): Here.
3914 1999-06-19 Mark Mitchell <mark@codesourcery.com>
3916 * semantics.c (finish_asm_statement): Apply decay conversions to
3919 * decl.c (expand_static_init): When building an anonymous function
3920 for use with atexit, compute its body before and after entering
3923 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3926 1999-06-18 Mark Mitchell <mark@codesourcery.com>
3928 * init.c (expand_aggr_vbase_init): Add flag parameter.
3929 (build_partial_cleanup_for): Remove, inlining into ..
3930 (expand_cleanup_for_base): ... here. Take flag parameter.
3931 (emit_base_init): Pass the in_chrg parameter to
3932 emit_aggr_vbase_init.
3933 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3935 1999-06-16 Mark Mitchell <mark@codesourcery.com>
3937 * decl2.c (import_export_decl): Use same_type_p, rather than
3938 relying on pointer-equality for types.
3940 * method.c (do_build_copy_constructor): Simplify.
3942 * call.c (build_method_call): Remove bogus code for two-argument
3944 * init.c (build_new_1): Expand on comment, and remove dead code.
3946 * init.c (expand_cleanup_for_base): New function, split out
3948 (emit_base_init): Here.
3949 (expand_aggr_vbase_init): Use it.
3951 1999-06-15 Mark Mitchell <mark@codesourcery.com>
3953 * cp-tree.h (class_cache_firstobj): Declare.
3954 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3955 * class.c (permanent_obstack): Remove declaration.
3956 (class_cache_firstobj): Make it global.
3957 (add_method): Don't use permanent_obstack directly.
3958 (pushclass): Only free the class_cache_obstack if we know how far
3960 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3961 * decl.c: Remove dead comment.
3962 (saved_scope): Add class_cache_firstobj.
3963 (push_to_top_level): Save it.
3964 (pop_from_top_level): Restore it.
3965 (push_class_level_binding): Use push_cache_obstack, not
3966 maybe_push_cache_obstack.
3967 * search.c (push_class_decls): Likewise.
3969 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3971 * pt.c (tsubst_friend_function): Push into namespace of friend
3972 function before pushdecl'ing it.
3974 1999-06-14 Nathan Sidwell <nathan@acm.org>
3976 * call.c (build_new_op): Remove REF_BIND from all operands.
3978 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
3980 * init.c (build_new_1): Look up operator delete even if there was
3981 no explicit new placement.
3983 1999-06-08 Nathan Sidwell <nathan@acm.org>
3985 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3987 (build_throw): ... here. Call it.
3988 (process_start_catch_block): Call it.
3990 1999-06-07 Mark Mitchell <mark@codesourcery.com>
3992 * search.c (convert_pointer_to_single_level): Reimplement without
3995 1999-06-06 Mark Mitchell <mark@codesourcery.com>
3997 * method.c (is_back_referenceable_type): Back-reference bools when
4000 1999-06-07 Dave Brolley <brolley@cygnus.com>
4002 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4003 * input.c (putback_buffer): New structure type.
4004 (putback): Replaces putback_char member.
4005 (putback): Replaces putback_char static variable.
4006 (feed_input): Use putback.
4007 (end_input): Use putback.
4008 (sub_getch): Use putback.
4009 (put_back): Use putback.
4011 1999-06-05 Mark Mitchell <mark@codesourcery.com>
4013 * decl.c (grokdeclarator): Fix typo in last change.
4015 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
4017 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4018 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4020 1999-06-04 Nathan Sidwell <nathan@acm.org>
4022 * except.c (build_throw): Check throw expression validity.
4024 1999-06-03 Mark Mitchell <mark@codesourcery.com>
4026 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4027 just because flag_signed_bitfields is false.
4029 1999-06-03 Nathan Sidwell <nathan@acm.org>
4031 * semantics.c (begin_class_definition): Update the struct's
4033 * class.c (finish_struct): ... rather than here.
4035 * decl.c (make_typename_type): Don't rely on uninitialized
4038 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4040 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4042 1999-05-31 Mark Mitchell <mark@codesourcery.com>
4044 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4045 and friends rather than messing with current_obstack directly.
4046 (cp_build_qualified_type_real): Rework ARRAY_TYPE
4047 allocation to match practice throughout the rest of the
4050 1999-05-30 Mark Mitchell <mark@codesourcery.com>
4052 * lex.c (make_lang_type): Create TYPE_BINFO for
4053 TEMPLATE_TYPE_PARMs just like for non-template types.
4055 * decl.c (start_decl): Move checks on initialization to ...
4056 (cp_finish_decl): Here. Tidy formatting slightly.
4058 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4060 * decl.c (add_binding): Don't complain about a redeclaration of a
4061 semantically identical typedef in a local scope.
4063 1999-05-28 Nathan Sidwell <nathan@acm.org>
4065 * decl.c (complete_array_type): Allocate off same obstack. Fix
4066 DO_DEFAULT comment to match reality.
4068 * friend.c (make_friend_class): Fix diagnostic typo.
4070 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4072 * decl.c (lookup_namespace_name): Handle getting a
4074 (expand_static_init): Don't call pushdecl for implicitly declared
4075 `atexit' used to register destructors.
4077 1999-05-25 Mark Mitchell <mark@codesourcery.com>
4079 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4082 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4083 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
4084 by combining TEMPLATE_INFO and LEVEL into a single union.
4085 (DECL_TEMPLATE_INFO): Reformat.
4086 (DECL_SAVED_TREE): Document.
4087 (DECL_TEMPLATE_INJECT): Remove.
4088 * class.c (finish_struct): Remove code to deal with
4089 DECL_TEMPLATE_INJECT.
4091 * decl.c (maybe_process_template_type_declaration): Handle all new
4092 types in templates uniformly.
4093 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4095 * pt.c (lookup_template_class): Inject template instantiations of
4096 forward-declarations.
4097 (instantiate_class_template): Remove code processing
4098 DECL_TEMPLATE_INJECT.
4100 * pt.c (lookup_template_class): Tweak lookup to find member
4103 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4105 * semantics.c (finish_asm_stmt): Make strings permanent if they're
4108 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
4110 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4111 parts of pointer to data member types.
4113 1999-05-24 Mark Mitchell <mark@codesourcery.com>
4115 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4116 and then make it look like `abort'. Just use `abort' instead.
4118 * typeck.c (build_static_cast): Don't allow static_casts that cast
4120 (casts_away_constness_r): New function.
4121 (casts_away_constness): Likewise.
4123 * decl.c (lookup_tag): Remove code no longer needed after
4124 name-lookup improvements.
4125 * decl2.c (handle_class_head): Make error-recovery more robust.
4126 * friend.c (make_friend_class): Reject templated typename types.
4127 * lex.c (is_global): A template parameter isn't global.
4128 * parse.y (class_head): Robustify.
4129 * parse.c: Regenerated.
4131 1999-05-22 Mark Mitchell <mark@codesourcery.com>
4133 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4134 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
4136 * cp-tree.h (push_nested_namespace): Declare.
4137 (pop_nested_namespace): Likewise.
4138 * decl.c (push_nested_namespace): New function.
4139 (pop_nested_namespace): Likewise.
4140 * pt.c (instantiate_class_template): Use them.
4142 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4144 * cp-tree.h (cplus_expand_constant): Declare.
4145 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4146 converted from one pointer-to-object type to another.
4147 * expr.c (cplus_expand_constant): Don't make it static.
4148 * typeck.c (build_component_ref): Don't crash when presented with
4149 a component which is a TEMPLATE_DECL.
4150 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
4151 cast from a pointer-to-member constant to its own type does not
4152 result in a valid non-type template argument.
4154 1999-05-21 Mark Mitchell <mark@codesourcery.com>
4155 Nathan Sidwell <nathan@acm.org>
4157 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4158 * cp-tree.h: Fix typo in documentation on pointers-to-members.
4159 (cp_build_qualified_type): Make it a macro.
4160 (cp_build_qualified_type_real): Declare.
4161 * decl.c (grokdeclarator): Remove misleading comment. Avoid
4162 problem with template parameters and restrict-qualification.
4163 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4164 * hash.h: Regenerated.
4165 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4167 (NORID): Remove definition.
4168 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4169 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
4170 (fn_type_unification): Check that the function type resulting from
4171 the deduction is legal.
4172 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4173 (unify): Use cp_build_qualified_type_real.
4174 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4175 (cp_build_qualified_type): Rename to ...
4176 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4177 and modify appropriately.
4179 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4180 reveal optimization opportunities.
4182 * pt.c (tsubst): Don't issue error messages when we're not
4183 complaining, even if we see a qualified function type.
4184 (check_cv_quals_for_unify): Don't allow a qualified function
4187 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
4189 * class.c (instantiate_type): Downgrade errors for object-dependent
4190 memfn refs to pedwarn.
4192 1999-05-20 Mark Mitchell <mark@codesourcery.com>
4194 * decl.c (grokdeclarator): Don't treat [] as indicating a
4195 zero-sized array in a typedef.
4197 * call.c (build_object_call): Don't look at DECL_NAME for a type.
4198 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
4199 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
4201 * pt.c (for_each_template_parm): Rework to match documentation.
4202 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
4204 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
4206 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
4208 * class.c (finish_base_struct): Allow non-COM bases for COM classes
4209 except at the leftmost position.
4210 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
4211 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
4212 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
4214 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
4215 (build_cplus_new): Make sure that what we return is of the right type.
4217 1999-05-20 Mark Mitchell <mark@codesourcery.com>
4219 * cp-tree.h (make_ptrmem_cst): New function.
4220 * expr.c (cplus_expand_constant): Split out from ...
4221 (cplus_expand_expr): Here. Use cplus_expand_constant.
4222 (init_cplus_expand): Set lang_expand_constant.
4223 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
4225 * tree.c (make_ptrmem_cst): Define.
4226 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
4227 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
4229 1999-05-19 Mark Mitchell <mark@codesourcery.com>
4231 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
4233 * decl2.c (start_static_storage_duration_function): Fix comment.
4234 (finish_file): Create static storage duration functions lazily.
4236 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
4238 Implement anonymous structs.
4239 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
4240 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
4241 * class.c (finish_struct_1): Remove redundant check for anon struct.
4242 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
4243 (check_tag_decl): Check for anonymous struct here.
4244 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
4245 * init.c (sort_member_init, emit_base_init): Handle getting fields
4246 as well as names in current_member_init_list.
4247 (perform_member_init): Handle getting an anon aggr.
4248 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
4249 (do_build_copy_constructor): Likewise.
4251 1999-05-19 Mark Mitchell <mark@codesourcery.com>
4253 * tree.c (cp_build_qualified_type): Don't allow qualified function
4256 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
4258 * gxxint.texi: Fix typo.
4260 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
4262 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
4263 * class.c (finish_struct_1): Use CLASS_TYPE_P.
4264 * ptree.c (print_lang_type): Likewise.
4265 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
4267 * typeck2.c (digest_init): Likewise.
4269 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
4271 * call.c (joust): Compare the types of the conv ops, not the
4272 target types of the conversions.
4274 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
4276 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
4279 1999-05-17 Mark Mitchell <mark@codesourcery.com>
4281 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
4282 * decl.c (grokfndecl): Don't allow inline declarations of friend
4283 template specializations, or friend template specializations with
4285 * pt.c (tsubst): Handle substitution into array types that does
4286 not yield a fixed upper bound, even when not processing a
4288 (tsubst_copy): Deal with the fact that the second operand to a
4289 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
4290 * search.c (marked_pushdecls_p): Don't descend into
4291 TEMPLATE_TYPE_PARMs and the like.
4292 (unmarked_pushdecls_p): Likewise.
4294 * call.c (build_over_call): Don't throw away
4295 initializations/copies of empty classes; use MODIFY_EXPR and
4296 INIT_EXPR as for non-empty classes.
4297 * class.c (finish_struct_1): Put the padding byte for an empty
4298 class on the TYPE_NONCOPIED_PARTS list for the class.
4300 1999-05-16 Mark Mitchell <mark@codesourcery.com>
4302 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
4303 indicate a reference to a field that is a qualified name.
4305 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
4307 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
4308 ASM_OUTPUT_CONSTRUCTOR.
4310 * friend.c (do_friend): Add attrlist arg. Remove support for
4311 getting a non-decl as 'decl'.
4312 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
4314 (grokdeclarator): Adjust.
4315 * cp-tree.h: Adjust.
4317 1999-05-16 Mark Mitchell <mark@codesourcery.com>
4319 * cp-tree.h (permanent_p): New function.
4320 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
4321 possibly complex tree node.
4322 * tree.c (mapcar): Adjust comments, and follow coding standards in
4324 (permanent_p): New function.
4326 1999-05-13 Per Bothner <bothner@cygnus.com>
4328 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
4329 primitive Java types, if we actually see `extern "Java"'.
4331 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
4333 * lang-specs.h: Pass -$ to the preprocessor.
4335 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
4337 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
4338 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
4339 (resolve_offset_ref): Don't handle a raw baselink.
4340 * cvt.c (build_expr_type_conversion): Likewise.
4341 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
4342 convert_for_initialization): Likewise.
4343 * class.c (instantiate_type): Handle seeing a baselink under an
4345 * error.c (dump_expr): Likewise.
4346 * pt.c (for_each_template_parm): Likewise.
4347 (resolve_overloaded_unification): Likewise.
4348 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
4349 * typeck.c (expr_sizeof): Also complain about other permutations
4350 of overloaded functions.
4352 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
4354 * init.c (resolve_offset_ref): Don't return a raw method.
4356 * typeck.c (decay_conversion): Don't handle a raw method.
4357 Resolve all OFFSET_REFs.
4358 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
4359 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
4360 same_type_p for pmf bits. Don't use build_binary_op to compare
4361 raw pointers to methods.
4362 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
4363 to decide when to call resolve_offset_ref.
4364 (build_c_cast, convert_for_initialization): Likewise.
4365 * cvt.c (build_expr_type_conversion): Likewise.
4367 1999-05-06 Nathan Sidwell <nathan@acm.org>
4369 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
4371 1999-05-05 Mark Mitchell <mark@codesourcery.com>
4373 * decl2.c (start_objects): Don't let static constructors and
4374 destructors get inlined.
4376 * parse.y (nested_name_specifier): Make sure ordinary types are
4377 complete, just like template types.
4378 * parse.c: Regenerated.
4380 * pt.c (check_explicit_specialization): Improve error messages.
4382 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
4384 * typeck.c (string_conv_p): Use same_type_p to check whether we
4385 try to convert between char and wchar_t.
4387 1999-05-03 Mark Mitchell <mark@codesourcery.com>
4389 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
4390 lookup to error_mark_node here.
4391 (lookup_member): Revise documentation. Add comments. Don't set
4392 the TREE_TYPE to error_mark_node here, and don't build up an extra
4393 TREE_LIST for ambiguous lookups.
4394 (setup_class_bindings): Adjust accordingly.
4395 (push_class_decls): Revise out-of-date comments.
4397 * typeck.c (build_const_cast): Tighten checks for legality.
4399 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
4401 * init.c (build_member_call): Lookup names coming from
4402 namespace-scoped LOOKUP_EXPR.
4404 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
4406 * gxxint.texi: Add documentation for 'I'.
4408 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
4410 * tinfo.cc (operator==): Qualify type_info with std::.
4412 1999-05-02 Mark Mitchell <mark@codesourcery.com>
4414 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
4415 (DECL_COMDAT): Remove definition.
4417 1999-05-01 Mark Mitchell <mark@codesourcery.com>
4419 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
4422 1999-04-30 Mark Mitchell <mark@codesourcery.com>
4424 * class.c (build_vtable): Use build_lang_decl when building
4425 vtables, not just build_decl.
4426 (prepare_fresh_vtable): Likewise.
4427 * decl.c (wrapup_globals_for_namespace): Mark vtables as
4428 DECL_EXTERNAL when calling wrapup_global_declarations.
4429 * decl2.c (priority_info_s): Add initializations_p and
4430 destructions_p members.
4431 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
4432 when deciding what vtables to write out.
4433 (ssdf_decls): New variable.
4434 (ssdf_decls_used): Likewise.
4435 (start_static_storage_duration_function): Deal with being called
4436 multiple times. Avoid inlining this function.
4437 (generate_inits_for_priority): Deal with reuse of priority map.
4438 (get_priority_info): Clear initializations_p and destructions_p.
4439 (do_static_initialization): Tweak comment.
4440 (do_static_destruction): Likewise. Fix condition on sentries for
4442 (generate_ctor_or_dtor_function): Call all of the static storage
4444 (generate_ctor_or_dtor_function_for_priority): Check
4445 initializations_p and destructions_p to see what priorities need
4446 initialization functions.
4447 (finish_file): Rework to generate multiple static storage duration
4448 functions, rather than just one.
4450 * typeck.c (build_const_cast): Tweak last change to handle
4451 templates correctly.
4453 * typeck.c (build_const_cast): Disallow use of const_cast to
4454 anything but a pointer or reference type.
4456 1999-04-30 Nathan Sidwell <nathan@acm.org>
4458 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
4461 1999-04-29 Mark Mitchell <mark@codesourcery.com>
4463 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
4464 (finish_file): Indent comments properly.
4466 1999-04-29 Richard Henderson <rth@cygnus.com>
4468 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
4469 (do_static_destruction): Likewise.
4471 1999-04-29 Nathan Sidwell <nathan@acm.org>
4473 * cp-tree.h (TYPE_NOTHROW_P): New macro.
4474 * decl2.c (delete_sanity): Warn on deleting void *.
4475 * init.c (build_new_1): Use TYPE_NOTHROW_P.
4476 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
4477 throwing operator new.
4479 1999-04-28 Nathan Sidwell <nathan@acm.org>
4481 * cp-tree.h (build_component_addr): Remove prototype.
4482 * typeck.c (build_component_addr): Make static. Remove MSG
4484 (build_component_addr): Remove MSG parameter, clean up
4486 (build_x_function_call): Use cp_error.
4487 (build_unary_op): Adjust call of build_component_addr.
4489 1999-04-28 Mark Mitchell <mark@codesourcery.com>
4491 * pt.c (tsubst_friend_class): Check for NULL.
4493 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4495 * search.c (binfo_for_vtable): Initialize bfvi.var.
4497 1999-04-27 Nathan Sidwell <nathan@acm.org>
4499 * rtti.c (build_x_typeid): Check rtti is enabled.
4501 1999-04-26 Mark Mitchell <mark@codesourcery.com>
4503 * search.c (is_subobject_of_p): Make sure we're looking at the
4506 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
4508 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
4510 1999-04-23 Mark Mitchell <mark@codesourcery.com>
4512 * decl2.c (finish_file): Tweak handling of extern inlines so that
4513 they are not unnecessarily put out.
4515 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
4516 such as base classes.
4518 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
4520 * tree.c (build_exception_variant): Fix typo: use the chain of U,
4521 not trying V, while cycling through U.
4523 1999-04-22 Mark Mitchell <mark@codesourcery.com>
4525 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
4526 preserves_first_arg. Enlarge dummy accordingly.
4527 (DECL_TINFO_FN_P): New macro.
4528 (SET_DECL_TINFO_FN_P): Likeiwse.
4529 (DECL_RETURNS_FIRST_ARG): Remove.
4530 (DECL_PRESERVES_THIS): Likewise.
4531 (DECL_INIT_PRIORITY): New macro.
4532 (finish_struct_1): Change prototype.
4533 (cat_namespace_levels): Remove prototype.
4534 (vtable_decl_p): New prototype.
4535 (vtype_decl_p): Likewise.
4536 (sigtable_decl_p): Likewise.
4537 (walk_globals_pred): New typedef.
4538 (walk_globals_fn): Likewise.
4539 (walk_globals): New prototype.
4540 (walk_namespaces_fn): New typedef.
4541 (walk_namespaces): New prototype.
4542 (wrapup_globals_for_namespace): Likewise.
4543 (walk_vtables): Remove prototype.
4544 (walk_sigtables): Likewise.
4545 (instantiate_pending_templates): New prototype.
4546 * class.c (finish_struct_1): Don't return a value.
4547 * decl.h (pending_statics): Remove declaration.
4548 * decl.c (walk_namespaces_r): New function.
4549 (walk_globals_r): Likewise.
4550 (vtable_decl_p): Likewise.
4551 (vtype_decl_p): Likewise.
4552 (sigtable_decl_p): Likewise.
4553 (walk_namespaces): Likewise.
4554 (walk_globals_data): New type.
4555 (walk_globals): New function.
4556 (wrapup_globals_for_namespace): Likewise.
4557 (expand_static_init): Remove assertion. Remove redundancy in
4558 conditional. Don't put static data members in static_aggregates
4560 (finish_function): Remove redundancy in conditional. Don't set
4561 DECL_RETURNS_FIRST_ARG.
4562 (cat_namespace_levels): Remove.
4563 * decl2.c: Include splay-tree.h and varray.h.
4564 (priority_info_s): New structure.
4565 (finish_vtable_vardecl): Change prototype. Adjust for new calling
4567 (prune_vtable_vardecl): Likewise.
4568 (finish_sigtable_vardecl): Likewise.
4569 (setup_initp): Remove.
4572 (start_static_storage_duration_function): New function.
4573 (generate_inits_for_priority): Likewise.
4574 (finish_static_storage_duration_function): Likewise.
4575 (get_priority_info): Likewise.
4576 (do_static_initialization): Likewise.
4577 (do_static_destruction): Likewise.
4578 (do_static_initialization_and_destruction): Likewise.
4579 (generate_ctor_or_dtor_function): Likewise.
4580 (generate_ctor_and_dtor_functions_for_priority): Likewise.
4581 (pending_statics): Make it a varray.
4582 (pending_statics_used): New variable.
4583 (saved_inlines): Make it a varray.
4584 (saved_inlines_used): New variable.
4585 (finish_static_data_member): Change method of updating
4587 (mark_inline_for_output): Remove #if 0'd code. Change method of
4588 updating saved_inlines.
4589 (walk_vtables): Remove.
4590 (walk_sigtables): Likewise.
4591 (import_export_decl): Use DECL_TINFO_FN_P.
4592 (pending_templates): Remove declaration.
4593 (maybe_templates): Likewise.
4594 (static_aggregates_initp): Likewise.
4595 (setup_initp): Likewise.
4596 (finish_objects): Simplify.
4597 (INITIALIZE_P_IDENTIFIER): New macro.
4598 (PRIORITY_IDENTIFIER): New macro.
4599 (SSDF_IDENTIFIER): New macro.
4600 (initialize_p_decl): New variable.
4601 (priority_decl): Likewise.
4602 (ssdf_decl): Likewise.
4603 (priority_info_map): Likewise.
4604 (finish_file): Recode output of static intializers and other
4605 file-scope finalization tasks.
4606 * error.c (OB_END_TEMPLATE_ID): New macro.
4607 (dump_type_real): Use it.
4608 (dump_decl): Likewise.
4609 (dump_function_name): Likewise.
4610 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
4612 (check_newline): Use walk_globals, not walk_vtables.
4613 * pt.c (pending_tempalte_expansions): Remove.
4614 (set_vardecl_interface_info): Likewise.
4615 (pending_templates): Make static.
4616 (maybe_templates): Likewise.
4617 (instantiate_class_template): Adjust call to finish_struct_1.
4618 (instantiate_pending_templates): New function.
4619 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
4620 * tree.c (static_aggregates_initp): Remove.
4621 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
4623 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
4625 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
4626 with the RTL code RETURN.
4627 * hash.h: Regenerated.
4628 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
4629 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
4630 * parse.c: Regenerated.
4631 * pt.c: Include varray.h. Include rtl.h since varray.h requires
4633 (inline_parm_levels): New variable.
4634 (inline_parm_levels_used): Likewise.
4635 (maybe_begin_member_template_processing): Update them.
4636 (maybe_end_member_template_processing): Use them, rather than
4637 guessing how many levels to pop.
4639 * decl.c (make_typename_type): Tighten error-checking.
4641 1999-04-20 Mark Mitchell <mark@codesourcery.com>
4643 * cp-tree.h (build_binary_op): Remove unneeded parameter.
4644 * class.c (build_vrable_entry_ref): Adjust call to
4646 * decl.c (expand_static_init): Likewise.
4647 (grokdeclarator): Likewise.
4648 (finish_function): Likewise.
4649 * decl2.c (delete_sanity): Likewise.
4650 (do_dtors): Likewise.
4651 (do_ctors): Likewise.
4652 * error.c (dump_type_suffix): Likewise.
4653 * expr.c (cplus_expand_expr): Likewise.
4654 * init.c (resolve_offset_ref): Likewise.
4655 (build_new): Likewise.
4656 (build_new_1): Likewise.
4657 (build_vec_delete_1): Likewise.
4658 (expand_vec_init_catch_clause): Likewise.
4659 (build_delete): Likewise.
4660 * pt.c (tsubst): Likewise.
4661 * rtti.c (synthesize_tinfo_fn): Likewise.
4662 * search.c (expand_upcast_fixups): Likewise.
4663 (expand_direct_vtbls_init): Likewise.
4664 * typeck.c (get_member_function_from_ptrfunc): Likewise.
4665 (build_binary_op_nodefault): Likewise.
4666 (point_int_sum): Likewise.
4667 (pointer_diff): Likewise.
4668 (build_unary_op): Likewise.
4669 (build_modify_expr): Likewise.
4670 (get_delta_difference): Likewise.
4671 (build_ptrmemfunc): Likewise.
4672 (expand_ptrmemfunc_cst): Likewise.
4674 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
4676 * decl.c (grokfndecl): Always call cplus_decl_attributes.
4677 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
4679 1999-04-19 Mark Mitchell <mark@codesourcery.com>
4681 * cp-tree.h (finish_static_data_member_decl): New function.
4682 * decl2.c (finish_static_data_member_decl): Split out from ...
4684 * pt.c (instantiate_class_template): Use it here instead of
4686 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
4687 finish_static_data_member_decl will do that. Explicit set
4688 DECL_EXTERNAL to match non-template processing.
4690 1999-04-18 Mark Mitchell <mark@codesourcery.com>
4692 * cp-tree.h (finish_class_definition): Add parameter.
4693 * parse.y (structsp): Use it. Don't call pop_scope here.
4694 * parse.c: Regenerated.
4695 * semantics.c (finish_class_definition): Pop it here.
4697 1999-04-17 Mark Mitchell <mark@codesourcery.com>
4699 * decl.c (xref_tag): Revise handling of nested template
4701 * pt.c (check_explicit_specialization): Tweak handling of friend
4702 templates in template classes.
4703 (tsubst_friend_class): Handle friend declarations for nested
4704 member template classes.
4706 1999-04-16 Mark Mitchell <mark@codesourcery.com>
4708 * class.c (finish_struct): Remove unused variable.
4709 (pushclass): Likewise.
4710 (invalidate_class_lookup_cache): Likewise.
4711 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
4712 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
4713 doesn't get obliterated.
4714 (make_typename_type): Handle template classes correctly.
4716 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
4717 (storetags): Declare.
4718 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
4719 (pushclass): Likewise. Use storetags to install tag declarations,
4721 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
4722 * decl.c (storetags): Make it global.
4723 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
4724 implicit typename declaration.
4725 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
4726 * method.c (hack_identifier): Likewise.
4727 * search.c (lookup_member): Likewise.
4729 * decl.c (warn_about_implicit_typename_lookup): New function.
4730 (lookup_name_real): Use it. Rework handling of implicit typename
4733 1999-04-15 Mark Mitchell <mark@codesourcery.com>
4735 * cp-tree.h (lookup_nested_field): Remove.
4736 * class.c (push_nested_class): Handle UNION_TYPEs.
4737 (pop_nested_class): Likewise.
4738 * decl.c (lookup_name_real): Don't call lookup_nested_field.
4739 (start_decl): Use push_nested_class, not just pushclass.
4740 (cp_finish_decl): Use pop_nested_class, not just popclass.
4741 * search.c (lookup_nested_field): Remove.
4743 * cp-tree.h (lang_type): Add documentation.
4744 * decl2.c (handle_class_head): Create template declarations here,
4746 * parse.y (class_head): Return whether or not we entered a new
4747 scope, as well as the type named.
4748 (named_class_head): Likewise.
4749 (named_complex_class_head_sans_basetype): Likewise.
4750 (structsp): Adjust accordingly. Pop scope when required.
4751 * parse.c: Regenerated.
4752 * pt.c (check_default_tmpl_args): Robustify.
4753 (redeclare_class_template): Likewise.
4754 (instantiate_class_template): An instantiation of an
4755 anonymous union is itself an anonymous union.
4756 * semantics.c (begin_class_definition): Don't create template
4759 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
4761 * parse.y (after_type_declarator_intern): New nonterminal.
4762 (after_type_declarator): Use it.
4763 (direct_after_type_declarator): Likewise. Move above
4764 nonnested_type to fix reduce/reduce conflict resolution.
4765 (declmods): Reducing from just 'attributes' has EMPTY precedence.
4766 * Makefile.in (CONFLICTS): Update.
4768 * decl.c (define_label): Downgrade error for jumping over a
4769 non-POD decl to pedwarn.
4771 1999-04-14 Mark Mitchell <mark@codesourcery.com>
4773 * cp-tree.h (popclass): Change declaration.
4774 (pop_nested_class): Likewise.
4775 (poplevel_class): Remove declaration.
4776 * call.c (convert_default_argument): Pass no arguments to
4778 * class.c (finish_struct_1): Likewise.
4779 (finish_struct): Likewise.
4780 (popclass): Remove argument. Simplify code accordingly.
4781 (pop_nested_class): Likewise.
4782 * decl.c (poplevel_class): Declare it here, and make it static.
4783 (poplevel): Handle class scopes.
4784 (poplevel_class): Don't take an rgument. Simplify.
4785 (pop_everything): Pass no arguments to pop_nested_class.
4786 (cp_finish_decl): Pass no arguments to popclass.
4787 (grokdeclarator): Pass no arguments to pop_nested_class.
4788 (finish_function): Likewise.
4789 * decl2.c (grokfield): Likewise.
4790 (pop_scope): Pass no arguments to popclass.
4791 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4792 * pt.c (instantiate_class_template): Move call to pushclass, and
4793 document. Pass no arguments to popclass.
4794 (regenerate_decl_from_template): Likewise.
4796 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
4798 * typeck.c (build_unary_op): Handle taking the address of a unique
4799 bound non-static member function.
4801 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
4803 * lang-options.h (-Wdeprecated): New flag.
4804 * decl2.c (warn_deprecated): New flag.
4805 (lang_decode_option): Deprecated this-is-variable,
4806 external-templates, alt-external-templates.
4807 Support -Wdeprecated.
4808 * errfn.c (cp_deprecated): New function.
4810 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
4812 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4813 of the decls themselves.
4815 * pt.c (tsubst_function_type): Copy attributes over.
4817 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
4819 * cp-tree.h: Add prototype.
4820 * decl.c (init_decl_processing): Set valid_lang_attribute.
4822 1999-04-13 Mark Mitchell <mark@codesourcery.com>
4824 * class.c (finish_struct_1): Look at the const-ness of the field's
4825 type, not the TREE_READONLY-ness of the declaration.
4826 * method.c (synthesize_method): Likewise.
4827 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4828 creating new declarations.
4830 1999-04-13 Mike Stump <mrs@wrs.com>
4832 * decl2.c (import_export_decl): Because vtables always reference
4833 virtual functions, even if they are inlined, don't allow
4834 -fno-implement-inlines to not emit them, instead, emit them with
4836 * decl.c (start_function): Likewise.
4838 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
4840 * cp-tree.h (struct lang_type): Add com_interface.
4841 (CLASSTYPE_COM_INTERFACE): New macro.
4842 * class.c (set_rtti_entry): COM interface classes have no RTTI
4843 entries in their vtables; adjust.
4844 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4845 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4846 finish_struct_1): Likewise.
4847 * decl2.c (mark_vtable_entries): Likewise.
4848 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4849 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4850 expand_upcast_fixups): Likewise.
4851 * tree.c (debug_binfo): Likewise.
4853 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4854 * typeck.c (comptypes): If we get it, ignore attributes.
4855 * class.c (instantiate_type): Use BASELINK_P. Change complain
4856 parameter to flags; 2 means ignore attributes.
4857 * call.c (build_op_delete_call): Pass it.
4859 * decl.c (xref_tag): Only complain once about using a typedef-name
4860 with 'struct'. Downgrade to pedwarn.
4862 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4864 * parse.y (absdcl_intern): New nonterminal.
4865 (absdcl, direct_abstract_declarator): Use it.
4867 * pt.c (lookup_template_class): Look through implict typename.
4869 1999-04-11 Mark Mitchell <mark@codesourcery.com>
4871 * friend.c (add_friend): Deal gracefully with error_mark_node.
4872 * method.c (build_overload_value): Handle pointers-to-members as
4873 template parameters.
4875 * decl.c (push_binding): Fix typo in comment.
4877 1999-04-10 Mark Mitchell <mark@codesourcery.com>
4879 * error.c (dump_type_real): If a typename is a template-id, put
4880 out the template arguments.
4881 (dump_expr): Handle TEMPLATE_ID_EXPR.
4882 * pt.c (lookup_template_class): Now that full arguments are
4883 available everywhere, remove code that tried to guess them.
4885 1999-04-09 Mark Mitchell <mark@codesourcery.com>
4887 * decl.c (make_typename_type): Complain if we don't find a type
4888 when trying to make a typename type for a non-template type.
4890 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
4892 * decl.c (start_decl): Pass attributes to grokdeclarator.
4893 (grokdeclarator): Handle attributes on constructor-syntax
4896 1999-04-08 Mark Mitchell <mark@codesourcery.com>
4898 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4901 * search.c (template_self_reference_p): Tweak.
4903 1999-04-07 Mark Mitchell <mark@codesourcery.com>
4905 * init.c (build_offset_ref): Don't build yet another weird data
4906 structure to describe overloaded functions.
4908 1999-04-06 Mark Mitchell <mark@codesourcery.com>
4910 * cp-tree.h (BASELINK_P): New macro.
4911 (SET_BASELINK_P): Likewise.
4912 * init.c (build_member_call): Remove needless assignment in if
4914 * search.c (lookup_field_r): Fix handling when we are looking
4915 specifically for a type; these are not hidden by functions and
4917 (lookup_member): Use SET_BASELINK_P.
4918 * tree.c (is_overloaded_fn): Use BASELINK_P.
4919 (really_overloaed_fn): Likewise.
4920 (get_first_fn): Likewise.
4922 1999-04-05 Mark Mitchell <mark@codesourcery.com>
4924 * decl.c (lookup_name_current_level): Tweak, and improve
4927 * class.c (maybe_fixup_vptrs): Remove declaration.
4928 (build_class_init_list): Likewise.
4929 * decl.c (pushdecl_class_level): Call check_template_shadow here
4931 (push_class_level_binding): ... not here.
4932 * search.c (dfs_push_type_decls): Only avoid
4933 template-self-reference TYPE_DECLs if they are from base classes.
4935 1999-04-04 Mark Mitchell <mark@codesourcery.com>
4937 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4940 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
4942 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4943 (finish_struct_1): Don't call build_class_init_list.
4945 1999-04-02 Mark Mitchell <mark@codesourcery.com>
4947 * tinfo.h (__class_type_info): Fix illegal declaration.
4949 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4950 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4951 (IDENTIFIER_CLASS_VALUE): Improve documentation.
4952 (is_properly_derived_from): Declare.
4953 (invalidate_class_lookup_cache): Likewise.
4954 (maybe_maybe_note_name_used_in_class): Likewise.
4955 (note_name_declared_in_class): Likewise.
4956 (push_using_decl): Remove duplicate declaration.
4957 (id_in_current_class): Remove declaration.
4958 (push_class_binding): Change prototype.
4959 (clear_identitifer_class_values): Declare.
4960 * call.c (is_properly_derived_from): Make it global.
4961 (build_new_function_call): Be careful about updating candidates.
4962 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
4963 asked to make illegal calls.
4964 * class.c: Include splay-tree.h.
4965 (class_stack_node): Add names_used slot.
4966 (check_member_decl_is_same_in_complete_scope): Remove.
4967 (add_method): Fix comment. Push the declaration into class
4969 (finish_struct_1): When popping the class, pop the bindings too.
4970 Remove check for data member/function member conflict.
4971 (finish_struct): Remove calls to
4972 check_member_decl_is_same_in_complete_scope. Change calls to
4974 (pushclass): Clear names_used in the class stack entry.
4975 Use invalidate_class_lookup_cache to remove cached entries, rather
4976 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
4977 before entering a new class. Remove dead code. Don't mess with
4978 current_function_decl when pushing declarations.
4979 (invalidate_class_lookup_cache): New function, split out from ...
4980 (popclass): Here. Clean up names_used on our way out.
4981 (instantiate_type): Adjust.
4982 (build_self_reference): Don't push the declaration here.
4983 (maybe_note_name_used_in_class): New function.
4984 (note_name_declared_in_class): Likewise.
4985 * decl.c (add_binding): Change prototype.
4986 (find_class_binding_level): New function.
4987 (innermost_nonclass_level): Likewise.
4988 (current_binding_level): Update documentation.
4989 (inner_binding_level): Remove. Replace with current_binding_level
4991 (push_binding_level): Remove special handling of
4992 class_binding_level.
4993 (pop_binding_level): Likewise. Use find_class_binding_level.
4994 (suspend_binding_level): Likewise.
4995 (global_bindings_p): Use innermost_nonclass_level.
4996 (toplevel_bindings_p): Likewise.
4997 (namespace_bindings_p): Likewise.
4998 (pseudo_global_level_p): Likewise.
4999 (push_binding): Clear INHERITED_VALUE_BINDING_P.
5000 (add_binding): Check for illegal multiple declarations. Return a
5001 value indicating whether or not the new binding was legal.
5002 (push_local_binding): Skip over class binding levels. Check
5003 return value from add_binding.
5004 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
5005 note_name_declared_in_class.
5006 (pushlevel_class): Remove "fake out the rest of the compiler"
5008 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5009 (clear_identifier_class_values): New function.
5010 (pop_from_top_level): Use it.
5011 (pop_everything): Tweak.
5012 (maybe_process_template_type_declaration): Don't push the
5013 declaration for the template here.
5014 (pushtag): Don't push tag declarations into class scope here.
5015 (pushdecl): Apply DeMorgan's law for readability.
5016 (pushdecl_class_level): Remove special-case code for
5017 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
5018 (push_class_level_bindng): Deal with inherited bindings.
5019 (lookup_name_real): Remove special-case code for
5020 TYPE_BEING_DEFINED, and some implicit typename magic.
5021 (grokdeclarator): Handle COMPONENT_REF for a template function.
5022 (build_enumerator): Don't call pushdecl_class_level here.
5023 (id_in_current_class): Remove.
5024 * decl2.c (grokfield): Don't call pushdecl_class_level or
5025 check_template_shadow.
5026 * errfn.c (cp_file_of): Don't declare.
5027 (cp_line_of): Likewise.
5028 * error.c (dump_decl): Handle an OVERLOAD.
5029 (cp_file_of): Likewise.
5030 (cp_line_of): Likewise.
5031 * init.c (build_member_call): Handle a COMPONENT_REF.
5032 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5033 pushdecl_class_level.
5034 * method.c (hack_identifier): Build COMPONENT_REFs for references
5035 to member templates as well as member functions. Remove dead
5037 * parse.y (left_curly): Remove.
5038 (nonnested_type): Call maybe_note_name_used_in_class, not
5039 pushdecl_class_level.
5040 * parse.c: Regenerated.
5041 (nested_name_specifier_1): Likewise.
5042 * pt.c (check_explicit_specialization): Adjust, for robustness.
5043 (check_template_shadow): Handle OVERLOADs.
5044 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5045 TEMPLATE_DECL, if appropriate.
5046 * search.c (envelope_add_decl): Remove.
5047 (dfs_pushdecls): Likewise.
5048 (dfs_compress_decls): Likewise.
5049 (dfs_push_decls): New function.
5050 (dfs_push_type_decls): Likewise.
5051 (setup_class_bindings): Likewise.
5052 (template_self_reference_p): Likewise.
5053 (lookup_field_r): Use it.
5054 (looup_member): Remove old comment. Deal with ambiguity.
5055 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5056 and remove envelope processing.
5057 * semantics.c (begin_class_definition): Let pushclass push
5058 declarations for base classes.
5059 (finish_member_declaration): Push declarations into class scope.
5060 * typeck.c (build_component_ref): Just put an OVERLOAD into the
5061 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5062 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
5063 * Makefile.in (class.o): Depend on splay-tree.h.
5065 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
5067 * cvt.c (convert_pointer_to_real): Use same_type_p.
5068 * typeck.c (comp_target_types): Use same_type_p.
5070 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
5072 * semantics.c (begin_inline_definitions,
5073 finish_inline_definitions): Rename from finish_default_args and
5074 begin_inline_definitions, respectively, to something that isn't a
5076 * parse.y (structsp): Adjust.
5078 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5079 (list_hash_lookup): Likewise.
5080 (hash_tree_chain): Adjust.
5081 * pt.c (tsubst): Adjust.
5082 (tsubst_arg_types): Use plain hash_tree_cons.
5083 * cp-tree.h (hash_tree_cons_simple): Lose.
5084 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5086 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5088 * Makefile.in (hash.h): Generate using gperf language 'C', not
5089 'KR-C', so gperf uses the `const' keyword on strings.
5091 * gxx.gperf (resword): Const-ify a char*.
5093 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
5095 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5096 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5097 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5098 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5099 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5100 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5103 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
5105 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5107 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
5109 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5111 1999-03-27 Mark Mitchell <mark@codesourcery.com>
5113 * cp-tree.h (add_friend): Declare.
5114 (add_friends): Likewise.
5115 * friend.c (add_friend): Make it global. Don't add to
5116 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5117 (add_friends): Make it global.
5118 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5119 befriending class is a template.
5120 * parse.y (component_decl_1): Fix typo in comment.
5121 * parse.c: Regenerated.
5122 * pt.c (instantiate_class_template): Use add_friend and
5123 add_friends rather that duplicating some of their functionality
5126 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
5128 * call.c (build_field_call): Unify 'this' and non-'this' cases.
5130 * typeck.c (build_indirect_ref): Check for 'this' sooner.
5132 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5134 * call.c (op_error): Const-ify a char*.
5135 (add_candidate, source_type, add_warning): Add static prototype.
5136 (print_z_candidates): Const-ify a char*.
5138 * class.c (resolve_address_of_overloaded_function,
5139 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5140 (get_vtable_name, finish_struct_1): Const-ify a char*.
5142 * cvt.c (convert_to_reference): Likewise.
5144 * decl.c (redeclaration_error_message, record_builtin_type,
5145 record_unknown_type, member_function_or_else, bad_specifiers):
5147 (find_binding, select_decl, unqualified_namespace_lookup,
5148 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5149 Add static prototype.
5150 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5151 implicitly_declare, record_builtin_java_type, define_function,
5152 grok_op_properties, tag_name): Const-ify a char*.
5154 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5155 (define_function, finish_builtin_type): Const-ify a char*.
5156 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5157 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5158 (file_name_nondirectory): Const-ify a char*.
5159 (init_filename_times): Don't prototype.
5160 (compiler_error): Prototype.
5161 (yyerror, init_repo): Const-ify a char*.
5162 (build_srcloc): Don't prototype.
5163 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5165 (warn_for_assignment): Don't prototype.
5166 (convert_for_initialization, readonly_error, check_for_new_type,
5167 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5170 * decl2.c (acceptable_java_type, output_vtable_inherit,
5171 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5172 merge_functions, decl_namespace, validate_nonmember_using_decl,
5173 do_nonmember_using_decl): Add static prototype.
5174 (lang_f_options): Const-ify a char*.
5175 (finish_builtin_type): Likewise.
5176 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5179 * errfn.c: Include cp-tree.h.
5180 (cp_thing): Add static prototype.
5181 (compiler_error): Don't protoptype.
5182 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5183 passing it to `cp_thing'.
5185 * error.c (interesting_scope_p): Add static prototype.
5187 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
5190 * init.c (compiler_error): Don't prototype.
5191 (member_init_ok_or_else): Const-ify a char*.
5192 (build_java_class_ref): Add static prototype.
5194 * lex.c (compiler_error): Don't prototype.
5195 (get_time_identifier, interface_strcmp, extend_token_buffer,
5196 handle_cp_pragma): Const-ify a char*.
5197 (is_global, init_filename_times): Add static prototype.
5198 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
5199 (compiler_error): Change from fixed args to variable args.
5200 (yyerror): Const-ify a char*.
5202 * parse.y (cond_stmt_keyword): Const-ify a char*.
5203 (parse_decl): Add static prototype.
5205 * pt.c (template_args_equal, print_template_context): Likewise.
5206 (print_candidates, check_default_tmpl_args): Const-ify a char*.
5207 (instantiate_class_template): Likewise.
5209 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
5211 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
5212 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
5214 * search.c (lookup_field_info, lookup_member): Likewise.
5215 (lookup_member): Cast the first argument of `bzero' to a PTR.
5217 * sig.c (compiler_error): Don't prototype.
5218 (build_signature_pointer_or_reference_nam): Const-ify a char*.
5219 (get_sigtable_name, build_member_function_pointer): Likewise.
5221 * tree.c (compiler_error): Don't prototype.
5222 (no_linkage_helper, build_srcloc): Add static prototype.
5223 (build_vbase_pointer_fields): Const-ify a char*.
5224 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
5226 * typeck.c (compiler_error): Don't prototype.
5227 (convert_for_assignment): Const-ify a char*.
5228 (comp_cv_target_types): Add static prototype.
5229 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
5230 build_component_addr, build_unary_op, convert_for_initialization):
5233 * typeck2.c (ack): Add static prototype and change from fixed args
5235 (readonly_error, check_for_new_type): Const-ify a char*.
5237 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
5238 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
5239 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
5240 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
5241 gen_assign, GNU_xref_member): Const-ify a char*.
5243 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
5245 * gxxint.texi: Remove old discussion on copying virtual bases.
5247 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
5249 * Make-lang.in: Remove all references to g++.o/g++.c.
5250 Link g++ from gcc.o.
5252 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
5254 * decl2.c (comdat_linkage): Treat vtables like functions.
5256 1999-03-25 Mark Mitchell <mark@codesourcery.com>
5258 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
5260 1999-03-25 Nathan Sidwell <nathan@acm.org>
5262 * decl.c (init_decl_processing): Add `signed' type as a synonym
5265 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
5267 * typeck.c (common_type): Handle cv-qual unification for pointers
5270 * decl.c (unqualified_namespace_lookup): Return error_mark_node
5272 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
5273 * lex.c (do_identifier): If we got error_mark_node, call
5276 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5278 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
5281 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
5283 * decl.c (lookup_name_real): Do nested field lookup regardless of
5286 1999-03-24 Mark Mitchell <mark@codesourcery.com>
5288 * cp-tree.h (lang_type): Remove has_assignment and
5289 has_real_assignment. Add befriending_classes.
5290 (TYPE_HAS_ASSIGNMENT): Remove.
5291 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
5292 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
5293 (lang_decl): Document.
5294 (DECL_BEFRIENDING_CLASSES): New macro.
5295 (FRIEND_NAME): Move declaration to more obvious location.
5296 (FRIEND_DECLS): Likewise.
5297 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
5298 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
5299 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
5300 (grok_op_properties): Likewise.
5301 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
5302 (add_friend): Likewise. Don't do weird things with assignment
5303 operators. Update DECL_BEFRIENDING_CLASSES.
5304 (add_friends): Don't do weird things with assignment operators.
5305 (make_friend_class): Likewise. Update
5306 CLASSTYPE_BEFRIENDING_CLASSES.
5307 * pt.c (instantiate_class_template): Don't set
5308 TYPE_HAS_ASSIGNMENT.
5309 (tsubst_copy): Substitute the TREE_TYPE for more unary
5311 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
5312 * search.c (protected_accessible_p): New function.
5313 (friend_accessible_p): Likewise.
5314 (accessible_p): Use them.
5316 1999-03-23 Mark Mitchell <mark@codesourcery.com>
5318 * pt.c (convert_nontype_argument): Don't create things that aren't
5319 PTRMEM_CSTs when applying a qualification conversion to a
5322 1999-03-23 Mark Mitchell <mark@codesourcery.com>
5324 * Makefile.in (OBJS): Don't mention hash.o.
5325 (OBJDEPS): Likewise.
5327 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
5329 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
5330 * decl.c (expand_static_init): Make sure we don't add any after
5333 * decl.c (cp_finish_decl): Move intelligence about handling
5334 DECL_COMDAT for variables from here...
5335 * decl2.c (comdat_linkage): ...to here.
5336 (maybe_make_one_only): Tweak.
5337 (import_export_decl): Call comdat_linkage for variables, too.
5338 (finish_file): Handle template statics properly.
5340 1999-03-22 Mark Mitchell <mark@codesourcery.com>
5342 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
5343 Document internals of pointer-to-member-functions.
5344 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
5345 (PFN_FROM_PTRMEMFUNC): Likewise.
5346 (build_type_conversion): Remove unused parameter.
5347 (build_ptrmemfunc1): Declare.
5348 (expand_ptrmemfunc_cst): New function.
5349 (delta2_from_ptrmemfunc): Likewise.
5350 (pfn_from_ptrmemfunc): Likewise.
5351 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
5352 build_type_conversion. Use TYPE_PTRMEM_P for readability.
5353 (convert_to_reference): Remove unused parameter to
5354 build_type_conversion.
5355 (ocp_convert): Likewise.
5356 (build_user_type_conversion): Likewise.
5357 * error.c (dump_expr): Handle NULL pointer-to-member functions.
5358 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
5359 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
5360 open when handling pointer-to-member functions.
5361 * pt.c (convert_nontype_argument): Clean up error messages. Be
5362 more stringent with pointers-to-members.
5363 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
5364 (build_unary_op): Tidy ever-so-slightly.
5365 (build_conditional_expr): Remove extra parameter to
5366 build_type_conversion.
5367 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
5369 (expand_ptrmemfunc_cst): Define.
5370 (delta2_from_ptrmemfunc): Likewise.
5371 (pfn_from_ptrmemfunc): Likewise.
5373 1999-03-19 Mark Mitchell <mark@codesourcery.com>
5375 * init.c (build_member_call): Handle template-id expressions
5377 * typeck.c (build_x_function_call): Likewise.
5379 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
5381 * friend.c (make_friend_class): Avoid core dump when
5382 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
5384 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
5386 * decl.c (start_function): Suppress normal linkage heuristics
5387 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
5389 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
5391 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
5392 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
5394 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
5396 * parse.y (named_complex_class_head_sans_basetype):
5397 Do not push a scope for error_mark_node.
5398 (maybe_base_class_list): Likewise.
5400 * decl.c (start_decl): Check for error_mark_node as a type.
5401 Detected by g++.brendan/array-refs.C.
5402 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
5403 (maybe_build_cleanup_1): Likewise. Detected by
5404 g++.jason/incomplete1.C.
5406 * tree.c (build_dummy_object): Use void_zero_node instead of the
5408 (is_dummy_object): Check for such a node.
5409 Detected by g++.bob/inherit1.C
5411 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
5413 * method.c (old_backref_index): Split out...
5414 (flush_repeats): From here. Rename back from try_old_backref.
5415 (build_mangled_name): Put back some old-style repeat handling.
5417 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5419 * lex.c: Don't include setjmp.h.
5420 (parse_float): New static function.
5421 (pf_args): New struct.
5422 (real_yylex): Use them in call to `do_float_handler'.
5424 1999-03-15 Mark Mitchell <mark@markmitchell.com>
5426 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
5427 * tree.c (layout_basetypes): Not here.
5428 * search.c (dfs_search): Remove; no longer used.
5430 1999-03-12 Mark Mitchell <mark@markmitchell.com>
5432 * decl2.c (validate_nonmember_using_decl): Issue sensible
5433 error-messages on bogus qualifiers.
5435 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
5437 * call.c (add_function_candidate): Fix uninitialized variable.
5439 * Makefile.in (search.o): Add dependency on varray.h.
5441 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
5443 * decl.c (duplicate_decls): Use same_type_p.
5444 * method.c (try_old_backref): Renamed from flush_repeats. Use
5445 same_type_p. Don't try to handle repeats. Return success.
5446 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
5447 calls from old-style code, too.
5448 (check_ktype): Use same_type_p.
5449 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
5450 (build_qualified_name): Simplify logic.
5451 (process_overload_item): Strip typedefs and quals at the top.
5452 (build_mangled_name_for_type_with_Gcode): Remove call to
5453 type_canonical_variant.
5454 (build_mangled_name): Likewise. Remove support for old-style
5455 repeats, which have been disabled since 2.7.2. Don't mess with
5457 (build_decl_overload_real): Don't mess with TREE_USED.
5459 1999-03-13 Nathan Sidwell <nathan@acm.org>
5461 * error.c (cp_printers): Add 'F' escape character.
5462 (dump_type_real): Remove TREE_LIST (fnargs) printing.
5463 Functionality moved to dump_parameters.
5464 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
5465 (dump_function_decl): Extend meaning of V parameter. Use
5466 dump_parameters and dump_exception_spec.
5467 (dump_parameters): New static function.
5468 (dump_exception_spec): New static function.
5469 (fndecl_as_string): Change argument semantics. Use
5470 dump_function_decl directly.
5472 * sig.c (build_signature_table_constructor): Use cp_error.
5474 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
5476 * semantics.c (finish_switch_cond): Handle error cases gracefully.
5477 Detected by g++.law/enum5.C.
5479 * typeck.c (build_modify_expr): Check for errors after resolving
5480 offsets. Detected by g++.brendan/static1.C.
5482 * decl.c (complete_array_type): Ignore initial_value if it is an
5483 error. Detected by g++.benjamin/17930.C.
5485 * typeck2.c (process_init_constructor): Return error if one argument
5486 is in error. Detected by g++.benjamin/13478.C.
5488 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
5490 * decl.c (select_decl): Allow class templates when we need types.
5491 * decl2.c (ambiguous_decl): Likewise.
5493 1999-03-12 Mark Mitchell <mark@markmitchell.com>
5495 * lex.c (do_identifier): Correct call to enforce_access.
5496 * search.c (accessible_p): Tweak comment.
5498 1999-03-10 Mark Mitchell <mark@markmitchell.com>
5500 * semantics.c (begin_class_definition): Call build_self_reference.
5501 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
5503 * search.c (assert_canonical_unmarked): Fix typo in prototype.
5505 * search.c (dfs_canonical_queue): New function.
5506 (dfs_assert_unmarked_p): Likewise.
5507 (assert_canonical_unmarked): Likewise.
5508 (access_in_type): Use it.
5509 (accessible_p): Likewise. Walk the whole tree when umarking.
5511 * sig.c (build_signature_table_constructor): Use accessible_p
5512 instead of compute_access.
5514 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
5516 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
5518 1999-03-09 Mark Mitchell <mark@markmitchell.com>
5520 * cp-tree.h (flag_access_control): Declare.
5521 (TREE_VIA_PPUBLIC): Document.
5522 (DECL_NONSTATIC_MEMBER_P): New macro.
5523 (enforce_access): Return an indication of whether or not access
5525 (build_self_reference): Change prototype.
5526 (compute_access): Replace with ...
5527 (accessible_p): New function.
5528 (dfs_walk): Change prototype.
5529 (dfs_unmark): Likewise.
5530 (markedp): Likewise.
5531 * call.c (enforce_access): Use accessible_p.
5532 * class.c (build_self_reference): Insert the declaration into the
5533 list of members for this type, and make it public.
5534 * decl.c (xref_basetypes): Avoid ill-timed recursion.
5535 * init.c (build_offset_ref): Use lookup_member, not three separate
5536 name-lookups. Call enforce_access rather than checking for
5537 illegal accesses here.
5538 (resolve_offset_ref): Likewise.
5539 * lex.c (do_identifier): Likewise.
5540 * method.c (hack_identifier): Likewise.
5541 * parse.y (self_reference): Remove.
5542 (opt_component_decl_list): Don't use it.
5543 * parse.c: Regenerated.
5544 * pt.c (print_candidates): Generalize to handle lists of
5545 overloaded functions.
5546 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
5548 (get_template_base): Use new calling convention for dfs_walk.
5549 * search.c: Include varray.h. Add prototypes.
5550 (dfs_walk): Accept a data pointer to pass to the work functions.
5551 All callers changed. All work functions changed.
5552 (breadth_first_search): Rename to bfs_walk, and make consistent
5554 (dfs_walk_real): New function.
5555 (canonical_binfo): New function.
5556 (context_for_name_lookup): Likewise.
5557 (shared_marked_p): Likewise.
5558 (shared_unmarked_p): Likewise.
5559 (lokup_field_queue_p): Likewise.
5560 (lookup_field_r): Generalize to handle both functions and fields.
5561 (lookup_field): Just call lookup_member.
5562 (lookup_fnfields): Likewise.
5563 (lookup_member): Move body of lookup_field here and generalize.
5564 (dfs_accessible_queue_p): Likewise.
5565 (dfs_accessible_p): Likewise.
5566 (dfs_access_in_type): Likewise.
5567 (access_in_type): Likewise.
5568 (compute_access): Remove, and replace with ...
5569 (accessible_p): New function.
5570 (vbase_types): Remove.
5571 (vbase_decl_ptr_intermediate): Likewise.
5572 (vbase_decl_ptr): Likewise.
5573 (vbase_init_result): Likewise.
5574 (closed_envelopes): Likewise.
5575 (bvtable): Likewise.
5577 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
5579 * call.c (add_function_candidate): Check for proper number of args
5580 before checking the validity of those args.
5582 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
5584 * cp-tree.h (struct lang_type): Add anon_union field.
5585 (ANON_UNION_TYPE_P): Use it instead of examining type.
5586 (SET_ANON_UNION_TYPE_P): New macro.
5587 * decl.c (check_tag_decl): Use it.
5589 * search.c (compute_access): Handle non-type contexts earlier, and
5592 * tree.c (build_exception_variant): Use copy_to_permanent.
5594 * decl2.c (setup_initp): Give statics with no priority the default
5596 (do_dtors, do_ctors, finish_file): Remove special handling of
5597 non-prioritized statics.
5599 1999-03-05 Mark Mitchell <mark@markmitchell.com>
5601 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
5602 * decl.c (make_typename_type): Don't issue an error if an
5603 immediate lookup fails; it migt be resolved later.
5604 * friend.c (is_friend): Add comment.
5605 * search.c (breadth_first_search): Add POSTFN and DATA
5606 parameters. Tidy. All callers changed.
5607 (lookup_field_queue_p): New function.
5608 (lookup_field_r): Likewise.
5609 (lookup_field_post): Likewise.
5610 (lookup_field): Use them, via breadth_first_search, instead of
5612 (compute_access): Robustify.
5613 (lookup_fnfield_info): New structure.
5615 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
5617 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
5619 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
5621 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
5624 * decl2.c (import_export_class): Also return if
5625 CLASSTYPE_INTERFACE_ONLY is set.
5627 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
5629 * decl.c (push_overloaded_decl): Only overwrite the old binding if
5631 * decl2.c (do_local_using_decl): Fix loop termination.
5633 1999-03-02 Mark Mitchell <mark@markmitchell.com>
5635 * cp-tree.h (determine_specialization): Don't declare.
5636 * pt.c (determine_specialization): Make it static. Eliminate
5637 complain parameter. Note that decl is always non-NULL now, and
5638 simplify accordingly.
5640 * decl.c (maybe_push_to_top_level): Always call
5641 push_cp_function_context.
5642 (pop_from_top_level): Always call pop_cp_function_context.
5644 1999-02-26 Nathan Sidwell <nathan@acm.org>
5646 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
5648 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
5649 * init.c (build_new_1): Extra arg to complete_type_or_else.
5650 (build_delete): Likewise.
5651 * typeck.c (require_complete_type): Likewise.
5652 (pointer_int_sum): Likewise.
5653 (pointer_diff): Likewise.
5654 (build_component_ref): Likewise.
5656 * typeck2.c (incomplete_type_error): Always use cp_error.
5657 Show declaration of undefined type, if appropriate.
5658 Deal with UNKNOWN_TYPE nodes.
5660 * typeck.c (require_complete_type): Use TYPE_SIZE as
5661 size_zero_node to mean incomplete type.
5662 (require_complete_type_in_void): New function.
5663 (build_compound_expr): Call complete_type_in_void for LHS.
5664 (build_c_cast): Call complete_type_in_void for void cast.
5665 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
5666 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
5667 require_complete_type_in_void. Call it.
5668 * cp-tree.h (require_complete_type_in_void): Prototype new function.
5670 * typeck.c (convert_arguments): Use alternative format for
5671 function decls. Don't require_complete_type here. Simplify
5672 diagnostic printing.
5673 (convert_for_initialization): Don't require_complete_type on RHS yet.
5674 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
5676 * call.c (build_over_call): Cope with qualified void return type.
5677 * semantics.c (finish_call_expr): Likewise.
5678 * typeck.c (build_function_call_real): Likewise.
5679 (c_expand_return): Likewise.
5680 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
5682 * call.c (print_z_candidates): Use alternate print format, to be
5683 consistent with (pt.c) print_candidates.
5684 * method.c (hack_identifier): List candidate members.
5685 * search.c (lookup_field): Build ambiguous list, and show it, if
5688 1999-02-26 Mark Mitchell <mark@markmitchell.com>
5690 * typeck.c (decay_conversion): Don't confuse constant array
5691 variables with their initializers.
5693 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
5695 * pt.c (regenerate_decl_from_template): Tweak for clarity.
5696 (instantiate_decl): Mark a decl instantiated before regenerating
5697 it to avoid recursion.
5698 * tree.c (mapcar): Don't call decl_constant_value unless we know
5699 something is TREE_READONLY_DECL_P.
5701 * class.c (check_for_override): Don't stop checking when we find
5702 the first overridden function. Delete #if 0'd code.
5703 * search.c (get_matching_virtual): Likewise.
5705 1999-02-25 Richard Henderson <rth@cygnus.com>
5707 * lang-specs.h: Define __FAST_MATH__ when appropriate.
5709 1999-02-24 Mike Stump <mrs@wrs.com>
5711 * typeck.c (convert_for_assignment): Allow boolean integral constant
5712 expressions to convert to null pointer.
5714 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
5716 * decl.c (lookup_namespace_name): Resolve namespace aliases.
5718 * class.c (push_nested_class): Allow namespaces.
5720 * decl2.c (set_decl_namespace): Add friendp parameter.
5721 * decl.c (grokfndecl): Pass it.
5722 (grokvardecl): Likewise.
5723 * cp-tree.h: Change declaration.
5725 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
5727 * pt.c (tsubst): Allow an array of explicit size zero.
5729 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
5731 * errfn.c: Change varargs code to look like toplev.c.
5733 * method.c (process_modifiers): Don't prepend 'U' for char or
5736 1999-02-20 Craig Burley <craig@jcb-sc.com>
5738 * Make-lang.in (cplib2.ready): Don't consider updating
5739 cplib2 stuff if the current directory isn't writable, as
5740 it won't work (such as during a `make install').
5742 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
5744 * decl2.c (start_objects): Make file scope constructors and
5745 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
5746 ASM_OUTPUT_DESTRUCTOR are defined.
5748 1999-02-19 Mark Mitchell <mark@markmitchell.com>
5750 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
5751 (fn_type_unification): Adjust prototype.
5752 (lookup_fnfields_1): Declare.
5753 * call.c (add_template_candidate_real): Adjust call to
5754 fn_type_unification.
5755 * class.c (add_method): Don't allow duplicate declarations of
5756 constructors or destructors.
5757 (resolve_address_of_overloaded_function): Remove unused variable.
5758 Adjust call to fn_type_unification.
5759 * decl.c (grokfndecl): Be more robust in the face of illegal
5761 * decl2.c (check_classfn): Remove hokey handling of member
5763 * pt.c (determine_specialization): Improve comments. Adjust to
5764 handle template argument deduction as per the standard.
5765 (check_explicit_specialization): Fix comment spacing. Handle
5766 type-conversion operators correctly. Improve error-recovery.
5767 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
5768 (get_bindings_real): Simplify handling of static members.
5769 * search.c (lookup_fnfields_1): Make it have external linkage.
5770 * typeck.c (compparms): Fix comment.
5771 (build_unary_op): Don't try to figure out which template
5772 specialization is being referred to when when the address-of
5773 operator is used with a template function.
5775 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5777 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
5778 keyword to match an analogous change at the top level.
5780 * tree.c (lvalue_or_else): Likewise.
5782 1999-02-17 Mark Mitchell <mark@markmitchell.com>
5784 * decl.c (xref_basetypes): Comment.
5785 * pt.c (instantiate_class_template): Use xref_basetypes.
5787 1999-02-16 Mark Mitchell <mark@markmitchell.com>
5789 * cp-tree.h (tsubst): Change prototype.
5790 (tsubst_expr): Likewise.
5791 (tsubst_copy): Likewise.
5792 (type_unification): Remove prototype.
5793 * call.c (convert_default_arg): Adjust call to tsubst_expr.
5794 * class.c (resolve_address_of_overloaded_function): Just use
5795 fn_type_unification.
5796 * decl.c (grokdeclarator): Adjust call to tsubst.
5797 * method.c (build_template_parm_names): Likewise.
5798 * pt.c (GTB_VIA_VIRTUAL): New macro.
5799 (GTB_IGNORE_TYPE): Likewise.
5800 (resolve_overloaded_unification): Add `complain' parameter.
5801 (try_one_overload): Likewise.
5802 (tsubst_template_arg_vector): Likewise.
5803 (tsubst_template_parms): Likewise.
5804 (tsubst_aggr_type): Likewise.
5805 (tsubst_arg_types): Likewise.
5806 (tsubst_call_declarator_parms): Likewise.
5807 (unify): Remove explicit_mask.
5808 (type_unification_real): Likewise.
5809 (get_template_base_recursive): Likewise.
5810 (coerce_template_template_parms): Provide prototype.
5811 (tsubst_function_type): Likewise.
5812 (try_class_unification): New function.
5813 All callers changed to use new complain parameter.
5814 (get_template_base): Use try_class_unification.
5815 (unify): Adjust handling of classes derived from template types.
5816 (fn_type_unification): Substitute explicit arguments before
5819 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5821 * decl.c (pushdecl): Remove dead code.
5823 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
5825 * decl2.c (finish_objects): Fix code I missed in previous change.
5827 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
5829 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5830 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5832 * pt.c (maybe_process_partial_specialization): Complain about
5833 'template <>' on non-specialization.
5835 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
5837 * decl.c (grokdeclarator): Catch wierd declarators.
5838 * decl2.c (finish_file): Don't abort because of namespace parsing
5840 (check_decl_namespace): Remove.
5842 1999-02-09 Mark Mitchell <mark@markmitchell.com>
5844 * cp-tree.h (get_template_base): Don't declare.
5845 (dfs_walk): Declare.
5846 (dfs_unmark): Likewise.
5847 (markedp): Likewise.
5848 * pt.c (unify): Remove duplicate declaration. Pass tparms and
5849 targs to get_template_base.
5850 (get_template_base_recursive): Move here from search.c. Check to
5851 see that the base found can be instantiated to form the desired
5853 (get_template_base): Likewise.
5854 (get_class_bindings): Simplify.
5855 * search.c (get_template_base_recursive): Move to pt.c.
5856 (get_template_base): Likewise.
5857 (markedp): Make it global.
5858 (dfs_walk): Likewise.
5859 (dfs_unmark): Likewise.
5861 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
5863 * pt.c (maybe_process_partial_specialization): Complain about
5864 specialization in wrong namespace.
5865 * tree.c (decl_namespace_context): New fn.
5867 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5869 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5870 * pt.c (coerce_template_template_parms): Handle nested
5871 template template parameters.
5873 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
5875 * typeck2.c: Update email addresses.
5877 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5879 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5882 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
5884 * lex.c (retrofit_lang_decl): Split out...
5885 (build_lang_decl): From here.
5886 * decl.c (pushdecl): Call it for functions generated by the middle
5887 end that don't have DECL_LANG_SPECIFIC.
5888 * cp-tree.h: Declare it.
5890 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
5891 (start_objects, finish_objects): Only use special
5892 init_priority code if the user specified a priority.
5893 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5896 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
5898 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5899 mkstemp.o. Get them from libiberty now.
5900 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5902 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5904 * decl2.c (lang_decode_option): Use read_integral_parameter.
5906 1999-02-01 Mark Mitchell <mark@markmitchell.com>
5908 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5909 before calling complete_type_or_else.
5911 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5913 * input.c (inline): Don't define, its handled by system.h.
5915 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
5917 * decl2.c: Don't define flag_no_ident here. Don't process
5919 * cp-tree.h: Don't declare flag_no_ident here.
5920 * lang-specs.h: Map -Qn to -fno-ident.
5922 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
5924 * cp-tree.h (struct tree_binding): Replace scope field with a union.
5925 (BINDING_SCOPE): Adjust.
5926 * decl.c (BINDING_LEVEL): Adjust.
5928 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
5930 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5933 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5936 * tree.c (equal_functions): Fix name in prototype.
5938 * decl.c (push_local_binding): Add FLAGS argument.
5939 (pushdecl, push_overloaded_decl): Pass it.
5940 * decl2.c (do_local_using_decl): Likewise.
5941 * cp-tree.h: Adjust prototype.
5942 * decl.c (poplevel): Fix logic.
5944 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5945 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
5946 (cat_namespace_levels): Don't loop forever.
5948 1999-01-25 Richard Henderson <rth@cygnus.com>
5950 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5952 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
5954 * class.c (resolve_address_of_overloaded_function): Mark the
5955 chosen function used.
5957 * call.c (build_call): Make sure that a function coming in has
5958 been marked used already.
5959 * decl.c (expand_static_init): Call mark_used instead of
5961 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5962 alloc_eh_object, expand_throw): Likewise.
5963 * init.c (build_builtin_delete_call): Likewise.
5964 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5965 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5966 expand_generic_desc): Likewise.
5968 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
5970 * tree.c (equal_functions): New function.
5971 (ovl_member): Call it.
5973 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
5975 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5977 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
5979 * decl.c (decls_match): Return 1 if old and new are identical.
5980 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5982 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
5984 * decl.c (start_function): Make member functions one_only on windows.
5985 * decl2.c (import_export_decl): Likewise.
5987 * decl.c (grokdeclarator): Don't complain about implicit int in
5988 a system header. Change same-name field check to not complain in
5989 a system header instead of within extern "C".
5991 1999-01-21 Mark Mitchell <mark@markmitchell.com>
5993 * cp-tree.h (PUSH_GLOBAL): New macro.
5994 (PUSH_LOCAL): Likewise.
5995 (PUSH_USING): Likewise.
5996 (namespace_bindings_p): Declare.
5997 (push_overloaded_decl): Likewise.
5998 * decl.c (push_overloaded_decl): Don't make it static. Check for
5999 illegal declarations after using declarations here.
6000 (namespace_bindings_p): Likewise.
6001 (duplicate_decls): Don't consider declarations from different
6002 namespaces to be the same.
6003 (pushdecl): Use symbolic PUSH_ constants in calls to
6004 push_overloaded_decl.
6005 (push_overloaded_decl_1): Likewise.
6006 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6007 (do_nonmember_using_decl): Check for illegal using declarations
6008 after ordinary declarations here.
6009 (do_local_using_decl): Call pushdecl to insert declarations.
6011 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
6013 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6015 1999-01-21 Mark Mitchell <mark@markmitchell.com>
6017 * tree.c (build_cplus_array_type_1): Don't call build_array_type
6018 for types involving template parameters.
6020 * cp-tree.h (PARM_DECL_EXPR): Delete.
6021 (convert_default_arg): Change prototype.
6022 (check_default_argument): Declare.
6023 (search_tree): Likewise.
6024 * call.c (convert_default_arg): Take the function to which the
6025 default argument belongs as a parameter, and do any necessary
6026 instantiation here, instead of ...
6027 (build_over_call): Here.
6028 * decl.c (local_variable_p): New function.
6029 (check_default_argument): Likewise, split out and tidied from ...
6031 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6032 * pt.c (tsubst_call_declarator_parms): New function.
6033 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
6034 with CALL_EXPRs, rather than trying to be clever.
6035 (tsubst): Use tsubst_call_declarator_parms.
6036 * tree.c (search_tree): Don't make it static.
6037 * typeck.c (convert_arguments): Use new interface to
6038 convert_default_arg.
6040 1999-01-20 Mark Mitchell <mark@markmitchell.com>
6042 * error.c (dump_function_decl): Don't print the argument types for
6043 a function when the verbosity level is negative.
6045 * call.c (build_over_call): Check format attributes at call-time.
6047 * pt.c (tsubst_copy): Fix comment.
6048 (unify): Don't allow unification with variable-sized arrays.
6050 * semantics.c (finish_stmt_expr): When processing a template make
6051 the BIND_EXPR long-lived.
6053 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
6055 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6056 (import_export_vtable): Not here.
6058 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6060 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6061 non-static member function.
6063 1999-01-18 Nathan Sidwell <nathan@acm.org>
6065 * class.c (instantiate_type): Only diagnose illegal address of member
6066 function if complaining.
6068 * decl.c (lookup_name_real): Remove duplicate code.
6070 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6072 * tree.c (copy_template_template_parm): Use permanent_obstack.
6074 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6076 * pt.c (unify): Remove restrictions on deduction of argument
6077 of template template parameters.
6079 1999-01-18 Nathan Sidwell <nathan@acm.org>
6081 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6083 * class.c (resolve_address_of_overloaded_function): Show list of
6084 all candidates, when none of them match.
6086 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
6088 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6089 definition of 'casting away const' in reinterpret_cast<>.
6091 1999-01-18 Graham <grahams@rcp.co.uk>
6093 * cvt.c: Add include for decl.h, remove extern for
6094 static_aggregates which is now provided by decl.h.
6096 * Makefile.in (cvt.o): Add dependency for decl.h and missing
6097 dependencies for convert.h and flags.h.
6099 1999-01-18 Nathan Sidwell <nathan@acm.org>
6101 * decl2.c (do_dtors): Set current location to that of the
6102 decl, for sensible diagnostics and debugging.
6103 (check_classfn): Issue `incomplete type' error, if
6104 class is not defined.
6106 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6108 * cp-tree.h: Add prototype for bound_pmf_p.
6110 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6111 Manfred Hollstein <manfred@s-direktnet.de>
6113 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6116 1999-01-16 Nathan Sidwell <nathan@acm.org>
6118 * cp-tree.h (struct lang_type): Added has_mutable flag.
6119 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6120 (TYPE_HAS_MUTABLE_P): New macro to read it.
6121 (cp_has_mutable_p): Prototype for new function.
6122 * class.c (finish_struct_1): Set has_mutable from members.
6123 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6124 it contains a mutable.
6125 * typeck.c (cp_has_mutable_p): New function.
6127 1999-01-15 Mark Mitchell <mark@markmitchell.com>
6129 * pt.c (process_template_parm): Ignore top-level qualifiers on
6130 non-type parameters.
6132 * decl.c (start_function): Use current_function_parms in the call
6133 to require_complete_type_for_parms, not the probably empty
6136 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
6138 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6140 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6141 that we don't suppress the other copies.
6142 * lex.c (handle_cp_pragma): Likewise.
6144 1999-01-13 Mark Mitchell <mark@markmitchell.com>
6146 * decl.c (grokdeclarator): Undo 1998-12-14 change.
6147 * tree.c (build_cplus_array_type_1): Likewise.
6148 * pt.c (instantiate_class_template): Remove misleading comment.
6149 (tsubst_aggr_type): Substitute if there are template parameters,
6150 regardless of whether or not they use template arguments.
6151 (unify): Likewise, but for unification.
6153 1999-01-12 Richard Henderson <rth@cygnus.com>
6155 * cp-tree.h (flag_permissive): Declare extern.
6157 1999-01-06 Mark Mitchell <mark@markmitchell.com>
6159 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6161 (lang_type): Add is_partial_instantiation. Decrease width of
6163 (PARTIAL_INSTANTIATION_P): New macro.
6164 (OPERATOR_TYPENAME_P): Remove.
6165 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6166 OPERATOR_TYPENAME_P.
6167 (grok_op_properties): Likewise.
6168 * friend.c (do_friend): Handle friends that are member functions
6170 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6171 * pt.c (instantiate_class_template): Rework for clarity. Avoid
6172 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
6173 any more partial instantiation than is absolutely necessary for
6174 implicit typename. Set PARTIAL_INSTANTIATION_P.
6175 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6176 * semantics.c (begin_class_definition): Handle partial
6177 specializations of a type that was previously partially
6180 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
6182 * g++spec.c (LIBSTDCXX): Provide default definition.
6183 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
6185 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6187 * Make-lang.in (g++.o): Depend on prefix.h.
6189 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
6191 * tree.c (bound_pmf_p): New fn.
6192 * typeck.c (build_c_cast): Use it.
6194 * decl.c (grok_op_properties): Use same_type_p.
6196 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6198 * Makefile.in (cvt.o): Depend on toplev.h.
6200 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6202 * cvt.c: Include toplev.h.
6204 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
6207 * init.c (expand_vec_init): Initialize variable `itype'.
6209 * lex.c (yyerror): Cast the argument passed to a ctype function to
6212 * method.c (build_mangled_C9x_name): Wrap prototype and definition
6213 in "HOST_BITS_PER_WIDE_INT >= 64".
6215 * typeck.c (build_binary_op): Mark parameter `convert_p' with
6218 1998-12-22 Mark Mitchell <mark@markmitchell.com>
6220 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
6221 * tree.c (build_exception_variant): Don't crash on empty throw
6224 1998-12-18 DJ Delorie <dj@cygnus.com>
6226 * cvt.c (convert_to_reference): Check for both error_mark_node
6227 and NULL_NODE after call to convert_for_initialization.
6229 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
6231 * error.c (interesting_scope_p): New fn.
6232 (dump_simple_decl): Use it.
6233 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6234 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
6236 1998-12-16 Mark Mitchell <mark@markmitchell.com>
6238 * class.c (resolve_address_of_overloaded_function): Do conversion
6239 to correct type here, rather than ...
6240 (instantiate_type): Here.
6242 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
6243 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
6244 (decl_template_parm_p): Remove.
6245 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
6247 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
6248 * pt.c (push_inline_template_parms_recursive): Set it.
6249 (decl_template_parm_p): Remove.
6250 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
6251 (process_template_parm): Set it.
6253 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
6255 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
6256 if configured with cpplib.
6258 1998-12-15 Mark Mitchell <mark@markmitchell.com>
6260 * decl.c (poplevel): Make sure ns_binding is initialized.
6262 * decl.c (finish_function): Undo inadvertent change in previous
6265 1998-12-14 Mark Mitchell <mark@markmitchell.com>
6267 * class.c (pushclass): Tweak handling of class-level bindings.
6268 (resolve_address_of_overloaded_function): Update pointer-to-member
6270 (instantiate_type): Likewise.
6271 * cvt.c (cp_convert_to_pointer): Likewise.
6272 * decl.c (pop_binding): Take the DECL to pop, not just the name.
6273 Deal with `struct stat' hack.
6274 (binding_level): Add to documentation.
6275 (push_binding): Clear BINDING_TYPE.
6276 (add_binding): New function.
6277 (push_local_binding): Use it.
6278 (push_class_binding): Likewise.
6279 (poplevel): Adjust calls to pop_binding.
6280 (poplevel_class): Likewise.
6281 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
6282 declarations to current binding level.
6283 (push_class_level_binding): Likewise.
6284 (push_overloaded_decl): Adjust handling of OVERLOADs in local
6286 (lookup_namespace_name): Don't crash when confronted with a
6288 (lookup_name_real): Do `struct stat' hack in local binding
6290 (build_ptrmemfunc_type): Adjust documentation.
6291 (grokdeclarator): Don't avoid building real array types when
6292 processing templates unless really necessary.
6293 (finish_method): Adjust calls to pop_binding.
6294 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
6295 not reparse_decl_as_expr.
6296 (build_expr_from_tree): Deal with a template-id as the function to
6297 call in a METHOD_CALL_EXPR.
6298 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
6299 (maybe_adjust_types_For_deduction): Don't do peculiar things with
6301 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
6302 pointer-to-member types where necessary.
6303 * tree.c (build_cplus_array_type_1): Don't avoid building real
6304 array types when processing templates unless really necessary.
6305 (build_exception_variant): Compare the exception lists correctly.
6307 1998-12-13 Mark Mitchell <mark@markmitchell.com>
6309 * cp-tree.def (CPLUS_BINDING): Update documentation.
6310 * cp-tree.h (LOCAL_BINDING_P): New macro.
6311 (lang_identifier): Rename local_value to bindings.
6312 (tree_binding): Make `scope' of type `void*', not `tree'.
6313 (BINDING_SCOPE): Update documentation.
6314 (IDENTIFIER_LOCAL_VALUE): Remove.
6315 (IDENTIFIER_CLASS_VALUE): Document.
6316 (IDENTIFIER_BINDING): New macro.
6317 (IDENTIFIER_VALUE): Likewise.
6318 (TIME_IDENTIFIER_TIME): Likewise.
6319 (TIME_IDENTIFIER_FILEINFO): Likewise.
6320 (IMPLICIT_TYPENAME_P): Likewise.
6321 (set_identifier_local_value): Remove.
6322 (push_local_binding): New function.
6323 (push_class_binding): Likewise.
6324 * class.c (pushclass): Update comments; use push_class_binding.
6325 * decl.c (set_identifier_local_value_with_scope): Remove.
6326 (set_identifier_local_value): Likewise.
6327 (push_binding): New function.
6328 (pop_binding): Likewise.
6329 (binding_level): Update documentation. Remove shadowed.
6330 (BINDING_LEVEL): New macro.
6331 (free_binding_nodes): New variable.
6332 (poplevel): Adjust for new name-lookup scheme. Don't mess up
6333 BLOCK_VARs when doing for-scope extension. Remove effectively
6335 (pushlevel_class): Tweak formatting.
6336 (poplevel_class): Adjust for new name-lookup scheme.
6337 (print_binding_level): Likewise.
6338 (store_bindings): Likewise.
6339 (pushdecl): Likewise.
6340 (pushdecl_class_level): Likewise.
6341 (push_class_level_binding): Likewise.
6342 (push_overloaded_decl): Update comments. Adjust for new
6344 (lookup_name_real): Likewise.
6345 (lookup_name_current_level): Likewise.
6346 (cp_finish_decl): Likewise.
6347 (require_complete_types_for_parms): Likewise. Remove misleading
6349 (grok_parms): Likewise. Don't call
6350 require_complete_types_for_parms here.
6351 (grok_ctor_properties): Don't treat templates as copy
6353 (grop_op_properties): Or as assignment operators.
6354 (start_function): Document. Adjust for new name-lookup scheme.
6355 (finish_function): Likewise.
6356 * decl2.c (do_local_using_decl): Use push_local_binding.
6357 * lex.c (begin_definition_of_inclass_inline): New function, split
6359 (do_pending_inlines): Here, and ...
6360 (process_next_inline): Here.
6361 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
6362 (init_filename_times): Likewise.
6363 (extract_interface_info): Likewise.
6364 (ste_typedecl_interface_info): Likewise.
6365 (check_newline): Likewise.
6366 (dump_time_statistics): Likewise.
6367 (handle_cp_pragma): Likewise.
6368 (do_identifier): Adjust for new name-lookup scheme.
6369 * parse.y (function_try_block): Return ctor_initializer_opt value.
6371 (fn.defpen): Pass appropriate values to start_function.
6372 (pending_inline): Use functor_try_block value, and pass
6373 appropriate values to finish_function.
6374 * pt.c (is_member_template): Update documentation; remove handling
6375 of FUNCTION_DECLs. As per name, this function should deal only in
6377 (decl_template_parm_p): Change name of olddecl parameter to decl.
6378 (check_template_shadow): Adjust for new name-lookup scheme.
6379 (lookup_template_class): Likewise.
6380 (tsubst_decl): Tweak so as not to confuse member templates with
6381 copy constructors and assignment operators.
6382 (unify): Handle UNION_TYPEs.
6383 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
6384 (lang_print_xnode): Adjust for new name-lookup scheme.
6385 * typeck.c (mark_addressable): Likewise.
6386 (c_expand_return): Likewise.
6388 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
6390 * decl.c (grokdeclarator): Allow field with same name as class
6393 * decl.c (lookup_name_real): Don't limit field lookup to types.
6394 * class.c (check_member_decl_is_same_in_complete_scope): No error
6395 if icv and x are the same.
6396 * lex.c (do_identifier): Tweak error message.
6398 1998-12-10 Mark Mitchell <mark@markmitchell.com>
6400 * decl.c (start_enum): Use push_obstacks, not
6401 end_temporary_allocation.
6402 (finish_enum): Call pop_obstacks.
6404 1998-12-10 Mark Mitchell <mark@markmitchell.com>
6406 * class.c (instantiate_type): Return error_mark_node rather than
6409 1998-12-09 Mark Mitchell <mark@markmitchell.com>
6411 * cp-tree.h (most_specialized_instantiation): New function.
6412 (print_candidates): Likewise.
6413 * class.c (validate_lhs): Remove.
6414 (resolve_address_of_overloaded_function): New function, split out
6415 and then substantially reworked, from ...
6416 (instantiate_type): Use it. Simplify.
6417 * cvt.c (convert_to_reference): Complain when caller has indicated
6418 that's the right thing to do. Don't crash if instantiate_type
6420 * pt.c: Substitute `parameters' for `paramters' throughout.
6421 (print_candidates): Don't make it static.
6422 (most_specialized_instantiation): Split out from ...
6423 (most_specialized): Here.
6425 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
6427 * lex.c (lang_init_options): Initialize cpplib.
6428 * decl2.c (parse_options,cpp_initialized): Removed.
6429 (lang_decode_option): Move initialization of cpplib to
6432 1998-12-09 Mark Mitchell <mark@markmitchell.com>
6434 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
6435 well as the TYPE_DECL, when a typedef name is assigned to a
6436 previously anonymous type.
6438 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
6440 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
6441 __cp_eh_info for getting the eh info pointer. Add table_index to
6443 (push_eh_cleanup): Don't increment 'handlers' data field.
6444 (process_start_catch_block): Don't set the 'caught' field.
6446 * cp/exception.cc (CP_EH_INFO): New macro for getting the
6447 exception info pointer within library routines.
6448 (__cp_eh_info): Use CP_EH_INFO.
6449 (__start_cp_handler): Get exception info pointer, set caught field,
6450 and increment the handlers field. Avoids this being done by handlers.
6451 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
6452 (uncaught_exception): Use CP_EH_INFO macro.
6454 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
6456 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
6458 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
6460 * lex.c (check_newline): Add support for \ as `natural'
6461 characters in file names in #line to be consistent with #include
6462 handling. We support escape processing in the # 1 "..." version of
6463 the command. See also support in cp/lex.c.
6465 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
6467 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
6470 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
6472 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
6474 * error.c (dump_simple_decl): Also print namespace context.
6475 (dump_function_decl): Likewise.
6477 * decl2.c (ambiguous_decl): Don't print old value if it's
6480 * decl.c (lookup_name_real): Fix handling of local types shadowed
6481 by a non-type decl. Remove obsolete code.
6482 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
6484 * lang-options.h: Add -fpermissive.
6485 * decl2.c: Likewise.
6486 * cp-tree.h: Add flag_permissive.
6487 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
6488 were specified, set flag_pedantic_errors.
6489 * call.c (build_over_call): Turn dropped qualifier messages
6491 * cvt.c (convert_to_reference): Likewise.
6492 * typeck.c (convert_for_assignment): Likewise.
6494 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
6496 * decl2.c (coerce_new_type): Use same_type_p.
6497 (coerce_delete_type): Likewise.
6499 * call.c (check_dtor_name): Return 1, not error_mark_node.
6501 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
6503 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
6504 if MULTIPLE_SYMBOL_SPACES.
6506 * pt.c (check_template_shadow): New fn.
6507 * decl2.c (grokfield): Use it.
6508 * decl.c (pushdecl): Likewise.
6509 (pushdecl_class_level): Likewise.
6510 (start_method): Likewise.
6511 (xref_tag): Don't try to use 't' if we're defining.
6513 * call.c (check_dtor_name): Just return an error_mark_node.
6514 * pt.c (lookup_template_class): Complain about using non-template here.
6515 * parse.y (apparent_template_type): Not here.
6517 * pt.c (check_explicit_specialization): Complain about specialization
6520 * lang-options.h: Add -f{no-,}implicit-inline-templates.
6522 * pt.c (convert_nontype_argument): Don't assume that any integer
6523 argument is intended to be a constant-expression.
6525 1998-12-03 Mark Mitchell <mark@markmitchell.com>
6527 * class.c (handle_using_decl): Fix comment. Don't lookup
6528 constructors in base classes.
6529 (validate_lhs): Fix typo in comment.
6530 * search.c (lookup_field_1): Don't return a USING_DECL.
6532 * cp-tree.h (DECL_ACCESS): Improve documentation.
6534 * decl.c (expand_static_init): Don't set the initialization-done
6535 flag until the initialization is done.
6537 1998-12-02 Mark Mitchell <mark@markmitchell.com>
6539 * decl2.c (validate_nonmember_using_decl): Complain about using
6540 declarations for class members.
6542 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
6544 * typeck2.c (process_init_constructor): Use same_type_p.
6546 * decl.c (check_tag_decl): Don't warn about null decl inside a
6549 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
6551 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
6552 (resolve_overloaded_unification): Strip baselinks.
6554 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6556 * g++spec.c: Don't prototype xmalloc.
6558 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
6560 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
6562 * decl.c (check_tag_decl): Do complain about null friend decl at
6565 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6567 * lex.c (make_lang_type): Clear the whole struct lang_type, not
6568 only the first multiple of sizeof (int).
6570 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
6572 * decl.c (start_decl): An explicit specialization of a static data
6573 member is only a definition if it has an initializer.
6575 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
6576 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
6578 * init.c (expand_default_init): Check for DIRECT_BIND instead of
6581 * call.c (build_over_call): Use build_decl.
6583 * except.c (expand_throw): Just use convert, not
6584 build_reinterpret_cast.
6586 * lex.c (handle_generic_pragma): Use token_buffer.
6588 * decl.c (check_tag_decl): Don't complain about null friend decl.
6590 1998-11-24 Dave Pitts <dpitts@cozx.com>
6592 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
6594 * lex.c (check_newline): Use ISALPHA.
6595 (readescape): Use ISGRAPH.
6596 (yyerror): Use ISGRAPH.
6598 1998-11-24 Nathan Sidwell <nathan@acm.org>
6600 * search.c (get_abstract_virtuals): Do not use initial
6601 CLASSTYPE_ABSTRACT_VIRTUALS.
6602 * typeck2.c (abstract_virtuals_error): Show location of abstract
6604 * call.c (build_new_method_call): Use
6605 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
6606 * class.c (finish_struct_bits): Don't bother working out whether
6607 get_abstract_virtuals will do anything, just do it.
6609 1998-11-24 Graham <grahams@rcp.co.uk>
6611 * typeck.c (build_component_ref): Remove unused statement.
6613 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
6615 * class.c (add_method): Catch invalid overloads.
6617 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
6618 * search.c (lookup_conversions): Handle getting real OVERLOADs.
6619 (add_conversions): Likewise. Revert last change.
6620 * call.c (add_conv_candidate): Pass totype to add_candidate instead
6621 of fn. Don't add a new candidate if the last one was for the same
6623 (print_z_candidates): Handle getting a type as a function.
6624 (joust): If we got two conversion candidates to the same type,
6626 (build_object_call): Lose 'templates'.
6627 (build_user_type_conversion_1): Handle getting real OVERLOADs.
6629 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
6631 * typeck2.c (process_init_constructor): If there are elements
6632 that don't have initializers and they need to have constructors
6633 run, supply them with initializers.
6635 * class.c (finish_struct_1): A class with a 0-width bitfield is
6638 1998-11-23 Mark Mitchell <mark@markmitchell.com>
6640 * pt.c (instantiate_class_template): Don't try to figure out what
6641 specialization to use for a partial instantiation. Correct
6642 typos in a couple of comments. Avoid calling uses_template_parms
6645 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
6647 * method.c (process_overload_item): Add call to
6648 build_mangled_C9x_name for intTI_type_nodes.
6649 (build_mangled_C9x_name): Add prototype, define.
6650 * decl.c (init_decl_processing): Add names for
6653 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
6655 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
6657 * class.c (finish_struct_1): Set things up for 0-width bitfields
6658 like we do for others.
6660 * decl.c (check_tag_decl): New fn.
6661 (shadow_tag): Split out from here.
6662 * decl2.c (grok_x_components): Call it.
6664 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
6666 * decl.c: Lose warn_about_return_type.
6667 (grokdeclarator): Always complain about implicit int, except for
6670 * decl.c (tag_name): New fn.
6671 (xref_tag): Complain about using typedef-name after class-key.
6673 * init.c (expand_vec_init): Also keep going if from_array.
6675 * tree.c (is_overloaded_fn): Also handle the output of
6678 * decl.c (grokdeclarator): Use constructor_name when comparing
6679 field name against enclosing class.
6680 * class.c (finish_struct_anon): Likewise.
6682 1998-11-22 Mark Mitchell <mark@markmitchell.com>
6684 * decl.c (poplevel): Remove code to handle KEEP == 2.
6685 (finish_function): Don't confuse BLOCK-order when
6686 processing a destructor.
6688 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
6690 * decl.c (require_complete_types_for_parms): Call layout_decl
6691 after we've completed the type.
6693 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
6695 * decl2.c (validate_nonmember_using_decl): Allow using templates
6696 from the global namespace.
6698 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
6700 Handle specifying template args to member function templates.
6701 * tree.c (build_overload): Always create an OVERLOAD for a template.
6702 * search.c (add_conversions): Handle finding an OVERLOAD.
6703 * decl2.c (check_classfn): Likewise.
6704 * lex.c (identifier_type): See through a baselink.
6705 * parse.y (do_id): Don't call do_identifier if we got a baselink.
6706 * class.c (instantiate_type, case TREE_LIST): Recurse.
6708 * decl.c (grokdeclarator): Allow a boolean constant for array
6709 bounds, odd as that sounds.
6711 * pt.c (unify): Be more strict about non-type parms, except for
6713 (UNIFY_ALLOW_INTEGER): New macro.
6715 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
6717 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
6719 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
6721 * semantics.c (begin_class_definition): Call
6722 maybe_process_partial_specialization before push_template_decl.
6723 Don't call push_template_decl for a specialization.
6724 * search.c (lookup_field): Do return a member template class.
6725 * decl2.c (handle_class_head): Handle member template classes.
6727 * decl.c (grokdeclarator): A parm type need not be complete.
6729 * pt.c (convert_nontype_argument): Fix thinko.
6731 1998-11-18 Mark Mitchell <mark@markmitchell.com>
6733 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
6734 (global_delete_fndecl): New variable.
6735 * decl.c (global_delete_fndecl): Define it.
6736 (init_decl_processing): Set it.
6737 * init.c (build_builtin_delete_call): Use it.
6738 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
6741 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
6743 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
6746 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
6747 * call.c (build_object_call): Also support references to functions.
6748 * typeck.c (convert_for_initialization): Don't decay a function
6749 if the target is a reference to function.
6751 * search.c (add_conversions): Get all the overloads from a class.
6753 * decl.c (grok_ctor_properties): Complain about any constructor
6754 that will take a single arg of the class type by value.
6756 * typeck2.c (build_functional_cast): Can't create objects of
6757 abstract classes this way.
6758 * cvt.c (ocp_convert): Likewise.
6760 * decl.c (grokfndecl): Member functions of local classes are not
6763 1998-11-18 Mark Mitchell <mark@markmitchell.com>
6765 * Make-lang.in (cc1plus): Add dependency on hash.o.
6767 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
6769 * search.c (get_abstract_virtuals): Complain about virtuals with
6771 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
6772 with no final overrider.
6773 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
6774 on virtuals with no final overrider.
6776 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
6778 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
6781 * friend.c (do_friend): Don't set_mangled_name_for_decl.
6783 * class.c (finish_struct_anon): Complain about non-fields.
6784 * decl2.c (build_anon_union_vars): Likewise.
6786 * decl.c (grokdeclarator): Normal data members can't have the same
6787 name as the class, either.
6788 * class.c (finish_struct_anon): Neither can members of an
6791 1998-11-17 Mark Mitchell <mark@markmitchell.com>
6793 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6794 (TYPE_BINFO): Likewise.
6795 (IS_AGGR_TYPE): Tweak.
6796 (SET_IS_AGGR_TYPE): New macro.
6797 (CLASS_TYPE_P): Tweak.
6798 (lang_type): Group mark bitfields together. Remove linenum.
6799 (CLASSTYPE_SOURCE_LINE): Remove macro.
6800 (CLASSTYPE_MARKED_N): New macro.
6801 (SET_CLASSTYPE_MARKED_N): Likewise.
6802 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
6803 (CLASS_TYPE_MARKED_*): Use them.
6804 (SET_CLASSTYPE_MARKED_*): Likewise.
6805 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
6806 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6807 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6808 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6809 * class.c (class_cache_obstack): New variable.
6810 (class_cache_firstobj): Likewise.
6811 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6812 (pushclass): Free the cache, when appropriate.
6814 (maybe_push_cache_obstack): Use class_cache_obstack.
6815 * decl.c (include hash.h).
6816 (typename_hash): New function.
6817 (typename_compare): Likewise.
6818 (build_typename_type): Check the hash table to avoid creating
6820 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6821 (grokdeclarator): Use CLASS_TYPE_P.
6822 (xref_basetypes): Likewise.
6823 (start_function): Likewise. Don't put current_class_ref on the
6825 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6827 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6828 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6829 fields for types other than class types. Do clear TYPE_ALIAS_SET
6830 for types other than class types, though.
6831 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6832 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6833 * pt.c (process_template_parm): Don't set
6834 CLASSTYPE_GOT_SEMICOLON.
6835 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6836 Coerce arguments on the momentary obstack.
6837 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6838 (instantiate_class_template): Calculate template arguments on the
6839 momentary obstack. Tidy.
6840 (tsubst_template_arg_vector): Use make_temp_vec.
6841 (tsubst_aggr_type): Put template arguments on the momentary
6843 (tsubst_decl): Likewise.
6844 (tsubst): Copy the array bounds index to the permanent obstack
6845 before building index types. Use new macros.
6846 (unify): Use new macros.
6847 (do_type_instantiation): Likewise.
6848 * search.c (lookup_fnfields_1): Use new macros.
6849 (dfs_pushdecls): Build envelopes on the cache obstack.
6850 (dfs_compress_decls): Use new macros.
6851 (push_class_decls): Build on the cache obstack.
6852 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6853 * sign.c (build_signature_pointer_or_reference_type): Use
6855 * tree.c (make_binfo): Check CLASS_TYPE_P.
6856 (copy_template_template_parm): Adjust.
6857 (make_temp_vec): Use push_expression_obstack.
6858 * typeck.c (complete_type): Use new macros.
6859 (comptypes): Likewise.
6861 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
6863 * pt.c (tsubst): Add diagnostics for invalid array, reference
6864 and pointer to member types.
6866 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
6868 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6870 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6873 * parse.y (structsp): Fix cut-and-paste error.
6875 * init.c (build_new): Complain about non-integral size.
6877 * parse.y (unary_expr): Complain about defining types in sizeof.
6879 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6881 * rtti.c (build_x_typeid): Complain about typeid without
6882 including <typeinfo>.
6883 (get_typeid): Likewise. Complain about typeid of incomplete type.
6884 (get_tinfo_fn_dynamic): Likewise.
6885 (get_typeid_1): Not static anymore.
6886 * except.c (build_eh_type_type): Use get_typeid_1.
6888 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6889 ambiguous or private bases. Fix warning for reference cast.
6891 1998-11-16 Mark Mitchell <mark@markmitchell.com>
6893 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6894 * decl.c (duplicate_decls): Remove special-case code to deal with
6895 template friends, and just do the obvious thing.
6896 * pt.c (register_specialization): Tweak for clarity, and also to
6897 clear DECL_INITIAL for an instantiation before it is merged with a
6899 (check_explicit_specialization): Fix indentation.
6900 (tsubst_friend_function): Handle both definitions in friend
6901 declaration and outside friend declarations.
6902 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6903 (regenerate_decl_from_template): Tweak accordingly.
6904 (instantiate_decl): Likewise.
6906 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
6908 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6909 member function reference to error.
6910 * cvt.c (ocp_convert): Complain about converting an overloaded
6913 * init.c (build_offset_ref): Just return a lone static member
6916 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6919 * typeck.c (build_binary_op_nodefault): Improve error handling.
6921 * decl.c (grokfndecl): Complain about making 'main' a template.
6923 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6925 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6926 TYPE_DECL in a template.
6928 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
6930 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6932 * decl.c (struct cp_function): Add named_label_uses.
6933 (push_cp_function_context): Save it.
6934 (pop_cp_function_context): Restore it.
6935 (define_label): Also complain about jumping into the scope of
6936 non-POD objects that don't have constructors.
6937 * tree.c (pod_type_p): New fn.
6939 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6940 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6941 (get_tinfo_fn): Not here.
6942 * repo.c (repo_get_id): Abort if we get called for an incomplete
6945 1998-11-13 Mark Mitchell <mark@markmitchell.com>
6947 * except.c (expand_throw): Make sure first argument to
6948 __cp_push_exception is of type `void*' to avoid spurious error
6951 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
6953 * pt.c (try_one_overload): Take orig_targs again. Only check for
6954 mismatches against them; we don't care what a previous call found.
6955 (resolve_overloaded_unification): Adjust.
6957 * search.c (lookup_field): Don't return anything for a non-type
6958 field from a dependent type.
6959 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6960 in an array declarator.
6961 (start_decl): Push into the class before looking for the field.
6963 1998-11-08 Mark Mitchell <mark@markmitchell.com>
6965 * method.c (build_overload_value): Handle REFERENCE_TYPE.
6967 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
6969 * decl.c (grokdeclarator): Allow namespace-scoped members if they
6972 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
6974 * pt.c (tsubst_decl): Don't mess with the global value of an
6975 un-mangled DECL_ASSEMBLER_NAME.
6977 1998-11-03 Christopher Faylor <cgf@cygnus.com>
6979 * decl.c (init_decl_processing): Remove CYGWIN conditional
6980 since CYGWIN is now able to deal with trapping signals.
6982 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6984 * cp-tree.h: Don't include gansidecl.h.
6985 * exception.cc: Include gansidecl.h (since we don't include config.h)
6986 * g++spec.c: Don't include gansidecl.h.
6988 1998-11-06 Mark Mitchell <mark@markmitchell.com>
6990 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
6992 (DECL_DEFINED_IN_CLASS_P): New macro.
6993 (TEMPLATE_PARMS_FOR_INLINE): Document.
6994 (check_static_variable_definition): New function.
6995 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6997 (check_static_variable_definition): Split out from ...
6998 (grokdeclarator): Here.
6999 * pt.c (check_default_tmpl_args): New function, split out from ...
7000 (push_template_decl_real): Here.
7001 (instantiate_template): Fix comment.
7003 1998-11-04 Mark Mitchell <mark@markmitchell.com>
7005 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7006 (CP_TYPE_VOLATILE_P): Likewise.
7007 (CP_TYPE_RESTRICT_P): Likewise.
7009 1998-11-03 Mark Mitchell <mark@markmitchell.com>
7011 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7013 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
7015 * class.c (instantiate_type): Be more helpful.
7017 * decl2.c (import_export_decl): Call import_export_class.
7019 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7020 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7021 * pt.c (tsubst_copy): Likewise.
7023 1998-11-02 Mark Mitchell <mark@markmitchell.com>
7025 * init.c (expand_vec_init): Fix off-by-one error.
7027 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
7029 * parse.y (apparent_template_type): New type.
7030 (named_complex_class_head_sans_basetype): Use it.
7031 * Makefile.in (CONFLICTS): One new conflict.
7032 * parse.c: Regenerated.
7034 1998-11-01 Mark Mitchell <mark@markmitchell.com>
7036 * cp-tree.h (COMPARE_STRICT): New macro.
7037 (COMPARE_BASE): Likewise.
7038 (COMPARE_RELAXED): Likewise.
7039 (COMPARE_REDECLARATION): Likewise.
7040 (same_type_p): Likewise.
7041 (same_or_base_type_p): Likewise.
7042 * call.c (standard_conversion): Use them, in place of comptypes
7043 with numeric arguments.
7044 (reference_binding): Likewise.
7045 (convert_like): Likewise.
7046 (build_over_call): Likewise.
7047 (is_subseq): Likewise.
7048 (is_properly_derived_from): Likewise.
7049 (compare_ics): Likewise.
7051 * class.c (delete_duplicate_fields_1): Likewise.
7052 (resolves_to_fixed_type_p): Likewise.
7053 (instantiate_type): Likewise. Remove #if 0'd code.
7054 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
7055 (pushdecl): Likewise.
7056 (lookup_name_real): Likewise.
7057 (grokdeclarator): Likewise. Check for illegal array declarations.
7058 (grokparms): Likewise.
7059 (grok_op_properties): Likewise.
7060 * decl2.c (check_classfn): Likewise.
7061 * friend.c (is_friend): Likewise.
7062 (make_friend_class): Likewise.
7063 * init.c (expand_aggr_init): Likewise.
7064 (expand_vec_init): Likewise.
7065 * pt.c (is_member_template_class): Remove declaration.
7066 (is_specialization_of): Use COMPARE_* and new macros.
7067 (comp_template_parms): Likewise.
7068 (convert_nontype_argument): Likewise.
7069 (coerce_template_template_parms): Likewise.
7070 (template_args_equal): Likewise.
7071 (lookup_template_class): Likewise.
7072 (type_unification_real): Likewise.
7074 (get_bindings_real): Likewise.
7075 * search.c (covariant_return_p): Likewise.
7076 (get_matching_virtual): Likewise.
7077 * sig.c (match_method_types): Likewise.
7078 * tree.c (vec_binfo_member): Likewise.
7079 (cp_tree_equal): Likewise.
7080 * typeck.c (common_type): Likewise.
7081 (comp_array_types): Likewise. Get issues involving unknown array
7083 (comptypes): Update comments. Use new flags.
7084 (comp_target_types): Use new macros.
7085 (compparms): Likewise.
7086 (comp_target_parms): Likewise.
7087 (string_conv_p): Likewise.
7088 (build_component_ref): Likewise.
7089 (build_indirect_ref): Likewise.
7090 (build_conditional_expr): Likewise.
7091 (build_static_cast): Likewise.
7092 (build_reinterpret_cast): Likewise.
7093 (build_const_cast): Likewise.
7094 (build_modify_expr): Likewise.
7095 (convert_for_assignment): Likewise.
7096 (comp_ptr_ttypes_real): Likewise.
7097 (ptr_reasonably_similar): Likewise.
7098 (comp_ptr_ttypes_const): Likewise.
7100 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
7102 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7104 1998-10-30 Mark Mitchell <mark@markmitchell.com>
7106 * decl2.c (delete_sanity): Pass integer_zero_node, not
7107 integer_two_node, to build_vec_delete.
7108 * init.c (build_array_eh_cleanup): Remove.
7109 (expand_vec_init_try_block): New function.
7110 (expand_vec_init_catch_clause): Likewise.
7111 (build_vec_delete_1): Don't deal with case that auto_delete_vec
7112 might be integer_two_node anymore.
7113 (expand_vec_init): Rework for initialization-correctness and
7114 exception-correctness.
7115 * typeck2.c (process_init_constructor): Make mutual exclusivity
7116 of cases more obvious.
7118 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
7120 * decl.c (lookup_name_real): OK, only warn if not lexing.
7121 Simplify suggested fix.
7123 * cp-tree.h (IDENTIFIER_MARKED): New macro.
7124 * search.c (lookup_conversions): Use breadth_first_search.
7125 (add_conversions): Avoid adding two conversions to the same type.
7126 (breadth_first_search): Work with base binfos, rather
7127 than binfos and base indices.
7128 (get_virtual_destructor): Adjust.
7129 (tree_has_any_destructor_p): Adjust.
7130 (get_matching_virtual): Adjust.
7132 * pt.c (push_template_decl_real): Generalize check for incorrect
7133 number of template parms.
7134 (is_member_template_class): #if 0.
7136 1998-10-29 Richard Henderson <rth@cygnus.com>
7138 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7141 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
7143 * lex.c: Call check_newline from lang_init always. After
7144 calling cpp_start_read, set yy_cur and yy_lim to read from the
7145 cpplib token buffer.
7147 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
7149 * class.c (instantiate_type): Don't consider templates for a normal
7152 * class.c (finish_struct_1): Don't complain about non-copy
7153 assignment ops in union members.
7155 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7156 (prepare_fresh_vtable): Likewise.
7157 (finish_struct_1): Don't call import_export_class.
7158 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7159 (finish_prevtable_vardecl): Lose.
7160 (finish_file): Don't call it.
7161 * pt.c (instantiate_class_template): Likewise.
7162 * cp-tree.h: Remove it.
7164 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7165 * decl.c (finish_function): Not here.
7166 (start_function): Do set DECL_INITIAL.
7168 * pt.c (push_template_decl_real): Complain about default template
7169 args for enclosing classes.
7171 * call.c (add_function_candidate): Treat conversion functions
7172 as coming from the argument's class.
7173 * cp-tree.h (DECL_CONV_FN_P): New fn.
7174 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7175 * class.c (add_method): Use DECL_CONV_FN_P.
7176 * decl2.c (check_classfn): Likewise.
7177 * error.c (dump_function_name): Likewise.
7178 (dump_function_decl): Likewise.
7179 * pt.c (fn_type_unification): Likewise.
7180 * search.c (add_conversions): Likewise.
7182 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
7184 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
7185 * method.c (hack_identifier): Also check for using RESULT_DECL
7188 1998-10-27 Mark Mitchell <mark@markmitchell.com>
7190 * decl.c (grokdeclarator): Use type_quals, rather than constp,
7193 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
7195 * call.c (standard_conversion): instantiate_type here.
7196 (reference_binding): And here.
7197 (implicit_conversion): Not here.
7198 (build_op_delete_call): No need to cons up an OVERLOAD.
7199 * cvt.c (cp_convert_to_pointer): instantiate_type here.
7200 (convert_to_reference): And here.
7201 * decl.c (grok_reference_init): Not here.
7202 (grokparms): Or here.
7203 * typeck2.c (digest_init): Or here.
7204 * typeck.c (decay_conversion): Take the address of overloaded
7206 (require_instantiated_type): Lose.
7207 (convert_arguments): Don't handle unknown types here.
7208 (build_c_cast): Likewise.
7209 (build_binary_op): Gut.
7210 (build_conditional_expr): Don't require_instantiated_type.
7211 (build_modify_expr): Likewise.
7212 (build_static_cast): Don't instantiate_type.
7213 (build_reinterpret_cast): Likewise.
7214 (build_const_cast): Likewise.
7215 (convert_for_initialization): Likewise.
7216 (build_ptrmemfunc): Use type_unknown_p.
7217 (convert_for_assignment): Also do default_conversion on overloaded
7218 functions. Hand them off to ocp_convert.
7220 1998-10-26 Mark Mitchell <mark@markmitchell.com>
7222 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
7223 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
7225 * class.c (finish_struct_1): Use build_cplus_array_type to build
7227 * decl.c (init_decl_processing): Likewise.
7228 * except.c (expand_end_eh_spec): Likewise.
7229 * search.c (expand_upcast_fixups): Simplify very slightly.
7231 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
7233 * decl.c (grokdeclarator): Complain about a variable using
7234 constructor syntax coming back null from start_decl.
7236 * friend.c (make_friend_class): Complain about trying to make
7237 a non-class type a friend.
7239 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
7240 (start_function): Not here.
7242 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
7244 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
7246 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
7248 * typeck2.c (process_init_constructor): Only skip anonymous fields
7249 if they are bitfields.
7251 * cp-tree.def (TYPEOF_TYPE): New code.
7252 * error.c (dump_type_real): Handle it.
7253 * pt.c (tsubst): Likewise.
7254 * tree.c (search_tree): Likewise.
7255 * semantics.c (finish_typeof): New fn.
7256 * parse.y (typespec): Use it.
7257 * cp-tree.h: Declare it.
7259 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
7261 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
7263 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
7265 * typeck.c (convert_arguments): Don't handle pmf references
7268 * init.c (build_member_call): Don't try to convert to the base type
7269 if it's ambiguous or pedantic.
7271 * typeck2.c (check_for_new_type): Only depend on pedantic for
7274 1998-10-25 Mark Mitchell <mark@markmitchell.com>
7276 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
7277 non-converting constructors.
7279 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7281 * gxxint.texi: Correct documentation for n, N, Q, and B.
7283 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
7285 * parse.y (condition): Convert VAR_DECL from reference to indirect
7288 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
7290 * exception.cc (__cp_pop_exception): Free the original exception
7291 value, not the potentially coerced one.
7293 1998-10-23 Mark Mitchell <mark@markmitchell.com>
7295 * Makefile.in (hash.h): Run gperf when necessary.
7297 * cp-tree.h (CP_TYPE_READONLY): Remove.
7298 (CP_TYPE_VOLATILE): Likewise.
7299 (CP_TYPE_QUALS): New macro.
7300 (CP_TYPE_CONST_P): Likewise.
7301 (CP_TYPE_VOLATILE_P): Likewise.
7302 (CP_TYPE_RESTRICT_P): Likewise.
7303 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
7304 (cp_build_type_variant): Rename to ...
7305 (cp_build_qualified_type): New function.
7306 (c_apply_type_quals_to_decl): Declare.
7307 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
7308 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
7309 (cp_type_qual_from_rid): New function.
7310 (compparms): Remove unused parameter. All callers changed.
7311 (cp_type_quals): New function.
7312 (at_least_as_qualified_p): Likewise.
7313 (more_qualified_p): Likewise.
7315 * call.c (standard_conversion): Replace calls to
7316 cp_build_type_variant with cp_build_qualified_type. Use
7317 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
7318 compare them. Use CP_TYPE_* macros to check qualifiers.
7319 (reference_binding): Likewise.
7320 (implicit_conversion): Likewise.
7321 (add_builtin_candidates): Likewise.
7322 (build_over_call): Likewise.
7323 * class.c (overrides): Compare all qualifiers, not just `const',
7324 on method declarations.
7325 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
7326 (convert_pointer_to_real): Likewise.
7327 (type_promotes_to): Likewise.
7328 * decl.c (check_for_uninitialized_const_var): New function.
7329 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
7330 (cp_finish_decl): Use check_for_uninitialized_const_var.
7331 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
7333 (grok_ctor_properties): Likewise.
7334 (grok_op_properties): Likewise.
7335 (start_function): Likewise.
7336 (rever_static_member_fn): Likewise.
7337 * decl2.c (grok_method_quals): Likewise.
7338 (grokfield): Likewise.
7339 * error.c (dump_readonly_or_volatile): Rename to ...
7340 (dump_qualifiers): New function. Handle `restrict'.
7341 (dump_type_real): Use it.
7342 (dump_aggr_type): Likewise.
7343 (dump_type_prefix): Likewise.
7344 (dump_type_suffix): Likewise.
7345 (dump_function_decl): Likewise.
7346 (cv_as_string): Likewise.
7347 * gxx.gperf: Add __restrict and __restrict__.
7348 * gxxint.texi: Document `u' as used for `__restrict', and a few
7349 other previously undocumented codes.
7350 * hash.h: Regenerated.
7351 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
7352 (build_member_call): Likewise.
7353 (build_new_1): Likewise.
7354 * lex.c (init_parse): Add entry for RID_RESTRICT.
7355 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
7356 (cp_type_qual_from_rid): Define.
7357 * lex.h (enum rid): Add RID_RESTRICT.
7358 * method.c (process_modifiers): Deal with `restrict'.
7359 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
7360 * parse.c: Regenerated.
7361 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
7362 (tsubst_aggr_type): Likewise.
7364 (check_cv_quals_for_unify): Likewise.
7366 * rtti.c (init_rtti_processing): Likewise.
7367 (build_headof): Likewise.
7368 (get_tinfo_var): Likewise.
7369 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
7370 (expand_class_desc): Likewise.
7371 (expand_attr_desc): Likewise.
7372 (synthesize_tinfo_fn): Likewise.
7373 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
7374 (get_matching_virtual): Likewise.
7375 (expand_upcast_fixups): Likewise.
7376 * sig.c (build_signature_pointer_or_reference_name): Take
7377 type_quals, not constp and volatilep.
7378 (build_signature_pointer_or_reference_type): Likewise.
7379 (match_method_types): More CP_TYPE_QUALS conversion, etc.
7380 (build_signature_pointer_constructor): Likewise.
7381 (build_signature_method_call): Likewise.
7382 * tree.c (build_cplus_array_type): Likewise.
7383 (cp_build_type_variant): Rename to ...
7384 (cp_build_qualified_type): New function. Deal with `__restrict'.
7385 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
7386 (build_exception_variant): Likewise.
7388 * typeck.c (qualif_type): Likewise.
7389 (common_type): Likewise.
7390 (comptypes): Likewise.
7391 (comp_cv_target_types): Likewise.
7392 (at_least_as_qualified_p): Define.
7393 (more_qualified_p): Likewise.
7394 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
7395 (compparms): Likewise.
7396 (inline_conversion): Likewise.
7397 (string_conv_p): Likewise.
7398 (build_component_ref): Likewise.
7399 (build_indirect_ref): Likewise.
7400 (build_array_ref): Likewise.
7401 (build_unary_op): Likewise.
7402 (build_conditional_expr): Likewise.
7403 (build_static_cast): Likewise.
7404 (build_c_cast): Likewise.
7405 (build_modify_expr): Likewise.
7406 (convert_For_assignment): Likewise.
7407 (comp_ptr_ttypes_real): Likewise.
7408 (cp_type_quals): New function.
7410 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
7412 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
7413 (CP_TYPE_VOLATILE): Likewise.
7414 * decl.c (grokdeclarator): Use them.
7415 * tree.c (canonical_type_variant): Likewise.
7417 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
7419 * parse.y (named_class_head): Push into class while parsing the
7421 * decl2.c (push_scope, pop_scope): New functions.
7422 * cp-tree.h: Declare them.
7423 * init.c (build_new_1): Delay cleanup until end of full expression.
7425 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
7427 * typeck.c (build_component_ref): Use of a type here is an error.
7429 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
7431 Revamp references to member functions.
7432 * method.c (hack_identifier): Call build_component_ref for a
7433 reference to a member function.
7434 * typeck.c (build_component_ref): Only return a single function
7435 if it's static. Otherwise, return a COMPONENT_REF.
7436 (build_x_function_call): Handle a COMPONENT_REF.
7437 (build_unary_op): Handle all unknown-type things.
7438 * decl2.c (arg_assoc): Handle COMPONENT_REF.
7439 * class.c (instantiate_type): Complain if the function we get is a
7440 nonstatic member function. Remove code for finding "compatible"
7442 * pt.c (tsubst_copy): Handle NOP_EXPR.
7443 * tree.c (build_dummy_object): New fn.
7444 (maybe_dummy_object): New fn.
7445 (is_dummy_object): New fn.
7446 * cp-tree.h: Declare them.
7447 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
7448 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
7449 * init.c (build_member_call): Use maybe_dummy_object and
7451 (build_offset_ref): Use maybe_dummy_object.
7452 (resolve_offset_ref): Use is_dummy_object.
7453 * typeck.c (build_x_function_call): Call build_dummy_object.
7454 (unary_complex_lvalue): Call is_dummy_object.
7456 * typeck.c (build_component_addr): Make sure field is a field.
7458 * call.c (build_new_op): Delete obsolete code.
7460 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
7462 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
7464 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
7465 std if std is ignored.
7467 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
7469 * decl.c (grokvardecl): Fix thinko.
7471 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7474 * parse.y (fn.def2): Fix 'attrs' format.
7476 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
7478 * Makefile.in (CONFLICTS): Update.
7479 * parse.y (expr_or_declarator_intern): New rule.
7480 (expr_or_declarator, direct_notype_declarator, primary,
7481 functional_cast): Use it.
7482 (notype_declarator_intern): New rule.
7483 (notype_declarator, complex_notype_declarator): Use it.
7485 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
7487 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
7488 (grokvardecl): Likewise.
7490 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7492 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
7493 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
7495 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
7497 * pt.c (process_partial_specialization): Cast 1st argument of
7500 * tree.c (build_base_fields): Cast `base_align' to (int) when
7501 comparing against one.
7503 1998-10-16 Mark Mitchell <mark@markmitchell.com>
7505 * decl.c (lookup_name_real): Handle template parameters for member
7506 templates where said parameters have the same name as the
7509 * decl.c (expand_static_init): Build cleanups before entering the
7510 anonymous function used to do them to avoid access-checking
7513 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
7514 accidentally removed by previous change, and make DECL_RTL here.
7515 * class.c (add_method): Don't make DECL_RTL here.
7517 * pt.c (for_each_template_parm): Don't examine uninstantiated
7520 1998-10-16 Dave Brolley <brolley@cygnus.com>
7522 * lex.c (real_yylex): Fix unaligned access of wchar_t.
7524 1998-10-16 Mark Mitchell <mark@markmitchell.com>
7526 * class.c (add_method): Fix documentation to reflect previous
7527 changes. Check for duplicate method declarations here.
7528 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
7529 correctly; such things never match.
7530 (grokfndecl): Don't look for duplicate methods here.
7531 * decl2.c (check_classfn): Don't assume names are mangled.
7532 Don't add bogus member function declarations to a class before the
7533 class type is complete.
7534 (grokfield): Reformat error message.
7535 * method.c (set_mangled_name_for_decl): Don't mangle names while
7536 processing_template_decl.
7538 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
7540 * typeck.c (build_indirect_ref): Complain about a pointer to data
7542 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
7544 * init.c (resolve_offset_ref): Don't undo the above.
7546 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
7547 (struct lang_decl_flags): Add `bitfield'.
7548 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
7550 * decl2.c (grokbitfield, grok_alignof): Likewise.
7551 * init.c (build_offset_ref): Likewise.
7552 * typeck.c (build_component_addr, expr_sizeof): Likewise.
7553 * cvt.c (build_up_reference): Don't crash if taking the address
7554 returns error_mark_node.
7556 * decl.c (grokfndecl): Also check ctype when checking for ::main().
7558 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
7560 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
7562 (grokdeclarator): Instead of here.
7563 * friend.c (do_friend): Lose special handling of ::main and
7565 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
7567 * spew.c (yylex): Clear looking_for_typename if we got
7570 1998-10-15 Mark Mitchell <mark@markmitchell.com>
7572 * class.c (maybe_warn_about_overly_private_class): Improve error
7573 messages for class with only private constructors.
7575 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
7576 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
7577 (build_typename_type): New function.
7578 * decl.c (build_typename_type): Broken out from ...
7579 (make_typename_type): Use it.
7580 * search.c (lookup_field): Likewise.
7582 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7584 * pt.c (convert_nontype_argument): Check against type_referred_to.
7585 * decl.c (grokvardecl): Check for declarator name before building
7586 DECL_ASSEMBLER_NAME.
7588 1998-10-14 Mark Mitchell <mark@markmitchell.com>
7590 * pt.c (lookup_template_class): Add comment.
7591 (instantiate_class_template): Don't mark the _TYPE node for
7592 member class templates as an instantiation.
7594 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
7596 * decl.c (grokfndecl): Fix my thinko.
7598 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
7600 * tinfo2.cc (fast_compare): Remove.
7601 (before): Just use strcmp.
7602 * tinfo.cc (operator==): Just use strcmp.
7604 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
7606 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
7609 1998-10-13 Mark Mitchell <mark@markmitchell.com>
7611 * cp-tree.h (specializations_of_same_template_p): Remove.
7612 * search.c (get_template_base): Don't use it.
7613 (get_template_base_recursive): Likewise.
7614 * pt.c (specializations_of_same_template_p): Remove.
7615 (unify): Don't use it.
7616 (lookup_template_class): Find the correct parent when setting
7617 CLASSTYPE_TI_TEMPLATE.
7619 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
7621 * tinfo.cc (operator==): Always compare names.
7623 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
7625 * decl.c (start_function): Fix cut-and-paste error.
7627 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
7629 * inc/typeinfo: Add #pragma interface.
7630 (operator!=): Just call operator==.
7631 * tinfo.cc: Add #pragma implementation.
7632 (operator==): Move from inc/typeinfo and tinfo2.cc.
7633 Check __COMMON_UNRELIABLE instead of _WIN32.
7635 * typeck2.c (my_friendly_abort): Add URL.
7637 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
7639 * decl.c (start_method): Added extra parameter for attributes.
7640 * cp-tree.h (start_method): Update prototype.
7641 * parse.y (fn.def2): Update start_method parameter list.
7643 1998-10-11 Mark Mitchell <mark@markmitchell.com>
7645 * cp-tree.h (specializations_of_same_template_p): Declare.
7646 * pt.c (specializations_of_same_template_p): New function.
7648 * search.c (get_template_base): Use it.
7649 (get_template_base_recursive): Likewise.
7651 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
7653 * decl2.c (start_objects): Add new variable `joiner' and
7654 initialize it properly.
7656 1998-10-09 Mark Mitchell <mark@markmitchell.com>
7658 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
7659 change to vtable types.
7661 * cvt.c (ocp_convert): Avoid infinite recursion caused by
7664 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
7666 * pt.c (resolve_overloaded_unification): New fn.
7667 (try_one_overload): Likewise.
7668 (unify): Don't fail on unknown type.
7669 (type_unification_real): Likewise. Use resolve_overloaded_unification
7670 to handle an overloaded argument.
7671 (template_args_equal): Split out...
7672 (comp_template_args): From here.
7673 (determine_specialization): Also allow a template with more
7674 parms than were explicitly specified.
7675 * cp-tree.h: Add template_args_equal.
7676 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
7678 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
7680 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
7683 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
7685 * typeck.c (unsigned_type): Only return TItype nodes when
7686 HOST_BITS_PER_WIDE_INT is >= 64 bits.
7687 (signed_type): Likewise.
7688 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
7689 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7690 (init_decl_processing): Only create TItype nodes when
7691 HOST_BITS_PER_WIDE_INT is >= 64 bits.
7692 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
7693 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7695 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7697 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
7698 (gxx.gperf): Update comments describing invocation flags.
7699 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7701 1998-10-07 Mark Mitchell <mark@markmitchell.com>
7703 * class.c (finish_struct_1): Add commentary on previous change.
7705 * cp-tree.h (vtbl_ptr_type_node): New variable.
7706 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
7707 already of the right type.
7708 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
7709 Simplify code to grow vtable.
7710 * decl.c (vtbl_ptr_type_node): Define.
7711 (init_decl_processing): Initialize it.
7713 1998-10-06 Mark Mitchell <mark@markmitchell.com>
7715 * cp-tree.def (PTRMEM_CST): New tree node.
7716 * cp-tree.h (ptrmem_cst): New type.
7717 (lang_type): Remove local_typedecls.
7718 (dummy): Increase to 12 bits from 11.
7719 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
7720 (PTRMEM_CST_CLASS): New macro.
7721 (PTRMEM_CST_MEMBER): Likewise.
7722 (current_access_specifier): New variable.
7723 (current_class_type): Remove duplicate declaration.
7724 (finish_struct): Change prototype.
7725 (unreverse_member_declarations): New function.
7726 (pushdecl_class_level): Change prototype.
7727 (grok_enum_decls): Remove.
7728 (fixup_anonymous_union): New function.
7729 (grok_x_components): Change prototype.
7730 (tsubst_chain): Remove.
7731 (finish_member_template_decl): Likewise.
7732 (check_explicit_specialization): Fix indentation.
7733 (finish_class_definition): Change prototype.
7734 (finish_member_class_template): Likewise.
7735 (finish_member_declaration): New function.
7736 (check_multiple_declarators): Likewise.
7737 * class.c (class_stack_node_t): New type.
7738 (current_class_base): Remove.
7739 (current_class_stack): Change type.
7740 (current_access_specifier): New variable.
7741 (grow_method): Remove.
7742 (check_member_decl_is_same_in_complete_scope): Break out from
7744 (make_method_vec): New function.
7745 (free_method_vec): Likewise.
7746 (add_implicitly_declared_members): Break out from finish_struct_1.
7747 (free_method_vecs): New variable.
7748 (add_method): Rework for direct use from parser.
7749 (handle_using_decl): Watch for NULL_TREE while iterating through
7750 CLASSTYPE_METHOD_VEC.
7751 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
7752 just do some error-checking.
7753 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
7754 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
7755 (finish_struct): Change prototype. Simplify; fields and methods
7756 are already set up at this point.
7757 (init_class_processing): Set up current_class_stack.
7758 (pushclass): Save current_access_specifier.
7759 (popclass): Restore it.
7760 (currently_open_class): Simplify.
7761 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
7762 * decl.c (saved_scope): Add access_specifier.
7763 (maybe_push_to_top_level): Save it.
7764 (pop_from_top_level): Restore it.
7765 (maybe_process_template_type_declaration): Use
7766 finish_member_declaration.
7767 (pushtag): Likewise.
7768 (pushdecl_class_level): Don't return a value.
7769 (fixup_anonymous_union): Break out from grok_x_components.
7770 (shadow_tag): Use it.
7771 (xref_tag): Complain about using an elaborated type specifier to
7772 reference a template type parameter or typedef name.
7773 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7774 (current_local_enum): Remove.
7775 (build_enumerator): Call finish_member_declaration.
7776 (grok_enum_decls): Remove.
7777 * decl2.c (grok_x_components): Simplify.
7778 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
7779 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7780 (merge_functions): Add to comment.
7781 (arg_assoc_type): Prototype.
7782 (arg_assoc): Pass as many arguments as there are parameters.
7783 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
7785 * expr.c (cpls_expand_expr): Remove dead code. Handle
7787 * friend.c (do_friend): Lookup friends when in nested classes.
7789 * init.c (build_offset_ref): Do lookup even for classes that are
7790 only partially defined.
7791 (decl_constant_value): Remove dead code.
7792 * method.c (build_overload_value): Remove hack where by TYPE was
7793 not a TYPE. Handle PTRMEM_CST.
7794 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7796 * parse.y (components, notype_components, component_decl,
7797 component_decl_1, component_declarator, component_declarator0):
7798 Now all are itype rather than ttype. Rework to add members to
7800 (typesqpecqual_reserved): Use check_multiple_declarators.
7801 (structsp): Update class to finish_class_definition.
7802 (do_xref_defn): Unsplit into named_class_head.
7803 (access_specifier): Set current_access_specifier.
7804 * pt.c (set_current_access_from_decl): New function.
7805 (finish_member_template_decl): Don't take the parameters.
7806 (comp_template_args): Make more robust.
7807 (lookup_template_class): Don't use current_local_enum.
7808 (for_each_template_parm): Handle PTRMEM_CST.
7809 (instantiate_class_template): Use set_current_access_from_decl,
7810 finish_member_declaration and unreverse_member_declarations. Set
7811 lineno/input_filename before generating implicit member functions.
7812 (type_unification_real): Don't assume back-unification happens
7813 only for the last argument.
7814 (regenerate_decl_from_template): Call pushclass a bit earlier.
7815 (tsubst_chain): Remove.
7816 (tsubst_enum): Use set_current_access_from_decl.
7817 (set_mangled_name_for_template_decl): Fix indentation.
7818 * search.c (lookup_fnfields_1): Change iteration through
7819 CLASSTYPE_METHOD_VEC.
7820 (dfs_pushdecls): Likewise.
7821 (dfs_compress_decls): Likewise.
7822 (add_conversions): Likewise.
7823 * semantics.c (finish_class_definition): Don't take components.
7824 Change call to finish_struct.
7825 (finish_member_declaration): New function.
7826 (finish_member_class_template): Don't take template parameters.
7827 Change call to grok_x_components. Call finish_member_template_decl.
7828 (check_multiple_declarators): New function.
7829 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7830 a passed in fieldlist.
7831 * tree.c (search_tree): Handle PTRMEM_CST.
7833 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7834 INTEGER_CSTs, for pointer-to-data members.
7836 * call.c (resolve_args): Resolve template specializations, if
7839 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7841 * Makefile.in (spew.o): Depend on toplev.h.
7843 * call.c (compare_ics): Initialize variables `deref_from_type2',
7844 `deref_to_type1' and `deref_to_type2'.
7846 * except.c (get_eh_type): Hide prototype and definition.
7847 (process_start_catch_block_old): Remove unused static prototype.
7849 * pt.c (tsubst_decl): Initialize variable `argvec'.
7851 * spew.c: Include toplev.h.
7853 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
7855 * pt.c (instantiate_decl): Do save and restore file position.
7857 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
7859 * method.c (build_decl_overload_real): Clear
7860 numeric_output_need_bar after __.
7862 1998-10-05 Nathan Sidwell <nathan@acm.org>
7864 * call.c (build_new_method_call): Issue 'incomplete type' error,
7865 if class is not defined.
7867 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7869 * call.c (build_object_call): Move declaration of variable
7870 `fn' into the scope where it is used. Don't access variable
7871 `fn' when it is uninitialized, instead use `fns'.
7873 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7875 * errfn.c (cp_thing): Print buf as a string not as a printf format
7876 to avoid problems with the operator%. Consequently, `%%' sequences
7877 in format are copied as `%' in buf.
7879 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
7881 * pt.c (pop_tinst_level): Call extract_interface_info.
7882 (instantiate_decl): Don't save and restore file position.
7884 * decl.c (cp_finish_decl): Make statics in extern inlines and
7885 templates common, if possible and the target doesn't support weak
7888 * decl.c (grokdeclarator): Remove redundant calls to
7889 build_type_variant and some duplicated code.
7890 * sig.c (build_signature_reference_type): Only take the type parm.
7891 (build_signature_pointer_type): Likewise.
7892 * tree.c (build_cplus_method_type): Adjust.
7893 * cp-tree.h: Update.
7895 1998-10-04 Mark Mitchell <mark@markmitchell.com>
7897 * call.c (build_over_call): Make pedwarns about dropped qualifiers
7898 into full-fledged errors.
7899 * cvt.c (convert_to_reference): Likewise.
7900 * typeck.c (convert_for_assignment): Likewise.
7902 * search.c (expand_upcast_vtables): In addition to unsetting
7903 TREE_READONLY, remove top-level const type qualifier.
7905 1998-10-03 Mark Mitchell <mark@markmitchell.com>
7907 * class.c (current_class_ptr, current_class_ref): Clarify
7909 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7910 NOP type conversions.
7911 * decl.c (decls_match): Use comptypes directly; ignore
7912 qualifiers on the DECL.
7913 (duplicate_decls): Remove qualifier checks on DECL.
7914 (grokdeclarator): Make the type built up include top-level
7916 * decl2.c (do_dtors): Fix spelling error.
7917 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7918 when printing type information.
7919 * init.c (build_new_1): Add documentation. Deal with the fact
7920 that type of allocated memory now contains qualifiers.
7921 * lex.c (is_global): Improve error-recovery.
7922 * sig.c (build_member_function_pointer): Don't cast away const
7923 on fields of sigtable_entry_type.
7924 * tree.c (lvalue_type): Don't look at top-level qualifiers on
7926 * typeck.c (decay_conversion): Likewise.
7927 (build_component_ref): Make sure the type of the COMPONENT_REF
7928 contains top-level qualifiers, as appropriate. Improve
7930 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
7931 (build_array_ref): Likewise.
7932 (build_unary_op): Improve error-recovery.
7933 (unary_complex_lvalue): Make taking the address a bound member
7934 function an error, not a sorry.
7935 (build_conditional_expr): Look at the type qualifiers, not the
7936 qualifiers on the expression itself.
7938 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
7940 * decl2.c (merge_functions): Remove duplicates.
7942 * decl2.c: Add -f{no-,}implicit-inline-templates.
7943 (import_export_decl): Check it.
7945 * decl.c (lookup_name_real): Template parms also take precedence
7946 over implicit typename. Only warn if yylex.
7948 * typeck.c (build_conditional_expr): Only fold if ifexp is an
7951 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7954 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
7956 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7957 * class.c (build_vbase_pointer): Use it.
7958 * rtti.c (expand_class_desc): Likewise.
7959 * tree.c (build_vbase_pointer_fields): Likewise.
7961 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
7963 * decl.c (start_decl): Add invocation of
7964 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7965 (start_function): Add invocation of
7966 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7968 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7969 HANDLE_GENERIC_PRAGMAS.
7971 1998-09-28 Anthony Green <green@cygnus.com>
7973 * semantics.c (finish_asm_stmt): Always permit volatile asms.
7975 1998-09-28 Mark Mitchell <mark@markmitchell.com>
7977 * decl.c (grokdeclarator): Tighten checks for invalid
7978 destructors. Improve error-messages and error-recovery.
7979 * decl2.c (check_classfn): Don't assume that mangled destructor
7980 names contain type information.
7982 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
7984 * search.c (get_base_distance): Remove assert.
7986 * decl2.c (build_anon_union_vars): Don't process a field with no
7988 (finish_anon_union): Also complain about local anon unions with no
7991 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
7993 * decl.c (lookup_namespace_name): If the name is a namespace,
7994 return it immediately.
7996 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7998 * cp-tree.h (define_case_label): Remove unused parameter.
7999 (check_java_method): Likewise.
8000 (grokclassfn): Likewise.
8001 (expand_aggr_init): Likewise.
8002 (build_x_delete): Likewise.
8003 (maybe_end_member_template_processing): Likewise.
8004 (unshare_base_binfos): Add prototype.
8005 (string_conv_p): Likewise.
8006 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8008 * cvt.c (build_up_reference): Remove unused parameter
8009 `checkconst', all callers changed.
8010 (build_type_conversion): Mark parameter `code' with
8012 (build_expr_type_conversion): Initialize variable `conv'.
8014 * decl.c (push_namespace): Initialize variable `d'.
8015 (define_case_label): Remove unused parameter `decl', all callers
8018 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8019 `argc' with ATTRIBUTE_UNUSED.
8020 (grokclassfn): Remove unused parameter `cname', all callers
8022 (check_java_method): Likewise for parameter `ctype'.
8023 (copy_assignment_arg_p): Mark parameter `virtualp' with
8025 (finish_prevtable_vardecl): Likewise for parameter `prev'.
8027 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8029 * init.c (expand_aggr_init_1): Remove unused parameter
8030 `alias_this', all callers changed.
8031 (expand_aggr_init): Likewise.
8032 (expand_default_init): Likewise.
8033 (build_new_1): Initialize variable `susp'.
8034 (build_x_delete): Remove unused parameter `type', all callers
8037 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8039 (readescape): Use (unsigned) value in shift.
8040 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
8041 comparing to a signed quantity.
8043 * pt.c (maybe_end_member_template_processing): Remove unused
8044 parameter `decl', all callers changed.
8045 (check_explicit_specialization): Add braces around empty body in
8047 (current_template_args): Initialize variable `args'.
8048 (lookup_template_class): Likewise for variable `prev_local_enum'.
8049 (tsubst_decl): Likewise for variable `r'.
8050 (set_mangled_name_for_template_decl): Initialize variable
8053 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8054 Likewise for variable `i'.
8055 (yylex): Initialize variable `trrr'.
8057 * typeck.c (compparms): Mark variable `strict' with
8060 * xref.c (simplify_type): Cast argument of ctype function to
8063 1998-09-24 Mark Mitchell <mark@markmitchell.com>
8065 * cp-tree.h (language_lvalue_valid): Remove.
8066 * decl.c (grokdeclarator): Don't disallow references to functions.
8067 * tree.c (lvalue_p_1): New function, combining duplicated
8070 (real_lvalue_p): Likewise.
8071 * typeck.c (language_lvalue_valid): Remove.
8072 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8073 they don't have TREE_READONLY set.
8074 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8076 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
8078 * spew.c (yylex): Give diagnostic.
8079 * hash.h (is_reserved_word): Add export.
8080 * gxx.gperf: Likewise.
8081 * lex.h (rid): Add RID_EXPORT.
8082 * lex.c (init_parse): Likewise.
8084 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8086 * friend.c (do_friend): Make warning a full sentence.
8088 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8090 * parse.y (component_decl_list): Improve error-recovery.
8092 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
8094 * decl.c (make_typename_type): Move error to point where name
8095 variable can be used by dump_type.
8097 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8099 * decl.c (grokfndecl): Improve error-recovery.
8100 * decl2.c (grokfield): Likewise.
8101 * pt.c (finish_member_template_decl): Likewise.
8103 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
8105 * method.c (hack_identifier): Finding multiple members is always
8108 1998-09-21 Per Bothner <bothner@cygnus.com>
8110 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
8112 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
8114 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8116 1998-09-20 Mark Mitchell <mark@markmitchell.com>
8118 * class.c (maybe_warn_about_overly_private_class): Reformat.
8120 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
8122 * exception.cc (__cplus_type_matcher): Realign some code.
8124 1998-09-16 Mark Mitchell <mark@markmitchell.com>
8126 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8127 (tinfo2.o): Likewise.
8128 (exception.o): Likewise.
8130 (opnew.o): Likewise.
8131 (opnewnt.o): Likewise.
8132 (opvnew.o): Likewise.
8133 (opvnewnt.o): Likewise.
8134 (opdel.o): Likewise.
8135 (opdelnt.o): Likewise.
8136 (opvdel.o): Likewise.
8137 (opvdelnt.o): Likewise.
8139 1998-09-16 Richard Henderson <rth@cygnus.com>
8141 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8143 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
8145 * call.c (build_field_call): Handle static data members too.
8147 * typeck.c (comptypes): When comparing pointer types, check
8148 whether referred types match even in strictest modes.
8150 1998-09-15 Mark Mitchell <mark@markmitchell.com>
8152 * cp-tree.h: Revert previous change.
8153 (finish_struct_methods): Remove declaration.
8154 * class.c: Revert previous change.
8155 (maybe_warn_about_overly_private_class): New function.
8156 (finish_struct_methods): Declare here, and make static. Remove
8157 unnecessary parameters. Tidy slightly. Use
8158 maybe_warn_about_overly_private_class.
8159 (finish_struct_1): Adjust. Remove check for private constructors,
8161 (finish_struct): Adjust.
8163 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
8165 * except.c (expand_start_catch_block): No need to check for new
8167 (process_start_catch_block_old): Deleted.
8168 (process_start_catch_block): Add call to start_decl_1().
8169 (expand_end_catch_block): Add call to end_catch_handler().
8170 * exception.cc (__cplus_type_matcher): Only check the exception
8171 language if there is an exception table.
8173 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
8175 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8176 as used to prevent conflicts with virtual function tables.
8178 1998-09-14 Mark Mitchell <mark@markmitchell.com>
8180 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8181 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8182 * class.c (maybe_class_too_private_p): New function.
8183 (finish_struct_methods): Use it.
8184 (finish_struct_1): Likewise.
8185 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
8188 * pt.c (check_specialization_scope): Fix spelling error.
8189 (check_explicit_specialization): Remove code to handle explicit
8190 specializations in class scope; they are now correctly diagnosed
8193 1998-09-10 Mark Mitchell <mark@markmitchell.com>
8195 * decl.c (pushdecl): Don't copy types if the
8196 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
8199 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8201 * class.c (get_enclosing_class): New function.
8202 (is_base_of_enclosing_class): Likewise.
8203 * cp-tree.h (get_enclosing_class): Declare.
8204 (is_base_of_enclosing_class): Likewise.
8205 * pt.c (coerce_template_parms): Use them.
8207 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
8209 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
8210 null to decide whether to use it.
8212 * error.c (dump_type_real): Handle NAMESPACE_DECL.
8213 * parse.y (base_class.1): Avoid crash on error.
8215 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
8217 * decl.c (make_typename_type): If context is a namespace, the code
8220 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
8222 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
8224 1998-09-08 Mark Mitchell <mark@markmitchell.com>
8226 * cp-tree.h (anonymous_namespace_name): Declare.
8227 * decl.c: Define it.
8228 (push_namespace): Use anonymous_namespace_name, rather than local
8230 * error.c (dump_decl): If a namespace is named
8231 anonymous_namespace_name, call it {anonymous}.
8233 * decl.c (grokparms): Distinguish between references and pointers
8236 1998-09-08 Richard Henderson <rth@cygnus.com>
8237 Mark Mitchell <mark@markmitchell.com>
8239 * pt.c (process_partial_specialization): Consistently allocate
8240 and zero tpd.parms based on ntparms. Use tpd2.parms, not
8241 tpd.parms, where appropriate.
8243 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
8245 * Makefile.in (INCLUDES): Update after recent toplevel gcc
8248 1998-09-05 Mark Mitchell <mark@markmitchell.com>
8250 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
8251 * class.c (finish_struct): Remove hackery to deal with explicit
8252 specializations in class scope.
8253 * decl.c (grokfndecl): Improve error-recovery.
8254 * decl2.c (grokfield): Likewise.
8255 * pt.c (check_specialization_scope): New function.
8256 (begin_specialization): Call it.
8257 (process_partial_specialization): New function, split out from
8258 push_template_decl. Check partial specializations more
8260 (push_template_decl): Call it.
8261 (check_explicit_specialization): Don't attempt to handle explicit
8262 specializations in class scope.
8263 (template_parm_data): Document. Add current_arg and
8264 arg_uses_template_parms.
8265 (mark_template_parm): Set it.
8266 (tsubst_arg_types): Remove unused variable.
8267 * semantics.c (begin_class_definition): Tweak.
8269 1998-09-04 Mark Mitchell <mark@markmitchell.com>
8271 * inc/typeinfo (type_info::type_info(const char*)): Make
8274 * cp-tree.h (hash_tree_cons_simple): New macro.
8275 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
8276 (coerce_template_parms): Use make_temp_vec, instead of
8277 make_tree_vec. Document this behavior.
8278 (lookup_template_class): Likewise.
8279 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
8280 Remove dead code (and add assertion to check its deadness). Fix
8281 bug w.r.t. exception specifications.
8283 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
8285 * decl2.c (import_export_vtable): Always make artificials comdat.
8286 (import_export_decl): Likewise.
8287 * pt.c (mark_decl_instantiated): Likewise.
8289 1998-09-03 Mark Mitchell <mark@markmitchell.com>
8291 * cp-tree.h (finish_globally_qualified_member_call_expr):
8293 (finish_qualified_call_expr).
8294 * semantics.c: Likewise.
8295 * parse.y (primary): Use it.
8296 * method.c (hack_identifier): Remove redundant code.
8298 * init.c (resolve_offset_ref): Call convert_from_reference to
8299 handle members of reference type. Improve error recovery.
8301 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
8303 * cp-tree.h: Declare warn_nontemplate_friend.
8304 * decl2.c (lang_decode_option): Set.
8305 * lang-options.h: Add -Wnon-template-friend.
8306 * friend.c (do_friend): Use to toggle non-template function warning.
8308 1998-09-03 Mark Mitchell <mark@markmitchell.com>
8310 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
8311 corresponding INTEGER_CSTs when processing_template_decl.
8312 * pt.c (tsubst_enum): Tweak accordingly.
8314 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8316 * decl.c (pushdecl_class_level): Add warning here.
8319 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
8321 * cvt.c (convert_pointer_to_real): Tidy.
8322 * search.c (get_base_distance_recursive): Simplify.
8323 (get_base_distance): Likewise.
8325 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
8328 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
8330 * lex.c (check_newline): Call HANDLE_PRAGMA before
8331 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
8332 if unknown pragmas are encountered.
8333 (handle_sysv_pragma): Interpret return code from
8334 handle_pragma_token (). Return success/failure indication rather
8335 than next unprocessed character.
8336 (pragma_getc): New function: retrieves characters from the
8337 input stream. Defined when HANDLE_PRAGMA is defined.
8338 (pragma_ungetc): New function: replaces characters back into the
8339 input stream. Defined when HANDLE_PRAGMA is defined.
8341 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
8343 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
8344 * class.c (build_vtable_entry_ref): Likewise.
8346 1998-09-01 Mark Mitchell <mark@markmitchell.com>
8348 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
8349 * decl2.c (import_export_decl): Likewise.
8350 * pt.c (instantiate_decl): Use it.
8352 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
8354 * decl.c (lookup_name_real): Also do implicit typename thing for
8355 artificial TYPE_DECLs.
8356 * search.c (lookup_field): Likewise.
8357 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
8358 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
8359 (enter_scope_of): Extract type from implicit typename.
8360 (begin_class_definition): Likewise.
8361 * lex.c (identifier_type): Handle implicit typename when checking
8364 * cp-tree.h: Declare flag_strict_prototype.
8365 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
8367 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
8368 specified, set it to the value of pedantic.
8370 1998-09-01 Mark Mitchell <mark@markmitchell.com>
8372 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
8374 1998-08-31 Mark Mitchell <mark@markmitchell.com>
8376 * decl.c (finish_enum): Handle member enums of classes declared in
8379 * decl2.c (grok_x_components): Strip attributes before calling
8382 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
8384 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
8385 -fenum-int-equivalence and -fno-nonnull-objects.
8386 * class.c (check_for_override): Remove support for -fall-virtual.
8387 (finish_struct_1): Likewise.
8388 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
8389 * typeck.c (build_binary_op_nodefault): Likewise.
8390 * cvt.c (ocp_convert): Likewise.
8391 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
8392 * class.c (build_vbase_path): Likewise.
8394 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
8396 * Makefile.in (INTERFACE): New, set to 1.
8398 1998-08-30 Mark Mitchell <mark@markmitchell.com>
8400 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
8401 comparing with global_namespace.
8402 (dump_aggr_type): Likewise.
8404 * decl.c (grokfndecl): Issue error on declaration of friend
8405 templates with explicit template arguments.
8407 * pt.c (convert_template_argument): New function, split out
8409 (coerce_template_parms): Here.
8410 (tsubst): Attempt better error-recovery.
8412 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
8414 * pt.c (decl_template_parm_p): Add checks for
8415 TEMPLATE_TEMPLATE_PARM.
8417 1998-08-28 Mark Mitchell <mark@markmitchell.com>
8419 * lex.c (do_identifier): Fix thinko in previous change.
8421 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
8423 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
8424 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
8426 1998-08-28 Richard Henderson <rth@cygnus.com>
8428 Add support for discarding unused virtual functions.
8429 * lang-options.h: Add -fvtable-gc.
8430 * cp-tree.h: Add flag_vtable_gc.
8431 * decl2.c (output_vtable_inherit): New fn.
8432 (finish_vtable_vardecl): Call it.
8433 * class.c (build_vtable_entry_ref): New fn.
8434 (build_vtbl_ref): Call it.
8436 1998-08-28 Mark Mitchell <mark@markmitchell.com>
8438 * cp-tree.h (build_enumerator): Take the enumeration type as a
8440 * decl.c (finish_enum): Don't set the TREE_TYPE for the
8441 enumeration constant values if we're processing_template_decls.
8442 Don't set the type for the CONST_DECLs either; that's done in
8444 (build_enumerator): Take the enumeration type as a
8446 * lex.c (do_identifier): Don't resolve enumeration constants while
8447 processing template declarations, even if they happen to be
8448 TEMPLATE_PARM_INDEXs.
8450 * parse.y (current_enum_type): New variable.
8451 (primary): Don't allow statement-expression in local classes just
8452 as we don't in global classes.
8453 (structsp): Use current_enum_type.
8454 (enum_list): Likewise.
8455 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
8456 finish_enum; they no longer occur.
8458 * cp-tree.h (finish_base_specifier): New function.
8459 * parse.y (base_class): Use it.
8460 * semantics.c (finish_base_specifier): Define it.
8462 * parse.y (structsp): Warn on use of typename outside of template
8465 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
8467 * lex.c (handle_cp_pragma): Remove #pragma vtable.
8468 * lang-options.h: Remove +e options.
8469 * decl2.c (lang_decode_option): Likewise.
8470 (import_export_vtable): Don't check write_virtuals.
8471 (finish_vtable_vardecl, finish_file): Likewise.
8472 * search.c (dfs_debug_mark): Likewise.
8473 * semantics.c (begin_class_definition): Likewise.
8474 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
8476 * call.c (build_over_call): Check flag_elide_constructors.
8477 * decl2.c: flag_elide_constructors defaults to 1.
8478 * typeck.c (convert_arguments): Remove return_loc parm.
8479 (build_function_call_real): Adjust.
8481 * search.c: Tear out all mi_matrix and memoize code.
8482 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
8483 * lang-options.h: Remove documentation for -fhandle-exceptions,
8484 -fmemoize-lookups and -fsave-memoized.
8485 * cp-tree.h: Lose mi_matrix and memoize support.
8486 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
8487 * class.c: Lose struct class_level.
8488 (pushclass, popclass): Lose memoize support.
8489 * init.c (build_offset_ref): Likewise.
8491 Never change BINFO_INHERITANCE_CHAIN.
8492 * init.c (emit_base_init): Change modification of
8493 BINFO_INHERITANCE_CHAIN to an assert.
8494 * search.c (get_base_distance_recursive): Likewise.
8495 (get_base_distance): Likewise.
8496 (lookup_member): Likewise.
8497 (convert_pointer_to_single_level): Likewise.
8498 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
8499 (lookup_fnfields): Likewise.
8500 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
8501 (unshare_base_binfos): Don't call propagate_binfo_offsets.
8502 (layout_basetypes): Call propagate_binfo_offsets instead of
8503 unshare_base_binfos.
8504 * decl.c (xref_basetypes): Call unshare_base_binfos.
8505 * pt.c (instantiate_class_template): Likewise.
8506 * tree.c (reverse_path): Remove 'copy' parm; always make a
8508 * class.c (build_vbase_path): Just call it.
8509 * search.c (compute_access): Likewise. Don't re-reverse.
8511 1998-08-27 Mark Mitchell <mark@markmitchell.com>
8513 * class.c (build_vbase_path): Use reverse_path.
8514 (finish_base_struct): Move warnings for inaccessible bases to
8516 (modify_one_vtable): Remove check of TREE_USED (binfo).
8517 (fixup_vtable_deltas1): Likewise.
8518 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
8519 (xref_tag): Remove binfos parameter.
8520 (make_binfo): Remove chain parameter.
8521 (reverse_path): Add copy parameter.
8522 * decl.c (init_decl_processing): Change calls to xref_tag.
8523 (xref_tag): Remove binfos parameter.
8524 (xref_basetypes): Change calls to make_binfo.
8525 * decl2.c (grok_x_components): Change calls to xref_tag.
8526 (handle_class_head): Likewise.
8527 * friend.c (do_friend): Likewise.
8528 * lex.c (make_lang_type): Change calls to make_binfo.
8529 * parse.y (structsp): Change calls to xref_tag.
8530 (named_complex_class_head_sans_basetype): Likewise.
8531 (named_class_head): Likewise.
8532 * rtti.c (init_rtti_processing): Likewise.
8533 * search.c (compute_access): Change calls to reverse_path.
8534 (dfs_get_vbase_types): Change calls to make_binfo.
8535 (get_vbase_types): Remove dead code.
8536 * tree.c (unshare_base_binfos): Change calls to make_binfo.
8537 (layout_basetypes): Warn here about inaccessible bases.
8538 (make_binfo): Remove chain parameter.
8539 (reverse_path): Add copy parameter.
8541 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
8543 * class.c: #if 0 complete_type_p.
8544 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
8545 * method.c (process_overload_item): Likewise.
8546 * typeck.c (comp_target_types): Likewise.
8548 Stop sharing binfos for indirect virtual bases.
8549 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
8550 (layout_basetypes): Likewise.
8551 (unshare_base_binfos): Copy vbases, too.
8552 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
8553 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
8554 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
8555 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
8556 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
8557 reference to BINFO_VIA_PUBLIC.
8558 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
8559 (push_class_decls): Use them.
8560 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
8561 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
8563 1998-08-27 Mark Mitchell <mark@markmitchell.com>
8565 * decl.c (build_enumerator): Set DECL_CONTEXT for the
8568 1998-08-26 Mark Mitchell <mark@markmitchell.com>
8570 * cp-tree.h (finish_enum): Change prototype.
8571 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
8572 VALUES parameter. Don't try to compute mins/maxs if
8573 processing_template_decl.
8574 * parse.y (structsp): Use new calling sequence for finish_enum.
8575 * pt.c (tsubst_enum): Likewise. Take the new type as input.
8576 (lookup_template_class): Remove unused variables. Tweak.
8577 Register enums on instantiation list before substituting
8578 enumeration constants.
8579 (tsubst_decl): Remove unused variables.
8580 (regenerate_decl_from_template): Likewise.
8582 * decl.c (duplicate_decls): Don't obliterate the
8583 DECL_TEMPLATE_INFO for a template if we're not replacing it with
8586 * lex.c (do_identifier): Fix typo in comment.
8588 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8590 * errfn.c: Remove stdarg.h/varargs.h.
8593 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
8595 * pt.c (tsubst_copy): Only do typename overloading on an
8596 IDENTIFIER_NODE that happens to look like a typename if it actually
8597 has a type for us to use.
8599 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
8601 * typeck.c (comp_cv_target_types): Split out...
8602 (comp_target_types): From here. Don't allow cv-qual changes under
8603 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
8604 (build_ptrmemfunc): Pass 1 to nptrs.
8605 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8607 1998-08-25 Mark Mitchell <mark@markmitchell.com>
8609 * search.c (dependent_base_p): Don't compare a binfo to
8610 current_class_type; use the TREE_TYPE of the binfo instead.
8612 * cp-tree.h (CLASS_TYPE_P): Revise definition.
8614 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
8616 * decl.c (duplicate_decls): Don't complain about different
8617 exceptions from an internal decl even if pedantic.
8619 * typeck.c (convert_for_assignment): Converting from pm of vbase
8620 to derived is an error, not a sorry.
8622 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
8623 * class.c (fixed_type_or_null): Rename from
8624 resolves_to_fixed_type_p. Return the dynamic type of the
8625 expression, if fixed, or null.
8626 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
8627 does not match the static type.
8628 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
8629 resolves_to_fixed_type_p again.
8631 1998-08-24 Mark Mitchell <mark@markmitchell.com>
8633 * pt.c (tsubst_decl): Move special case code for dealing with
8634 tricky friend templates here from ...
8635 (regenerate_decl_from_template): Here.
8637 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
8639 * decl.c (start_decl): Remove redundant linkage check.
8641 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
8643 * typeck.c (c_expand_return): Handle the case that valtype
8644 is wider than the functions return type.
8646 1998-08-24 Mark Mitchell <mark@markmitchell.com>
8648 * cp-tree.h (CLASS_TYPE_P): New macro.
8649 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
8650 * pt.c (process_template_parm): Undo previous change.
8652 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
8654 * cp-tree.h: Declare.
8655 * pt.c (decl_template_parm_p): New function.
8656 * decl.c (pushdecl): Check decls for redeclaring template parms.
8657 (xref_tag): Make redeclaration an error, print decl.
8658 * decl2.c (grokfield): Check field_decls for redeclaration as well.
8660 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
8662 * parse.y (primary): Fix up the type of string constants.
8664 1998-08-24 Mark Mitchell <mark@markmitchell.com>
8666 * typeck.c (convert_for_initialization): Move check for odd uses
8667 of NULL to avoid duplicate warnings.
8669 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
8671 * tree.c (lvalue_type): Fix for arrays.
8672 * typeck.c (string_conv_p): New fn.
8673 (convert_for_assignment): Use it.
8674 (build_unary_op): Use lvalue_type.
8675 * call.c (standard_conversion, convert_like): Use string_conv_p.
8676 (add_function_candidate): Use lvalue_type.
8677 * cvt.c (convert_to_reference): Likewise.
8678 * decl2.c (lang_decode_option): Ignore -traditional.
8679 * decl.c (init_decl_processing): flag_writable_strings inhibits
8682 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
8684 * lang-options.h (lang_options): Add fconst-strings to the list
8686 * decl2.c (lang_f_options, lang_decode_option): Likewise.
8688 1998-08-24 Nathan Sidwell <nathan@acm.org>
8690 * lex.c (real_yylex): Don't warn about long long constants if
8691 we're allowing long long.
8693 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8695 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
8696 accessing bindings directly.
8698 * search.c (my_tree_cons): Reimplement.
8700 * lang-specs.h: Remove __HONOR_STD.
8701 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
8703 1998-08-23 Mark Mitchell <mark@markmitchell.com>
8705 * decl.c (grokdeclarator): Complain about in-class initialization
8706 of aggregates and/or references.
8707 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
8708 TEMPLATE_TYPE_PARMs.
8710 * decl2.c (grok_array_decl): Add comment.
8711 (mark_used): Don't instantiate an explicit instantiation.
8712 * friend.c (make_friend_class): Remove bogus comment. Fix check
8713 for partial specializations.
8714 * pt.c (check_explicit_specialization): Don't
8715 SET_DECL_EXPLICIT_INSTANTIATION here.
8716 (mark_decl_instantiated): Or here.
8717 (do_decl_instantiation): Do it here, instead. Add checks for
8718 duplicate explicit instantiations, etc. Tidy.
8719 (do_type_instantiation): Likewise.
8720 (instantiate_decl): Improve comments. Complain about explicit
8721 instantiations where no definition is available.
8723 * cp-tree.h (ansi_null_node): Remove.
8724 * call.c (build_over_call): Warn about converting NULL to an
8726 * cvt.c (build_expr_type_conversion): Likewise. Use
8727 null_ptr_cst_p instead of expanding it inline.
8728 * decl.c (ansi_null_node): Remove.
8729 (init_decl_processing): Make null_node always have integral type.
8730 * except.c (build_throw): Warn about converting NULL to an
8732 * lex.c (init_parse): Remove handling of ansi_null_node.
8733 * pt.c (type_unification_real): Don't convert NULL to void* type.
8734 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
8735 (convert_for_assignment): Warn about converting NULL to an
8737 (convert_for_initialization): Likewise.
8739 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
8741 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
8742 * pt.c (coerce_template_parms): Use no_linkage_check.
8743 * decl.c (grokvardecl): Likewise.
8744 (grokfndecl): Likewise. Members of anonymous types have no linkage.
8746 * method.c (process_overload_item): Remove useless code.
8748 1998-08-20 Per Bothner <bothner@cygnus.com>
8750 Handle new'ing of Java classes.
8751 * init.c (build_class_classref): New function.
8752 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
8753 constructor does not return this; don't need to exception-protect.
8755 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
8756 * decl2.c (acceptable_java_type): Handle template-derived types.
8758 1998-08-20 Per Bothner <bothner@cygnus.com>
8760 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
8762 1998-08-20 Mark Mitchell <mark@markmitchell.com>
8764 * decl.c (duplicate_decls): Always merge the old and new patterns
8765 for templates, regardless of whether or not the new one has
8766 DECL_INITIAL. Don't throw away specializations. Merge
8768 * pt.c (tsubst_decl): Use the right pattern when calculating the
8769 complete args for a new template instance.
8770 (do_decl_instantiation): Fix typo in comment.
8771 (regenerate_decl_from_template): Deal with tricky friend template
8773 (instantiate_decl): Likewise.
8775 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
8777 * init.c (build_builtin_delete_call): Add missing assemble_external
8780 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
8782 * parse.y (notype_unqualified_id): Also accept ~A<int>.
8784 1998-08-19 Mark Mitchell <mark@markmitchell.com>
8786 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
8788 * except.c (build_throw): Warn when NULL is thrown, even with
8789 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
8792 * cp-tree.h (ansi_null_node): New variable.
8793 * decl.c (ansi_null_node): New variable.
8794 (init_decl_processing): Initialize its type.
8795 * lex.c (init_parse): Initialize its value. Use ansi_null_node
8796 for null_node in non-ANSI mode.
8797 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8798 place of null_node to avoid spurious errors.
8800 1998-08-17 Mark Mitchell <mark@markmitchell.com>
8802 * cp-tree.h (enter_scope_of): New function.
8803 * parse.y (complex_direct_notype_declarator): Use it.
8804 * semantics.c (enter_scope_of): New function.
8806 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
8808 * decl.c (grokparms): No, here.
8810 * decl.c (grokdeclarator): Catch parm with pointer to array of
8811 unknown bound here...
8812 * method.c (process_overload_item): ...not here.
8814 * gxxint.texi: Remove obsolete documentation of overloading code.
8816 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8817 * class.c (finish_struct_bits): Likewise.
8819 * tree.c (lvalue_type): Fix for arrays.
8820 * typeck.c (build_unary_op): Use lvalue_type.
8821 * call.c (add_function_candidate): Likewise.
8822 * cvt.c (convert_to_reference): Likewise.
8824 * decl2.c (lang_decode_option): Ignore -traditional.
8826 * init.c (build_offset_ref): Don't mess with error_mark_node.
8827 * lex.c (do_scoped_id): Use cp_error.
8829 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8831 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
8833 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8835 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
8837 * cp-tree.h (set_identifier_local_value): Provide prototype.
8839 * decl2.c (do_namespace_alias): Remove unused variables `binding'
8842 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
8844 * Makefile.in: Rename BBISON to BISON so that it can be properly
8845 inherited from the parent makefile.
8847 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
8849 * lang-options.h: Add -finit-priority.
8850 * decl2.c: Likewise. Check flag_init_priority instead of
8853 * decl2.c (setup_initp): New fn.
8854 (start_objects, finish_objects, do_ctors): Handle init_priority.
8855 (do_dtors, finish_file): Likewise.
8857 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
8859 * pt.c (tsubst_copy): Hush warning.
8861 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8863 1998-08-12 Mark Mitchell <mark@markmitchell.com>
8865 * pt.c (print_template_context): Don't abort when instantiating a
8868 * decl.c (grokdeclarator): Issue errors on namespace qualified
8869 declarators in parameter lists or in class scope.
8871 1998-08-09 Mark Mitchell <mark@markmitchell.com>
8873 * pt.c (check_explicit_specialization): Don't abort on bogus
8874 explicit instantiations.
8876 1998-08-07 Mark Mitchell <mark@markmitchell.com>
8878 * typeck.c (require_complete_type): Use complete_type_or_else.
8879 (complete_type_or_else): Always return NULL_TREE on failure, as
8882 * pt.c (tsubst_aggr_type): Prototype.
8883 (tsubst_decl): New function, split out from tsubst. Set
8884 input_filename and lineno as appropriate.
8885 (pop_tinst_level): Restore the file and line number saved in
8887 (instantiate_class_template): Set input_filename and lineno as
8889 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
8890 context for a TYPENAME_TYPE is complete.
8892 * decl2.c (grokbitfield): Issue errors on bitfields declared with
8894 (do_dtors): As in do_ctors, pretend to be a member of the same
8895 class as a static data member while generating a call to its
8898 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8899 conversions, even in complex virtual base class hierarchies.
8901 1998-08-06 Mark Mitchell <mark@markmitchell.com>
8903 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8904 (TYPE_TEMPLATE_INFO): Likewise.
8905 (SET_TYPE_TEMPLATE_INFO): Likewise.
8906 (ENUM_TI_TEMPLATE): Likewise.
8907 (ENUM_TI_ARGS): Likewise.
8908 (lookup_nested_type_by_name): Remove.
8909 * decl.c (maybe_process_template_type_declaration): Handle enums.
8910 (start_enum): Don't check for primary-template enum declarations
8912 (finish_enum): Clean up, document. Make sure template enum
8913 constants get the correct type.
8914 (build_enumerator): Copy initializers for template enumerations,
8916 (grok_enum_decls): Document.
8917 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8918 better. Build LOOKUP_EXPRs for local variables, even if they are
8920 * pt.c (tsubst_enum): Remove field_chain parameter.
8921 (template_class_depth): Include the depth of surrounding function
8923 (push_template_decl): Check for primary-template enum declarations
8924 here. Deal with enumeration templates.
8925 (lookup_template_class): Likewise.
8926 (for_each_template_parm): Likewise.
8927 (instantiate_class_template): Don't call tsubst_enum directly,
8928 call tsubst instead, to instantiate enums. Deal with all
8929 field_chain issues here, not in tsubst_enum.
8930 (lookup_nested_type_by_name): Remove.
8931 (tsubst_aggr_type): Revise handling of enumeration types.
8933 (tsubst_copy): Likewise.
8934 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8936 1998-08-04 Mark Mitchell <mark@markmitchell.com>
8938 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8939 uses template parameters.
8940 * method.c (build_template_parm_names): Use the full set of
8941 template arguments for tsubst'ing.
8942 (build_overload_identifier): Pass the full set of template
8943 arguments to build_template_parm_names, not just the
8945 * pt.c (TMPL_ARGS_DEPTH): Define using
8946 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8947 (NUM_TMPL_ARGS): New macro.
8948 (add_outermost_template_args): Deal with the case where the outer
8949 args will be completely discarded.
8950 (coerce_template_parms): Use the full set of template arguments
8951 for tsubst'ing. Simplify. Add some asserts. Improve
8953 (lookup_template_class): Pass the full set of template arguments
8954 to coerce_template_parms.
8955 (tsubst): Add assertion.
8956 (do_type_instantiation): Don't instantiate member template
8959 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8960 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8962 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
8964 * method.c (set_mangled_name_for_decl): Change return type to void.
8966 * decl.c (lookup_name_real): A namespace-level decl takes priority
8967 over implicit typename. Avoid doing the same lookup twice.
8969 * search.c (dependent_base_p): New fn.
8970 (dfs_pushdecls, dfs_compress_decls): Use it.
8972 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8973 virtual functions if the type doesn't have any.
8975 1998-08-03 Mark Mitchell <mark@markmitchell.com>
8977 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8978 uses template parameters.
8980 1998-08-02 Mark Mitchell <mark@markmitchell.com>
8982 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
8983 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8984 * lex.c (do_identifier): Don't use a second argument, or a type,
8985 when building LOOKUP_EXPRs.
8986 (do_identifier): Likewise.
8987 (do_scoped_id): Likewise.
8988 * method.c (hack_identifier): Improve error message.
8989 * pt.c (lookup_template_function): Don't needlessly call
8990 copy_to_permanent or build_min.
8991 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
8993 (do_decl_instantiation): Improve error message.
8994 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8995 (build_min): Copy the type to the permanent obstack, too.
8997 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
8999 * init.c (init_init_processing): Remove BI* handling.
9000 (build_builtin_call): Remove.
9001 (build_builtin_delete_call): New fn.
9002 (build_delete): Use it.
9004 1998-07-31 Mark Mitchell <mark@markmitchell.com>
9006 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9007 (maybe_check_template_type): New function.
9008 * decl.c (maybe_process_template_type_declaration): New function,
9009 split out from pushtag Call maybe_check_template_type.
9010 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
9011 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9012 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9013 * pt.c (template_class_depth_real): Generalization of ...
9014 (template_class_depth): Use it.
9015 (register_specialization): Use duplicate_decls for duplicate
9016 declarations of specializations.
9017 (maybe_check_template_type): New function.
9018 (push_template_decl_real): Fix comment.
9019 (convert_nontype_argument): Likewise.
9020 (lookup_template_class): Likewise. Avoid an infinite loop on
9022 (tsubst_friend_function): Fix comment.
9023 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9025 * semantics.c (begin_function_definition): Use
9026 reset_specialization to note that template headers don't apply
9027 directly to declarations after the opening curly for a function.
9029 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
9031 * decl.c (push_overloaded_decl): Use current_namespace instead of
9032 DECL_CONTEXT (decl) to determine where we go.
9034 * decl.c (lookup_name_real): Fix typo.
9036 1998-07-28 Mark Mitchell <mark@markmitchell.com>
9038 * friend.c (is_friend): Be lenient with member functions to deal
9039 with nested friends.
9041 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
9043 * class.c (finish_struct_1): Convert integer_zero_node to
9044 ssizetype before passing it to set_rtti_entry.
9045 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9046 of any size to a pointer.
9048 1998-07-27 Mark Mitchell <mark@markmitchell.com>
9050 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9051 (build_template_decl_overload): Remove.
9052 (set_mangled_name_for_decl): New function.
9053 (innermost_args): Remove is_spec parameter.
9054 (most_specialized, most_specialized_class): Remove declarations.
9055 (lookup_template_class): Add entering_scope parameter.
9056 (maybe_process_partial_specialization): New function.
9057 (finish_template_decl): Likewise.
9058 (finish_template_type): Likewise.
9059 * class.c (finish_struct): Clean up processing of member template
9061 * decl.c (pushtag): Fix formatting.
9062 (lookup_tag): Improve handling of pseudo-global levels.
9063 (make_typename_type): Adjust call to lookup_template_class.
9064 (shadow_tag): Use maybe_process_partial_specialization.
9065 (xref_tag): Improve handling of member friends.
9066 (start_function): Call push_nested_class before
9067 push_template_decl. Don't call push_template_decl for
9069 * decl2.c (grok_x_components): Don't call xref_tag for
9070 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
9071 (grokclassfn): Use set_mangled_name_for_decl.
9072 (arg_assoc_class): Adjust call to innermost_args.
9073 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9074 * error.c (dump_function_name): Improve printing of template
9076 * friend.c (is_friend): Don't compare types of decls to determine
9077 friendship, unless flag_guiding_decls.
9078 (make_friend_class): Partial specializations cannot be friends.
9079 (do_friend): Use set_mangled_name_for_decl. Call
9080 push_template_decl_real instead of push_template_decl.
9081 * method.c (build_decl_overload_real): Remove prototype. Give it
9083 (build_overload_identififer): Adjust call to innermost_args.
9084 (build_template_decl_overload): Remove.
9085 (set_mangled_name_for_decl): New function.
9086 * parse.y (.finish_template_type): New non-terminal.
9087 (template_def): Use finish_template_decl. Use template_extdef
9089 (template_extdef, template_datadef): New non-terminals, containing
9090 only those rules for things which can be templates.
9092 (template_type, self_template_type): Use .finish_template_type.
9093 (named_class_head): Use maybe_process_partial_specialization.
9094 * pt.c (mangle_class_name_for_template): Remove context parameter.
9095 (get_class_bindings): Remove outer_args parameter.
9096 (complete_template_args): Remove.
9097 (add_outermost_template_args): New function.
9098 (register_specialization): Return the specialization.
9099 (unregister_specialization): New function.
9100 (tsubst_template_parms): Likewise.
9101 (most_specialized, most_specialized_class): Prototype here as
9103 (original_template): Rename to most_general_template.
9104 (tsubst_template_parms): New function.
9105 (set_mangled_name_for_template_decl): Likewise.
9106 (TMPL_ARGS_DEPTH): New macro.
9107 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9108 (TMPL_ARGS_LEVEL): New macro.
9109 (SET_TMPL_ARGS_LEVEL): Likewise.
9110 (TMPL_ARG): Likewise.
9111 (SET_TMPL_ARG): Likewise.
9112 (TMPL_ARGS_DEPTH): Likewise.
9113 (finish_member_template_decl): Use finish_template_decl.
9114 (maybe_process_partial_specialization): New function, split out
9116 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9117 (maybe_begin_member_template_processing): Use new macros.
9118 (is_member_template): Likewise.
9119 (is_member_template_class): Likewise.
9120 (add_to_template_args): Likewise. Deal with multiple levels of
9122 (maybe_process_partial_specialization): New function.
9123 (retrieve_specialization): Add consistency check.
9124 (determine_specialization): Return full argument list.
9125 (check_explicit_specialization): Tweak friend handling. Use full
9126 argument lists. Simplify.
9127 (current_template_args): Use new macros.
9128 (push_template_decl_real): Change ill-named mainargs to specargs.
9129 Check that a partial specialization actually specializes at least
9130 one parameter. Improve friend handling. Modify for full
9132 (classtype_mangled_name): Don't mangle the names of
9134 (lookup_template_class): Add entering_scope parameter. Use it to
9135 avoid finding a template type when an instantiation is required.
9136 Simplify. Use full template arguments.
9137 (tsubst_friend_function): Use unregister_specialization. Use new
9138 macros. Use full template arguments.
9139 (tsubst_friend_class): Substitute, using tsubst_template_parms,
9140 into the template parameters before passing them to
9141 redeclare_class_template.
9142 (instantiate_class_template): Simplify. Use full template
9143 arguments. Adjust calls to get_class_bindings. Use
9144 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
9145 (innermost_args): Use new macros.
9146 (tsubst_aggr_type): New function, split out from tsubst.
9147 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9148 conventions for lookup_template_class. Refine handling of partial
9149 instantiations. Remove calls to complete_template_args.
9150 Simplify. Add consistency checks. Use set_mangled_name_for_decl
9151 and set_mangled_name_for_template_decl.
9152 (tsubst_copy): Use tsubst_aggr_type.
9153 (instantiate_template): Use full template arguments.
9154 (more_specialized): Improve formatting.
9155 (more_specialized_class): Adjust calls to get_class_bindings.
9156 (get_bindings_real): Don't call complete_template_args.
9157 (most_specialized): Don't overwrite input; create a new list.
9158 (most_specialized_class): Use most_general_template.
9159 (regenerate_decl_from_template): Use unregister_specialization.
9160 Use full template arguments.
9161 (instantiate_decl): Use full template arguments.
9162 (set_mangled_name_for_template_decl): New function.
9163 * semantics.c (begin_class_definition): Use
9164 maybe_process_partial_specialization.
9165 (finish_member_class_template): New function.
9166 (finish_template_decl): Likewise.
9167 (finish_template_type): Likewise.
9168 (typeck.c): Don't crash after issuing a compiler_error.
9169 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9171 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
9173 * typeck2.c (build_functional_cast): Handle default-initialization.
9175 * call.c (build_over_call): Pass 1 to popclass.
9177 * parse.y (direct_notype_declarator): Add precedence declaration
9178 to notype_unqualified_id case.
9179 * Makefile.in (EXPECT): Adjust.
9181 * tree.c (ovl_member): Fix for single function in OVL.
9183 1998-07-27 Dave Brolley <brolley@cygnus.com>
9185 * c-lex.c (yylex): Fix boundary conditions in character literal and
9186 string literal loops.
9188 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
9190 * decl.c (lookup_name_real): OK, do return the from_obj value
9191 unless got_object depends on template parms.
9193 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
9195 * pt.c (coerce_template_parms): Also complain about local enums.
9197 * cp-tree.h: Add prototype for set_identifier_local_value.
9198 * decl.c (set_identifier_local_value_with_scope): Make static,
9200 * search.c (covariant_return_p): Likewise.
9201 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
9203 * call.c (build_method_call): Only pull out the type of a destructor
9204 if it's a template type parm.
9205 * decl.c (lookup_name_real): Never return the from_obj value.
9207 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
9209 * except.c (process_start_catch_block_old): Call start_decl_1 for
9211 * decl.c (start_decl_1): Avoid duplicate error.
9213 * init.c (expand_default_init): Only perform the initialization if
9214 it will do something.
9216 1998-07-23 H.J. Lu (hjl@gnu.org)
9218 * parse.y (base_class): Check for invalid base class.
9220 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
9222 * decl2.c (import_export_template): Fold in...
9223 (import_export_class): ...to here. Handle dllimport/export.
9225 * class.c (build_vtable): Pass at_eof to import_export_vtable.
9226 (prepare_fresh_vtable): Likewise.
9227 * decl2.c (import_export_class): Split out...
9228 (finish_prevtable_vardecl): From here.
9229 * class.c (finish_struct_1): Call import_export_class if at_eof.
9231 * decl.c (start_function): #if 0 mysterious code I wrote and have
9233 * rtti.c (get_tinfo_fn): If this is for a class type, set
9236 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
9238 * inc/exception: Change terminate and unexpected to ().
9240 * parse.y (named_class_head_sans_basetype_defn): A
9241 named_class_head_sans_basetype followed by '{' or ':' is a defn.
9243 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
9245 * tree.c (canonical_type_variant): New fn to handle arrays.
9246 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
9247 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
9248 * method.c (process_overload_item): Use build_overload_value for
9251 1998-07-20 Dave Brolley <brolley@cygnus.com>
9253 * lex.c (mbchar.h): #include it.
9254 (GET_ENVIRONMENT): New macro.
9255 (init_parse): Set character set based on LANG environment variable.
9256 (real_yylex): Handle multibyte characters in character literals.
9257 (real_yylex): Handle multibyte characters in string literals.
9259 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
9261 * lex.c (do_identifier): Look for class value even if we don't
9262 have a global value. Do implicit declaration if parsing is 2.
9263 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
9266 1998-07-19 Mark Mitchell <mark@markmitchell.com>
9268 * decl.c (pushtag): Revert previous change.
9269 * pt.c (lookup_template_class): Don't put out debugging
9270 information for types that use template parameters.
9272 * decl.c (pushtag): Don't put out debugging information for
9273 compiler-generated typedefs.
9275 * error.c (dump_type_real): Don't crash when presented with
9276 intQI_type_node or the like.
9278 * semantics.c (finish_translation_unit): Fix spelling error in
9281 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
9283 * decl.c (lookup_name_real): Pull out single function here.
9284 (select_decl): Not here.
9285 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
9287 * decl.c (qualify_lookup): Tweak again.
9289 * pt.c (lookup_template_class): Don't mess with the context of the
9291 * decl2.c (current_decl_namespace): Remove special handling for
9294 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
9295 a member template specialization.
9297 * tree.c (ovl_member): Use decls_match to compare functions.
9298 * decl.c (decls_match): Check the context of a function.
9300 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
9301 in Koenig lookup support rules.
9302 * semantics.c (finish_call_expr): Handle the new cases.
9304 * typeck.c (build_x_function_call): Handle overloaded methods.
9306 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
9308 1998-07-16 Mark Mitchell <mark@markmitchell.com>
9310 * semantics.c (finish_object_call_expr): Revert previous change.
9311 * call.c (build_new_method_call): Likewise. Instead, convert
9312 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
9314 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
9316 * decl.c (qualify_lookup): Handle templates.
9318 * decl2.c (do_using_directive): Don't pass ancestor.
9319 * decl.c (push_using_directive): Calculate ancestor.
9321 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
9322 * decl.c (pushdecl): Move type shadowing handling from here...
9323 (duplicate_decls): ...to here.
9324 * decl.c (set_identifier_local_value_with_scope): New fn.
9326 (set_identifier_local_value, lookup_type_current_level): New fns.
9327 * decl2.c (do_local_using_decl): Handle types and binding level
9330 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
9331 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
9332 (lookup_namespace_name): Likewise.
9333 * typeck.c (build_unary_op): Not here anymore.
9335 * decl2.c (do_class_using_decl): Make sure we get an identifier.
9336 * class.c (handle_using_decl): Ignore TYPE_DECLs.
9338 * decl.c (qualify_lookup): New fn.
9339 (lookup_name_real): Use it.
9341 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9343 * decl2.c (add_using_namespace): When directly using a namespace
9344 that was indirect before, promote it.
9346 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
9347 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
9348 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
9349 * decl.c (select_decl): Replace two flag parameters by one.
9350 (unqualified_namespace_lookup): Likewise, pass flag.
9351 (lookup_flags): New function.
9352 (lookup_name_real): Compute flags, pass them.
9353 (lookup_namespace_name): Call with zero-flag.
9354 * decl2.c (ambiguous_decl): Add flag parameter, complain only
9356 (lookup_using_namespace, qualified_lookup_using_namespace):
9357 Add flag parameter, pass them through.
9358 * lex.c (do_scoped_id): Call with zero-flag.
9360 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
9362 * typeck.c (convert_for_assignment): Use comptypes.
9364 1998-07-16 Mark Mitchell <mark@markmitchell.com>
9366 * semantics.c (finish_object_call_expr): Move test for the
9367 function called being a TYPE_DECL to ...
9368 * call.c (build_new_method_call): Here.
9370 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
9372 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
9373 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
9375 * lex.c (looking_for_typename): Don't initialize.
9377 * decl2.c (ambiguous_decl): Clarify error message.
9379 * decl.c (push_using_directive): Iterate over namespaces used
9382 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9384 * decl2.c (add_using_namespace): Iterate over namespaces used
9387 * decl.c (lookup_name_real): Accept namespace aliases as locals.
9388 (cat_namespace_levels): Ignore aliases.
9389 (duplicate_decls): Ignore duplicate aliases.
9390 * decl2.c (do_namespace_alias): Process block level namespace
9391 aliases. Store alias with pushdecl. Remove odr errors.
9392 * parse.y (namespace_alias): New non-terminal.
9395 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
9397 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
9398 Handle TEMPLATE_TYPE_PARM.
9399 (arg_assoc): Rewrite.
9401 * pt.c (complete_template_args): Don't look at the context unless
9404 * method.c (build_decl_overload_real): Fix namespace handling.
9406 * typeck.c (build_unary_op): Extract a lone function from an
9409 * call.c (build_scoped_method_call): Handle getting a namespace
9410 for basetype in a destructor call.
9411 (check_dtor_name): Handle enums.
9413 * parse.y (using_directive): New nonterminal.
9414 (extdef, simple_stmt): Use it.
9416 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
9418 * decl2.c (add_function): Move error message ...
9419 (arg_assoc_namespace): ... from here.
9421 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
9423 * parse.y (namespace_qualifier): Fix multiple level handling.
9424 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
9425 (arg_assoc): Don't skip the first argument of a function.
9427 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
9429 * search.c (my_tree_cons): Clean up.
9431 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
9433 * call.c (joust): Don't warn about "confusing" conversions to the
9436 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
9438 * class.c (push_nested_class): Complain about namespaces.
9439 * decl.c (start_decl): Enter the object's namespace.
9440 (cp_finish_decl): Leave it.
9441 (grokdeclarator): Likewise.
9442 * decl2.c (check_decl_namespace): New function.
9443 (finish_file): Call it.
9444 * parse.y (complex_direct_notype_declarator): Set complexity
9445 of namespace-qualified ids to -1, enter the namespace.
9447 * method.c (build_template_decl_overload): Expect _DECL as first
9448 parameter. Put context temporarily into current_namespace.
9449 * pt.c (check_explicit_specialization): Change caller.
9452 * init.c (build_offset_ref): Call mark_used and
9453 convert_from_reference for namespace members.
9455 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
9457 * search.c (my_tree_cons): The bitfield is at index 2.
9459 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
9461 * lang-options.h: Format changed to work with new --help support
9464 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
9466 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
9467 Do Koenig lookup in CALL_EXPR.
9468 (arg_assoc): Handle error_mark.
9469 * lex.c (is_global): New function.
9470 (do_identifier): Expect arguments for Koenig lookup.
9471 * parse.y (primary): Add rules for calls of unqualified function calls.
9472 (do_id): Change call of do_identifier.
9473 * pt.c (finish_stmt_expr): Likewise.
9474 * semantics.c (finish_id_expr): Likewise.
9475 (finish_call_expr): Add integer parameter to indicate
9476 argument-dependent lookup.
9478 * decl.c (struct binding_level): New field using_directives.
9479 (push_using_decl): Not sorry anymore.
9480 (push_using_directive): New function.
9481 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
9482 (unqualified_namespace_lookup): New function, code from ...
9483 (lookup_name_real): ... here.
9484 * decl2.c (lookup_using_namespace): Pass using list instead of
9486 (validate_nonmember_using_decl): New function.
9487 (do_nonmember_using_decl): New function.
9488 (do_toplevel_using_decl): Use them.
9489 (do_local_using_decl): New function.
9490 (do_using_directive): Support block-level directives.
9491 * parse.y (simple_stmt): Support using declarations and
9493 (namespace_qualifier, namespace_using_decl): New non-terminals.
9495 * xref.c (classname): New function.
9496 (GNU_xref_hier): Change class and base parameters to tree.
9497 * decl.c (xref_baseypes): Change caller.
9498 * friend.c (make_friend_class): Likewise.
9500 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9502 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
9505 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
9506 template template parameter, record its use.
9507 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
9508 its template arguments if exists.
9510 * pt.c (coerce_template_template_parms): New function equivalent
9511 to coerce_template_parms when IS_TMPL_PARM is true.
9512 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
9513 all callers changed.
9515 (coerce_template_parms): Access ARGLIST properly when creating a
9516 new vector. Only accept implicit TYPE_DECL as valid argument for
9517 a template template parameter when it is a base class of
9518 current_class_type. Don't display error message when COMPLAIN is
9521 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
9523 * repo.c (get_base_filename): Use file_name_nondirectory.
9524 (open_repo_file): Likewise.
9525 * cp-tree.h (file_name_nondirectory): Add prototype.
9527 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
9529 * friend.c (do_friend): Pull the identifier out of declarator.
9530 Use cp_error and friends.
9531 * decl2.c (qualified_lookup_using_namespace): Fix call to
9533 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
9534 (grokvardecl): Use DECL_CLASS_SCOPE_P.
9535 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
9536 * class.c (warn_hidden): Fix for OVERLOAD.
9537 From grahams@rcp.co.uk:
9538 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
9539 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
9541 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
9543 * g++.1 (-traditional): Remove duplicated documentation.
9545 1998-07-11 Mark Mitchell <mark@markmitchell.com>
9547 * method.c (flush_repeats): Add nrepeats parameter.
9548 (issue_nrepeats): Likewise.
9549 (is_back_referenceable_type): New function. Don't back-reference
9550 TEMPLATE_TYPE_PARMs as well as simple types like integers.
9551 (build_mangled_name_for_type): Likewise.
9552 (build_mangled_name_for_type_with_Gcode): Likewise.
9554 (nrepeats): Likewise.
9555 (Nrepeats): Likewise.
9556 (start_squangling): Don't clear the variables removed above.
9557 (end_squangling): Likewise.
9558 (flush_repeats): Tidy. Use nrepeats parameter rather than
9560 (issue_nrepeats): Likewise, but with nrepeats global. Use
9561 is_backreferenceable_type.
9562 (build_overload_nested_name): Tidy. Add comment. Use
9563 build_mangled_name_for_type.
9564 (build_underscore_int): Comment.
9565 (build_overload_scope_ref): Use build_mangled_name_for_type.
9566 (build_overload_int): Likewise.
9567 (build_template_template_parm_names): Tidy.
9568 (build_template_parm_names): Use build_mangled_name_for_type.
9569 (build_overload_identifier): Add comments.
9570 (build_mangled_name_for_type_with_Gcode): Split out from
9572 (build_mangled_name_for_type): Use it.
9573 (build_mangled_name): Rework to use build_mangled_name_for_type
9574 and to not use global nrepeats/Nrepeats. Tidy.
9575 (process_modifiers): Tidy.
9576 (check_btype): Use is_backreferenceable_type. Add comment.
9577 Rename `node' to `type'.
9578 (process_overload_item): Set numeric_output_need_bar here.
9579 Use build_mangled_name_for_type. Tidy.
9580 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
9581 build_mangled_name_for_type.
9583 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
9586 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
9588 * cp-tree.h (warn_long_long): Define.
9589 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
9590 warning "ANSI C++ does not support `long long'".
9591 * decl2.c (warn_long_long): Define.
9592 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
9594 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
9596 * decl.c (xref_tag): Handle attributes between 'class' and name.
9597 * parse.y (aggr): Likewise.
9598 * semantics.c (finish_class_definition): Likewise.
9599 * Makefile.in (EXPECTED): Adjust.
9601 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
9602 * decl2.c: Define them.
9603 (lang_decode_option): Handle them.
9604 * lang-options.h: Add -foptional-diags.
9605 * class.c (finish_struct): Don't complain about multiple meanings of
9606 name if -fno-optional-diags.
9607 * decl.c (pushdecl_class_level): Likewise.
9608 * lex.c (real_yylex): Check warn_multichar.
9610 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
9612 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
9614 * tree.c (make_binfo): Fix length.
9616 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
9618 * decl2.c (lang_decode_option): Remove warn_template_debugging.
9619 * lang-options.h: Likewise.
9621 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9623 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
9624 (process_start_catch_block): Likewise for variables
9625 `false_label_rtx', `call_rtx' and `return_value_rtx'.
9627 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
9629 * tree.c (build_srcloc): Make sure we allocate this node on the
9632 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
9634 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
9635 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
9636 (lang_specific_driver): Only add -lm automatically if need_math is
9639 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
9641 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
9643 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9645 * Makefile.in (EXPR_H): New dependency variable.
9646 (decl2.o): Depend on $(EXPR_H).
9647 (typeck.o): Likewise.
9651 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9653 * decl.c (start_enum): Put local enums on permanent_obstack.
9655 1998-06-25 Mark Mitchell <mark@markmitchell.com>
9657 * cp-tree.h (c_get_alias_set): Declare.
9658 * decl.c (init_decl_processing): Set lang_get_alias_set.
9660 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
9662 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
9663 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
9664 flag for all function decls which are in the exception table.
9665 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
9666 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
9667 code is emitted for any referenced rtti function.
9669 1998-06-25 Dave Brolley <brolley@cygnus.com>
9671 * lang-specs.h: Use new | syntax to eliminate
9672 string concatenation.
9674 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
9676 * cp-tree.h (CP_DECL_CONTEXT): New macro.
9677 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
9678 * method.c (build_overload_nested_name): Likewise.
9679 * sig.c (build_signature_pointer_or_reference_type): Don't set
9682 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9684 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
9685 * cp-tree.h (FROB_CONTEXT): New macro.
9686 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
9687 * decl.c (namespace_binding): Replace NULL_TREE with
9689 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
9690 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
9692 * decl.c (pushtag): Use FROB_CONTEXT.
9693 (pushdecl, make_typename_type, define_function, grokdeclarator):
9695 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
9696 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
9698 * decl2.c (decl_namespace): Return global_namespace if no context.
9699 * method.c (build_overload_nested_name): Expect null as context.
9700 * pt.c (mangle_class_name_for_template): Do nothing for null
9702 (lookup_template_class): Allow for null id_context.
9704 1998-06-25 Richard Henderson <rth@cygnus.com>
9706 * method.c (emit_thunk): Set current_function_is_thunk for the
9707 ASM_OUTPUT_MI_THUNK case as well.
9709 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
9711 * exception.cc (__cplus_type_matcher): Get a match_info pointer
9712 instead of an exception table entry as a parameter.
9714 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
9716 * parse.y (function_try_block): Don't call start_catch_handler.
9717 * except.c (call_eh_info): Remove coerced field from declaration.
9718 (build_eh_type_type_ref): New function to create an address of a
9719 rtti function for the new style exception tables.
9720 (expand_start_catch_block): Split function, this contains the
9722 (process_start_catch_block_old): New function to perform the rest
9723 of expand_start_catch_block under old style exceptions.
9724 (process_start_catch_block_old): New function to perform the rest
9725 of expand_start_catch_block under new style exceptions.
9726 (expand_end_catch_block): Only pop the false label off the stack under
9727 the old style of exceptions.
9728 * semantics.c (finish_try_block): Don't call start_catch_handler.
9729 * exception.cc (struct cp_eh_info): Add original_value field.
9730 (__cplus_type_matcher): Perform type matching on the original exception
9731 value, and if we have a match, set the current value.
9732 (__cp_push_exception): Set the original exception value.
9734 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
9736 * call.c (joust): Fix confusing conversion warning.
9738 * call.c (build_op_delete_call): Add placement parm. Check
9739 LOOKUP_SPECULATIVELY.
9740 * cp-tree.h, decl2.c, init.c: Adjust.
9741 * decl.c (finish_function): Use it.
9743 * pt.c (tsubst): Diagnose creating void fields or variables.
9745 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9747 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
9749 * cp-tree.h (check_dtor_name): Add prototype.
9751 * init.c (expand_member_init): Remove unused variables
9752 `ptr_type_node', `parm' and `rval'.
9754 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
9756 (lang_print_xnode): Likewise.
9758 * typeck2.c (enum_name_string): Cast argument to sprintf to long
9759 and use %ld specifier.
9761 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
9762 specifier in call to fprintf.
9763 (GNU_xref_member): Cast argument to sprintf to int.
9765 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9767 * typeck2.c (pop_init_level): Warn about implicit zero initialization
9770 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9772 * cp-tree.h: Prototype function `check_java_method'.
9774 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
9776 * class.c (finish_struct): Make conflicting use of id a pedwarn.
9777 * decl.c (pushdecl_class_level): Likewise.
9779 1998-06-17 Mark Mitchell <mark@markmitchell.com>
9781 * pt.c (convert_nontype_argument): Issue an error when presented
9782 with an integer (real) constant that cannot be simplified to an
9785 * cp-tree.h (c_get_alias_set): Remove declaration added in
9786 1998-06-13 change that should never have been checked in.
9788 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
9790 * typeck.c (build_binary_op_nodefault): Change % in format strings
9793 * decl.c (grokvardecl): Don't build_static_name for decls that
9794 aren't at namespace scope.
9796 * init.c (perform_member_init): Catch default-initialization of
9799 1998-06-17 Mark Mitchell <mark@markmitchell.com>
9801 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
9803 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
9805 * method.c (hack_identifier): Complain about getting a namespace
9807 * typeck.c (decay_conversion): Remove check for namespaces.
9808 * typeck2.c (incomplete_type_error): Likewise.
9809 * parse.y (template_arg): Add PTYPENAME expansion.
9811 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
9813 * decl.c (grokvardecl): Don't build external assembler names for
9814 TYPENAMEs in other namespaces as there is no declarator.
9815 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9816 info from DECL_CONTEXT if it is NULL.
9818 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
9820 * call.c (check_dtor_name): Split out.
9821 (build_scoped_method_call): Use it.
9822 (build_method_call): Use it.
9823 * init.c (build_offset_ref): Use it.
9825 * typeck.c (build_static_cast): Fix handling of pointers to members.
9827 * decl.c (finish_function): Just return nothing from a constructor.
9828 * typeck.c (c_expand_return): Complain about returning a void
9829 expression from a destructor.
9831 1998-06-13 Mark Mitchell <mark@markmitchell.com>
9833 * class.c (alter_access): Accept a BINFO explaining how to get
9834 from the entity whose accessed is being altered to the type doing
9836 (handle_using_decl): New function containing code split out from ...
9837 (finish_struct_1): Here.
9839 * cp-tree.h (complete_type_or_else): Declare.
9840 * init.c (build_new_1, build_delete): Use it.
9841 * typeck.c (require_complete_type): Use complete_type, rather than
9842 expanding it inline.
9843 (complete_type_or_else): New function.
9844 (build_component_ref): Use it.
9845 (pointer_int_sum): Make sure the type pointed to is complete.
9846 (pointer_diff): Likewise.
9848 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9851 * search.c (get_matching_virtual): Note that member templates
9852 cannot override virtual functions.
9854 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
9856 * pt.c (check_explicit_specialization): If DECLARATOR turned into
9857 an error_mark_node from lookup_template_function, return the same.
9858 (determine_specialization): Also make sure TEMPLATE_ID isn't an
9859 error_mark_node, before we try to read its operands.
9860 * decl.c (grokdeclarator): If we got an error_mark_node from
9861 check_explicit_specialization, just return it right back.
9863 1998-06-12 Mark Mitchell <mark@markmitchell.com>
9865 * class.c (instantiate_type): Don't treat template-ids that don't
9866 specify any template arguments as equivalent to ordinary
9867 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
9868 pointer-to-members for member templates. Tidy slightly.
9869 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9870 * init.c (build_offset_ref): Handle template-ids like ordinary
9871 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9872 offset part of the OFFSET_REF.
9873 * typeck.c (build_unary_op): Change check for unknown types to
9874 look for OFFSET_REFs, not SCOPE_REFs.
9876 1998-06-11 Mark Mitchell <mark@markmitchell.com>
9878 * pt.c (is_member_template_class): New function.
9879 (push_template_decl_real): Use it.
9881 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
9883 * friend.c (do_friend): Add support for nested classes using
9884 member functions of the enclosing class as friends.
9886 1998-06-10 Mark Mitchell <mark@markmitchell.com>
9888 * call.c (convert_default_arg): Make global, not static.
9889 (convert_arg_for_ellipsis): Split out from ...
9890 (build_over_call): Here.
9891 * cp-tree.h (convert_default_arg); Declare.
9892 (convert_arg_to_ellipsis): Likewise.
9893 (do_member_init): Remove.
9894 * init.c (do_member_init): Remove; this code is dead.
9895 (expand_member_init): Remove much of this code; it is dead.
9896 * typeck.c (convert_arguments): Use convert_default_arg and
9897 convert_arg_for_ellipsis, rather than duplicating here.
9899 * call.c (convert_like): Don't fail silently if
9900 build_user_type_conversion fails. Always return error_mark_node
9903 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9905 * search.c (covariant_return_p): Complain about ambiguous base.
9907 * typeck.c (build_component_ref): Diagnose ref to nested type.
9909 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
9911 * decl.c (grokparms): Check that INIT isn't an error_mark_node
9912 before giving error about invalid type for default arg.
9914 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9916 * call.c (build_method_call): Fix thinko.
9918 1998-06-10 Dave Brolley <brolley@cygnus.com>
9920 * decl2.c (lang_decode_option): New argc/argv interface.
9921 * cp-tree.h (lang_decode_option): New argc/argv interface.
9922 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9923 specified for cpplib-enabled compilers.
9924 * lex.c (lang_init): Don't check_newline for cpplib.
9925 (init_parse): Don't initialize cpplib here.
9927 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
9929 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9930 piece before checking DECL_MUTABLE_P.
9932 1998-06-10 John Carr <jfc@mit.edu>
9934 * tree.c (debug_binfo): Make printf format match arguments.
9936 * error.c (OB_PUTI): Make printf format match arguments.
9938 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
9940 * init.c (perform_member_init): Handle default-initialization.
9942 * except.c (build_throw): Handle throwing NULL.
9944 * typeck.c (build_x_function_call): Use resolve_offset_ref.
9946 * search.c (compute_access): Only strip an anonymous union
9949 * call.c (add_builtin_candidates): Tweak.
9951 * cvt.c (build_expr_type_conversion): Restore code for conversion
9953 * decl2.c (delete_sanity): Use it. Clean up.
9955 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9957 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
9959 * typeck.c (c_expand_return): Don't warn about void expressions on
9960 return statements in functions returning void.
9962 1998-06-09 Mark Mitchell <mark@markmitchell.com>
9964 * pt.c (fn_type_unification): Revise documentation. Tidy.
9965 (type_unification): Likewise.
9967 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
9969 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9971 * parse.y (function_try_block): Rename expand_start_catch, and delete
9973 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9976 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
9978 * search.c (lookup_member): New fn.
9979 * class.c (finish_struct_1): Use it.
9980 * decl.c (lookup_name_real): Use it.
9982 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9984 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9986 * cp-tree.h: Add prototype for `maybe_print_template_context' and
9987 `maybe_make_one_only'.
9989 * decl.c (auto_function): Remove unused variable `decl'.
9991 * decl2.c: Include dwarf2out.h and dwarfout.h.
9993 * lex.c: Remove redundant declarations of `set_float_handler' and
9996 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
9998 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9999 time flag. Call __cp_eh_info instead of __cp_exception_info.
10000 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10001 (__cp_exception_info): Return offset into cp_eh_info structure to
10002 match what use to be the start of this structure.
10003 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10004 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10006 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10007 __cp_eh_info instead of __cp_exception_info.
10009 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
10011 * decl.c (cp_finish_decl): Disable inlining of extern inlines
10012 with static variables.
10014 1998-06-08 Mark Mitchell <mark@markmitchell.com>
10016 * init.c (build_offset_ref): Correct previous change to use build,
10019 1998-06-07 Mark Mitchell <mark@markmitchell.com>
10021 * class.c (instantiate_type): Handle pointer-to-members where the
10022 member is a template.
10023 * init.c (build_offset_ref): Likewise.
10024 * typeck.c (build_unary_op): Likewise.
10026 1998-06-07 Richard Henderson <rth@cygnus.com>
10028 * lex.c (lang_init_options): New function.
10029 (lang_init): Remove flag_exceptions == 2 hack.
10031 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10033 * search.c (envelope_add_decl): Tweak for implicit typename.
10035 * call.c (joust): Also warn about confusing conversion op/constructor
10036 overload resolution.
10038 * spew.c (yylex): Also return the TYPE_DECL if got_object.
10039 Don't clear got_object after '~'.
10040 * call.c (build_scoped_method_call): Tweak destructor handling.
10041 (build_method_call): Likewise.
10042 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10043 TYPE_MAIN_VARIANT for destructors.
10044 * semantics.c (finish_object_call_expr): Complain about calling a
10047 1998-06-05 Per Bothner <bothner@cygnus.com>
10049 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10050 Define - update needed by gcc.c change.
10052 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10054 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10056 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10058 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10059 * decl.c (lookup_name_real): Add namespaces_only parameter.
10060 If set, return only NAMESPACE_DECLs.
10061 (select_decl): Likewise.
10062 (identifier_type_value): Give additional parameter.
10063 (lookup_name_nonclass): Likewise.
10064 (lookup_name): Likewise.
10065 (find_binding): Skip namespace aliases.
10066 (binding_for_name): Likewise.
10067 (push_namespace): Check for namespace aliases.
10068 (lookup_name_namespace_only): New function.
10069 (begin_only_namespace_names, end_only_namespace_names): New functions.
10070 * decl2.c (set_decl_namespace): Skip namespace aliases.
10071 (do_using_directive): Likewise.
10072 (do_namespace_alias): Produce namespace aliases, fix alias
10074 * error.c (dump_decl): Support SCOPE_REF.
10075 * parse.y (extdef): Wrap lookup with namespace_only for namespace
10076 aliases and using declarations.
10078 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
10080 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10082 * error.c (dump_expr): Clean up NEW_EXPR case.
10084 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
10086 Suggested by Brendan Kehoe
10087 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10088 treat it as using ::decl.
10090 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10092 * tree.c (mapcar): Support NEW_EXPR.
10094 * error.c (dump_expr): Support NEW_EXPR.
10096 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
10098 * method.c (make_thunk): Use overload machinery to make name.
10099 * search.c (covariant_return_p): New fn.
10100 (get_matching_virtual): Use it.
10102 * init.c (build_new_1): Fix check for void.
10104 1998-06-01 Per Bothner <bothner@cygnus.com>
10106 * cp-tree.h (TYPE_FOR_JAVA): New macro.
10107 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10108 java_int_type_node, java_long_type_node, java_float_type_node,
10109 java_double_type_node, java_char_type_node, java_boolean_type_node):
10110 New "primitive" types, with predefined names __java_byte etc.
10111 (record_builtin_java_type): New function.
10112 (init_decl_processing): Make Java types with record_builtin_java_type.
10113 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
10114 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
10115 (grokfndecl): Call check_java_method for Java classes.
10116 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
10117 (process_overload_item): Match types against specific
10118 java_XX_type_node types, rather than using is_java_type.
10119 * class.c (finish_struct_1): Don't add default copy constructor
10120 or operator= if TYPE_FOR_JAVA.
10121 (pop_lang_conext): Restore strict_prototyp proper if Java.
10122 * decl2.c (acceptable_java_type, check_java_method): New functions.
10123 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
10124 (tsubst): Move common statement after if statement.
10125 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
10127 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
10129 * pt.c (for_each_template_parm): Use first_rtl_op.
10131 * tree.c (build_cplus_array_type_1): Also check index_type for
10134 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
10136 * pt.c (tsubst): Always copy BINFO_BASETYPES.
10138 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
10140 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10141 TYPE_SIZE_UNIT too.
10143 1998-05-29 Mark Mitchell <mark@markmitchell.com>
10145 * decl.c (grokdeclarator): Don't complain about in-class
10146 initialization of static consts if we don't really know the type
10149 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
10151 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10152 * method.c (build_destructor_name): New fn.
10153 * decl2.c (maybe_retrofit_in_chrg): Split out...
10154 (grokclassfn): From here. Reorganize.
10155 * decl.c (grok_ctor_properties): Make sure ctors for types with
10156 vbases have the in_chrg parm.
10157 * pt.c (instantiate_class_template): Update
10158 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
10160 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10162 1998-05-28 Mark Mitchell <mark@markmitchell.com>
10164 * pt.c (instantiate_decl): Make test for whether or not static
10165 variables should be instantiated early match its comment.
10167 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
10169 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10171 (start_function): Call check_default_args.
10172 * decl2.c (grokfield): Don't call check_default_args.
10173 (check_default_args): Use cp_error_at.
10174 * lex.c (do_pending_defargs): Call check_default_args.
10176 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
10178 * call.c (build_method_call): Make sure get_type_value returns
10179 something before we try to use its TYPE_MAIN_VARIANT.
10180 (build_scoped_method_call): Likewise.
10182 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
10184 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
10185 initialize an array.
10187 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
10190 * friend.c (do_friend): Clarify template warning.
10192 1998-05-27 Mark Mitchell <mark@markmitchell.com>
10194 * decl.c (shadow_label): Don't treat decls as identifiers.
10195 (maybe_push_to_top_level): Clear shadowed_labels.
10197 * pt.c (instantiate_decl): Reset lineno and filename after calling
10198 regenerate_decl_from_template.
10200 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
10203 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
10205 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
10207 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10209 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
10210 (convert_nontype_argument): Handle cases when nontype template
10211 parameters become classes after substitution.
10213 1998-05-26 Mark Mitchell <mark@markmitchell.com>
10215 * friend.c (is_friend): Use comptypes, rather than == to compare
10216 types. Modify for new representation of template friends.
10217 (make_friend_class): Likewise.
10218 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
10219 (instantiate_class_template): Deal with template friends.
10221 * decl.c (store_parm_decls): Remove redundant call to
10222 expand_main_function.
10224 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
10226 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
10229 1998-05-26 Per Bothner <bothner@cygnus.com>
10231 * language_as_string: Handle lang_java.
10233 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
10235 * decl.c (pushdecl): Don't copy the type_decl.
10237 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10239 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
10240 current_class_type.
10241 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
10243 * parse.y (complex_direct_notype_declarator): Use $1 to access
10244 scope of notype_qualified_id.
10246 1998-05-26 Dave Brolley <brolley@cygnus.com>
10248 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
10249 (init_parse): Initialize cpplib interface.
10251 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
10252 empty continuation.
10254 1998-05-26 Mark Mitchell <mark@markmitchell.com>
10256 * decl.c (pushtag): Avoid crashing on erroneous input.
10258 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10260 * decl.c (push_namespace): Only produce one unique name for
10261 anonymous namespaces.
10262 (get_unique_name): Remove.
10264 1998-05-25 Mark Mitchell <mark@markmitchell.com>
10266 * call.c (tourney): Don't do any extra comparisons.
10268 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
10270 * cp-tree.h (processing_template_parmlist): Declare.
10271 * decl.c (pushtag): Don't call push_template_decl when we
10273 * pt.c (processing_template_parmlist): New variable.
10274 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
10275 (complete_template_args): Use it.
10276 (add_to_template_args): Likewise.
10277 (innermost_args): Likewise.
10278 (tsubst): Likewise.
10279 (begin_template_parm_list): Use processing_template_parmlist.
10280 (end_template_parm_list): Likewise.
10282 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
10283 * decl.c (grokdeclarator): Use it.
10284 * decl2.c (grok_x_components): Likewise.
10285 * init.c (initializing_context): Likewise.
10286 * method.c (do_build_copy_constructor): Likewise.
10287 (do_build_assign_ref): Likewise.
10288 * search.c (compute_access): Likewise.
10289 * typeck.c (build_component_ref): Likewise.
10291 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
10292 unnamed type a typedef name "for linkage purposes".
10294 * pt.c (lookup_template_class): Don't look at
10295 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
10297 * method.c (build_overload_int): Handle error cases gracefully.
10299 * pt.c (instantiate_decl): Handle static member variables
10302 * pt.c (tsubst): Use the tsubst'd type when producing new
10303 TEMPLATE_PARM_INDEX nodes.
10305 1998-05-24 Mark Mitchell <mark@markmitchell.com>
10307 * tree.c (cp_tree_equal): Handle pointers to member functions.
10309 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
10310 sure the type of the REF_BIND is a reference type.
10311 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
10312 target_type for clarity.
10314 * parse.y (xcond): Move call to condition_conversion ...
10315 * semantics.c (finish_for_cond): Here.
10316 * parse.c: Regenerated.
10318 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
10320 * decl.c (push_namespace): Namespaces have type void.
10321 * typeck2.c (incomplete_type_error): Complain about namespace
10322 used as expression.
10323 * typeck.c (decay_conversion): Likewise.
10325 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
10327 * error.c (dump_expr): Support namespaces.
10329 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
10331 * cp-tree.def: Add SRCLOC.
10332 * cp-tree.h: Add struct tree_srcloc and accessor macros.
10333 * tree.c (build_srcloc, build_srcloc_here): New fns.
10334 * pt.c (add_pending_template): Use build_srcloc_here.
10335 (push_tinst_level): Update last_template_error_tick before erroring.
10336 (instantiate_decl): Restore lineno and input_filename before
10337 calling add_pending_template.
10338 * decl2.c (finish_file): Set up lineno and input_filename for
10341 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
10343 * decl.c (lang_print_error_function): New fn.
10344 (init_decl_processing): Set print_error_function to use it.
10345 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
10347 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
10350 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
10351 copy-initialization.
10353 * class.c (build_vtable_entry): Use int_fits_type_p.
10354 (build_vtable): Pass a signed offset to build_vtable_entry.
10355 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
10356 set_rtti_entry): Likewise.
10358 1998-05-22 Per Bothner <bothner@cygnus.com>
10360 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
10361 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
10363 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
10365 * pt.c (print_template_context): Use fprintf instead of cp_error.
10367 * pt.c (determine_specialization): Just return an error_mark_node.
10368 Also print the decl we want in error messages. If we complain,
10369 return error_mark_node.
10370 (tsubst_friend_function): Set lineno and input_filename so
10371 error messages will be useful.
10372 (instantiate_template): Just return an error_mark_node.
10373 (check_explicit_specialization): Don't mess with a returned
10376 * pt.c (print_template_context): Add new argument.
10377 (maybe_print_template_context): New fn.
10378 (push_tinst_level): Increment tinst_level_tick.
10379 (pop_tinst_level): Likewise.
10380 * errfn.c (cp_thing): Call maybe_print_template_context. Use
10381 xrealloc instead of xmalloc.
10383 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
10385 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
10387 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
10388 if the template we looked up is the same as the one we already
10391 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
10393 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
10394 (cpp_reader,parse_in): Add for cpplib.
10395 (check_newline): Call handle_sysv_pragma with new interface.
10396 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
10398 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
10399 (sub_getch): Call GETC for cpplib.
10401 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
10402 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
10404 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
10406 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
10408 * decl2.c (maybe_make_one_only): New fn.
10409 (import_export_vtable): Use it.
10410 (import_export_decl): Likewise.
10411 * pt.c (mark_decl_instantiated): Likewise.
10413 1998-05-21 Mark Mitchell <mmitchell@usa.net>
10415 * decl2.c (find_representative_member): Rename to ...
10416 (build_anon_union_vars): New function.
10417 (finish_anon_union): Fix stupidity of previous change.
10419 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
10421 * decl.c (grokfndecl): Handle definition of specialization in
10422 friend declaration.
10424 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
10426 1998-05-20 Mark Mitchell <mmitchell@usa.net>
10428 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
10429 to look for type declarations.
10430 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
10431 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
10432 (finish_member_class_template): Declare.
10433 * decl.c (pushtag): Put member class templates on the
10434 CLASSTYPE_TAGS list, just as for ordinary member classes.
10435 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
10436 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
10437 IDENTIFIER_NAMESPACE_VALUEs.
10438 * parse.y (component_decl): Move code to ...
10439 * semantics.c (finish_member_class_template): New function.
10440 Don't put member class templates on the list of components for a
10442 * parse.c: Regenerated.
10443 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
10444 In fact, don't use DECL_CONTEXT at all here.
10446 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
10448 * decl.c (record_unknown_type): New function.
10449 (init_decl_processing): Call it for the unknown and global type
10452 1998-05-20 Mark Mitchell <mmitchell@usa.net>
10454 * decl2.c (find_representative_member): New function.
10455 (finish_anon_union): Use it.
10457 * cp-tree.h (MAIN_NAME_P): New macro.
10458 (DECL_MAIN_P): Likwise.
10459 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
10460 (grokfndecl): Use the new macros.
10461 (grokdeclarator): Likewise.
10462 (start_function): Likewise.
10463 (store_parm_decls): Likewise.
10464 (finsh_function): Likewise.
10465 * friend.c (do_friend): Likewise.
10466 * typeck.c (build_function_call_real): Likewise.
10467 (build_unary_op): Likewise.
10469 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
10471 * decl2.c (start_objects, finish_objects, do_dtors,
10472 do_ctors): Split out from...
10473 (finish_file): ...here.
10475 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
10477 * tree.c (is_overloaded_fn): Don't abort on placeholders from
10480 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
10482 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
10484 * error.c (dump_expr): Handle an ARROW_EXPR.
10486 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
10488 * decl.c (saveable_obstack): Declare.
10489 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
10490 declare, if necessary.
10492 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
10494 * call.c (compare_qual): Remove.
10495 (is_subseq): Tweak.
10496 (is_properly_derived_from): New function.
10497 (maybe_handle_ref_bind): Likewise.
10498 (maybe_handle_implicit_object): Likewise.
10499 (compare_ics): Modify substantially to bring into conformance with
10501 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
10502 (comp_cv_qualification): Declare.
10503 (comp_cv_qual_signature): Likewise.
10504 * typeck.c (comp_cv_qualification): Likewise.
10505 (comp_cv_qual_signature): Likewise.
10507 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10509 * Makefile.in (parse.o): Depend on toplev.h.
10511 * class.c (typecode_p): Remove prototype and definition.
10513 * cp-tree.h (currently_open_class, is_empty_class, member_p):
10516 * decl.c (push_overloaded_decl_top_level): Remove prototype and
10519 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
10520 in call to `cp_thing'.
10521 (cp_warning): Likewise for function pointer `warning'.
10523 * except.c (do_function_call): Remove prototype and definition.
10524 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
10526 * method.c (is_java_type): Add prototype and make it static.
10528 * parse.y: Include toplev.h.
10530 * pt.c (type_unification): Remove unused variable `arg'.
10531 (instantiate_decl): Likewise for `save_ti'.
10533 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
10535 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
10537 * init.c (build_member_call): Handle template_ids.
10538 * parse.y (primary): Add global_scope template_id.
10540 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10542 * decl2.c (get_sentry): Use end_temporary_allocation.
10543 Don't declare permanent_obstack.
10545 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
10547 * parse.y (.finish_new_placement): New non-terminal.
10548 (unary_expr, new_type_id): Use it.
10549 * parse.c: Regenerated.
10551 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
10553 * pt.c (redeclare_class_template): Say where the original definition
10554 of the template-parameter's default argument appeared.
10556 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
10558 * call.c (build_over_call): Tweak empty class handling.
10560 * decl.c (make_typename_type): Use currently_open_class.
10562 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
10564 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10566 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
10567 for a type unless it is one.
10569 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
10571 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
10573 * Makefile.in (program_transform_name, objdir): Define.
10575 * Makefile.in (BISON): Use bison from the build tree if it exists.
10578 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10580 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
10582 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
10584 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
10586 * call.c (build_scoped_method_call): Likewise.
10588 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
10590 * init.c (build_new_1): Call suspend_momentary around the creation
10591 of values that must be saved for exception handling.
10592 * parse.y (.build_new_placement): New non-terminal.
10593 (unary_expr, new_placement): Use it.
10594 * parse.c: Regenerated.
10596 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
10598 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
10601 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
10604 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
10606 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
10608 * decl.c (start_decl): Revert problem change.
10610 * Makefile.in (CONFLICTS): Fix.
10612 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10614 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
10616 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
10618 * class.c (finish_struct_1): Use BINFO_SIZE.
10620 * decl.c (start_decl): Use 'tem'.
10622 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
10624 * exception.cc: Include eh-common.h.
10625 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
10626 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10627 (__cp_push_exception): Initialize eh_info struct as well.
10628 * except.c: Remove local structs and include eh-common.h.
10629 (init_exception_processing): Set language and version codes.
10630 (call_eh_info): Add presence of eh_info to runtime description of
10632 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
10633 * semantics.c (finish_try_block): Call start_catch_block() and
10635 * parse.y (function_try_block): Call start_catch_block() and
10638 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
10640 * typeck.c (original_type): New function.
10641 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
10642 to see if they're actually the same.
10643 * cp-tree.h (original_type): Declare.
10645 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10647 * Makefile.in (lex.o): Depend on output.h.
10649 * call.c (add_function_candidate): Remove unused variable `cand'.
10650 (add_conv_candidate): Likewise.
10651 (build_builtin_candidate): Likewise.
10653 * cp-tree.h: Add prototype for `types_overlap_p'.
10655 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
10657 * decl2.c (merge_functions): Remove unused variables `tmp' and
10660 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
10661 (code_as_string): Likewise.
10662 (language_as_string): Likewise.
10663 (parm_as_string): Likewise.
10664 (op_as_string): Likewise.
10665 (assop_as_string): Likewise.
10666 (cv_as_string): Likewise.
10668 * lex.c: Include output.h.
10670 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
10672 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
10675 * tinfo.cc (__class_type_info::dcast): Change the type of variable
10676 `i' from int to size_t.
10678 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
10681 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10683 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
10684 DECL_NAMESPACE_SCOPE_P.
10685 (lang_decl_name): Likewise.
10686 * pt.c (tsubst_friend_function, tsubst): Likewise.
10687 * decl.c (pushdecl, redeclaration_error_message, start_decl,
10688 cp_finish_decl, start_function): Likewise.
10689 * class.c (finish_struct_1): Likewise.
10690 * call.c (build_over_call): Likewise.
10691 (compare_ics): Use DERIVED_FROM_P.
10693 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
10695 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
10696 * method.c (build_mangled_name): Use it.
10697 (build_decl_overload_real): Likewise.
10699 * error.c (dump_simple_decl): New function, broken out from ...
10700 (dump_decl): Use it.
10702 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
10704 * ptree.c (lang_print_xnode): Add missing `break'.
10706 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
10708 * call.c (add_template_candidate): Adjust for changes to
10709 fn_type_unification.
10710 (add_template_candidate_real): Likewise.
10711 (add_template_conv_candidate): Likewise.
10712 (build_user_type_conversion_1): Likewise.
10713 (build_new_function_call): Likewise.
10714 (build_object_call): Likewise.
10715 (build_new_op): Likewise.
10716 (build_new_method_call): Likewise.
10717 * class.c (instantiate_type): Likewise.
10718 * cp-tree.h (unification_kind_t): New type.
10719 (fn_type_unification): Adjust prototype.
10720 (type_unificaiton): Likewise.
10721 * pt.c (UNIFY_ALLOW_NONE): New macro.
10722 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
10723 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
10724 (UNIFY_ALLOW_DERIVED): Likewise.
10725 (unify): Change prototype.
10726 (maybe_adjust_types_for_deduction): New function.
10727 (check_cv_quals_for_unify): Likewise.
10728 (determine_specialization): Adjust.
10729 (fn_type_unification): Likewise.
10730 (type_unification): Likewise.
10731 (type_unification_real): Likewise. Use
10732 maybe_adjust_types_for_deduction. Fix mishandling of
10733 back-unification of template functions passed as arguments. Pass
10734 appropriate combination of UNIFY_ALLOW_* to unify.
10735 (unify): Remove unused NTPARMS parameter. Use
10736 check_cv_quals_for_unify. Remove bogus code that allowed
10737 too-generous unification in order to adhere more closely to standard.
10738 (get_bindings_real): Adjust.
10739 (get_class_bindings): Likewise.
10741 * method.c (build_overload_identifier): Only use the innermost
10742 template arguments when mangling.
10743 * pt.c (tsubst_template_argument_vector): New function.
10744 (complete_template_args): Deal with the situation where the
10745 extra_args contain more than one level of arguments.
10746 (lookup_template_class): Deal with member template classes, which
10747 may have more than one level of arguments.
10748 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
10749 Improve handling of member template classes. Use
10750 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
10751 tsubst_template_argument_vector where appropriate.
10752 (regenerate_decl_from_template): Break out from ...
10753 (instantiate_decl): Here.
10755 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
10756 * parse.h: Regenerated.
10757 * parse.c: Really regenerated.
10759 * cp-tree.h (finish_unary_op_expr): New function.
10760 (finish_id_expr): Likewise.
10761 (begin_new_placement): Likewise.
10762 (finish_new_placement): Likewise.
10763 (finish_declarator): Likewise.
10764 (finish_translation_unit): Likewise.
10765 (finish_parmlist): Likewise.
10766 (begin_class_definition): Likewise.
10767 (finish_class_definition): Likewise.
10768 (finish_default_args): Likewise.
10769 (finish_inline_definitions): Likewise.
10770 * parse.y (GCC_ASM_KEYWORD): Remove.
10771 (TYPENAME_ELLIPSIS): Likewise.
10772 * parse.c: Regenerated.
10773 Use new functions in semantics.c in the actions for many rules.
10774 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
10775 * hash.h: Regenerated.
10776 * semantics.c (finish_expr_stmt): Allow NULL expr.
10777 (finish_unary_op_expr): New function, containing
10778 code previously in parse.y.
10779 (finish_id_expr): Likewise.
10780 (begin_new_placement): Likewise.
10781 (finish_new_placement): Likewise.
10782 (finish_declarator): Likewise.
10783 (finish_translation_unit): Likewise.
10784 (finish_parmlist): Likewise.
10785 (begin_class_definition): Likewise.
10786 (finish_class_definition): Likewise.
10787 (finish_default_args): Likewise.
10788 (finish_inline_definitions): Likewise.
10790 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
10792 * typeck.c (build_c_cast): Don't decay arrays and functions to
10793 pointer type when converting to a class type.
10795 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
10797 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10798 (DECL_CLASS_SCOPE_P): Likewise.
10800 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
10802 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
10803 * decl2.c (constructor_name_full): Likewise.
10805 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
10807 * tree.c (mapcar): Add OVERLOAD support.
10809 * init.c (resolve_offset_ref): We must use basetype_path before we
10810 destroy it with a call to convert_pointer_to.
10812 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10814 * class.c (currently_open_class): New fn.
10815 * decl.c (lookup_name_real): Use it.
10816 * search.c (lookup_field): Likewise.
10818 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10820 * cp-tree.def (OVERLOAD): New node.
10821 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10822 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10823 (NAMESPACE_BINDING): Remove.
10824 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10826 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10828 (tree_overload): New struct.
10829 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10830 (REAL_IDENTIFIER_TYPE_VALUE): Define.
10831 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10832 (lang_decl_flags): Remove in_namespace.
10833 (lang_decl): Remove chain.
10834 (DECL_CHAIN, DECL_NAMESPACE): Remove.
10835 (flag_honor_std): Declare extern.
10836 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10837 namespace_binding, set_namespace_binding,
10838 lookup_function_nonclass, cat_namespace_levels,
10839 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10840 scratch_ovl_cons, ovl_member, build_overload): Declare.
10841 (decl_list_length, get_namespace_id, current_namespace_id,
10842 overloaded_globals_p): Remove.
10843 (lookup_using_namespace, qualified_lookup_using_namespace): Change
10845 (push_scratch_obstack): New macro.
10846 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10847 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10849 (build_new_function_call): Iterate using OVL_CHAIN.
10850 Print DECL_NAME in when reporting ambiguities.
10851 (build_object_call): Iterate using OVL_NEXT for fns, convs.
10852 (build_new_op): Call lookup_function_nonclass.
10853 Iterate using OVL_NEXT.
10854 (build_op_delete_call): Change detection of members.
10855 Do not wrap TREE_LIST around fields and single global functions.
10856 (build_over_call): Don't push a class level if the context is a
10858 (build_new_method_call): Iterate using OVL_NEXT.
10859 * class.c (add_method): Chain overloaded members using
10860 build_overload. Remove copying of method.
10861 (grow_method): When iterating through the obstack, expect OVERLOAD
10862 nodes. Chain overload members.
10863 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
10864 nodes in call to get_baselinks.
10865 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10866 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
10867 fdecls that are OVERLOAD nodes.
10868 (validate_lhs): New function.
10869 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
10870 code. Use DECL_NAME in error messages. Split code between global
10871 and member function processing.
10872 * decl.c (global_type_node): New static variable.
10873 (in_std): New global.
10874 (struct binding_level): New field usings.
10875 (resume_binding_level): Assert that we are not in a class.
10876 (toplevel_bindings_p): Just check for namespace_p or
10878 (resume_level): Remove.
10879 (find_binding): New function.
10880 (binding_for_name): Call it.
10881 (namespace_binding, set_namespace_binding): New functions.
10882 (push_namespace): Associate binding level with new namespace,
10883 resume_binding_level for existing namespace. Remove old code.
10884 Fake std by counting.
10885 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10886 (maybe_push_to_top_level): Save current namespace.
10887 (pop_from_top_level): Restore saved namespace.
10888 (pop_namespace): Call suspend_binding_level. Remove old code.
10889 (cat_namespace_levels): New function.
10890 (set_identifier_type_value_with_scope): For namespace bindings,
10891 set BINDING_TYPE, and use global_type_node.
10892 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10893 (identifier_type_value): New function.
10894 (pushtag): If no context, use current_namespace.
10895 (duplicate_decls): Don't process DECL_CHAIN.
10896 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10897 already set. Never reset it to NULL_TREE. Lookup global variables
10898 in their namespace. Push overloaded templates if they are on
10900 (pushdecl_namespace_level): New function.
10901 (pushdecl_top_level): Implement using pushdecl_namespace_level.
10902 (pushdecl_using_decl): New function.
10903 (overloaded_globals_p): Remove.
10904 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10905 them. Use namespace_binding and set_namespace_value.
10906 (redeclaration_error_message): Complain if the declarations come
10907 from different namespaces.
10908 (lookup_tag): On namespace level, look in the BINDING_TYPE.
10909 (lookup_namespace_name): Pass tree_bindings from stack. Remove
10911 (select_decl): New function.
10912 (lookup_name_real): Call it for qualified and unqualified lookup.
10913 Pass tree_bindings from the stack.
10914 If prefer_type is 1, also accept namespaces.
10915 (lookup_function_nonclass): New function.
10916 (init_decl_processing): Set the binding level of the global
10917 namespace to global_binding_level.
10918 Build a proper type list for __builtin_apply.
10919 Initialize std_node to "fake std" if flag_honor_std is set.
10920 Initialize global_type_node.
10921 Allocated bad_alloc in namespace std if flag_honor_std.
10922 (define_function): Set the DECL_CONTEXT to the current_namespace.
10923 (start_decl): A namespace is not considered as a context here. If
10924 the DECL_CONTEXT is a namespace, push the decl.
10925 (cp_finish_decl): Check for namespaces used as initializers.
10926 (grokfndecl): Add namespace parameter. Remove processing of
10928 (grokvardecl): Add namespace parameter.
10929 (grokdeclarator): Process SCOPEs that are namespaces. For
10930 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10931 (start_function): Check for contexts that are namespaces.
10932 Set context for declarations that have not been pushed.
10933 (store_parm_decls): Check for ::main only.
10934 (finish_function): Likewise.
10935 (start_method): Check for contexts that are namespaces.
10936 (start_method): Remove DECL_CHAIN processing.
10937 * decl2.c (flag_honor_std): Declare.
10938 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10939 (decl_namespace_list): New static global.
10940 (grok_x_components): Ignore namespaces as type contexts.
10941 (check_classfn): Expect OVERLOAD nodes.
10942 (grokfield): Remove DECL_CHAIN processing.
10943 (finish_file): Call cat_namespace_levels.
10944 (merge_functions): New function.
10945 (ambiguous_decl): Rewrite.
10946 (lookup_using_namespace): Produce tree_bindings.
10947 (qualified_lookup_using_namespace): Likewise.
10948 (set_decl_namespace, decl_namespace, current_decl_namespace,
10949 push_decl_namespace, pop_decl_namespace): New functions.
10950 (arg_lookup): New struct.
10951 (add_function, arg_assoc_namespace, arg_assoc_class,
10952 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10954 (get_namespace_id, current_namespace_id): Remove.
10955 (do_toplevel_using_decl): Rewrite.
10956 (do_class_using_decl): Complain about namespace qualifiers.
10957 (do_using_directive): Sorry if not on namespace level. Complain
10958 about unknown namespaces.
10959 * error.c (dump_aggr_type): Check for namespace contexts.
10960 * except.c (init_exception_processing): Push terminate into std.
10961 * friend.c (is_friend): A namespace is not a context, here.
10962 * init.c (expand_member_init): Remove DECL_CHAIN processing.
10963 (build_offset_ref): Process OVERLOAD nodes.
10964 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10965 * lex.c (identifier_type): Loop using OVL_CHAIN.
10966 (see_typename): Set looking_for_typename to 2.
10967 (real_yylex): Likewise.
10968 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10969 (do_scoped_id): Expect OVERLOAD nodes.
10970 Change calling convention for qualified_lookup_using_namespace.
10971 (build_lang_decl): Don't set in_namespace anymore.
10972 * method.c (typevec_size): New global.
10973 (build_overload_nested_name): Return if global_namespace.
10974 Otherwise, always expect a declaration context.
10975 (build_qualified_name): Likewise.
10976 Make sure we don't write beyond typevec_size.
10977 (build_decl_overload_real): Likewise.
10978 Allocate one extra slot for the namespace.
10979 (hack_identifier): Mark code dead.
10980 Process OVERLOAD and NAMESPACE_DECL nodes.
10981 * parse.y (program): Pop namespaces until in global namespace.
10982 (extdef): In a using-declaration, don't discard the identifier if
10983 there is no declaration.
10984 (left_curly): Ignore type contexts which are namespaces.
10985 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10987 * pt.c (template_class_depth): Expect types to be namespaces.
10988 (determine_specialization): Simplify by expecting OVERLOAD nodes.
10989 (push_template_decl): Push into namespace level.
10990 Reset ctx if it is a namespace.
10991 Set DECL_CONTEXT to current_namespace if not set already.
10992 Ignore real contexts that are namespaces.
10993 (mangle_class_name_for_template): Skip global_namespace.
10994 Mangle other namespaces as declarations.
10995 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10996 (lookup_template_class): Push into namespace of context.
10997 If the context is a namespace, set it to global_namespace.
10998 Use id_context for mangling.
10999 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11000 (tsubst_friend_function): Ignore namespace contexts.
11001 Push into namespace level.
11002 (tsubst): Handle NAMESPACE_DECL nodes.
11003 Remove DECL_CHAIN processing.
11004 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11005 * ptree.c (print_lang_identifier): Print bindings.
11006 (lang_print_xnode): Print OVERLOAD nodes.
11007 * rtti.c (init_rtti_processing): Push type_info into std.
11008 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11009 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11010 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11011 lookup_fnfields_here): Likewise.
11012 Process all nodes, instead of going through TREE_CHAIN.
11013 * sig.c (build_signature_pointer_or_reference_type): Set context
11014 to global_namespace.
11015 (build_signature_table_constructor): Expect OVERLOAD nodes.
11016 * spew.c (yylex): Save old setting of looking_for_typename.
11017 * tree.c (decl_list_length): Remove.
11018 (binding_init): New function.
11019 (count_functions): Rewrite.
11020 (is_overloaded_fn): Expect OVERLOAD nodes.
11021 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11022 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11023 ovl_member): New functions.
11024 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11025 (type_unknown_p): Likewise.
11026 (require_instantiated_type): Likewise.
11027 (build_component_ref): Declare code dead.
11028 (build_x_function_call): Create and expect OVERLOAD nodes.
11029 (build_function_call_real): Check for ::main only.
11030 (build_unary_op): Likewise. Expect OVERLOAD nodes.
11031 (convert_for_assignment): Check for TREE_LIST before accessing
11033 * decl.c (duplicate_decls): Check for namespace bindings instead
11034 of global bindings.
11035 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11036 lookup_name_current_level, start_decl, xref_tag,
11037 finish_enum): Likewise.
11038 * init.c (build_offset_ref): Likewise.
11039 * search.c (lookup_field): Likewise.
11040 (lookup_fnfields): Likewise.
11041 (dfs_debug_mark): Likewise.
11042 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11043 (poplevel_class, pop_from_top_level): Likewise.
11044 * decl2.c (finish_method): Likewise.
11045 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11046 * decl.c (record_builtin_type): Likewise.
11047 (init_decl_processing, grokfndecl): Likewise.
11048 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11049 (make_lang_type): Likewise.
11050 * parse.y (make_thunk): Likewise.
11051 * pt.c (tsubst): Likewise.
11052 * tree.c (debug_binfo): Likewise.
11053 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11054 tinfo2.cc, inc/new.h: Add std qualifications.
11055 * inc/new: Wrap with namespace std if __HONOR_STD.
11056 * inc/typeinfo: Likewise.
11058 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
11060 * call.c (build_user_type_conversion_1): Handle second_conv
11061 properly for templates.
11063 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
11065 * method.c (build_decl_overload_real): Set TREE_USED flag to
11066 zero for build_type_variants nodes as well.
11068 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
11070 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11072 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
11074 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11075 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11076 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11077 xref.o): Add toplev.h dependencies.
11079 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
11081 * errfn.c (cp_error, cp_warning): Remove declarations for
11082 error and warning respectively.
11084 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11086 * error.c: Convert to using ctype macros defined in system.h.
11087 * method.c: Likewise.
11088 * xref.c: Likewise.
11089 * lex.c: Likewise. Also remove redundant system header stuff.
11091 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
11093 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11094 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11095 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11096 xref.c: Add include of toplev.h.
11098 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
11100 * tree.c (perm_manip): Also regenerate the RTL of an extern.
11101 (copy_to_permanent): Use end_temporary_allocation.
11103 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
11105 * init.c (expand_vec_init): The initialization of each array
11106 element is a full-expression.
11108 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
11110 * method.c (build_mangled_name): Add a call to build_type_variant
11111 to get the right type.
11113 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
11115 * Makefile.in: Add .SUFFIXES.
11117 * cp-tree.def: Remove NAMESPACE_DECL.
11119 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
11121 * call.c (build_over_call): Do evaluate arg even if it has empty
11123 * decl.c (start_function): Don't push a member function.
11125 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
11127 * Makefile.in (g++FAQ.info): Put -o option before input file.
11129 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
11131 * gxxint.texi: Add info for squangling codes K and B.
11133 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
11135 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11136 the expression in templates.
11137 (finish_stmt_expr): Likewise.
11139 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
11141 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11143 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
11145 * decl.c (maybe_push_to_top_level): Always clear
11146 current_template_parms and processing_template_decl.
11147 (pushtag): Remove check of current_class_type and some comments,
11148 since maybe_push_to_top_level no longer creates confusion.
11150 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
11152 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11153 (DECL_CLASS_TEMPLATE_P): Likewise.
11154 (DECL_PRIMARY_TEMPLATE): Likewise.
11155 (PRIMARY_TEMPLATE_P): Use it.
11156 (push_template_decl_real): New function.
11157 (redeclare_class_template): Take new template parameters as
11159 (is_specialization_of): New function.
11160 (comp_template_args): Declare.
11161 * decl.c (pushtag): Handle friend template classes.
11162 (xref_tag): Likewise. Use new calling convention for
11163 redeclare_class_template.
11164 * decl2.c (grok_x_components): Handle friend templates.
11165 * friend.c (is_friend): Use is_specialization_of where
11166 appropriate. Deal with friend class templates.
11167 (make_friend_class): Let a class template be friends with itself.
11168 * pt.c (comp_template_args): Remove declaration.
11169 (tsubst_friend_class): New function.
11170 (push_template_decl_real): New function.
11171 (push_template_decl): Use it.
11172 (redeclare_class_template): Adjust for new calling convention.
11173 (comp_template_args): Give it external linkage.
11174 (instantiate_class_type): Use tsubst_friend_class to deal
11175 with friend templates.
11176 * typeck.c (comptypes): Use comp_template_args, rather than
11177 expanding it inline.
11178 * parse.y (component_decl): Handle a nested template type
11179 like other component type declarations.
11181 * pt.c (check_explicit_specialization): Handle overloaded
11182 constructors correctly.
11184 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
11185 (lookup_template_class): Use it.
11187 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
11189 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
11190 * cp-tree.h: Add WRAPPER support.
11191 * call.c (add_candidate): Split out from add_*_candidate fns.
11192 (build_over_call): Take the candidate instead of function and args.
11193 Enforce access control here. Emit overload warnings here.
11194 (add_warning): New fn.
11195 (joust): Add WARN parm. If not set, call add_warning instead of
11196 printing a warning. Re-enable some warnings.
11197 (tourney): Pass it.
11198 (convert_like): Adjust.
11199 (build_new_op): Adjust.
11200 (build_new_function_call): Adjust.
11201 (build_user_type_conversion_1): Adjust.
11202 (USER_CONV_FN): Adjust.
11203 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
11204 build_int_wrapper): New fns.
11206 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
11208 * pt.c (unify): Fix typo in previous change.
11210 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
11212 * error.c (dump_type_real): Declare canonical_name.
11214 * typeck.c (comp_target_types): Fix PMFs.
11216 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
11218 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
11219 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
11222 * pt.c (tsubst): Decrease the template-level of
11223 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
11224 TEMPLATE_PARM_INDEX.
11225 (template_decl_level): New function.
11226 (unify): Make sure to record unifications for template
11227 parameters, even when the parameters exactly match the arguments.
11228 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
11229 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
11230 aren't from the level we're currently working on.
11232 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
11234 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
11236 * decl2.c (check_member_template): Set DECL_IGNORED for member
11237 class templates, too.
11239 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
11241 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11243 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
11245 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
11247 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
11248 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
11249 (init_decl_processing): Handle TI types.
11250 * typeck.c (unsigned_type, signed_type): Handle TI types.
11252 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
11254 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
11255 New local added_libraries. Increment count when add library to
11258 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
11260 * cp-tree.h (type_as_string_real): New function.
11261 * pt.c (mangle_class_name_for_template): Use it.
11262 * error.c (dump_aggr_type): Change prototype.
11263 (dump_type_prefix): Likewise.
11264 (dump_type_suffix): Likewise.
11265 (dump_type_real): Convert from dump_type. If desired, the
11266 "canonica" name of a typedef, i.e., the name of the underlying
11267 type, can be printed.
11268 (dump_type): Call dump_type_real.
11270 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
11272 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
11274 * typeck.c (comp_target_types): Tweak pedantic case.
11275 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
11276 Return -1 or 1 instead of 1 or 2.
11277 (compparms): Remove STRICT handling.
11278 (convert_for_assignment): Fix handling of pmfs.
11280 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
11282 * typeck.c (comp_target_types): Handle references like pointers.
11283 (comp_target_parms): Note that return code from comp_target_types
11284 can be negative to indicate failure.
11286 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11288 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
11289 which requires a working target compiler to build.
11291 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
11293 * tree.c (avoid_overlap): Add prototype.
11295 * spew.c (num_tokens): Add prototype.
11296 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
11298 * search.c (dfs_check_overlap): Add prototype.
11299 (dfs_no_overlap_yet): Likewise.
11301 * pt.c (original_template): Add prototype.
11302 (inline_needs_template_parms): Likewise.
11303 (push_inline_template_parms_recursive): Likewise.
11304 (retrieve_specialization, register_specialization): Likewise.
11305 (print_candidates, reduce_template_parm_level): Likewise.
11306 (build_template_decl, mark_template_parm): Likewise.
11307 (tsubst_friend_function, get_bindings_real): Likewise.
11309 * method.c (start_squangling): Add prototype.
11310 (end_squangling, check_ktype, issue_ktype): Likewise.
11311 (build_overloaded_scope_ref, check_btype): Likewise.
11312 (build_mangled_template_parm_index): Likewise.
11314 * lex.c (init_cpp_parse): Add prototype.
11315 (handle_cp_pragma, handle_sysv_pragma): Likewise.
11316 (reduce_cmp, token_cmp): Likewise.
11318 * except.c (call_eh_info): Add prototype.
11319 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
11320 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
11322 * decl2.c (is_namespace_ancestor): Add prototype.
11323 (namespace_ancestor, add_using_namespace): Likewise.
11324 (ambiguous_decl): Likewise.
11326 * decl.c (indent): Add prototype.
11328 * call.c (add_template_candidate_real): Add prototype.
11330 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
11332 * decl2.c (build_expr_from_tree): Just return a PMF.
11334 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
11336 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
11337 when doing initializations.
11339 * pt.c (unify): Use comptypes to compare type args.
11341 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
11343 * decl.c (duplicate_decls): Fix check for when it's safe to free
11346 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
11349 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
11351 * pt.c (build_template_parm_index): Add prototype.
11353 * search.c (my_tree_cons): Don't clear words outside the
11354 newly allocated node.
11356 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
11358 * lex.c (init_parse): Now returns char* containing the filename.
11360 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
11361 Jeff Law <law@cygnus.com>
11363 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
11366 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11368 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
11370 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
11372 * decl.c (duplicate_decls): Don't warn for redundant decls if
11373 friend: let add_friend take care of it.
11375 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
11377 * sig.c (build_signature_pointer_constructor): Don't set
11378 TREE_HAS_CONSTRUCTOR for a signature pointer.
11379 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
11380 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
11382 * typeck.c (build_unary_op): Only allow taking the address of a
11384 * typeck2.c (digest_init): Simplify.
11385 (store_init_value): Don't pedwarn about using { } for pmfs.
11387 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
11389 * cp-tree.h (start_decl): Update prototype.
11390 * decl.c (start_decl): Like the C version, new parameters
11391 for the attributes. Call cplus_decl_attributes here,
11392 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
11393 (grokdeclarator): Pass NULL for new start_decl arguments.
11394 * pt.c (tsubst_expr): Likewise.
11395 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
11396 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
11397 * lex.c (build_lang_decl): Add lang_name_java.
11398 * class.c (push_lang_context): Add lang_name_java.
11399 * method.c (build_mangled_name): Check for is_java_type.
11401 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
11403 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
11404 * call.c (build_scoped_method_call): Check for TREE_CODE for
11405 VOID_TYPE instead of type == void_type_node.
11406 (build_method_call): Likewise.
11407 * decl.c (lookup_name_real): Likewise.
11408 (grokdeclarator): Likewise.
11409 (start_decl): Likewise.
11410 (grokparms): Likewise.
11411 (start_function): Likewise.
11412 (finish_function): Likewise.
11413 (start_method): Likewise.
11415 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
11417 * lex.c (finput): New variable.
11418 (init_cpp_parse): Renamed from init_parse.
11419 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
11420 (finish_parse): New function.
11421 * cp-tree.h (init_lex, init_parse): Remove declarations.
11423 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
11425 * call.c (build_call): Still evaluate the actual argument.
11426 * class.c (is_empty_class): Update for -fnew-abi.
11428 * decl2.c: -fnew-abi implies -fsquangle.
11430 * method.c (do_build_assign_ref): Don't do anything to copy
11432 (do_build_copy_constructor): Likewise.
11433 * call.c (build_over_call): Likewise.
11435 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
11437 * tree.c (avoid_overlap): Return a value.
11439 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
11441 * method.c (check_btype): Add missing argument to xrealloc.
11442 (check_ktype): Likewise.
11444 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
11446 Implement empty base optimization.
11447 * class.c (finish_struct_1): Add vbase fields earlier. Set
11448 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
11449 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
11450 (types_overlap_p): New fn.
11451 * tree.c (avoid_overlap): New fn.
11452 (build_base_fields): Use it to avoid overlapping empty bases.
11453 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
11455 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
11457 Re-implement allocation of base class subobjects.
11458 * tree.c (unshare_base_binfos): New fn.
11459 (layout_basetypes): Use it. Now handles offsets of both virtual and
11460 non-virtual bases, after layout_type.
11461 (layout_vbasetypes): Remove.
11462 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
11463 (build_vbase_pointer_fields): Split out from old layout_basetypes.
11464 * class.c (finish_base_struct): Lose offset handling code.
11465 Move nonvdtor warning here. Don't mess with t_binfo anymore.
11466 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
11467 * cp-tree.h: Adjust.
11469 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11471 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
11472 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
11473 * class.c (duplicate_tag_error): Likewise.
11474 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
11475 * tree.c (layout_vbasetypes): Update from layout_record, remove
11476 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
11477 (layout_basetypes): Likewise.
11479 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
11481 * class.c, Make sure system.h is included just after config.h.
11482 Delete lingering stdio and errno references too.
11483 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
11485 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
11487 * friend.c (is_friend): Fix access control for local classes.
11489 * class.c (is_empty_class): New fn.
11490 * call.c (build_call): Don't pass empty class objects to a function.
11492 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
11494 * call.c (build_over_call): Do name resolution for default
11495 arguments of function templates in the scope of the templates.
11497 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
11499 * call.c: Include system.h. Remove includes, declarations and
11500 defines provided by system.h.
11501 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
11502 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
11503 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
11504 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
11505 * typeck2.c, xref.c: Likewise.
11506 * Makefile.in: Dependencies updated as appropriate.
11507 * Make-lang.in: Likewise.
11509 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
11511 * pt.c (fn_type_unification): Allow incomplete unification without
11512 an immediate error message.
11514 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11516 * tree.c (member_p): New fn.
11517 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
11518 initializing class members.
11520 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
11521 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
11523 * call.c (build_method_call): Handle non-scoped destructors, too.
11524 * pt.c (tsubst_copy): Likewise.
11526 * pt.c (print_template_context): Split out...
11527 (push_tinst_level): ...from here.
11529 * friend.c (is_friend): Don't pass a type to decl_function_context.
11531 * typeck.c (convert_for_initialization): Always hand off
11532 conversions to class type.
11534 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
11536 * friend.c (is_friend): Local classes have the same access as the
11537 enclosing function.
11539 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
11541 * typeck.c (expand_target_expr): Delete dead function.
11543 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
11545 * repo.c (save_string): Delete dead function.
11547 * method.c (thunk_printable_name): Delete dead function.
11549 * lex.c (yynextch): Delete dead function.
11551 * expr.c (tree_extract_aggr_init): #if 0 out.
11553 * except.c (do_unwind): Delete dead function.
11554 (easy_expand_asm): Likewise.
11556 * cvt.c (build_conversion_type_1): Delete dead function.
11558 * cp-tree.h (push_expression_obstack): Declare.
11560 * call.c (source_type): #if 0 out.
11562 * class.c (alter_access): Remove unused label. Add braces
11563 around empty else clause.
11565 * lex.c (yyprint): Fix argument to printf.
11567 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
11569 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
11571 * pt.c (instantiate_class_template): Make sure template
11572 arguments are permanent.
11573 * init.c (resolve_offset_ref): Don't go looking around in
11576 * semantics.c: Add routines to handle expressions, and some
11577 declaration processing.
11578 * parse.y: Use them.
11579 (current_class_depth): Move declaration to cp-tree.h.
11580 * parse.c: Regenerated.
11581 * cp-tree.h: Use them.
11582 (current_class_depth): Declare.
11583 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
11585 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
11587 * error.c (dump_decl): Be a bit more explicit with template
11588 type arguments, when verbose.
11590 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
11592 * inc/exception: Reorder closing braces.
11594 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
11596 * pt.c (redeclare_class_template): New function.
11597 * cp_tree.h (redeclare_class_template): Declare it.
11598 * decl.c (xref_tag): Use it.
11600 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
11602 * call.c (build_over_call): Check IS_AGGR_TYPE, not
11603 TYPE_LANG_SPECIFIC.
11604 * typeck.c (convert_arguments): Likewise.
11606 * decl.c (grokdeclarator): Remove const and volatile from type after
11607 setting constp and volatilep.
11609 * class.c (finish_struct_1): Don't warn about bool bitfield larger
11612 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
11614 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
11616 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
11618 * call.c (build_object_call): Complain about ambiguous operator(),
11619 rather that crashing.
11620 (build_new_op): Likewise.
11621 (build_op_delete_call): Likewise.
11623 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
11625 * cvt.c (perform_qualification_conversions): Use comp_target_types
11626 instead of comp_ptr_ttypes.
11628 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
11630 * cp-tree.h (enforce_access): Declare.
11631 * call.c (enforce_access): Make it extern, not static.
11632 * class.c (alter_access): Use enforce_access; modify code for ISO
11633 compliance, rather than ARM rules.
11635 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11637 * cp-tree.h: Fix typo.
11639 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11641 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
11642 if (aggregate_value_p (type)).
11644 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
11646 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
11648 * tree.c (mapcar): When dealing with a DECL, use it's constant
11650 * pt.c (lookup_template_class): Don't mangle the names of template
11651 classes whose arguments are unknown.
11653 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
11655 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
11657 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
11659 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
11661 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
11662 boolean_type_node to 1.
11664 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
11666 * error.c (dump_expr): Remove unused variable `l'.
11668 * pt.c (for_each_template_parm): New function, created by
11669 converting uses_template_parms.
11670 (tree_fn_t): New typedef.
11671 (uses_template_parms): Use it.
11672 (mark_template_parm): New function.
11673 (push_template_decl): Check that the argument list of a partial
11674 specialization uses all the template parameters.
11676 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
11677 with it; we might want it for debugging.
11678 * cp-tree.h (type_unification): Change interface.
11679 * class.c (finish_struct_1): Skip nested template types, just like
11680 ordinary nested types.
11681 (instantiate_type): Use new interface to type_unification.
11682 * lex.c (init_lex): Add __sz as opname for sizeof.
11683 * method.c (build_overload_scope_ref): New function.
11684 (build_overload_int): Handle complex expressions. Set
11685 numeric_output_need_bar if necessary.
11686 (build_overload_value): Handle non-PARM_DECL nodes; this
11687 routine is now used by build_overload_int. Remove some
11688 assignments to numeric_output_need_bar. Use
11689 build_overload_scope_ref.
11690 (build_qualified_name): Note that some template mangled names end
11691 with digits, and set numeric_output_need_bar appropriately. Use
11692 build_underscore_int.
11693 * pt.c (unify): Change interface.
11694 (type_unification_real): Likewise.
11695 (determine_specialization): Use new interfaces.
11696 (tsubst): Deal gracefully with situations in which the argument
11697 vector is not fully filled.
11698 (fn_type_unification): Use new interfaces.
11699 (type_unification): Likewise. Remove NOP_EXPR hack.
11700 (type_unification_real): Likewise.
11701 (unify): Likewise. Deal with unification of complex expressions.
11703 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11705 * pt.c (complete_template_args): Initialize skip properly.
11707 * decl.c (make_typename_type): Revert.
11708 (make_implicit_typename): Remove.
11709 (lookup_name_real): Don't call it. Call lookup_field if we see a
11710 TYPE_DECL from a template base.
11711 * search.c (lookup_field): Do implicit typename stuff.
11713 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
11714 Geoff Noer <noer@cygnus.com>
11716 * Makefile.in: Various fixes for building cygwin32 native toolchains.
11717 * Make-lang.in: Likewise.
11719 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11721 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
11723 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
11725 * decl.c (make_implicit_typename): Rewrite removed code.
11726 (make_typename_type): Call it if the type we look up comes from
11727 a base that uses template parms.
11729 * pt.c (complete_template_args): Rewrite.
11730 (tsubst, FUNCTION_DECL): Use it.
11732 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
11734 * semantics.c (finish_asm_stmt): Fix combine strings. Call
11735 c_expand_asm_operands () if output_operands, input_operands or
11736 clobbers is not NULL_TREE.
11738 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11740 * pt.c (complete_template_args): New function.
11741 (get_bindings): Deal with specializations of function templates
11742 with return type containing parameters from outer class
11744 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
11745 substitute arguments and compose a new type.
11747 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
11749 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
11752 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
11754 * decl.c (make_implicit_typename): Lose useless code.
11756 * call.c (standard_conversion): Handle A* -> const A* properly.
11758 * pt.c (get_bindings_real): Rename from get_bindings. Add
11759 check_rettype parm.
11760 (get_bindings): Pass 1.
11761 (get_bindings_overload): Pass 0.
11763 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
11765 * pt.c (check_explicit_specialization): When reverting a static
11766 member function, also remove the `this' parameter from
11767 last_function_parms.
11769 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
11771 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
11772 a function context.
11774 * decl.c (store_bindings): Use free_binding_vecs.
11775 (pop_from_top_level): Likewise.
11777 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
11779 * decl.c (make_implicit_typename): Only change the type of a
11782 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
11784 * semantics.c: New file, containing routines to perform the
11785 semantic phase of parsing.
11787 * pt.c (tsubst_expr): Likewise.
11788 * cp-tree.h: Declare the various functions in semantics.c.
11789 Provide macros to access _STMT tree nodes.
11790 * cp-tree.def: Add ASM_STMT tree node.
11791 * Makefile.in, Make-lang.in: Add dependencies on and for
11794 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
11796 * pt.c (push_template_decl): Only check primary templates.
11798 * pt.c (check_explicit_specialization): Complain about default args
11799 in explicit specialization.
11801 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
11802 constructor_declarator.
11804 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
11806 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11807 has no overloaded operator ->.
11809 * call.c (build_field_call): Don't crash when presented with a
11810 field that is actually a nested type.
11812 * decl.c (pushtag): Deal with friend class injection in local
11815 * call.c (build_object_call): Don't crash if OBJ is a
11816 pointer-to-member-function.
11818 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
11820 * pt.c (push_template_decl): Complain about template with C linkage,
11821 anonymous template class.
11823 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
11825 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11826 * search.c: Likewise.
11828 * lex.c (do_pending_defargs): Only call
11829 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11831 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11833 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
11835 * parse.y: Deal with CONSTRUCTORS in new_initializers.
11837 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
11839 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11840 closely mimics the behavior in parse.y.
11841 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11842 into a compound statement.
11844 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
11846 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11847 * pt.c (inline_needs_template_parms): New fn.
11848 (original_template): New fn.
11849 (push_inline_template_parms_recursive): New fn.
11850 (maybe_begin_member_template_processing): Use them.
11851 (maybe_end_member_template_processing): Likewise.
11852 (is_member_or_friend_template): Rename to is_member_template.
11853 Member functions of local classes are never member templates.
11855 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11857 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11858 added in the class scope to catch redefinition error.
11860 * pt.c (reduce_template_parm_level): Also copy
11861 the DECL_TEMPLATE_PARMS field.
11863 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
11865 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11866 reduced-level template type parameter.
11868 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
11870 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11871 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11872 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11873 * decl.c (duplicate_decls): Propagate it.
11874 * typeck2.c (abstract_virtuals_error): Use two loops to emit
11875 abstract virtual functions and virtual functions which need a
11876 final overrider separately.
11878 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
11880 * lang-specs.h: Properly put brackets around array elements in
11883 * typeck.c (build_binary_op_nodefault): Correctly place parens around
11884 && and || in expression.
11886 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
11888 * call.c (default_parm_conversions): Remove prototype definition.
11889 (build_method_call): Remove unused variable result.
11891 * cvt.c (ocp_convert): Remove unused variable conversion.
11893 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11895 * except.c (do_unwind): #if 0 definition of unused variables fcall
11898 * expr.c (extract_scalar_init): #if 0 prototype and function
11901 * init.c (expand_aggr_init_1): Remove unused variable init_type.
11902 (build_new_1): Remove unused variable t.
11904 * pt.c (instantiate_class_template): Remove unused variable newtag;
11905 cast called function return value to void.
11906 (do_decl_instantiation): Remove unused variables name and fn.
11908 * tree.c (get_type_decl): Add default return to shut up compiler from
11909 complaining control reaches end of non-void function.
11911 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11913 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
11915 * call.c (default_parm_conversions): Remove prototype definition.
11916 (build_method_call): Remove unused variable result.
11917 (build_over_call): Add default case in enumeration switch.
11919 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
11921 * decl2.c (lang_decode_option): Change j's type to size_t.
11923 * tree.c (layout_vbasetypes): record_align and desired_align are of
11924 type unsigned int; const_size and nonvirtual_const_size likewise.
11926 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
11928 * parse.y (new_initializer): Make sure all initializers are
11931 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
11933 * decl2.c (import_export_decl): Mark tinfo functions for
11934 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11936 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
11938 * method.c: Fix typo.
11940 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11942 * method.c: Include "system.h" to get stdlib.h, stdio.h,
11943 ctype.h, string.h, etc.
11944 (issue_nrepeats): Add default case in enumeration switch.
11945 (check_btype): Likewise.
11946 (process_overload_item): Likewise.
11948 * Makefile.in (method.o): Depend on system.h.
11950 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11952 * lex.c (do_scoped_id): Fix parenthesizing.
11954 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
11956 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11957 FLAG_RTTI is unset, initialize type info machinery and continue
11958 with FLAG_RTTI enabled.
11959 (get_typeid): Likewise.
11961 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
11963 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11966 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
11968 * pt.c (finish_member_template_decl): Deal more gracefully with
11969 invalid declarations.
11971 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
11973 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11974 cp-tree.h: Clean up more old overloading code, old RTTI code, and
11975 some formatting quirks.
11977 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11978 method.c, pt.c, ptree.c, typeck.c: Remove support for
11979 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11981 * Makefile.in: Adjust.
11983 * pt.c (unify): Don't allow reduced cv-quals when strict.
11985 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11986 *type_unification* and unify.
11988 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
11990 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11991 (nested_name_specifier): And add it before this use.
11992 (typename_sub0): And this use. Also add use without the keyword.
11993 (typename_sub1): Likewise.
11994 * pt.c (instantiate_class_template): Don't actually instantiate
11995 anything if our type uses template parms.
11997 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
11999 * decl.c (start_function): Don't call temporary_allocation for a
12002 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12004 * pt.c (instantiate_class_template): Don't mess with friends if
12005 our type uses template parms.
12007 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
12009 * parse.y (nested_name_specifier): Use explicit_template_type.
12010 (typename_sub): Allow a template_type, an explicit_template_type,
12011 or an implicit template type at the end.
12012 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12013 * decl.c (make_typename_type): Handle template-id where the name
12014 is a TEMPLATE_DECL.
12015 * call.c (build_scoped_method_call): Handle member template
12017 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12018 destructor is represented by the type.
12020 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12021 * parse.y (nested_name_specifier): Add 'template' case.
12022 (explicit_template_type): New rule.
12023 (typename_sub): Use it.
12024 * decl.c (make_typename_type): Handle getting a template-id for NAME.
12025 * pt.c (tsubst): Likewise.
12027 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
12029 * pt.c (add_to_template_args): Fix thinko.
12030 (instantiate_class_template): Call it later.
12032 * pt.c (get_class_bindings): Add outer_args parm.
12033 (most_specialized_class): Likewise.
12034 (instantiate_class_template): Pass it.
12035 (more_specialized_class): Likewise.
12036 (lookup_template_class): Get context from template if none
12038 (finish_member_template_decl): Don't do anything with a
12039 partial specialization.
12040 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12042 * class.c (finish_struct): Member class templates have already been
12043 checked for name clashes.
12044 * decl.c (pushdecl_with_scope): Handle pushing at class level.
12046 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
12048 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12049 (tsubst, *_PARM): Support multiple levels of template classes.
12050 (instantiate_class_template): Look up the pattern from the
12052 (lookup_template_class): Handle getting a template for d1.
12053 (push_template_decl): Correct setting of 'primary'.
12054 (reduce_template_parm_level): Add 'levels' parm.
12055 (finish_member_template_decl): Support member class templates.
12056 (template_class_depth): Handle multiple levels.
12057 * parse.y (component_decl_1, fn.def2): Remove member template case.
12058 (component_decl): Add member template cases.
12059 * decl2.c (check_member_template): We now handle member template
12061 * decl.c (pushtag): Handle member templates.
12062 * method.c (do_inline_function_hair): Don't touch
12063 IDENTIFIER_GLOBAL_VALUE.
12064 * init.c (build_offset_ref): If name isn't an identifier, just
12066 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12068 * typeck.c (get_delta_difference): Do adjust for conversions to
12069 and from virtual base.
12071 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
12073 * typeck.c (get_delta_difference): Give hard error for conversion
12076 * cp-tree.h: Tweak formatting.
12078 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
12080 * decl.c (push_namespace): Handle redeclaration error.
12082 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12083 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12084 (NAMESPACE_BINDING): New macro.
12085 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12088 * pt.c (push_template_decl): Use innermost_args.
12090 * decl.c (get_unique_name): Tweak from earlier in the name.
12092 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12094 * cp-tree.def: Add CPLUS_BINDING node.
12095 * cp-tree.h (tree_binding): New struct.
12096 (BINDING_SCOPE, BINDING_VALUE): New macros.
12097 (current_namespace, global_namespace): Declare extern.
12098 (struct lang_decl_flags): New field in_namespace.
12099 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12100 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12101 (TREE_INDIRECT_USING): New macro.
12102 * decl2.c (current_namespace, global_namespace): Declare. The
12103 value is a NAMESPACE_DECL now, not a TREE_LIST.
12104 (is_namespace_ancestor, namespace_ancestor): New static functions.
12105 (add_using_namespace, ambiguous_decl): Likewise.
12106 (lookup_using_namespace): New support function for lookup_name.
12107 (qualified_lookup_using_namespace): New support function for
12108 do_scoped_id and lookup_namespace_name.
12109 (get_namespace_id): Mark as obsolete.
12110 (current_namespace_id): Likewise.
12111 (do_namespace_alias): Implement.
12112 (do_using_directive): Implement as call to add_using_namespace.
12113 * decl.c (binding_for_name): New function.
12114 (push_namespace, pop_namespace): Implement.
12115 (push_decl): Don't install a FUNCTION_DECL in the global branch.
12116 (lookup_namespace_name): Implement using qualified lookup.
12117 (lookup_name_real): For global scoping, lookup in
12118 global_namespace. For namespace scoping, lookup in given
12119 namespace. For unscoped lookup, iterate over namespace,
12120 considering using directives.
12121 (init_decl_processing): Initialize global_namespace.
12122 (grokvardecl): Build assembler name as static name for globals.
12123 (grokdeclarator): Remove old namespace mangling.
12124 (xref_tag): When installing a global binding for the
12125 tag, make sure we have an identifier.
12126 * method.c (build_overload_nested_name): Mangle namespaces.
12127 (build_qualified_name): Likewise.
12128 (build_decl_overload_real): Likewise.
12129 * lex.c (build_lang_decl): Set namespace for new declaration to
12131 (do_scoped_id): Find global names in global or current
12132 namespace, or using qualified namespace lookup, depending on
12134 * init.c (build_member_call): When scope is namespace, use
12135 build_x_function_call instead.
12136 (build_offset_ref): When scope is namespace, collapse processing
12137 to lookup_namespace_name instead.
12138 * error.c (dump_decl): Support NAMESPACE_DECL.
12139 * decl.c (pushdecl): Bind globals to current namespace.
12140 (push_overloaded_decl): Likewise.
12141 (lookup_tag): Likewise.
12142 (lookup_name_current_level): Likewise.
12143 (xref_tag): Likewise.
12144 (start_function): Likewise.
12145 * lex.c (do_identifier): Likewise.
12146 (identifier_typedecl_value): Likewise.
12147 (real_yylex): Likewise.
12148 * method.c (do_inline_function_hair): Likewise.
12149 * parse.y (unscoped): Likewise.
12150 * pt.c (check_explicit_specialization): Likewise.
12151 (lookup_template_class): Likewise.
12152 * rtti.c (call_void_fn): Likewise.
12153 * sig.c (build_sigtable): Likewise.
12154 * ptree.c (lang_print_xnode): New function.
12156 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
12158 * pt.c (instantiate_class_template): Don't instantiate if pedantic
12159 and the args use template parms.
12161 * pt.c (push_tinst_level): If the instantiation uses template parms,
12163 * decl.c (xref_basetypes): Do call complete_type for basetypes
12164 that involve template parameters.
12166 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
12168 * typeck2.c (process_init_constructor): Fix labeled init check.
12170 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
12172 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12173 argument to tsubst and friends.
12175 * pt.c (tsubst, FUNCTION_DECL): Tidy.
12177 * typeck.c (build_x_function_call): Handle static member function
12178 templates like non-templates. Handle friend templates like normal
12179 function templates.
12180 * pt.c (tsubst, *_PARM): Don't use orig_level.
12181 (get_bindings): Don't call add_to_template_args.
12182 (instantiate_template): Likewise.
12183 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
12184 * ptree.c (print_lang_type): Print index/level for template parms.
12186 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
12188 * Make-lang.in (cc1plus): Note that cc1plus depends on
12189 cp/cp-tree.h and cp/cp-tree.def.
12191 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
12192 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
12193 position in a template parameter list.
12194 * cp-tree.h (template_parm_index): New structure, used as the tree
12195 structure for a TEMPLATE_PARM_INDEX.
12196 (TEMPLATE_PARM_IDX): New macro.
12197 (TEMPLATE_PARM_LEVEL): Likewise.
12198 (TEMPLATE_PARM_DESCENDANTS): Likewise.
12199 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
12200 (TEMPLATE_PARM_DECL): Likewise.
12201 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12202 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
12203 (TEMPLATE_TYPE_DECL): Likewise.
12204 (TEMPLATE_CONST_IDX): Remove.
12205 (TEMPLATE_CONST_LEVEL): Likewise.
12206 (TEMPLATE_CONST_SET_INFO): Likewise.
12207 (TEMPLATE_TYPE_SET_INFO): Likewise.
12208 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
12210 (TEMPLATE_TYPE_LEVEL): Likewise.
12211 * decl.c (decls_match): Call comp_template_parms, rather than
12212 expanding it inline.
12213 (duplicate_decls): If two template declarations are being merged,
12214 then their TEMPLATE_INFOs should be merged as well.
12215 (grokfndecl): Save template-id information when declaring a friend
12216 with explicit template arguments. Pass arguments to
12217 check_explicit_specialization via correct convention; at some
12218 point check_explicit_specialization changed, but these call-sites
12220 (grokdeclarator): Tidy up slightly.
12221 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
12222 two template functions with the same DECL_ASSEMBLER_NAME the same,
12223 since the names are not yet mangled.
12224 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
12225 TEMPLATE_CONST_PARM.
12226 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
12227 decl for a non-type parameter, rather than printing `<tparm ...>'.
12228 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
12229 (do_friend): Deal with template friends.
12230 * lex.c (do_pending_inlines): Call
12231 maybe_begin_member_template_processing, rather than
12232 conditionally calling begin_member_template_processing.
12233 (process_next_inline): Likewise. Call
12234 maybe_end_member_template_processing, rather than
12235 conditionally calling end_member_template_processing.
12236 (do_pending_defargs): Likewise.
12237 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
12238 TEMPLATE_CONST_PARM.
12239 * method.c (build_mangled_template_parm_index): New function.
12240 (build_overload_value): Use it.
12241 (build_overload_name): Likewise.
12242 * pt.c (finish_member_template_decl): Allow friend declarations.
12243 (template_class_depth): New function.
12244 (is_member_template): Rename, and modify, to become...
12245 (is_member_or_friend_template): New function.
12246 (end_member_template_processing): Rename, and modify, to become...
12247 (maybe_end_member_template_processing).
12248 (build_template_parm_index): New function.
12249 (reduce_template_parm_level): New function.
12250 (process_template_parm): Modify to use build_template_parm_index.
12251 (push_template_decl): Deal with friend templates.
12252 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
12253 TEMPLATE_CONST_PARM.
12254 (tsubst_friend_function): New function.
12255 (instantiate_class_template): Generate the DECL_FRIENDLIST
12256 for a new instantiation by using tsubst_friend_function rather
12258 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
12259 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
12260 appropriate new macros. Use reduce_template_parm_level to
12261 generate lower-level template parameters. Handle tsubst'ing into
12262 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
12263 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
12264 templates. Similarly for the template parameters for a new
12266 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
12267 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
12268 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
12269 (get_bindings): Call add_to_template_args if necessary.
12270 (instantiate_decl): Handle instantiations of friend templates.
12271 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
12272 TEMPLATE_TYPE_PARM as a list of fields; it's not!
12273 * spew.c (yylex): Do a little manual constant propagation to
12276 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
12278 * error.c: Include sys/types.h.
12280 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
12282 * method.c (build_mangled_name): Start CPP directives in column zero.
12284 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12286 * typeck2.c (process_init_constructor): Sorry about non-trivial
12287 labeled initializers.
12288 * parse.y (initlist): Re-enable labeled initializers.
12290 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12292 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
12293 all callers changed. Rely on the new parameter instead of arg
12294 being a TREE_LIST when determine whether we are working inside
12295 template template parameter. Clean up is_type test.
12297 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
12299 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
12300 * typeck2.c (initializer_constant_valid_p): Allow conversions
12301 between pointers and references.
12303 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
12305 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
12306 if pedantic || warn_pointer_arith.
12308 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12310 * pt.c (unify): Handle TEMPLATE_DECL.
12312 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
12314 * cp-tree.h (strip_attrs): Remove decl.
12316 1998-02-18 Doug Evans <devans@cygnus.com>
12318 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
12319 Update olddecl's attributes too.
12320 (strip_attrs): Remove function.
12321 * typeck.c (common_type): Call merge_machine_type_attributes.
12323 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
12325 * parse.y (initdcl0_innards): New grammar symbol.
12326 (nomods_initdecls, nomods_initdcl0): Change type from itype to
12327 none, since the resulting value is never used.
12328 (parse_decl): New function.
12329 (datadef): Remove redundant actions.
12330 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
12331 * parse.c: Regenerated.
12333 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
12335 * parse.y (simple_stmt): Use getdecls() to check for decl.
12337 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
12339 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
12341 (c++.install-common): Install c++filt properly as native or as cross
12343 (c++.uninstall): Add c++filt.
12345 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12347 * call.c (standard_conversion): Fix multi-level ptr conversions.
12349 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
12351 * init.c (build_new): Propagate error_mark_node up.
12353 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
12355 * parse.y (simple_stmt): If the condition isn't a declaration,
12356 start the controlled block after the test.
12358 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12360 * call.c (build_over_call): Convert builtin abs, labs and fabs to
12362 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
12365 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
12367 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
12369 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
12371 * cp-tree.h: Add access_protected_virtual_node.
12372 * class.c (init_class_processing): Initialize it.
12373 * decl.c (xref_basetypes): Use it.
12374 * parse.y (base_class_access_list): Likewise.
12376 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
12377 (c++.install-common): Install c++filt.
12379 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12381 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
12383 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
12385 * call.c (reference_binding): Use comptypes when comparing
12386 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
12388 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
12390 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
12391 (really_overloaded_fn): Move check here from is_overloaded_fn.
12392 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
12394 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
12396 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
12399 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
12401 * cp-tree.h (push_template_decl): Return the decl passed in, or an
12402 equivalent duplicate.
12403 * decl.c (pushtag): Use the return value from push_template_decl.
12404 (duplicate_decls): When duplicating a template declaration, merge
12405 the DECL_TEMPLATE_RESULTs as well.
12406 (make_implicit_typename): Don't try to dive into typename types to
12407 find a context for making a new implicit typename.
12408 (start_decl): Use the return value from push_template_decl.
12409 (grokdeclarator): Complain about declarations list `const operator
12410 int'. Since we don't correctly handle in-class initializations of
12411 non-static data members, complain about this (now illegal)
12412 practice. Issue an error for initializations of non-const statics
12413 since that is illegal as well, and since we don't handle that case
12415 (start_function): Use the return value from push_template_decl.
12416 (start_method): Likewise.
12417 * decl2.c (grokfield): Likewise. Since the change to
12418 grokdeclarator ensures that all initialized fields are in fact
12419 static, remove a redundant test for TREE_PUBLIC.
12420 * parse.y (initlist): Disable labeled initializers since they do
12421 not work as per the documentation, and since they do not use the
12422 same syntax as the C front end.
12423 * pt.c (push_template_decl): Return the decl passed in, or an
12424 equivalent duplicate.
12425 (lookup_template_class): When searching in a nested context,
12426 use the right arguments.
12427 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
12428 * typeck.c (build_component_ref): Assign the correct type to the
12429 result of build_vfn_ref.
12431 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
12433 * pt.c (convert_nontype_argument): Fix typo.
12434 (check_explicit_specialization): Allow old-style specialization
12435 of class template members.
12437 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
12438 Manfred Hollstein <manfred@s-direktnet.de>
12440 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
12441 when deciding to override DECL_ASSEMBLER_NAME.
12443 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
12445 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
12446 * cp-tree.h (flag_do_squangling): Add declaration.
12447 * lang-options.h: Add -fsquangle and -fno-squangle.
12448 * method.c: Add macros and static variables for squangling.
12449 (build_overload_name): Rename to build_mangled_name, add logic for B
12450 compression, and split into process_modifiers and
12451 process_overload_item.
12452 (process_modifiers): New function, to handle constant, reference,
12454 (process_overload_item): New function, handles issue of type codes.
12455 (build_overload_name): New function, start squangling and call
12456 build_mangled_name.
12457 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
12458 (start_squangling): New function to initialize squangling structs.
12459 (end_squangling): New function to destroy squangling structs.
12460 (nrepeats): Rename variable to Nrepeats.
12461 (issue_nrepeats): New function for issuing 'n' type repeats.
12462 (check_ktype): New function to check for type K name compression.
12463 (build_overload_nested_name): Add a check for K name compression.
12464 (build_qualified_name): Add a check for K name compression and don't
12465 use DECL_ASSEMBLER_NAME when squangling is on.
12466 (check_btype): New function, checks for B type compression.
12467 (build_static_name, build_decl_overload_real): Initiate squangling.
12468 (build_typename_overload, build_overload_with_type): Initiate
12471 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
12473 * method.c (make_thunk): Avoid name buffer overflow.
12475 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
12477 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
12478 don't define them yet.
12480 * parse.y (nomods_initdcl0): Add constructor_declarator case.
12482 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12484 * config-lang.in (diff_excludes): Use basename only.
12486 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
12488 * tinfo2.cc: Add tinfo for signed char.
12490 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
12492 * search.c (compute_access): Handle protected constructors in derived
12493 classes as accessible.
12495 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
12497 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
12498 Call convert_from_reference sooner.
12500 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
12502 * cvt.c (ocp_convert): Obtain the constant values from constant
12503 decls even if the destination type is the same as the type of the
12506 * decl2.c (finish_file): Make sure that static inlines with
12507 definitions are not marked DECL_EXTERNAL before returning.
12509 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
12511 * decl.c: Lose arg_looking_for_template.
12512 (lookup_name_real): Likewise.
12513 * parse.y: Lose processing_template_arg, template_arg1.
12514 (primary): Likewise.
12515 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
12517 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12519 * error.c (dump_decl): Fix type of default arguments for template
12520 template parameters and nontype template parameters.
12521 * parse.y (template_parm): Handle invalid default template
12522 template arguments here.
12524 * parse.y (template_parm): Use template_arg instead of PTYPENAME
12525 for default template template argument.
12526 * pt.c (coerce_template_parms): Merge default template argument
12527 codes. Can treat RECORD_TYPE as template name if it is implicitly
12528 created. Fix argument index in error message.
12529 * typeck.c (comptypes): Merge template argument comparison codes in
12530 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
12532 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
12534 * lex.c (file_name_nondirectory): Also check for '/'.
12536 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
12538 * parse.y (primary): Deal with statement-expressions in
12540 * pt.c (tsubst_copy): Handle BIND_EXPR.
12541 * tree.c (mapcar): Likewise.
12543 * call.c (add_template_candidate_real): Pass extra parameter to
12544 fn_type_unification.
12545 * cp-tree.h (fn_type_unification): Add parameter.
12546 * pt.c (fn_type_unification): Add additional parameter to deal with
12547 static member functions.
12548 (get_bindings): Deal with static member functions.
12550 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
12551 (revert_static_member_fn): Declare.
12552 * decl.c (revert_static_member_fn): Remove declaration. Change
12553 linkage from internal to external.
12554 (cp_finish_decl): Deal with virtual functions in classes local to
12555 template functions.
12556 * decl2.c (finish_file): Don't forget to emit increment/decrement
12557 expressions in initializers for file-scope variables.
12558 * parse.y (typename_sub2): If the typename doesn't names a
12559 template, rather than a type, issue an error message.
12560 * pt.c (check_explicit_specialization): Handle specializations of
12561 static member functions.
12562 (coerce_template_parms): Handle offset references to lists of
12564 * search.c (note_debug_info_needed): Don't crash when handed a
12565 type which is being defined.
12566 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
12567 that can happen with some illegal code.
12569 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12571 * call.c (user_harshness): Initialize `code' to 0.
12572 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
12573 (null_ptr_cst_p): Add parentheses around && within ||.
12574 (standard_conversion): Likewise.
12575 (z_candidate): Likewise.
12576 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
12577 (build_object_call): Likewise for `mem_args'.
12578 (build_new_op): Likewise for `mem_arglist'. Add `return' from
12579 default case in enumeration switch.
12581 * class.c (build_vtable_entry): Add explicit braces to avoid
12583 (build_class_init_list): Likewise.
12584 (finish_struct_1): Initialize `width' to 0.
12585 (instantiate_type): Initialize `name' to NULL_TREE. Add
12586 explicit braces to avoid ambiguous `else'.
12588 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
12591 * decl.c (grok_reference_init): Eliminate unused parameter, all
12593 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
12594 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
12595 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
12596 (grokdeclarator): Add parentheses around && within ||. Add
12597 explicit braces to avoid ambiguous `else'.
12598 (grokparms): Initialize `type' to NULL_TREE.
12599 (xref_tag): Remove unused label `just_return'.
12600 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
12601 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
12602 (hack_incomplete_structures): Add parentheses around assignment
12603 used as truth value.
12605 * decl2.c (coerce_delete_type): Hide definition of `e3'.
12607 * error.c: Include <stdlib.h>.
12608 (dump_expr): Change the type of `i' to size_t. Remove unused
12611 * except.c (init_exception_processing): Remove unused variable `d'.
12612 (expand_throw): Likewise for `label'.
12614 * friend.c (add_friends): Add explicit braces to avoid ambiguous
12617 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
12618 (sort_base_init): Likewise for `binfo'.
12619 (expand_member_init): Likewise for `rval'.
12620 (build_member_call): Add parentheses around assignment used as
12622 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
12623 (build_new): Initialize `nelts' to NULL_TREE. Initialize
12624 `old_immediate_size_expand' to 0.
12625 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
12626 (build_vec_delete_1): Remove unused variable `block'.
12627 (expand_vec_init): Initialize `itype' to NULL_TREE.
12629 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
12630 declaration of `index' and `rindex' with autoconf macros.
12631 (reinit_parse_for_expr): Remove unused variables
12632 `look_for_semicolon' and `look_for_lbrac'.
12633 (cons_up_default_function): Initialize `args' to NULL_TREE.
12634 (readescape): Initialize `firstdig' to 0.
12635 (real_yylex): Add parentheses around assignment used as truth value.
12637 * method.c: Include <strings.h> if we don't have <string.h>.
12638 Protect declaration of `index' with autoconf macro.
12640 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
12641 Initialize `type' to NULL_TREE.
12642 (structsp): Remove unused variable `id'.
12644 * pt.c (coerce_template_parms): Add explicit braces to avoid
12646 (lookup_template_class): Initialize `template' to NULL_TREE.
12647 (instantiate_class_template): Remove unused variable `name' and `e'.
12648 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
12649 (do_poplevel): Initialize `saved_warn_unused' to 0.
12650 (type_unification): Remove unused varable `parm'.
12651 (unify): Likewise for `j'.
12653 * repo.c (init_repo): Add parentheses around assignment used as
12655 (finish_repo): Remove unused varable `p'.
12657 * search.c (get_binfo): Initialize `type' to NULL_TREE.
12658 (get_base_distance): Likewise.
12659 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
12660 and `new_v' to NULL_TREE.
12661 (lookup_fnfields): Likewise for `rval_binfo_h'.
12662 (breadth_first_search): Add parentheses around assignment used as
12664 (get_template_base): Initialize `type' to NULL_TREE.
12666 * sig.c (append_signature_fields): Initialize `last_mfptr' to
12668 (build_signature_table_constructor): Likewise for
12669 `last_rhs_field', `pfn' and `vt_off'.
12670 (build_sigtable): Likewise for `init'.
12672 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
12673 (propagate_binfo_offsets): Likewise for `delta'.
12674 (hash_tree_cons): Initialize hashcode to 0.
12675 (can_free): Likewise for `size'.
12676 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
12678 * typeck.c (convert_sequence): Hide prototype.
12679 (common_type): Add explicit braces to avoid ambiguous `else'.
12680 (comp_target_types): Likewise.
12681 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
12682 (build_function_call_real): Add explicit braces to avoid ambiguous
12684 (convert_arguments): Initialize `called_thing' to 0.
12685 (convert_for_initialization): Initialize `savew' and `savee' to 0.
12687 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
12688 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
12689 (build_x_arrow): Likewise for `last_rval'.
12691 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
12693 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
12695 * decl.c (init_decl_processing): Use set_sizetype.
12696 * decl2.c (sizetype): Don't declare.
12697 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
12698 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
12699 (build_component_addr, unary_complex_lvalue): Likewise.
12700 * rtti.c (expand_class_desc): Likewise.
12701 * class.c (get_vfield_offset): Likewise.
12703 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
12705 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
12706 early to avoid bogus error. Handle overloaded function
12707 names provided as template arguments correctly.
12708 (coerce_template_parms): Don't mishandle overloaded functions when
12709 dealing with template template parameters.
12710 (lookup_template_class): Issue an error message, rather than
12711 crashing, when the TYPE_DECL provided is not a template type.
12713 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
12715 * class.c (instantiate_type): Don't just return a known type if
12718 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
12720 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
12721 since that code could never be reached.
12723 * error.c (dump_decl): Avoid aborting in the midst of printing an
12724 error message about an illegal template declaration.
12726 * parse.y (structsp): Print an error message, rather than crashing,
12727 when a class-head does not name a class.
12729 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
12730 template arguments as a g++ extension.
12732 * cp-tree.def (ALIGNOF_EXPR): New tree code.
12733 * decl2.c (grok_alignof): If processing_template_decl, just store
12735 * typeck.c (c_alignof): Likewise.
12736 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
12737 * error.c (dump_expr): Likewise.
12738 * pt.c (tsubst_copy): Likewise.
12739 * tree.c (cp_tree_equal): Likewise.
12740 * pt.c (uses_template_parms): Correctly determine whether or not a
12741 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
12742 folding can be done.
12744 * cp-tree.h (grok_enum_decls): Remove type parameter.
12745 * decl.c (grok_enum_decls): Likewise.
12746 * decl2.c (grok_x_components): Call grok_enum_decls
12747 unconditionally, since it will do nothing if there is no
12748 current_local_enum. Use the new calling sequence.
12749 * pt.c (tsubst_enum): Use the new calling sequence for
12752 * decl.c (start_function): Make member functions of local classes
12753 in extern inline functions have comdat linkage here...
12754 (grokdeclarator): Rather than here.
12756 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
12758 * pt.c (convert_nontype_argument): Use decl_constant_value.
12760 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
12762 * call.c (add_template_candidate_real): New function.
12763 (add_template_candidate): Use it.
12764 (add_template_conv_candidate): Likewise.
12765 (joust): Pass extra argument to more_specialized.
12766 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
12767 (is_local_class): Remove.
12768 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
12769 * cp-tree.h (is_local_class): Remove.
12770 (perform_array_to_pointer_conversion): Likewise.
12771 (finish_member_template_decl): Add.
12772 (check_explicit_specialization): Return a tree, not an int.
12773 (more_specialized): Take additional argument.
12774 (get_bindings): Likewise.
12775 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
12776 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12777 (perform_array_to_pointer_conversion): Remove.
12778 * decl.c (saved_scope): Add processing_specialization,
12779 processing_explicit_instantiation fields.
12780 (maybe_push_to_top_level): Save them.
12781 (pop_from_top_level): Restore them.
12782 (grokfndecl): Use new return value from
12783 check_explicit_specialization.
12784 (start_decl): Don't check flag_guiding_decls before pushing
12786 (cp_finish_decl): Remove previous (bogus) change.
12787 (grok_declarator): Use decl_function_context rather than
12789 * decl2.c (finish_file): Pass extra argument to get_bindings.
12790 (build_expr_from_tree): Let build_x_component_ref check
12791 validity of arguments rather than doing it here.
12792 * lex.c (cons_up_default_function): Remove code fooling with
12793 processing_specialization, processing_explicit_instantiation
12794 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12795 * method.c (build_overload_identifier): Mangle local classes in
12796 template functions correctly.
12797 * parse.y (finish_member_template_decl): Move to pt.c.
12798 * pt.c (finish_member_template_decl): Moved here from parse.y.
12799 (print_candidates): New function.
12800 (determine_specialization): Change interface. Properly look for
12801 most specialized versions of template candidates.
12802 (check_explicit_specialization): Fully process explicit
12804 (push_template_decl): Avoid looking at CLASSTYPE fields in
12806 (determine_overloaded_function): Remove.
12807 (convert_nontype_argument): Change name from
12808 convert_nontype_parameter. Use determine_overloaded_function
12809 instead of instantiate_type.
12810 (mangle_class_name_for_template): Handle type contexts as well as
12812 (classtype_mangled_name): Likewise.
12813 (lookup_template_class): Likewise.
12814 (tsubst): Likewise.
12815 (more_specialized): Take explict template arguments as a
12817 (most_specialized): Likewise.
12818 (get_bindings): Likewise. Check that return types match before
12819 proclaiming a function a match.
12820 (do_decl_instantiation): Remove code searching for function to
12821 instantiate; that is now done in check_explicit_specialization.
12822 (add_maybe_template): Pass extra argument to get_bindings.
12823 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12825 * typeck.c (build_component_ref): Check for invalid arguments.
12827 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
12829 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12830 return_target and call_target are equivalent.
12832 * pt.c (type_unification_real): Just accept function parms that
12833 don't use any template parms.
12835 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
12837 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12838 unset DECL_NOT_REALLY_EXTERN.
12840 * parse.y (typename_sub*): Fix std::.
12842 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
12844 * error.c (dump_decl): Fix type default template args.
12845 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12847 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
12849 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12850 (file_name_nondirectory): Use.
12852 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12854 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12855 that are not really present. Substitute default arguments in
12856 template template arguments. Correctly convert TEMPLATE_DECL to
12857 TEMPLATE_TEMPLATE_PARM.
12858 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12859 are no longer treated specially here.
12860 * parse.y (template_template_parm): Fix copy error.
12861 * decl.c (grokdeclarator): Warn about missing `typename' for nested
12862 type created from template template parameters.
12863 * parse.y (bad_parm): Likewise
12865 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12866 (push_nested_class): Likewise.
12867 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12868 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12869 (copy_template_template_parm): Declare.
12870 * decl.c (arg_looking_for_template): New variable.
12871 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12872 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12873 node if arg_looking_for_template is nonzero.
12874 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12875 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12876 (grokdeclarator): Handle TEMPLATE_DECL.
12877 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12878 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12879 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12880 (dump_decl): Handle unnamed template type parameters.
12881 Handle template template parameters.
12882 (dump_function_name): Handle template template parameters.
12883 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12884 Handle TEMPLATE_TEMPLATE_PARM.
12885 * method.c (build_template_template_parm_names): New function.
12886 (build_template_parm_names): Handle TEMPLATE_DECL.
12887 (build_overload_nested_name, build_overload_name):
12888 Handle TEMPLATE_TEMPLATE_PARM.
12889 * parse.y (maybe_identifier): New nonterminal.
12890 (template_type_parm): Use it.
12891 (template_template_parm, template_arg1): New nonterminal.
12892 (template_parm): Add template_template_parm rules.
12893 (template_arg): Set processing_template_arg.
12894 (template_arg1): Rules moved from template_arg.
12895 (primary, nonnested_type): Set arg_looking_for_template if we are
12896 processing template arguments.
12897 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12898 (process_template_parm): Handle template template parameters.
12899 (coerce_template_parms, comp_template_args): Likewise.
12900 (mangle_class_name_for_template, lookup_template_class): Likewise.
12901 (uses_template_parms): Handle TEMPLATE_DECL and
12902 TEMPLATE_TEMPLATE_PARM.
12903 (current_template_args): Handle TEMPLATE_DECL.
12904 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12905 * search.c (dfs_walk, dfs_record_inheritance):
12906 Handle TEMPLATE_TEMPLATE_PARM.
12907 * tree.c (copy_template_template_parm): New function.
12908 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12909 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12911 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
12913 * decl.c (start_decl): Don't allow duplicate definitions of static
12916 * call.c (build_user_type_conversion_1): Handle user-defined
12917 template conversion operators correctly.
12919 * decl2.c (build_expr_from_tree): Issue an error message if the
12920 object in a COMPONENT_REF is a TEMPLATE_DECL.
12922 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12924 * class.c (is_local_class): New function.
12925 * cp-tree.h (is_local_class): Declare it.
12926 (last_tree): Likewise.
12927 (begin_tree): Likewise.
12928 (end_tree): Likewise.
12929 (lookup_template_class): Change prototype.
12930 * decl.c (cp_finish_decl): Check for NULL where necessary.
12931 Consider FUNCTION_DECLS to declare objects with top-level binding,
12932 when calling make_decl_rtl.
12933 (grokdeclarator): Give members of local classes internal linkage.
12934 (start_function): Remove declaration of last_tree.
12935 (finish_function): Set flag_keep_inline_functions around call to
12936 rest_of_compilation if we are processing a member function in a
12938 (start_method): Call push_template_decl for member functions of
12939 local classes in template functions.
12940 * decl2.c (import_export_decl): Don't give external linkage to
12941 instantiations of templates with internal linkage.
12942 * parse.y (last_tree): Remove declaration.
12943 (template_type): Pass extra parameter to lookup_template_class.
12944 (self_template_type): Likewise.
12945 (structsp): Move call to reset_specialization into left_curly.
12946 (left_curly): Call reset_specialization, and begin_tree.
12947 * pt.c (saved_trees): New variable.
12948 (mangle_class_name_for_template): Change prototype. Use
12949 additional function context to name local classes in templates
12951 (classtype_mangled_name): Pass the context.
12952 (push_template_decl): Handle local classes and templates, and
12953 member functions for such classes.
12954 (convert_nontype_parameter): Fix handling of pointer-to-member
12956 (lookup_template_class): Handle local classes in templates.
12957 (tsubst): Likewise. Don't assume that template instantiations
12958 have external linkage; pay attention to the template declaration.
12959 (mark_decl_instantiated): Likewise.
12960 (begin_tree): New function.
12961 (end_tree): Likewise.
12963 * decl.c (xref_basetypes): Don't call complete_type for basetypes
12964 that involve template parameters; that can lead to infinite
12965 recursion unnecessarily.
12967 * pt.c (register_specialization): Do not register specializations
12968 that aren't ready to be registered yet.
12969 (check_explicit_specialization): Handle explicit specialization of
12970 constructors and destructors.
12971 (build_template_decl): New function.
12972 (push_template_delc): Handle out-of-class specializations of
12975 * pt.c (check_explicit_specialization): Set up the template
12976 information before registering the specialization.
12977 (coerce_template_parms): Fix thinko.
12978 (tsubst): Handle specializations of member templates correctly.
12980 * class.c (finish_struct_methods): Remove calls to
12981 check_explicit_specialization from here.
12982 (finish_struct): And insert them here.
12983 * cp-tree.h (perform_qualification_conversions): New function.
12984 (perform_array_to_pointer_conversion): Likewise.
12985 (begin_explicit_instantiation): Likewise.
12986 (end_explicit_instantiation): Likewise.
12987 (determine_specialization): Renamed from
12988 determine_explicit_specialization.
12989 (comp_template_parms): New function.
12990 (processing_explicit_instantiation): New variable.
12991 * cvt.c (perform_qualification_conversions): New function.
12992 (perform_array_to_pointer_conversion): Likewise.
12993 * decl.c (duplicate_decls): Don't consider template functions
12994 alike unless they have the same parameters. Refine handling of
12995 instantiation/specialization mismatches.
12996 (start_decl): Don't call pushdecl for template specializations,
12997 since they don't affect overloading.
12998 (start_function): Likewise.
12999 (grokfndecl): Call check_explicit_specialization a little later.
13000 Don't call duplicate_decls for memberm template specializations.
13001 (grokdeclarator): Don't update template_count for classes that are
13002 themselves specializations. Remove use of `2' as parameter to
13003 grokfndecl since that value isn't used.
13004 * lex.c (cons_up_default_function): Save and restore
13005 processing_explicit_instantiation around calls to grokfield.
13006 * parse.y (finish_member_template_decl): New function.
13007 (component_decl_1): Use it.
13008 (fn.def2): Likewise.
13009 (template_arg_list_opt): New nonterminal.
13010 (template_type): Use it.
13011 (self_template_type): Likewise.
13012 (template_id): Likewise.
13013 (object_template_id): Likewise.
13014 (notype_template_declarator): Likwise.
13015 (begin_explicit_instantiation): Likewise.
13016 (end_explicit_instantiation): Likewise.
13017 (explicit_instantiation): Use them.
13018 * pt.c (coerce_template_parms): Add parameters.
13019 (processing_explicit_instantiation): New variable.
13020 (convert_nontype_parameter): New function.
13021 (determine_overloaded_function): Likewise.
13022 (begin_explicit_instantiation): Likewise.
13023 (end_explicit_instantiation): Likewise.
13024 (retrieve_specialization): Likewise.
13025 (register_specialization): Likewise.
13026 (processing_explicit_specialization): Removed.
13027 (determine_specialization): Handle specializations of member
13028 functions of template class instantiations.
13029 (check_explicit_specialization): Refine to conform to standard.
13030 (comp_template_parms): New function.
13031 (coerce_template_parms): Call convert_nontype_parameter.
13032 (tsubst): Refine handling of member templates. Use
13033 register_specialization.
13034 (instantiate_template): Use retrieve_specialization.
13035 (do_decl_instantiation): Likewise.
13036 (instantiate_decl): Likewise.
13037 (type_unification): Improve handling of explict template
13039 * tree.c (mapcar): Return error_mark_node, rather than aborting,
13040 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13041 * typeck.c (build_unary_op): Call determine_specialization, rather
13042 than determine_explicit_specialization.
13044 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
13046 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13048 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13050 * error.c (dump_decl): For enum tags, output the tag, not its value.
13052 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
13054 * decl.c (init_decl_processing): Only call init_rtti_processing
13057 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
13059 * init.c (build_new_1): Split out from build_new.
13060 (build_new): Just return a NEW_EXPR.
13061 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13063 * decl2.c (get_temp_regvar): Tweak.
13065 * cp-tree.h (TREE_CALLS_NEW): Comment out.
13066 * class.c (resolves_to_fixed_type_p): Remove use.
13067 * method.c (build_opfncall): Likewise.
13068 * call.c (build_new_op): Likewise.
13070 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13072 * exception.cc (__eh_alloc, __eh_free): New fns.
13073 (__cp_push_exception, __cp_pop_exception): Use them.
13074 (__uncatch_exception): Call terminate here if no exception.
13075 * except.c (build_terminate_handler): New fn.
13076 (expand_start_catch_block): Use it.
13077 (expand_exception_blocks): Likewise.
13078 (alloc_eh_object): New fn.
13079 (expand_throw): Use it. Protect exception init with terminate.
13080 * typeck.c (build_modify_expr): Remove code that ignores trivial
13083 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13085 * call.c (add_builtin_candidate): Add default case in enumeration
13087 (build_new_op): Likewise.
13088 (convert_like): Likewise.
13089 * cvt.c (build_expr_type_conversion): Likewise.
13090 * tree.c (real_lvalue_p): Likewise.
13091 (lvalue_p): Likewise.
13092 (cp_tree_equal): Likewise.
13093 * typeck.c (comptypes): Likewise.
13094 (build_component_ref): Likewise.
13095 (build_function_call_real): Likewise.
13096 (build_binary_op_nodefault): Likewise.
13097 (build_unary_op): Likewise.
13098 (build_modify_expr): Likewise.
13099 * typeck2.c (initializer_constant_valid_p): Likewise.
13101 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
13103 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13105 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
13107 * pt.c (coerce_template_parms): Make sure to digest_init if
13110 * decl.c (duplicate_decls): Make the newdecl virtual if the
13111 olddecl was, just as is done with other attributes of olddecl.
13113 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13115 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13116 address of an OFFSET_REF.
13118 * cp-tree.def: Add AGGR_INIT_EXPR.
13119 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13120 AGGR_INIT_EXPR where appropriate.
13121 * expr.c (cplus_expand_expr): Likewise. Simplify.
13123 * decl2.c (finish_file): Remove call to register_exception_table.
13125 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13127 * pt.c (instantiate_class_template): Don't do injection when
13128 processing_template_decl is true, as pollutes current_binding_level
13131 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
13133 * pt.c (maybe_fold_nontype_arg): Add prototype.
13135 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13137 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13138 * error.c (dump_expr): Likewise.
13140 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13142 * typeck.c (build_function_call_real): Remove "inline called before
13143 definition" pedwarn.
13145 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13147 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13149 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13151 * pt.c (type_unification_real): Change __null to type void* with
13154 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
13156 * call.c (implicit_conversion): Don't call
13157 build_user_type_conversion_1 with a NULL expr, since it will
13160 * pt.c (unify): Don't try to unify array bounds if either array is
13163 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13165 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13166 Replace extern decls with casts.
13168 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13169 Update last_parm_cleanup_insn.
13170 (store_after_parms): Remove.
13171 * cp-tree.h: Adjust.
13173 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13175 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13176 (finish_file): Check DECL_COMDAT instead of weak|one_only.
13177 (import_export_vtable): Use make_decl_one_only instead of
13178 comdat_linkage for win32 tweak.
13179 (import_export_decl): Likewise.
13180 * pt.c (mark_decl_instantiated): Likewise.
13182 * decl2.c (finish_file): Lose handling of templates in pending_statics.
13184 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13186 * decl2.c (finish_file): Lose call to expand_builtin_throw.
13187 * except.c (expand_builtin_throw): Remove.
13188 * cp-tree.h: Remove ptr_ptr_type_node.
13189 * decl.c: Likewise.
13191 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
13193 * decl.c (ptr_ptr_type_node): Define.
13194 (init_decl_processing): Initialize it.
13195 * cp-tree.h: Declare it.
13196 * exception.cc (__cp_exception_info): Use __get_eh_info.
13197 (__cp_push_exception): Likewise.
13198 (__cp_pop_exception): Likewise.
13200 From Scott Snyder <snyder@d0sgif.fnal.gov>:
13201 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
13203 (init_exception_processing): Removed saved_pc initialization.
13205 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
13207 * pt.c (instantiate_decl): Defer all templates but inline functions.
13209 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13211 * init.c (expand_vec_init): Don't fold a list of parameters.
13213 * decl.c (copy_args_p): Handle copy elision for types with virtual
13215 * call.c (build_over_call): Likewise.
13217 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
13219 * pt.c (lookup_template_function): Copy the template arguments,
13220 not just the list containing them, to the permanent obstack.
13222 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13224 * except.c (expand_start_catch_block): suspend_momentary for the
13227 * error.c (dump_decl): Handle LOOKUP_EXPR.
13229 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
13231 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
13232 permanent obstack if we are processing a template decl.
13233 * typeck.c (build_static_cast): Likewise.
13234 (build_const_cast): Likewise.
13235 (build_reinterpret_cast): Likewise.
13237 * pt.c (coerce_template_parms): Coerce some expressions, even
13238 when processing_template_decl.
13240 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13242 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
13243 handling of pointer difference expressions.
13245 * typeck.c (comp_target_types): Comparison of function/method types
13246 is independent of nptrs.
13248 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
13250 * pt.c (tsubst): Avoid creating pointer to reference and
13251 reference to reference types.
13253 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13255 * parse.y (do_id): New nonterminal.
13256 (template_id): Use it.
13258 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13260 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
13261 * spew.c (yylex): Don't do_identifier here.
13262 * decl2.c (build_expr_from_tree): Revert last change.
13264 * decl2.c (build_expr_from_tree): Expand the name for a method call.
13265 * parse.y (object_template_id): Don't try to take the DECL_NAME.
13267 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13269 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
13271 * call.c (build_op_delete_call): Adjust.
13273 * except.c (expand_end_catch_block): Lose rethrow region.
13274 (expand_start_catch_block): Likewise.
13275 (expand_end_catch_block): Don't expand_leftover_cleanups.
13277 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13279 * pt.c (tsubst): Remove tree_cons call (places redundant info into
13280 DECL_TEMPLATE_INSTANTIATION).
13282 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13284 * tree.c (is_overloaded_fn): Handle getting a fn template.
13285 (really_overloaded_fn): Likewise.
13286 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
13287 * pt.c (check_explicit_specialization): Tweak.
13288 (determine_explicit_specialization): Tweak.
13290 * tree.c, cp-tree.h (get_target_expr): New fn.
13292 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
13294 * pt.c (check_explicit_specialization): Fix misspelling in
13295 diagnostic: `preceeded'.
13296 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
13299 1997-12-02 Mark Mitchell <mmitchell@usa.net>
13301 * pt.c (determine_explicit_specialization): Avoid an internal
13302 error for bad specializations.
13304 * method.c (build_overload_value): Handle SCOPE_REF.
13306 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
13308 * class.c (prepare_fresh_vtable): Enable even more complex MI
13311 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13313 * exception.cc (__check_eh_spec): Optimize a bit.
13315 * exception.cc (__cp_pop_exception): Lose handler arg.
13316 * except.c (do_pop_exception): Likewise.
13317 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
13318 (expand_end_catch_block): Likewise.
13320 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13322 * pt.c (check_explicit_specialization): Complain about using a
13323 template-id for a non-specialization.
13325 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
13327 * repo.c: Prototype rindex only if needed.
13328 * xref.c: Likewise.
13330 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13332 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
13334 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13336 * typeck.c (build_const_cast): Handle references here instead of
13337 handing off to convert_to_reference.
13339 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
13340 TerminateFunctionCall.
13341 (init_exception_processing): Likewise. Terminate et al are now
13342 the fns, not ADDR_EXPRs.
13343 (various): Lose redundant assemble_external calls.
13344 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
13346 * cp-tree.h (struct lang_decl_flags): Add comdat.
13347 (DECL_COMDAT): New macro.
13348 * decl.c (duplicate_decls): Propagate it.
13349 (cp_finish_decl): Handle it.
13350 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
13352 * class.c: Remove static pending_hard_virtuals.
13353 (add_virtual_function): Take pointers to pending_virtuals
13354 and pending_hard_virtuals.
13355 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
13357 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13359 * decl2.c (import_export_vtable): If we support one_only but not
13360 weak symbols, mark instantiated template vtables one_only.
13361 (import_export_decl): Likewise for tinfo functions.
13362 (finish_vtable_vardecl): Also write out vtables from explicitly
13363 instantiated template classes.
13364 * pt.c (mark_class_instantiated): Revert last change.
13366 * except.c (expand_throw): Call mark_used on the destructor.
13368 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
13370 * lex.c (lang_init): Enable flag_exceptions by default if no
13371 command line switch was specified.
13373 1997-11-26 Mark Mitchell <mmitchell@usa.net>
13375 * pt.c (unify): Handle `void' template parameters in
13378 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13380 * rtti.c (build_dynamic_cast): Handle template case here.
13381 (build_dynamic_cast_1): Not here.
13383 * typeck2.c (digest_init): Make copies where appropriate.
13385 * decl2.c (delete_sanity): resolve_offset_ref.
13387 * except.c: Call terminate without caching so many bits.
13389 * except.c (expand_start_catch_block): Fix catching a reference
13392 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
13394 * init.c (build_new): Copy size to the saveable obstack.
13396 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
13397 TRY_CATCH_EXPR for now.
13399 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13401 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
13402 has DECL_LANG_SPECIFIC.
13404 * exception.cc (struct cp_eh_info): Add handlers field.
13405 (__cp_push_exception): Initialize it.
13406 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
13407 (__throw_bad_exception): Remove.
13408 * except.c (call_eh_info): Add handlers field.
13409 (get_eh_handlers): New fn.
13410 (push_eh_cleanup): Increment handlers.
13412 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13414 * except.c (expand_start_eh_spec): Use the try/catch code.
13415 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
13416 doing everything inline.
13417 (init_exception_processing): throw_type_match now takes
13418 const void pointers.
13419 * exception.cc (__check_eh_spec): New fn.
13420 * inc/exception: Neither terminate nor unexpected return.
13421 * decl.c: Make const_ptr_type_node public.
13422 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
13424 * except.c (expand_start_catch_block): We only need the rethrow
13425 region for non-sjlj exceptions.
13426 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
13428 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
13430 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
13431 (various.o): Likewise.
13432 * inc/new: Add placement deletes. Add throw specs for default new.
13433 * new.cc (set_new_handler): Move here from libgcc2.
13434 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
13435 (new): Move from libgcc2. Throw bad_alloc.
13436 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
13437 * decl.c (init_decl_processing): Update exception specs on new and
13440 * method.c (build_decl_overload_real): Don't mess with global
13443 * init.c (build_new): Check for null throw spec, not nothrow_t.
13445 * decl.c (duplicate_decls): Don't complain about different exceptions
13446 from an internal declaration.
13448 * call.c (build_op_delete_call): Fix check for member fns again.
13450 * decl2.c (import_export_decl): Interface hackery affects
13451 virtual synthesized methods.
13453 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13455 * decl.c (start_decl): Don't just complain about a mismatched
13458 * decl.c (make_implicit_typename): Handle case where t is not
13459 actually from context.
13460 * tree.c (get_type_decl): Lose identifier case.
13461 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
13462 * parse.y (nonnested_type): Just use lookup_name.
13463 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
13465 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
13467 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
13468 T was built in C language context (for example, by
13469 output_func_start_profiler).
13471 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13473 * decl.c (make_implicit_typename): New fn.
13474 (lookup_name_real): Use it. Use current_class_type as the context.
13476 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
13478 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
13480 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13482 * friend.c (do_friend): Warn about non-template friends in templates.
13484 * call.c (build_op_delete_call): Fix handling of inherited delete.
13486 * search.c (dfs_record_inheritance): Ignore template type parms.
13488 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
13490 * call.c (build_new_op): Fix copy error.
13491 (build_op_new_call): New fn.
13492 (build_op_delete_call): New fn.
13493 * cp-tree.h: Declare them.
13494 * init.c (build_new): Use them. Support placement delete.
13495 (build_x_delete): Use build_op_delete_call.
13496 (build_delete): Likewise.
13497 * decl2.c (delete_sanity): Likewise.
13498 (coerce_delete_type): Don't complain about placement delete.
13500 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13502 * call.c (build_new_function_call): Remove unused 'obj' parm.
13503 * cp-tree.h, typeck.c: Adjust.
13505 * init.c (build_new): Make the cleanup last longer.
13506 (expand_vec_init): Call do_pending_stack_adjust.
13508 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
13510 * pt.c (do_type_instantiation): Fix typo.
13511 (mark_class_instantiated): If we support one_only but not weak
13512 symbols, don't mark this as known.
13514 * init.c (build_new): Handle vec delete in EH cleanup.
13516 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13518 * call.c (build_method_call): Call complete_type before checking
13521 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
13523 * decl.c (add_block_current_level): Delete.
13524 * init.c (build_vec_delete_1): Delete build_block and
13525 add_block_current_level calls.
13527 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
13529 * init.c (build_new): Handle freeing allocated memory when the
13530 constructor throws.
13532 * call.c (build_new_method_call): Fix flags arg.
13534 * pt.c (do_type_instantiation): Don't try to instantiate
13536 (mark_decl_instantiated): If we support one_only but not
13537 weak symbols, mark this one_only.
13538 * decl2.c (import_export_vtable): Don't defer handling of vtables
13539 if MULTIPLE_SYMBOL_SPACES.
13541 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13543 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
13545 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
13547 * except.c (do_pop_exception): Return a value.
13549 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13551 * call.c (build_new_method_call): Handle getting a
13552 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
13553 if we got template parms.
13554 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
13556 * decl2.c (build_expr_from_tree): Tweak last change.
13557 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
13558 (maybe_fold_nontype_arg): Split out from tsubst_copy.
13559 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
13561 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13563 * pt.c (tsubst_copy): Handle explicit template arguments in
13565 * typeck.c (build_x_function_call): Likewise.
13566 * decl2.c (build_expr_from_tree): Lookup function name if it
13569 * pt.c (tsubst): Instantiate template functions properly when
13570 template parameter does not appear in function arguments and return
13572 (comp_template_args): Handle member templates required by tsubst.
13574 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13576 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
13579 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13581 * pt.c (coerce_template_parms): Tweak error message.
13583 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
13584 return type defaults to `int', even if there are storage-class
13587 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13589 Complete nested exception support.
13590 * except.c (do_pop_exception): Split out...
13591 (push_eh_cleanup): From here. Handle the EH region by hand.
13592 (expand_start_catch_block): Add a new level for the catch parm.
13593 Move the rethrow region outside the two cleanup regions.
13594 Protect the initializer for the catch parm with terminate.
13595 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
13596 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
13597 popping off the middle of the stack.
13598 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
13599 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
13600 (build_cplus_new): Only wrap CALL_EXPRs.
13601 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
13602 the constructor call.
13604 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13606 * Make-lang.in (c++.distdir): Make inc subdirectory.
13608 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13610 * decl2.c (finish_file): Put back some code.
13612 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13614 * decl2.c (finish_file): Remove redundant code.
13615 * method.c (emit_thunk): Don't let the backend defer generic thunks.
13617 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13619 * except.c (call_eh_info): Split out...
13620 (push_eh_info): From here.
13621 (expand_builtin_throw): Use it.
13622 (expand_start_catch_block): Move region start back.
13624 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
13626 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
13627 (real_yylex): Record wide strings using target endianness, not host.
13629 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
13631 * repo.c (rindex): Add decl unconditionally.
13632 (get_base_filename, open_repo_file): Don't cast rindex.
13633 * xref.c (rindex): Add decl unconditionally.
13634 (index): Remove unused decl.
13635 (open_xref_file): Don't cast rindex.
13637 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13639 * class.c (build_vbase_path): Propagate the result type properly.
13641 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
13643 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
13644 remaining use of saved_throw_type with a call to get_eh_type.
13646 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
13648 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
13649 (file_name_nondirectory): New function, doing the same as the macro.
13650 (set_typedecl_interface_info): Use it instead of the macro.
13651 (check_newline): Likewise.
13652 (handle_cp_pragma): Likewise.
13654 * repo.c (get_base_filename): Cast result of rindex to char*.
13655 (open_repo_file): Likewise.
13656 * xref.c (open_xref_file): Likewise.
13657 * error.c (dump_char): Make its arg int, not char.
13659 * except.c (push_eh_info): Pass the number of fields - 1 down, not
13660 the exact number of fields.
13662 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13664 Support for nested exceptions.
13665 * tinfo2.cc (__is_pointer): New fn.
13666 * exception.cc (struct cp_eh_info): Define.
13667 (__cp_exception_info, __uncatch_exception): New fns.
13668 (__cp_push_exception, __cp_pop_exception): New fns.
13669 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
13671 (init_exception_processing): Likewise. __eh_pc is now external.
13672 (push_eh_info): New fn.
13673 (get_eh_{info,value,type,caught}): New fns.
13674 (push_eh_cleanup): Just call __cp_pop_exception.
13675 (expand_start_catch_block): Use push_eh_info. Start the eh region
13677 (expand_end_eh_spec): Use push_eh_info.
13678 (expand_throw): Call __cp_push_exception to set up the exception info.
13679 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
13681 (expand_builtin_throw): Don't refer to empty_fndecl.
13683 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13685 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
13687 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
13689 * method.c (build_template_parm_names, build_decl_overload_real):
13690 Add static to definitions.
13691 * pt.c (add_to_template_args, note_template_header,
13692 processing_explicit_specialization, type_unification_real): Likewise.
13693 ({determine,check}_explicit_specialization): Use a single string for
13696 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13698 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
13699 (expand_end_catch_block): Likewise.
13700 (expand_end_eh_spec): Likewise.
13702 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
13704 * decl.c (duplicate_decls): Handle template specializations
13706 * error.c (dump_function_name): Fix printing of specializations of
13707 member functions that are not member templates.
13708 * cp-tree.h (processing_specialization): Make global.
13709 * pt.c (processing_specialization): Likewise.
13710 * lex.c (cons_up_default_function): Save and restore
13711 processing_specialization to avoid confusion.
13713 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13715 * decl.c (init_decl_processing): Give null_node unknown* type.
13716 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
13717 (common_type): Likewise.
13718 * error.c (args_as_string): Recognize null_node.
13720 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13722 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
13723 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
13725 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
13727 * Make-lang.in (g++): Include prefix.o.
13729 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
13731 * pt.c (determine_explicit_specialization): Initialize "dummy"
13732 to keep Purify quiet.
13734 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13736 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
13737 (build_overload_int): Not here.
13739 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
13741 * class.c (build_type_pathname): Remove.
13742 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
13744 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
13746 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
13747 &&label GNU extension.
13749 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
13751 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
13752 so as to avoid incorrect manglings.
13753 * method.c (build_decl_overload_real): Don't mangle return types
13756 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13758 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
13759 scratch_tree_cons): Define as macros for now.
13760 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
13761 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
13762 typeck2.c: Use them and the expression_obstack variants.
13764 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13766 * decl.c (store_return_init): Allow classes with explicit ctors to
13767 be used with the named return values extension.
13769 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
13771 * pt.c (instantiate_decl): Fix previous change.
13773 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
13775 * pt.c (tsubst): Fix thinko.
13776 (instantiate_decl): Really use the original template.
13778 * call.c (build_new_method_call): Use simple constructor_name for
13781 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
13783 * method.c (build_underscore_int): Don't use ANSI specific
13786 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13788 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13789 for our key method; it might have been inlined by -O3.
13791 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
13793 * decl.c (make_typename_type): Do not try to call lookup_field for
13794 non-aggregate types.
13796 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
13798 * typeck.c (build_reinterpret_cast): Tweak.
13800 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
13802 * typeck.c (build_reinterpret_cast): Converting a void pointer
13803 to function pointer with a reinterpret_cast produces a warning
13804 if -pedantic is issued.
13806 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13808 * typeck.c (c_expand_return): Don't warn about returning a
13809 reference-type variable as a reference.
13811 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13813 * method.c (build_static_name): Fix typo.
13815 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
13817 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13818 OLDDECL before we try to do DECL_USE_TEMPLATE.
13820 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13822 * decl.c (duplicate_decls): Don't warn about template instances.
13824 * typeck.c (mark_addressable): Lose ancient code that unsets
13827 * pt.c (do_decl_instantiation): Lose support for instantiating
13830 * call.c (build_new_function_call): Fix handling of null explicit
13832 (build_new_method_call): Likewise.
13834 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
13836 * method.c (build_underscore_int): Fix typo.
13838 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
13840 * tree.c (print_lang_statistics): #if 0 call to
13841 print_inline_obstack_statistics until its definition is checked in.
13843 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13845 * decl2.c (finish_file): Move dump_tree_statistics to end.
13847 * pt.c (instantiate_decl): Look for the original template.
13848 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13849 of member templates.
13851 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13853 * Makefile.in (g++FAQ.*): New rules.
13854 (CONFLICTS): Update.
13855 * g++FAQ.texi: Moved from libg++.
13857 * parse.y (PFUNCNAME): Only specify the type once.
13859 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
13861 * lex.c (real_yylex): Clean up the code to fully behave the way
13862 the c-lex.c parser does for complex and real numbers.
13864 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13866 * method.c (build_decl_overload_real): Reformat.
13868 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
13870 * method.c (synthesize_method): If at_eof, determine our linkage.
13872 1997-09-29 Paul Eggert <eggert@twinsun.com>
13874 * lex.c (real_yylex): Treat `$' just like `_', except issue a
13875 diagnostic if !dollars_in_ident or if pedantic.
13877 * lang-specs.h (@c++): -ansi no longer implies -$.
13879 * decl2.c (lang_decode_option):
13880 -traditional and -ansi now do not mess with
13883 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
13885 * Makefile.in (parse.o, decl.o): Also depend on
13886 $(srcdir)/../except.h $(srcdir)/../output.h.
13887 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13888 $(srcdir)/../except.h $(srcdir)/../output.h.
13889 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13892 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13894 * expr.c (cplus_expand_expr): Make it static.
13896 * decl2.c, init.c, typeck.c: Include "expr.h".
13897 (expand_expr): Use proper values when calling the function.
13899 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
13901 * lang-options.h: New -Wold-style-cast flag.
13902 * cp-tree.h (warn_old_style_cast): New variable.
13903 * decl2.c (warn_old_style_cast): Likewise.
13904 (lang_decode_option): Support -Wold-style-cast.
13905 (reparse_absdcl_as_casts): Produce old-style-cast warning.
13907 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13909 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13910 TREE_USED, reset value based on already_used.
13912 * init.c (expand_member_init): Revert change.
13914 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13916 * cp-tree.h, decl.c, decl2.c, pt.c:
13917 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
13919 * decl2.c (lang_decode_option): Add missing ;.
13921 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13923 * friend.c (do_friend): Disable injection for all template-derived
13925 * decl2.c (lang_decode_option): Handle -fguiding-decls.
13926 * parse.y (notype_template_declarator): New nonterminal.
13927 (direct_notype_declarator): Use it.
13928 (complex_direct_notype_declarator): Likewise.
13929 (object_template_id): Accept any kind of identifier after TEMPLATE.
13930 (notype_qualified_id): Don't add template declarators here.
13932 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
13934 * call.c (add_template_candidate): Add explicit_targs parameter.
13935 (build_scoped_method_call): Use it.
13936 (build_overload_call_real): Likewise.
13937 (build_user_type_conversion_1): Likewise.
13938 (build_new_function_call): Likewise.
13939 (build_object_call): Likewise.
13940 (build_new_op): Likewise.
13941 (build_new_method_call): Likewise.
13942 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13943 (build_new_method_call): Likewise.
13945 * class.c (finish_struct_methods): Add specialization pass to
13946 determine which methods were specializing which other methods.
13947 (instantiate_type): Handle TEMPLATE_ID_EXPR.
13949 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13951 * cp-tree.h (name_mangling_version): New variable.
13952 (flag_guiding_decls): Likewise.
13953 (build_template_decl_overload): New function.
13954 (begin_specialization): Likewise.
13955 (reset_specialization): Likewise.
13956 (end_specialization): Likewise.
13957 (determine_explicit_specialization): Likewise.
13958 (check_explicit_specialization): Likewise.
13959 (lookup_template_function): Likewise.
13960 (fn_type_unification): Add explicit_targs parameter.
13961 (type_unification): Likewise.
13963 * decl.c (duplicate_decls): Add smarts for explicit
13965 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13967 (grokfndecl): Call check_explicit_specialization.
13969 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13970 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13971 (check_classfn): Handle specializations.
13973 * error.c (dump_function_name): Print specialization arguments.
13975 * friend.c (do_friend): Don't call pushdecl for template
13978 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13980 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13981 and -fno-guiding-decls.
13983 * lex.c (identifier_type): Return PFUNCNAME for template function
13986 * method.c (build_decl_overload_real): New function.
13987 (build_template_parm_names): New function.
13988 (build_overload_identifier): Use it.
13989 (build_underscore_int): New function.
13990 (build_overload_int): Use it. Add levels for template
13992 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
13993 (build_overload_nested_names): Handle template type parameters.
13994 (build_template_decl_overload): New function.
13996 * parse.y (YYSTYPE): New ntype member.
13997 (nested_name_specifier): Use it.
13998 (nested_name_specifier_1): Likewise.
13999 (PFUNCNAME): New token.
14000 (template_id, object_template_id): New non-terminals.
14001 (template_parm_list): Note specializations.
14002 (template_def): Likewise.
14003 (structsp): Likewise.
14004 (fn.def2): Handle member template specializations.
14005 (component_decl_1): Likewise.
14006 (direct_notype_declarator): Handle template-ids.
14007 (component_decl_1): Likewise.
14008 (direct_notype_declarator): Handle template-ids.
14009 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14011 * pt.c (processing_specializations): New variable.
14012 (template_header_count): Likewise.
14013 (type_unification_real): New function.
14014 (processing_explicit_specialization): Likewise.
14015 (note_template_header): Likewise.
14016 (is_member_template): Handle specializations.
14017 (end_template_decl): Call reset_specialization.
14018 (push_template_decl): Handle member template specializations.
14019 (tsubst): Likewise.
14020 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14021 (instantiate_template): Handle specializations.
14022 (instantiate_decl): Likewise.
14023 (fn_type_unification): Handle explicit_targs.
14024 (type_unification): Likewise. Allow incomplete unification
14025 without an error message, if allow_incomplete.
14026 (get_bindings): Use new calling sequence for fn_type_unification.
14028 * spew.c (yylex): Handle PFUNCNAME.
14030 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14031 (really_overloaded_fn): Likewise.
14032 (get_first_fn): Handle function templates.
14034 * typeck.c (build_x_function_call): Use really_overloaded_fn.
14035 Handle TEMPLATE_ID_EXPR.
14036 (build_x_unary_op): Likewise.
14037 (build_unary_op): Likewise.
14038 (mark_addressable): Templates whose address is taken are marked
14041 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14043 * decl.c (init_decl_processing): Declare __builtin_constant_p as
14044 accepting any kind of type, not only int.
14046 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14048 * search.c (get_matching_virtual): Notice virtual bases when sorrying
14049 about covariant returns.
14051 * parse.y (member_init): Also imply typename here. Remove ancient
14052 extension for initializing base members.
14054 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14056 Handle multi-level typenames and implicit typename in base list.
14057 * parse.y (typename_sub{,[0-2]}): New rules.
14058 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14059 (nonnested_type): New rule.
14060 (complete_type_name): Use it.
14061 (base_class.1): Use typename_sub and nonnested_type.
14062 (nested_name_specifier): Don't elide std:: here.
14063 * decl.c (make_typename_type): Handle getting a type for NAME.
14064 (lookup_name_real): Turn std:: into :: here.
14066 Rvalue conversions were removed in London.
14067 * call.c (is_subseq): Don't consider lvalue transformations.
14068 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14069 (joust): Re-enable ?: kludge.
14071 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
14073 * decl.c (start_function): Up warning of no return type to be a
14076 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14078 * init.c (expand_member_init): Don't set TREE_USED.
14079 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14080 set,don't clear TREE_USED wholesale.
14082 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14084 * call.c (build_over_call): Do require_complete_type before
14087 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14089 * search.c (lookup_field): Call complete_type in all cases.
14091 * decl.c (finish_function): Just warn about flowing off the end.
14093 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14095 * decl.c (grokparms): Don't bash a permanent list node if we're
14098 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
14100 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14102 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14104 * call.c (build_new_op): Give better error for syntactically
14105 correct, but semantically invalid, use of undeclared template.
14107 * call.c (compare_qual): Handle pmfs.
14109 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14110 after the exception spec.
14112 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14114 * call.c (null_ptr_cst_p): Integer type, not integral type.
14116 * call.c (joust): Disable warnings until they can be moved to the
14119 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
14121 * Makefile.in, config-lang.in: Convert to autoconf.
14123 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14125 * decl.c (lookup_name_real): Add implicit 'typename' to types from
14128 * pt.c (most_specialized_class): Fix typo.
14129 (tsubst): Move constant folding to TREE_VEC case.
14131 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
14133 * pt.c (do_poplevel): Don't warn about unused local variables
14134 while processing_template_decl since we don't always know whether
14135 or not they will need constructing/destructing.
14137 * pt.c (uses_template_parms): Check the values of an enumeration
14138 type to make sure they don't depend on template parms.
14140 * decl.c (make_typename_type): Don't lookup the field if the
14141 context uses template parms, even if we're not
14142 processing_template_decl at the moment.
14144 * pt.c (coerce_template_parms): Avoid looking at the
14145 TYPE_LANG_DECL portion of a typename type, since there won't be
14147 (tsubst): Do constant folding as necessary to make sure that
14148 arguments passed to lookup_template_class really are constants.
14150 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14152 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14153 * decl2.c (finish_file): Only register exception tables if we
14156 * decl.c (init_decl_processing): Add __builtin_[fs]p.
14158 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14160 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14162 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
14164 * error.c (dump_decl): Avoid crashing when presented with a
14165 uninitialized constant, as can occur with a template parameter.
14166 (dump_expr): Make sure that there are enough levels of
14167 current_template_parms before we start diving through them.
14169 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
14171 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14174 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14176 * except.c (expand_throw): Call build_delete for all
14177 exception types, not just objects with destructors.
14179 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
14181 * decl.c (current_local_enum): Remove static.
14182 * pt.c (tsubst_enum): Save and restore value of current_local_enum
14183 in case template is expanded in enum decl.
14184 (instantiate_class_template): Use new tsubst_enum signature.
14185 (tsubst_expr): Likewise.
14187 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
14189 * pt.c (begin_member_template_processing): Take a function as
14190 argument, not a set of template arguments. Use the template
14191 parameters, rather than the arguments. Handle non-type parameters
14192 correctly. Push a binding level for the parameters so that multiple
14193 member templates using the same parameter names can be declared.
14194 (end_member_template_processing): Pop the binding level.
14195 (push_template_decl): Mark member templates as static when
14198 * lex.c (do_pending_inlines): Pass the function, not its template
14199 arguments, to begin_member_template_processing.
14200 (process_next_inline): Likewise.
14201 (do_pending_defargs): Likewise.
14203 * error.c (dump_expr): Obtain the correct declaration for a
14204 TEMPLATE_CONST_PARM.
14206 * call.c (add_template_conv_candidate): New function.
14207 (build_object_call): Handle member templates, as done in the other
14210 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
14212 * decl.c (replace_defag): Undo previous change.
14213 * lex.c (do_pending_defargs): Deal with member templates.
14215 * pt.c (is_member_template): Avoid crashing when passed a
14216 non-function argument.
14218 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14220 * class.c (grow_method): Remove check for redeclaration.
14222 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
14224 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
14225 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
14226 (PRIMARY_TEMPLATE_P): Use it.
14227 * call.c (build_overload_call_real): Use it.
14228 * class.c (instantiate_type): Likewise.
14229 * decl.c (decls_match): Likewise.
14230 * method.c (build_overload_identifier): Likewise.
14231 * pt.c (push_template_decl): Likewise.
14232 (classtype_mangled_name): Likewise.
14233 (lookup_template_class): Likewise.
14235 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
14236 DECL_NTPARMS to conform to usage elsewhere.
14237 * call.c (add_template_candidate): Likewise.
14238 * class.c (instantiate_type): Likewise.
14239 * pt.c (instantiate_template): Likewise.
14240 (get_bindings): Likewise.
14242 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
14243 is_member_template.
14245 * pt.c (unify): Undo changes to allow multiple levels of template
14247 (type_unification): Likewise.
14248 (fn_type_unification): Likewise.
14249 (get_class_bindings): Likewise.
14250 * cp-tree.h (Likewise).
14252 * decl.c (replace_defarg): Check that the type of the default
14253 parameter does not invlove a template type before complaining
14254 about the initialization.
14256 * error.c (dump_expr): Deal with template constant parameters in
14257 member templates correctly.
14259 * pt.c (is_member_template): Deal with class specializations
14261 (tsubst): Handle "partial instantiation" of member templates
14264 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
14266 * pt.c (type_unification): Change calling sequence to allow for
14267 multiple levels of template parameters.
14268 (tsubst_expr): Likewise.
14269 (tsubst): Likewise.
14270 (tsubst_copy): Likewise.
14271 (instantiate_template): Likewise.
14273 * call.c (build_overload_call_real): Use it.
14274 (add_builtin_candidate): Use it.
14275 (build_new_method_call): Use it.
14276 * class.c (instantiate_type): Use it.
14277 * decl.c (grokdeclarator): Use it.
14278 * decl2.c (finish_file): Use it.
14279 * method.c (build_overload_identifier): Use it.
14281 * call.c (add_template_candidate): Add additional parameter for
14282 the function return type. Call fn_type_unification istead of
14284 (build_user_type_conversion_1): Handle member templates.
14285 (build_new_function_call): Likewise.
14286 (build_new_op): Likewise.
14287 (build_new_method_call): Likewise.
14289 * class.c (grow_method): Don't give an error message indicating
14290 that two member templates with the same name are ambiguous.
14291 (finish_struct): Treat member template functions just like member
14294 * cp-tree.h (check_member_template): Add declaration.
14295 (begin_member_template_processing): Likewise.
14296 (end_member_template_processing): Likewise.
14297 (fn_type_unification): Likewise.
14298 (is_member_template): Likewise.
14299 (tsubst): Change prototype.
14300 (tsubst_expr): Likewise.
14301 (tsubst_copy): Likewise.
14302 (instantiate_template): Likewise.
14303 (get_bindings): Likewise.
14305 * decl.c (decls_match): Handle multiple levels of template
14307 (pushdecl): Handle template type params just like other type
14309 (push_class_level_binding): Return immediately if the
14310 class_binding_level is NULL.
14311 (grokfndecl): If check_classfn() returns a member_template, use
14312 the result of the template, not the template itself.
14314 * decl2.c (check_member_template): New function. Check to see
14315 that the entity declared to be a member template can be one.
14316 (check_classfn): Allow redeclaration of member template functions
14317 with different types; the new functions can be specializations or
14318 explicit instantiations.
14320 * error.c (dump_decl): Handle multiple levels of template
14322 (dump_function_decl): Update to handle function templates.
14324 * lex.c (do_pending_inlines): Set up template parameter context
14325 for member templates.
14326 (process_next_inline): Likewise.
14328 * method.c (build_overload_identifier): Adjust for multiple levels
14329 of template parameters.
14331 * parse.y (fn.def2): Add member templates.
14332 (component_decl_1): Likewise.
14334 * pt.c (begin_member_template_processing): New function.
14335 (end_member_template_processing): Likewise.
14336 (is_member_template): Likewise.
14337 (fn_type_unification): Likewise.
14338 (current_template_parms): Return a vector of all the template
14339 parms, not just the innermost level of parms.
14340 (push_template_decl): Deal with the possibility of member
14342 (lookup_template_class): Likewise.
14343 (uses_template_parms): Likewise.
14344 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
14345 TEMPLATE_CONST_PARM to deal with multiple levels of template
14346 arguments. Add processing of TEMPLATE_DECL to produce new
14347 TEMPLATE_DECLs from old ones.
14348 (do_decl_instantiation): Handle member templates.
14350 * search.c (lookup_fnfields_1): Handle member template conversion
14353 * tree.c (cp_tree_equal): Check the levels, as well as the
14354 indices, of TEMPLATE_CONST_PARMs.
14356 * typeck.c (comptypes): Check the levels, as well as the indices,
14357 fo TEMPLATE_TYPE_PARMs.
14358 (build_x_function_call): Treat member templates like member
14361 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14363 * typeck.c (c_expand_return): Always convert_for_initialization
14364 before checking for returning a pointer to local.
14366 * pt.c (type_unification): If strict and the function parm doesn't
14367 use template parms, just compare types.
14369 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
14371 * method.c (build_overloaded_value): Replace direct call
14372 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
14374 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
14376 * typeck.c (convert_arguments): Don't arbitrarily choose the first
14377 of a set of overloaded functions.
14379 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14381 * lex.c (real_yylex): Don't elide __FUNCTION__.
14383 * method.c (build_overload_value): Add in_template parm.
14384 (build_overload_int): Likewise.
14385 (build_overload_identifier): Pass it.
14387 * decl.c (duplicate_decls): Don't bash a previous template
14388 definition with a redeclaration.
14390 * pt.c (unify): float doesn't match double.
14392 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
14393 TYPE_DECL. Handle getting non-template types.
14394 * parse.y (explicit_instantiation): Use typespec instead of
14395 aggr template_type.
14397 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
14399 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
14401 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
14403 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
14404 (compare_ics): Likewise.
14406 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
14408 * call.c (joust): Warn about choosing one conversion op over
14409 another because of 'this' argument when the other return type is
14411 (source_type): New fn.
14413 * call.c (build_new_op): Strip leading REF_BIND from first operand
14414 to builtin operator.
14416 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
14419 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
14421 * call.c (null_ptr_cst_p): Remove support for (void*)0.
14423 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
14425 * typeck.c (expand_target_expr): Make definition match declaration.
14427 * class.c (get_basefndecls): Make definition match declaration.
14429 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
14431 * input.c (sub_getch): Eventually give up and release the input file.
14433 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
14436 * call.c (joust): Tweak message.
14438 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
14440 * error.c (type_as_string): Put const/volatile on template type
14441 parameters where appropriate.
14443 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
14445 * call.c (strictly_better): Make arguments unsigned ints.
14447 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
14449 * lex.c (real_yylex): Refer to __complex instead of complex.
14451 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
14453 * lex.c (real_yylex): Don't use getc directly.
14455 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
14457 * call.c (is_subseq): Don't try to be clever.
14459 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
14461 * parse.y, pt.c: Include "except.h".
14462 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
14463 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
14464 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
14465 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
14468 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
14470 * decl2.c (mark_vtable_entries): Instead of replacing pure
14471 virtuals with a reference to __pure_virtual, copy the decl and
14474 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
14476 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
14478 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
14480 * pt.c (instantiate_class_template): Call repo_template_used
14481 before finish_prevtable_vardecl.
14483 * call.c (is_subseq): New fn.
14484 (compare_ics): Use it.
14486 * repo.c (finish_repo): Don't crash on no args.
14488 * parse.y (named_complex_class_head_sans_basetype): Handle
14489 explicit global scope.
14490 * decl2.c (handle_class_head): New fn.
14492 * pt.c (unify): Add CONST_DECL case.
14494 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14496 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
14498 * cp-tree.h (report_type_mismatch): Add prototype.
14499 * call.c (build_overload_call_real): Remove erroneous fourth
14500 argument to report_type_mismatch.
14501 (build_user_type_conversion_1): Remove erroneous second arg to
14503 (build_new_function_call): Likewise.
14504 (build_object_call): Likewise.
14505 (build_new_op): Likewise.
14506 (build_new_method_call): Likewise.
14508 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14510 * error.c (dump_decl): Don't bother processing a function with no
14511 DECL_LANG_SPECIFIC.
14513 * method.c (emit_thunk): Call init_function_start in the macro case.
14515 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
14517 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
14518 defined and used to set flag_vtable_thunks.
14520 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14522 * parse.y: Don't clear the inlines from their obstack until they've
14523 all been processed.
14525 * decl.c (duplicate_decls): Don't complain about exception
14526 specification mismatch if flag_exceptions is off.
14528 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
14530 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
14532 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
14534 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
14535 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
14536 Include <stdio.h> before include files that formerly used STDIO_PROTO.
14538 * decl.c, g++spec.c, lex.c, method.c, repo.c:
14539 Include "config.h" first, as per autoconf manual.
14541 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14543 * decl.c (duplicate_decls): Tweak wording.
14544 * lex.c (do_pending_defargs): Don't die if we see a default arg
14545 that isn't a DEFAULT_ARG.
14546 * error.c (dump_expr): Handle DEFAULT_ARG.
14548 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
14549 * lang-options.h: Add -fhandle-exceptions.
14551 * class.c (build_vtable): Vtables are artificial.
14552 (prepare_fresh_vtable): Likewise.
14554 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14556 * cvt.c (ocp_convert): After converting to the target type, set
14557 LOOKUP_NO_CONVERSION.
14559 * call.c (joust): Warn about potentially confusing promotion rules
14561 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
14563 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
14565 * exception.cc: Declare __terminate_func with noreturn attribute.
14567 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
14569 * parse.y: Break out eat_saved_input, handle errors.
14570 (function_try_block): Use compstmt instead of compstmt_or_error.
14572 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
14574 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
14576 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14578 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
14579 existence of cc1plus check whether $(LANGUAGES) contains C++.
14581 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14583 * method.c (do_build_copy_constructor): When copying an anonymous
14584 union member loop around to handle nested anonymous unions. Use
14585 the offset of the member relative to the outer structure, not the
14588 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14590 * call.c (resolve_args): New fn.
14591 (build_new_function_call): Use it.
14592 (build_object_call): Likewise.
14593 (build_new_method_call): Likewise.
14595 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14597 * call.c (build_over_call): tsubst all default parms from templates.
14599 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14601 * decl.c (struct cp_function): Add static_labelno.
14602 (push_cp_function_context): Save it.
14603 (pop_cp_function_context): Restore it.
14605 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14607 * typeck.c (build_component_ref_1): Convert from reference.
14609 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14611 * parse.y (current_declspecs, prefix_attributes): Initialize to
14614 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
14615 before we try to force it to be a TREE_LIST.
14616 (decl): Make sure $1.t is non-nil.
14618 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
14620 * pt.c (uses_template_parms): Handle template first-parse codes.
14622 * decl.c (cp_finish_decl): Only warn about user-defined statics.
14624 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
14626 * pt.c (unify): Handle BOOLEAN_TYPE.
14628 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
14629 * pt.c (tsubst): Don't set it.
14630 * call.c (build_over_call): Use uses_template_parms.
14632 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14634 * method.c (build_overload_nested_name): Use static_labelno
14635 instead of var_labelno.
14636 (build_qualified_name): New fn.
14637 (build_overload_name): Split out from here.
14638 (build_static_name): Use build_qualified_name.
14639 * decl.c (cp_finish_decl): Statics in extern inline functions
14640 have comdat linkage.
14641 (start_function): Initialize static_labelno.
14643 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14645 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
14646 before "all member functions in class [] are private".
14648 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
14650 * lex.c (do_scoped_id): convert_from_reference.
14651 * init.c (build_offset_ref): Likewise.
14653 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14655 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
14657 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
14659 * typeck.c (get_member_function_from_ptrfunc): Promote index
14662 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14664 * tree.c (layout_basetypes): Move non-virtual destructor warning.
14665 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
14667 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14669 * decl.c (grokdeclarator): Call add_defarg_fn for the function
14671 * lex.c (add_defarg_fn): Adjust.
14672 (do_pending_defargs): Adjust. Don't skip the first parm.
14674 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
14676 * decl.c (build_enumerator): Global enumerators are also readonly.
14678 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
14679 (build_dynamic_cast): Call it and convert_from_reference.
14681 * lex.c (add_defarg_fn): New fn.
14682 (snarf_defarg): Don't add to defarg_types.
14683 (do_pending_defargs): Lose defarg_types. All fns we process now
14685 * decl.c (grokfndecl): Call add_defarg_fn.
14687 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
14688 * cp-tree.def: Add DEFAULT_ARG.
14689 * spew.c (yylex): Call snarf_defarg as appropriate.
14690 * parse.y: New tokens DEFARG and DEFARG_MARKER.
14691 (defarg_again, pending_defargs, defarg, defarg1): New rules.
14692 (structsp): Use pending_defargs.
14693 (parms, full_parm): Use defarg.
14694 * lex.c (init_lex): Initialize inline_text_firstobj.
14695 (do_pending_inlines): Never pass the obstack to feed_input.
14696 (process_next_inline): Call end_input instead of restore_pending_input.
14697 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
14698 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
14699 * input.c (end_input): New fn.
14700 (sub_getch): At the end of some fed input, just keep returning EOF
14701 until someone calls end_input.
14702 Remove 'obstack' field from struct input_source.
14703 * decl.c (grokparms): Handle DEFAULT_ARG.
14704 (replace_defarg): New fn.
14705 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
14707 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14709 * call.c (implicit_conversion): If nothing else works, try binding
14710 an rvalue to a reference.
14712 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
14714 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
14715 ifndef for Cygwin32 to include SIGSEGV.
14717 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14719 * class.c (finish_struct_1): Only complain about pointers without
14720 copy stuff if there are any constructors.
14722 * rtti.c (build_dynamic_cast): Call complete_type on the types.
14724 * decl.c (grokfndecl): If the function we chose doesn't actually
14727 * decl2.c (grokclassfn): Don't specify 'const int' for the
14728 artificial destructor parm.
14730 * pt.c (type_unification): If we are called recursively, nothing
14733 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
14735 * decl.c (init_decl_processing): Stop trying to catch signals
14736 other than SIGABRT since the Cygwin32 library doesn't support
14737 them correctly yet. This fixes a situation in which g++ causes
14738 a hang on SIGSEGVs and other such signals in our Win32-hosted
14741 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
14743 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
14745 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14747 * typeck2.c (store_init_value): Always return the value if our
14748 type needs constructing.
14750 * method.c (hack_identifier): Convert class statics from
14753 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
14755 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
14757 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
14759 * typeck.c (c_expand_return): Make sure we clean up temporaries at
14760 the end of return x;
14762 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14764 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
14766 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
14768 * except.c (expand_builtin_throw): Add support
14769 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
14771 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14773 * repo.c (extract_string): Null-terminate.
14775 * cp-tree.h (TI_SPEC_INFO): New macro.
14776 (CLASSTYPE_TI_SPEC_INFO): New macro.
14777 * pt.c (push_template_decl): Correctly determine # of template parms
14780 * call.c (compare_ics): Really fix 'this' conversions.
14782 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
14785 * pt.c (push_template_decl): Complain about mismatch in # of
14786 template parms between a class template and a member template.
14788 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14790 * method.c (synthesize_method): You can't call
14791 function_cannot_inline_p after finish_function.
14792 * decl.c (finish_function): Turn on flag_inline_functions and turn
14793 off DECL_INLINE before handing a synthesized method to the
14796 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14798 * method.c (synthesize_method): Remove July 30 change to never set
14799 DECL_INLINE if at_eof.
14801 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
14803 * xref.c (GNU_xref_member): Ensure that the node has a
14804 decl_lang_specific part before checking DECL_FRIEND_P.
14806 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14808 * pt.c (instantiate_class_template): Diagnose non-class types used
14811 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
14813 * typeck.c (build_conditional_expr): Use convert_for_initialization
14814 instead of convert_and_check.
14816 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14818 * parse.y (typespec): Don't pedwarn for typeof.
14820 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
14822 * repo.c (finish_repo): Only check changes if we would write a
14825 * call.c (compare_ics): Fix handling of 'this' conversions.
14827 * pt.c (do_decl_instantiation): Support static data too. Rename
14828 from do_function_instantiation.
14829 * cp-tree.h: Adjust.
14832 * repo.c (extract_string): New fn.
14833 (get_base_filename): Use it.
14834 (init_repo): Compare old args with current args.
14836 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
14838 * Makefile.in, Make-lang.in: Protect C-ls with a comment
14839 character, idea from Paul Eggert <eggert@twinsun.com>.
14841 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
14843 * typeck.c (c_expand_return): Be more persistent in looking for
14846 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14847 pointer to reference.
14849 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14851 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14853 * init.c (build_member_call, build_offset_ref):
14854 Use do_scoped_id instead of do_identifier.
14856 * cvt.c (convert): Remove bogosity.
14858 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14860 * cvt.c (build_up_reference): Do checks of ARGTYPE and
14861 TARGET_TYPE before trying to use get_binfo.
14863 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
14865 * cvt.c (build_up_reference): Call get_binfo to get access control.
14867 * decl2.c (import_export_decl): If we don't support weaks, leave
14870 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
14872 * except.c (expand_builtin_throw): Add support for machines that
14873 cannot access globals after throw's epilogue when
14874 -fno-sjlj-exceptions is used.
14876 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
14878 * parse.y: 'std::' becomes '::'.
14879 * lex.c (real_yylex): Remove 'namespace' warning.
14880 * init.c (build_member_call): Ignore 'std::'.
14881 (build_offset_ref): Likewise.
14882 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14883 (do_toplevel_using_decl): Ignore 'using std::whatever'.
14884 * decl.c (push_namespace): Just sorry.
14885 (pop_namespace): Nop.
14886 (init_decl_processing): Declare std namespace.
14888 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
14890 * search.c (push_class_decls): A name which ambiguously refers to
14891 several instantiations of the same template just refers to the
14894 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
14896 * decl.c (build_enumerator): Fix problem with unsigned long
14897 enumerated values being smashed to ints, causing overflow
14898 when computing next enumerated value (for enum values around
14901 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14903 * typeck.c (build_component_ref): Only call mark_used on a decl.
14905 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14907 * typeck.c (build_c_cast): Make the check for a ptr to function
14908 more specific before possible default_conversion call.
14910 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
14912 * except.c (expand_exception_blocks): Simplify and fix and make
14913 sure we don't end a region in a sequence, as expand_end_bindings
14916 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
14918 * except.c (init_exception_processing): Mark terminate as not
14919 returning so that the optimizer can optimize better.
14921 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
14923 * cvt.c (convert): Don't do any extra work, if we can avoid it
14926 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
14928 * *.[chy]: Change cp_convert to ocp_convert, change convert to
14929 cp_convert. convert is now reserved for the backend, and doesn't
14930 have the semantics a frontend person should ever want.
14932 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
14934 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14935 Lose -traditional support.
14937 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14939 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14941 * parse.y (self_reference): Do it for templates, too.
14942 * class.c (pushclass): Don't overload_template_name; the alias
14943 generated by build_self_reference serves the same purpose.
14945 * tree.c (list_hash): Make static, take more args.
14946 (list_hash_lookup): Likewise.
14947 (list_hash_add): Make static.
14948 (list_hash_canon): Lose.
14949 (hash_tree_cons): Only build a new node if one isn't already in the
14951 (hash_tree_chain): Use hash_tree_cons.
14952 * cp-tree.h: Adjust.
14953 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14954 of calling lookup_name.
14956 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14958 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14959 doesn't refer to the CONST_DECLs.
14961 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
14963 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14965 (expand_class_desc): Convert the last argument to a sizetype.
14967 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14969 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14970 __real__): Add reswords.
14971 * hash.h: Regenerate.
14972 * lex.h (rid): Add RID_COMPLEX.
14973 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14974 * lex.c (init_lex): Add building of RID_COMPLEX.
14975 (real_yylex): General cleanup in line with what c-lex.c also has,
14976 sans the cruft for traditional; add handling of SPEC_IMAG, complex
14977 types, and imaginary numeric constants.
14978 * parse.y (REALPART, IMAGPART): Add tokens.
14979 (unary_expr): Add REALPART and IMAGPART rules.
14980 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14981 * decl.c (complex_{integer,float,double,long}_type_node): Define
14983 (init_decl_processing): Set up the types.
14984 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
14985 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14986 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14987 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14988 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14990 * method.c (build_overload_name): Add handling of the different
14991 COMPLEX_TYPEs, prefixing them with `J'.
14992 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14993 as a template parm.
14994 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14995 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14996 (mapcar): Handle COMPLEX_CST.
14997 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14998 (common_type): Add code for complex types.
14999 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15000 (convert_for_assignment): Likewise.
15001 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15003 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15005 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15006 tsubst_expr, as it might try to do overload resolution.
15008 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15010 * pt.c (instantiate_class_template): Oops.
15012 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15014 * cp-tree.def: Add TAG_DEFN.
15015 * pt.c (tsubst_enum): New fn.
15016 (instantiate_class_template): Use it.
15017 (tsubst_expr): Support TAG_DEFN.
15018 (tsubst): Support local enums.
15019 (tsubst_copy): Likewise.
15020 * decl.c (finish_enum): Likewise.
15021 (start_enum): If this is a local enum, switch to permanent_obstack.
15023 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
15025 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15026 (finish_function): Put the base init code for constructors just
15027 after the parm cleanup insns.
15028 (struct cp_function): Add last_parm_cleanup_insn.