1 1999-09-30 Mark Mitchell <mark@codesourcery.com>
3 * method.c (emit_thunk): Don't crash when -fsyntax-only.
5 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
6 global_dtor_p. Add init_priority.
7 (DECL_ACCESS): Adjust accordingly.
8 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
9 (GLOBAL_INIT_PRIORITY): Likewise.
10 * decl.c (lang_mark_tree): Adjust accordingly.
11 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
12 and GLOBAL_INIT_PRIORITY.
13 * dump.c (dequeue_and_dump): Print them.
14 * ir.texi: Document them.
16 * decl2.c (struct priority_info_s): Remove initialization_sequence
17 and destruction_sequence.
18 (start_static_storage_duration_function): Return the body of the
19 function. Convert for function-at-a-time mode.
20 (generate_inits_for_priority): Remove.
21 (finish_static_storage_duration_function): Change prototype.
22 Adjust for function-at-a-time mode.
23 (do_static_initialization): Likewise.
24 (do_static_destruction): Likewise.
25 (do_static_initialization_and_destruction): Remove.
26 (start_static_initialization_or_destruction): New function.
27 (finish_static_initialization_or_destruction): Likewise.
28 (get_priority_info): Don't manipulation initialization_sequence or
30 (prune_vars_needing_no_initialization): New function.
31 (write_out_vars): Likewise.
32 (finish_file): Use the various new functions instead of the old.
34 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
36 * cp-tree.h (warn_float_equal): Declare.
37 * decl2.c (warn_float_equal): Define.
38 (lang_decode_option): Recognize -W[no-]float-equal.
39 * typeck.c (build_binary_op_nodefault): Conditionally warn
40 about equality tests of floating point types.
42 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
44 Support normal type_info-based EH mechanisms with -fno-rtti.
45 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
46 (build_eh_type_type_ref): Likewise.
47 (build_eh_type): Remove.
48 (expand_throw): Call build_eh_type_type, not build_eh_type.
49 * decl2.c (import_export_decl): Don't associate the tinfo fn with
50 the vtable if -fno-rtti.
51 * decl.c (init_decl_processing): Always init_rtti_processing.
53 * rtti.c (get_typeid): Don't complain about -fno-rtti.
55 * class.c (class_cache_obstack, class_obstack): Remove.
56 (init_class_processing): Don't initialize class_obstack.
57 (push_cache_obstack): Remove.
58 (pushclass): Don't call it.
59 * cp-tree.h: Remove prototype for push_cache_obstack.
60 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
61 (pushlevel_class): Don't push_decl_level.
62 (poplevel_class): Don't pop_stack_level.
63 (push_class_level_binding): Don't push_cache_obstack.
64 (init_decl_processing): Don't intialize decl_obstack.
65 * search.c (push_class_decls): Don't push_cache_obstack.
66 * tree.c (list_hash_add): Put hash node on permanent_obstack.
67 (hash_tree_cons): Don't mess with obstacks.
68 (print_lang_statistics): Don't print stats for class_obstack and
71 1999-09-29 Mark Mitchell <mark@codesourcery.com>
73 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
74 * ir.texi: Document DECL_EXTERNAL.
76 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
77 * ir.texi: Document THUNK_DECLs.
79 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
80 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
81 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
82 * error.c (dump_template_bindings): Remove unused parameter.
83 Handle multiple levels of template parameters.
84 (dump_template_decl): Use `parms', not `args', for template
85 parameters. Fix thinko.
86 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
87 flags to dump_template_bindings.
88 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
89 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
90 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
91 (tsubst_copy): Clarify variable name.
92 (most_general_template): Robustify.
94 1999-09-29 Nathan Sidwell <nathan@acm.org>
96 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
97 to change primary template rendering.
99 1999-09-29 Mark Mitchell <mark@codesourcery.com>
101 * cp-tree.h (UPT_TEMPLATE): Remove.
102 (UPT_PARMS): Likewise.
103 (DECL_NEEDED_P): New macro.
104 * decl2.c (finish_vtable_vardecl): Use it.
105 (finish_objects): Don't crash with -fsyntax-only.
106 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
108 * pt.c (tsubst_friend_function): Remove FIXME that talks about
110 (tsubst_expr): Correct handling of function try-blocks.
111 * semantics.c: Include flags.h.
112 (expand_body): Don't do RTL generation if -fsyntax-only.
113 * Makefile.in (semantics.o): Depends on flags.h.
115 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
117 * pt.c (most_general_template): Adjust declaration.
119 * cp-tree.h: (most_general_template): Declare.
121 * error.c (dump_template_value): Rename to ...
122 (dump_template_argument): This.
123 (dump_template_argument_list): New function.
125 (dump_template_parameter): New function.
126 (dump_template_decl): Use it.
127 (dump_template_bindings): New function.
128 (dump_function_decl): Use it. Pretty print function template
131 1999-09-28 Nathan Sidwell <nathan@acm.org>
133 * decl.c (grokdeclarator): Distinguish parameter context for
134 diagnostics. Tidy up missing type diagnostic.
135 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
137 1999-09-28 Mark Mitchell <mark@codesourcery.com>
139 * ir.texi: Improve documentation for TARGET_EXPR.
141 1999-09-27 Nathan Sidwell <nathan@acm.org>
143 Augment stringification of trees.
144 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
145 (fndecl_as_string, type_as_string_real, args_as_string,
146 code_as_string, language_as_string, parm_as_string,
147 op_as_string, assop_as_string, cv_as_string): Remove.
148 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
149 (context_as_string): Declare new function.
150 * error.c (cp_printers): Move definition.
152 (OB_END_TEMPLATE_ID): Adjust.
153 (interesting_scope_p): Remove.
154 (dump_scope): New static function.
155 (dump_qualifiers): Adjust prototype, reimplement.
156 (dump_template_value): Use tree_string_flags.
157 (dump_type_real): Move back to dump_type.
158 (dump_type): Adjust prototype. Use tree_string_flags.
159 (dump_aggr_type): Likewise. Use dump_template_parms.
160 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
162 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
163 (dump_simple_decl): Likewise.
164 (dump_decl): Likewise. Use dump_template_decl.
165 (dump_template_decl): New static function broken out of dump_decl.
166 (dump_function_decl): Adjust prototype. Use tree_string_flags.
167 (dump_parameters): Likewise. Prefix space.
168 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
169 (dump_function_name): Likewise. Use dump_template_parms.
170 (dump_template_parms): New static function broken out of
172 (dump_expr_list): Adjust prototype. Use tree_string_flags.
173 (dump_expr): Likewise.
174 (fndecl_as_string): Removed
175 (type_as_string_real): Removed
176 (dump_binary_op): Adjust prototype. Use tree_string_flags.
177 (dump_unary_op): Likewise.
178 (type_as_string): Likewise.
179 (expr_as_string): Likewise.
180 (decl_as_string): Likewise.
181 (context_as_string): New function.
182 (lang_decl_name): Adjust.
183 (decl_to_string): New static print callback.
184 (expr_to_string): Likewise.
185 (fndecl_to_string): Likewise.
186 (code_as_string): Renamed to ...
187 (code_to_string): ... here. Adjust.
188 (language_as_string): Renamed to ...
189 (language_to_string): ... here. Adjust.
190 (parm_as_string): Renamed to ...
191 (parm_to_string): ... here.
192 (op_as_string): Renamed to ...
193 (op_to_string): ... here.
194 (assop_as_string): Renamed to ...
195 (assop_to_string): ... here.
196 (type_to_string): New static print callback.
197 (args_as_string): Renamed to ...
198 (args_to_string): ... here. Adjust.
199 (cv_as_string): Renamed to ...
200 (cv_to_string): ... here. Adjust.
201 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
202 (print_template_context): Likewise.
204 1999-09-26 Mark Mitchell <mark@codesourcery.com>
206 * cp-tree.h (expand_throw): Remove prototype.
207 * except.c (expand_throw): Make it static. Use tree-generation
208 functions, rather than RTL-generation functions.
209 (build_throw): Use it.
210 * expr.c: Include except.h.
211 (cplus_expand_expr): Don't call expand_throw here.
212 * Makefile.in (expr.o): Depend on except.h.
213 * ir.texi: Update documentation for THROW_EXPR.
215 * decl.c (start_function): Set x_dont_save_pending_sizes rather
216 than calling get_pending_sizes.
217 * init.c (build_new): Don't save and restore
218 immediate_size_expand; instead, assert that it has the expected
221 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
223 * lex.c (compiler_error): Add missing call to va_end().
225 1999-09-25 Mark Mitchell <mark@codesourcery.com>
227 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
228 * ir.texi: Document RESULT_DECL and DECL_RESULT.
230 * cp-tree.h (check_return_expr): New function.
231 * decl.c (finish_constructor_body): New function.
232 (pushdecl): Put global friend functions in namespace binding
233 level, not the class binding level.
234 (finish_destructor_body): Make sure the dtor_label is always
235 defined. Fix typo in comment.
236 (finish_function): Move generation of constructor-termination code
237 to semantic-analysis time. Move generation of implicit `main'
238 return value to semantic-analysis time.
239 * semantics.c (finish_return_stmt): Generate goto's to
240 ctor_label/dtor_label here. Use check_return_expr to do semantic
241 analysis on the returned expression.
242 * typeck.c (maybe_warn_about_returning_address_of_local): New
243 function split out from c_expand_return.
244 (check_return_expr): Likewise.
245 (c_expand_return): Just generate the RTL for the return.
247 1999-09-24 Mark Mitchell <mark@codesourcery.com>
249 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
250 (cleanup_type): Likewise.
251 (search_tree): Change prototype.
252 * decl.c (local_variable_p): Adjust for new interface to
254 (check_default_argument): Likewise.
255 * error.c (dump_expr): Handle INIT_EXPR.
256 * except.c (expand_throw): Don't make cleanup_type a local static.
257 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
258 * init.c (build_new): Call build_new_1 directly, rather than
260 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
261 processing file-scope initializers.
262 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
263 * tree.c: Include splay-tree.h
264 (no_linkage_helper): Adjust for new interface to search_tree.
265 (search_tree): Pass around pointers to tree nodes, rather than the
266 nodes themselves. Handle VEC_INIT_EXPR.
267 (no_linkage_check): Adjust for new interface to search_tree.
268 (mapcar): Handle VEC_INIT_EXPR.
269 (target_remap): New variable.
271 (bot_replace): New function.
272 (break_out_target_exprs): Use it to remap all variables used in a
273 default argument expression.
274 * typeck.c (build_modify_expr): Don't crash when outside a
275 function and presented with an INIT_EXPR assignment
276 * Makefile.in (tree.o): Depend on splay-tree.h.
278 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
280 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
282 (builtin_function): New arg CLASS. Arg CODE now of type int. All
284 Set the builtin's DECL_BUILT_IN_CLASS.
286 1999-09-24 Mark Mitchell <mark@codesourcery.com>
288 * decl.c (pushdecl): Don't make local declarations of extern
289 variables give the variable a DECL_CONTEXT for the function.
290 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
291 Don't accidentally make RTL for local declarations.
292 (emit_local_var): Handle declarations with asm-specifiers here.
294 1999-09-23 Mark Mitchell <mark@codesourcery.com>
296 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
299 * cp-tree.h (language_function): Add cannot_inline.
300 * decl.c (start_function): Restore current_function_cannot_inline
301 from the saved value.
302 (save_function_data): Save current_function_cannot_inline.
303 * decl2.c (start_objects): Change prototype. Build the function
304 in function-at-a-time mode.
305 (finish_objects): Likewise.
306 (generate_ctor_or_dtor_function): Adjust accordingly.
308 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
309 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
310 Don't call expand_anon_union_decl here
311 * semantics.c (exapnd_stmt): Call it here, instead.
312 * typeck.c (mark_addressable): Addressed variables are implicitly
315 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
317 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
318 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
319 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
320 * cp-tree.h: Add tree checking macros to various tree access
322 * ptree.c (print_lang_decl): Test for function or variable
323 before accessing template info.
325 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
327 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
328 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
329 * decl2.c (lang_f_options): Add -fshort-wchar.
330 * cp-tree.h: Declare flag_short_wchar.
331 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
334 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
336 * ir.texi: Fix formatting errors and typos.
338 1999-09-22 Mark Mitchell <mark@codesourcery.com>
340 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
342 * decl.c (pushdecl): Do create a binding for extern "C" functions,
343 but not for their DECL_ASSEMBLER_NAMEs.
344 (lookup_name_current_level): Fix formatting.
345 (xref_tag): Likewise.
346 * decl2.c (start_objects): Mark static constructors and
349 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
351 * decl.c (define_case_label): Don't crash if we're not in a switch.
353 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
354 * lang-options.h: Restore -fthis-is-variable. Remove help strings
355 for unsupported flags.
357 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
359 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
360 Accept and warn about -fthis-is-variable.
362 1999-09-21 Mark Mitchell <mark@codesourcery.com>
364 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
365 CLEANUP_STMT, and SCOPE_STMT.
367 * decl2.c (lang_decode_option): Adjust, in the wake of recent
368 changes to option processing.
370 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
372 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
373 function pointer from pmfs with no object given.
374 (convert_for_assignment): Do not return error when converting
377 1999-09-21 Alex Samuel <samuel@codesourcery.com>
379 * lex.c (internal_filename): New variable.
380 (INTERNAL_FILENAME): New macro.
381 (init_parse): Allocate internal_filename and mark as root. Use it
382 instead of a string constant.
384 1999-09-21 Nathan Sidwell <nathan@acm.org>
386 Reimplement dynamic cast and catch matching.
387 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
388 * search.c (dynamic_cast_base_recurse): New function.
389 (get_dynamic_cast_base_type): New function for dynamic cast.
390 * rtti.c (build_dynamic_cast_1): Determine source and target
391 class relationship. Call __dynamic_cast_2.
392 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
393 (__user_type_info::dyncast): New dynamic cast dispatcher.
394 (__user_type_info::sub_kind): New nested enumeration.
395 (__user_type_info::contained_p): sub_kind predicate.
396 (__user_type_info::contained_public_p): Likewise.
397 (__user_type_info::contained_nonpublic_p): Likewise.
398 (__user_type_info::contained_nonvirtual_p: Likewise.
399 (__user_type_info::upcast_result): New nested struct.
400 (__user_type_info::dyncast_result): New nested struct.
401 (*::do_upcast): New catch function.
402 (*::do_dyncast): New dynamic cast function.
403 (__user_type_info::find_public_subobj): New dynamic cast
405 (*::do_find_public_subobj): New dynamic cast helper function.
406 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
407 (__user_type_info::dyncast): Define dynamic cast dispatcher.
408 (*::do_upcast): Define catch function.
409 (*::do_dyncast): Define dynamic cast function.
410 (*::do_find_public_subobj): Define dynamic cast helper function.
411 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
412 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
413 (__dynamic_cast_2): New dynamic cast runtime.
415 1999-09-20 Mark Mitchell <mark@codesourcery.com>
417 * cp-tree.h (finish_stmt_expr): Change prototype.
418 * expr.c (cplus_expand_expr): Adjust call accordingly.
419 * init.c (finish_init_stmts): Likewise.
420 * parse.y (primary): Likewise.
421 * pt.c (tsubst_copy): Likewise.
422 * semantics.c (finish_stmt_expr): Don't take two parameters.
423 Don't remove generated BLOCKs from the block-tree.
425 Remove support for assigning to `this'.
426 * NEWS: Note that fact.
427 * class.c (build_vbase_path): Don't check flag_this_is_variable.
428 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
429 (language_function): Remove assigns_this, just_assigned_this, and
430 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
431 (base_init_expr): Remove.
432 (current_vcalls_possible_p): New macro.
433 (vtbls_set_up_p): Likewise.
434 (emit_base_init): Change prototype.
435 * decl.c (finish_destructor_body): New function, split out from
437 (current_function_assigns_this): Remove.
438 (current_function_just_assigned_this): Likewise.
439 (start_function): Don't set them.
440 (finish_function): Don't check them. Don't emit
441 base-initialization code here. Generate code for destructors when
442 doing semantic analysis.
443 (finish_stmt): Don't check current_function_just_assigned_this.
444 * decl2.c (lang_f_options): Remove this-is-variable.
445 (lang_decode_option): Likewise.
446 (grokclassfn): Don't check flag_this_is_variable.
447 * init.c (emit_base_init): Return the expression generated.
448 (construct_virtual_bases): Don't push/pop obstacks. Fix
450 (build_new_1): Don't check flag_this_is_variable.
451 (get_temp_regvar): Don't set DECL_REGISTER.
452 (build_vec_init): Don't call use_variable.
453 * lang-options.h: Remove "-fthis-is-variable" and
454 "-fno-this-is-variable".
455 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
456 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
458 * semantics.c (finish_expr_stmt_real): Rename to ...
459 (finish_expr_stmt): This. Remove assigned_this parameter.
460 (begin_if_stmt): Call do_pushlevel before starting the statement.
461 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
463 (setup_vtbl_ptr): Emit initialization code for bases and members
464 at semantic-analysis time. Emit code to initialize vtables in
466 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
467 Don't handle CTOR_INITIALIZER any more.
468 * typeck.c (build_modify_expr): Don't check for assignments to
470 (c_expand_return): Don't suggest assigning to `this'.
472 * Makefile.in (decl.o): Depend on RTL_H.
476 (method.o): Likewise.
477 (search.o): Likewise.
481 * decl.c (duplicate_decls): When a builtin function is redeclared
482 as static, make sure it is mangled correctly.
484 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
485 detail about the statement-tree.
487 1999-09-20 Nathan Sidwell <nathan@acm.org>
489 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
491 1999-09-20 Nick Clifton <nickc@cygnus.com>
493 * decl2.c (lang_decode_option): Extend comment.
495 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
497 * typeck.c: Include "tm_p.h".
499 1999-09-19 Mark Mitchell <mark@codesourcery.com>
503 1999-09-19 Paul Burchard <burchard@pobox.com>
505 * semantics.c (expand_stmt): Initialize return value.
507 1999-09-18 Paul Burchard <burchard@pobox.com>
509 * gxxint.texi: G++ now implements namespaces.
511 1999-09-18 Mark Mitchell <mark@codesourcery.com>
513 * decl.c (pop_label): Don't warn about unused labels more than
515 * semantics.c (finish_goto_stmt): Always marked used labels as
518 * decl.c (layout_var_decl): Change prototype. Call layout_decl
519 even when the declaration is external.
520 (cp_finish_decl): Adjust call to layout_var_decl.
521 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
523 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
525 * typeck.c (get_member_function_from_ptrfunc): Always consider
526 virtuality inside member pointer.
528 1999-09-17 Mark Mitchell <mark@codesourcery.com>
530 Turn on function-at-a-time processing.
531 * cp-tree.h (doing_semantic_analysis_p): New macro.
532 (SF_DEFAULT): Define to zero, not SF_EXPAND.
533 (start_handler_parms): Change prototype.
534 (expand_start_catch_block): Likewise.
535 (expand_end_catch_block): Likewise.
536 (expand_start_eh_spec): Likewise.
537 (expand_end_eh_spec): Declare.
538 (finish_handler_parms): Change prototype.
539 (begin_catch_block): Declare.
540 (finish_handler): Change prototype.
541 (do_pushlevel): Declare.
542 (do_poplevel): Likewise.
543 * decl.c (pushlevel): Don't create
544 binding levels when not doing semantic analysis.
545 (poplevel): Don't pop them.
546 (pushdecl): Assert that we are never called when not doing
548 (pushdecl_top_level): Use push_to_top_level.
549 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
550 label when expanding.
551 (cp_finish_decl): Only inject for-scope variables when doing
552 semantic analysis. Add comments.
553 (start_handler_parms): Return the handler parm.
554 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
555 already set. Reinitialize from saved function data if available.
556 Don't pushlevel when not doing semantic analysis.
557 (store_parm_decls): Only generate RTL when expanding. Only
558 pushdecl when doing semantic analysis. Set
559 current_eh_spec_try_block if appropriate.
560 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
561 Combine common code. Don't poplevel when not doing semantic
563 (push_cp_function_context): Don't expand functions without an
564 explicit call to expand_body.
565 (mark_lang_function): Make eh_spec_try_block and
567 * except.c (expand_end_eh_spec): Don't
569 (process_start_catch_block): Likewise.
570 (push_eh_cleanup): Use finish_decl_cleanup.
571 (initialize_handler_parm): New function.
572 (expand_start_catch_block): Use it.
573 (expand_end_catch_block): Use tree-generation functions, not
574 RTL-generation functions.
575 (expand_start_eh_spec): Likewise.
576 (expand_end_eh_spec): Likewise.
577 (expand_exception_blocks): Simplify.
578 (start_anon_func): Use do_pushlevel.
579 (end_anon_func): Use do_poplvel. Call expand_body for the
581 * expr.c (do_case): Don't call define_case_label.
582 * init.c (create_temporary_var): Set DECL_CONTEXT for local
584 * method.c (emit_thunk): Call expand_body for the
586 (sythesize_method): Likewise.
587 * parse.y (handler_args): Give it ttype.
588 (eat_saved_input): Call expand_body.
589 (base_init): Use do_pushlevel.
590 (pending_inline): Call expand_body.
591 (handler): Adjust calls to finish_handler_parms and
593 (handler_args): Don't call expand_start_catch_block. Return the
594 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
595 * parse.c: Regenerated.
596 * rtti.c (synthesize_tinfo_fn): Call finish_function.
597 * semantics.c (do_pushlevel): Give it external linkage. Build
599 (do_poplevel): Likewise.
600 (finish_case_label): Call define_case_label when doing semantic
602 (finish_goto_stmt): Create RTL for labels.
603 (finish_function_try_block): Set in_function_try_handler
605 (finish_function_handler_sequence): Unset it.
606 (finish_handler_parms): Use expand_start_catch_block even when
607 building a statement-tree.
608 (begin_catch_block): New function.
609 (finish_handler): Move a little RTL-generation logic here.
610 (finish_decl_cleanup): Allow cleanups for empty declarations.
611 (finish_named_return_value): Don't pushdecl when not doing
613 (expand_stmt): Don't do semantic analysis for variable
614 declarations. Handle START_CATCH_STMT. Call expand_label
615 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
616 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
617 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
618 RETURN_INIT and function try blocks.
620 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
621 x_scope_stmt_stack. Add x_in_charge_parm.
622 (current_eh_spec_try_block): New macro.
623 (current_scope_stmt_stack): Likewise.
624 (current_in_charge_parm): Likewise.
625 * decl.c (start_function): Initialize current_in_charge_parm.
626 (finish_function): Use current_in_charge_parm rather than looking
628 * search.c (expand_indirect_vtbls_init): Likewise.
630 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
631 (TRY_BLOCK): Likewise.
633 (START_CATCH_STMT): New tree node.
634 (SCOPE_STMT): Likewise.
635 * cp-tree.h (SCOPE_BEGIN_P): New macro.
636 (SCOPE_NULLIFIED_P): Likewise.
637 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
638 (struct lang_decl): Add saved_language_function.
639 (DECL_PENDING_INLINE_INFO): Adjust documentation.
640 (DECL_PENDING_INLINE_P): New macro.
641 (TYPE_TI_ARGS): Fix typo in comment.
642 (DECL_SAVED_TREE): Add to documentation.
643 (DECL_SAVED_FUNCTION_DATA): New macro.
644 (START_CATCH_TYPE): Likewise.
645 (SCOPE_END_P): New macro.
646 (declare_parm_level): Don't declare.
647 * decl.c (mark_lang_function): New function, split out from
648 mark_cp_function_context.
649 (save_function_data): New function.
650 (declare_parm_level): Remove.
651 (finish_function): Use save_function_data to squirrel away
652 important stuff for later use.
653 (mark_cp_function_context): Use mark_function_data.
654 (lang_mark_tree): Likewise.
655 * lex.c (begin_definition_of_inclass_inline): Set
656 DECL_PENDING_INLINE_P.
657 (store_pending_inline): Clear it.
658 * pt.c (tsubst_decl): Likewise.
660 1999-09-17 Nathan Sidwell <nathan@acm.org>
662 * call.c (perform_implicit_conversion): Deal with error_mark_node.
664 1999-09-17 Mark Mitchell <mark@codesourcery.com>
666 * decl.c (warn_extern_redeclared_static): Don't get confused by
667 static member functions.
668 (duplicate_decls): Merge DECL_THIS_STATIC.
670 * decl.c (expand_static_init): Make sure assignments to local
671 statics actually occur.
673 1999-09-17 Mark Mitchell <mark@codesourcery.com>
675 * cp-tree.h (poplevel_class): Declare.
676 * class.c (popclass): Use poplevel_class, not poplevel.
677 * decl.c (poplevel_class): Don't make it static. Don't return a
679 (poplevel): Don't call poplevel_class; abort in a class
680 binding level is seen.
681 * semantics.c (finish_translation_unit): Use pop_everything.
682 * parse.y (member_init): Allow errors.
683 (pending_inline): Call finish_function.
684 * parse.c: Regenerated.
685 * Makefile.in (CONFLICTS): Adjust.
687 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
689 * error.c: Reduce code duplication.
690 (dump_template_value): New function.
691 (dump_type_real): Use it.
692 (dump_decl): Likewise.
693 (dump_function_name): Likewise.
694 (dump_function_decl): Don't be too talkative about function return
697 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
699 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
701 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
703 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
705 * decl2.c (finish_file): Also call check_global_declarations for
706 the pending_statics list.
708 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
710 * lex.c (cp_pragma_implementation): Allow #pragma implementation
713 1999-09-15 Richard Henderson <rth@cygnus.com>
715 * lex.c (mark_impl_file_chain): Follow the next chain.
717 1999-09-15 Mark Mitchell <mark@codesourcery.com>
719 * decl.c (warn_extern_redeclared_static): Simplify. Catch
720 problems with extern "C" functions redeclared as static.
721 (duplicate_decls): When a builtin is redeclared static, make the
722 new function have internal linkage.
724 1999-09-15 Mark Mitchell <mark@codesourcery.com>
726 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
727 * pt.c (tsubst_copy): Likewise.
728 * tree.c (search_tree): Likewise.
731 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
733 * typeck2.c (ack): Don't declare progname.
735 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
737 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
738 filenames with ggc_alloc_string.
740 1999-09-14 Mark Mitchell <mark@codesourcery.com>
742 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
744 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
746 * cvt.c (build_up_reference): Likewise.
747 * tree.c (build_cplus_new): Likewise.
748 (get_target_expr): Likewise.
750 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
752 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
754 1999-09-13 Mark Mitchell <mark@codesourcery.com>
756 * cp-tree.h (build_target_expr): New function.
757 * call.c (build_conditional_expr): Use build_target_expr.
758 (convert_like): Likewise.
759 (build_over_call): Likewise.
760 * cvt.c (build_up_reference): Likewise.
761 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
762 (destroy_local_var): Here.
763 (build_target_expr): New function.
764 * tree.c (build_cplus_new): Use it.
765 (get_target_expr): Likewise.
767 1999-09-13 Nathan Sidwell <nathan@acm.org>
769 * typeck.c (expr_sizeof): Don't decay arrays and functions.
770 Remove misleading comment.
771 (build_compound_expr): Don't decay arrays.
773 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
775 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
778 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
780 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
782 * g++spec.c: Include gcc.h.
783 (lang_specific_driver): Constify a char*. Call xcalloc, not
784 xmalloc/bzero. All calls to the function pointer parameter now
785 explicitly call `fatal'.
787 1999-09-12 Mark Mitchell <mark@codesourcery.com>
789 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
790 * cvt.c (ocp_convert): Complete the from and destination types.
791 Adjust warning about functions always being `true' in conditionals.
792 * decl.c (duplicate_decls): Don't play funny games with abort.
793 * error.c (dump_expr): Handle OVERLOADs.
794 * spew.c (probe_obstack): Remove.
795 * typeck.c (condition_conversion): Use perform_implicit_conversion.
797 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
799 * cp-tree.h (auto_function, define_function): Adjust prototypes.
800 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
802 (auto_function): Likewise, for CODE arg.
803 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
804 (builtin_function): ... here.
806 1999-09-11 Mark Mitchell <mark@codesourcery.com>
808 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
809 (init_decl_processing): Don't set TREE_PERMANENT for the
811 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
812 (grokdeclarator): Likewise.
813 (grokparms): Don't check TREE_PERMANENT when building up lists.
814 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
815 (mark_inline_for_output): Likewise.
816 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
817 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
818 * lex.c (check_newline): Don't check ggc_p; it is always one.
819 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
820 * spew.c (yylex): Don't copy_node or probe_obstacks for
821 non-permanent CONSTANTs and STRINGs.
822 * tree.c (build_cplus_array_type_1): Don't fuss with
823 TREE_PERMANENT on ARRAY_TYPEs.
825 * cp-tree.def (CLEANUP_STMT): New node.
826 * cp-tree.h (language_function): Add name_declared.
827 (current_function_name_declared): New macro.
828 (CLEANUP_DECL): New macro.
829 (CLEANUP_EXPR): Likewise.
830 (emit_local_var): Likewise.
831 (finish_decl_cleanup): New function.
832 * cvt.c (build_up_reference): Simplify.
833 (ocp_convert): Remove dead code.
834 * decl.c (start_decl): Remove call to add_decl_stmt.
835 (grok_reference_init): Adjust, to handle bindings temporaries to
836 references. Remove dead code.
837 (initialize_local_var): Don't generate RTL for
838 declarations here, or build cleanups here. Don't fuss with
839 obstacks. Replace expand_start_target_temps calls with explicit
840 setting of stms_are_full_exprs_p.
841 (destroy_local_var): New function.
842 (emit_local_var): Likewise.
843 (cp_finish_decl): Use them, as appropriate.
844 (start_function): Announce template functions.
845 (store_parm_decls): Don't call declare_function_name here.
846 (finish_stmt): Don't start emit base-initialization code when just
847 building the statement-tree.
848 * init.c (create_temporary_var): Move add_decl_stmt call ...
849 (get_temp_regvar): Here.
850 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
851 cp_finish_decl would expect. Don't call add_decl_stmt.
852 * semantics.c (begin_compound_stmt): Call declare_function_name,
854 (finish_decl_cleanup): New function.
855 (expand_stmt): Use emit_local_var to output variables.
856 (expand_body): Set current_funtion_name_declared.
858 1999-09-10 Mark Mitchell <mark@codesourcery.com>
860 * cp-tree.h (finish_cleanup_try_block): New function.
861 * semantics.c (finish_cleanup_try_block): Add comment.
863 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
865 * cp-tree.h: Delete declarations for all tree nodes now moved to
867 * decl.c: Delete their definitions.
868 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
869 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
871 (init_decl_processing): Call build_common_tree_nodes and
872 build_common_tree_nodes_2 instead of building their nodes here.
873 Don't add gc roots for them.
875 1999-09-10 Mark Mitchell <mark@codesourcery.com>
877 * cp-tree.h (language_function): Rename expanding_p to
878 x_expanding_p. Rename named_label_uses to x_named_label_uses.
879 (expanding_p): Adjust accordingly.
880 (TREE_VIA_PRIVATE): Fix typo in comment.
881 (DECL_REFERENCE_SLOT): Remove.
882 (SET_DECL_REFERENCE_SLOT): Likewise.
883 * decl.c (named_label_uses): Adjust. Remove chicken comment.
884 (push_overloaded_decl): Don't truncate the chain of bindings when
885 adding an overloaded function.
886 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
887 (initialize_local_var): Fix typo in comment.
888 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
889 * decl2.c (start_objects): Make the fact that we are expanding
890 the generated function right away explicit.
891 (start_static_storage_duration_function): Likewise.
892 (finish_file): Fix typo in comment.
893 * init.c (build_vec_init): Correct bugs in handling cleanups.
894 * semantics.c (maybe_convert_cond): New function.
895 (FINISH_COND): Always store the condition, even if there's
897 (finish_if_stmt_cond): Use maybe_convert_cond.
898 (finish_while_stmt_cond): Likewise.
899 (finish_do_stmt): Likewise.
900 (finish_for_cond): Likewise.
901 (expand_cond): Adjust.
903 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
904 * init.c (perform_member_init): Remove obstack machinations.
905 (expand_cleanup_for_base): Likewise.
906 (finish_init_stmts): Mark the statement-expression as used.
907 * method.c (emit_thunk): Use tree-generating functions, not
909 (do_build_copy_constructor): Likewise.
910 (do_build_assign_ref): Likewise.
911 (synthesize_method): Likewise. Keep track of line numbers.
912 * pt.c (tsubst_expr): Handle various kinds of try blocks.
913 * semantics.c (expand_stmts): Remove.
914 (begin_function_try_block): Set FN_TRY_BLOCK_P.
915 (finish_function_try_block): Be careful rechaining
917 (expand_stmt): Loop through all the statements at a given level.
918 (exapnd_body): Be careful with line-numbers here too. Prepare for
919 being called directly from the parser.
921 * cp-tree.h (finish_function): Adjust prototype.
922 * decl.c (finish_function): Return the function compiled.
923 * pt.c (instantiate_decl): Don't play games with obstacks.
924 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
925 (search_tree): Likewise.
926 * typeck.c: Fix typo in comment.
927 * typeck2.c (store_init_value): Add comment.
929 * cp-tree.h (CPTI_ATEXIT): New macro.
930 (atexit_node): Likewise.
931 * decl.c (destroy_local_static): New function, broken out from ...
932 (expand_static_init): Here.
934 * rtti.c (get_tinfo_var): These should always be global
935 (expand_si_desc): Use tree, not RTL, functions to generate code.
936 (expand_class_desc): Likewise.
937 (expand_ptr_desc): Likewise.
938 (expand_attr_desc): Likewise.
939 (expand_generic_desc): Likewise.
940 (synthesize_tinfo_fn): Likewise.
942 1999-09-09 Mark Mitchell <mark@codesourcery.com>
944 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
945 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
947 (RECHAIN_STMST_FROM_CHAIN): Likewise.
949 * parse.y (simple_stmt): Fix typo in last change.
951 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
952 (STMT_IS_FULL_EXPR_P): Likewise.
953 (STMT_LINENO_FOR_FN_P): Likewise.
954 (prep_stmt): New function.
955 (building_stmt_tree): Tweak for safety.
956 * pt.c (tsubst_expr): Use prep_stmt throughout.
957 (add_tree): Move it to semantics.c
958 * semantics.c (add_tree): Move it here.
959 (finish_expr_stmt_real): New function.
960 (finish_expr_stmt): Use it.
961 (finish_if_stmt_cond): Use FINISH_COND.
962 (finish_while_stmt_cond): Likewise.
963 (finish_for_cond): Likewise.
964 (finish_stmt_tree): Tweak line-number handling.
965 (prep_stmt): New function.
966 (expand_stmt): Use it.
968 * cp-tree.h (begin_switch_stmt): Adjust prototype.
969 (finish_switch_cond): Likewise.
970 * parse.y (simple_stmt): Adjust accordingly.
971 * parse.c: Regenerated.
972 * pt.c (tsubst_expr): Adjust accordingly.
973 * semantics.c (expand_cond): New function.
974 (FINISH_COND): New macro.
975 (begin_switch_stmt): Build the SWITCH_STMT here.
976 (finish_switch_stmt_cond): Not here.
977 (expand_stmt): Adjust calls to begin_switch_stmt and
978 finish_switch_cond. Use expand_cond throughout.
980 * dump.c (dequeue_and_dump): Dump types for constants.
981 Describe DECL_ARG_TYPE more intuitively.
984 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
985 (lang_cleanup_tree): Remove.
986 * lex.c (make_lang_type): Use ggc_alloc to allocate
989 Reorganize per-function data.
990 * cp-tree.h (saved_scope): Add function_decl, bindings.
991 (language_function): Rename binding_level to bindings.
992 (cp_function_chain): Use the current_function, not the
993 outer_function_chain.
994 (current_class_ptr): Make it work, even when there's no
996 (current_class_ref): Likewise.
997 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
999 (clear_temp_name): Remove.
1000 * decl.c (check_function_type): New function, broken out from
1002 (current_binding_level): Adjust definition.
1003 (pushlevel): Simplify.
1004 (poplevel): Don't use named_label_uses when we're outside
1006 (mark_saved_scope): Mark function_decl and bindings.
1007 (maybe_push_to_top_level): Don't unconditionally push a new
1008 function context. Save bindings and the current_function_decl.
1009 Don't clear named_labels.
1010 (pop_from_top_level): Pop function context if appropriate.
1011 (init_decl_processing): Set init_lang_status and free_lang_status,
1012 rather than save_lang_status and restore_lang_status.
1013 (start_function): Take SF_* flags. Don't clear per-function data.
1014 Reorder and simplify to use new per-function data code. Add
1016 (store_parm_decls): Don't call init_function_start here.
1017 (finish_function): Adjust for new handling of per-function data.
1018 (push_cp_function_context): Simplify.
1019 (mark_cp_function_context): Change binding_level to bindings.
1020 * decl2.c (clear_temp_name): Remove.
1021 (start_objects): Use SF flags to start_function.
1022 (start_static_storage_duration_function): Likewise.
1023 * except.c (start_anon_func): Remove redundant calls to
1024 push_function_context_to. Use SF flags to start function.
1025 (end_anon_func): Remove redundant call to pop_function_context
1027 * lex.c (reinit_parse_for_function): Don't initialize per-function
1029 * method.c (emit_thunk): Clear current_function after calling
1030 assemble_end_function. Use SF flags for start_function.
1031 (synthesize_method): Use SF flags for start_function.
1032 * parse.c: Regenerated.
1033 * parse.y (fn.defpen): Likewise.
1034 (pending_inline): Clear current_function, even if something goes
1036 * pt.c (instantiate_decl): Use SF flags to start_function.
1037 Don't save and restore expanding_p.
1038 (add_tree): Handle the case where we are outside any function.
1039 (end_tree): Likewise.
1040 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1041 * semantics.c (begin_function_definition): Likewise.
1042 (expand_body): Likewise.
1044 1999-09-09 Nathan Sidwell <nathan@acm.org>
1046 * cp-tree.h (convert_to_void): Prototype new function.
1047 (require_complete_type_in_void): Remove prototype.
1048 * cvt.c (convert_to_void): New function.
1049 (ocp_convert): Use convert_to_void.
1050 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1052 * typeck.c (require_complete_type_in_void): Remove function.
1053 (build_compound_expr): Use convert_to_void.
1054 (build_static_cast): Likewise.
1055 (build_c_cast): Likewise.
1056 * semantics.c (finish_expr_stmt): Do not decay full expressions.
1058 * typeck.c (build_x_compound_expr): Add FIXME.
1060 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1062 * cp-tree.h (scratch_tree_cons): Remove.
1063 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1064 and perm_tree_cons with plain tree_cons.
1065 * class.c: Likewise.
1067 * decl2.c: Likewise.
1068 * except.c: Likewise.
1072 * method.c: Likewise.
1073 * parse.y: Likewise.
1077 * search.c: Likewise.
1078 * typeck.c: Likewise.
1079 * parse.c: Regenerated.
1080 * tree.c (build_srcloc): Simplify.
1082 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1084 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1086 (LANG_DECL_PERMANENT): Remove.
1087 * decl.c (duplicate_decls): Don't mess about with obstacks trying
1089 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1090 * lex.c (free_lang_decl_chain): Remove.
1091 (build_lang_decl): Don't use obstacks.
1092 (retrofit_lang_decl): Likewise.
1093 (copy_lang_decl): Likewise.
1095 * cp-tree.h (saved_scope): Remove old_binding_level and
1096 function_decl. Tidy up.
1097 * decl.c (mark_saved_scope): Don't set them.
1098 (maybe_push_to_top_level): Clear memory.
1100 * decl.c (layout_var_decl): Change prototype. Don't complete
1101 types for external objects.
1102 (check_initializer): Likewise. Tidy.
1103 (initialize_local_var): Complete types here.
1104 (cp_finish_decl): Not here. Reorganize a little.
1105 (grokvardecl): Don't complete types here.
1107 * decl.c (start_function): Clear last_dtor_insn and
1108 last_parm_cleanup_insn.
1109 (push_cp_function_context): Just copy over a little of
1110 the old context, not all of it.
1112 * cp-tree.h (copy_to_permanent): Remove.
1113 (permanent_p): Likewise.
1114 * decl.c (building_typename_type): Don't use copy_to_permanent.
1115 (start_decl): Likewise.
1116 (grok_reference_init): Likewise.
1117 (cp_finish_decl): Likewise.
1118 * init.c (build_new_1): Don't use mapcar.
1119 (build_vec_delete_1): Don't use copy_to_permanent.
1120 (build_vec_init): Likewise.
1121 * parse.y (primary): Likewise.
1122 * parse.c: Regenerated.
1123 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1124 (lookup_template_class): Likewise.
1125 (tsubst_friend_function): Likewise.
1126 (instantiate_class_template): Likewise.
1127 (tsubst_decl): Likewise.
1129 (instantiate_template): Likewise.
1131 * rtti.c (get_tinfo_fn): Likewise.
1132 (build_dynamic_cast): Likewise.
1133 * semantics.c (finish_if_stmt_cond): Likewise.
1134 (finish_while_stmt_cond): Likewise.
1135 (finish_do_stmt): Likewise.
1136 (finish_for_cond): Likewise.
1137 (finish_for_expr): Likewise.
1138 (finish_cleanup): Likewise.
1139 (add_decl_stmt): Likewise.
1140 (finish_named_return_value): Likewise.
1141 (finish_qualified_call_expr): Likewise.
1142 * tree.c (perm_manip): Remove.
1143 (build_exception_variant): Don't use copy_to_permanent.
1144 (permanent_p): Remove.
1145 (copy_to_permament): Remove.
1146 (build_min_nt): Don't use copy_to_permanent.
1147 (build_min): Likewise.
1148 (min_tree_cons): Likewise.
1149 * typeckc.c (build_static_cast): Likewise.
1150 (build_reinterpret_cast): Likewise.
1151 (build_const_cast): Likewise.
1153 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1155 * decl.c (ggc_p): Set it to 1.
1156 (mark_saved_scope): Add prototype.
1158 1999-09-07 Richard Henderson <rth@cygnus.com>
1160 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1161 * typeck.c (self_promoting_args_p): Delete.
1163 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
1165 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1166 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1168 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1170 * Makefile.in (tree.o): Depend on ggc.h.
1171 * class.c (make_method_vec): Remove.
1172 (free_method_vec): Likewise.
1173 (free_method_vecs): Remove.
1174 (add_method): Don't use them.
1175 * cp-tree.def (PTRMEM_CST): Make it longer.
1176 (TEMPLATE_PARM_INDEX): Make it shorter.
1177 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1178 (template_parm_index): Remove RTL field.
1179 (ptrmem_cst): Add RTL field.
1180 (finish_function): Removed parameter.
1181 (process_next_inline): Change prototype.
1182 (init_cplus_unsave): Rename to init_tree.
1183 (binding_init): Remove.
1184 * decl.c (free_binding_nodes): Remove.
1185 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
1186 (pop_binding): Don't use free_binding_nodes.
1187 (free_binding_vecs): Remove.
1188 (store_bindings): Don't use them.
1189 (pop_from_top_level): Likewise.
1190 (lookup_namespace_name): Simplify.
1191 (build_typename_type): Don't use obstack_free.
1192 (unqualified_namespace_lookup): Simplify.
1193 (lookup_name_real): Simplify.
1194 (start_function): Remove comment about leaks.
1195 (finish_function): Removed nested parameter. Call
1196 expand_end_bindings even when building_stmt_tree.
1197 Call ggc_push_context and ggc_pop_context around
1198 rest_of_compilation, if necessary.
1199 (mark_cp_function_context): Handle a NULL language-context.
1200 (lang_mark_false_label_stack): Fix typo.
1201 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1202 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
1203 pointer to method types.
1204 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1205 * decl2.c (finish_objects): Adjust call to finish_function.
1206 (finish_static_store_duration_function): Likewise.
1207 (do_nonmember_using_decl): Remove call to binding_init.
1208 * except.c (end_anon_func): Adjust call to finish_function.
1209 * lex.c (mark_impl_file_chain): New function.
1210 (init_parse): Call init_tree, not init_cplus_unsave.
1212 (cp_pramga_interface): Use xmalloc, not permalloc.
1213 (cp_pragma_implementation): Likewise.
1214 (begin_definition_of_inclass_inline): Simplify.
1215 (process_next_inline): Adjust prototype.
1216 (do_scoped_id): Don't call binding_init.
1217 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1218 * method.c (emit_thunk): Adjust call to finish_function.
1219 (synthesize_method): Likewise.
1220 * parse.y (%union): Add a new `pi' variant.
1221 (PRE_PARSED_FUNCTION_DECL): Use it.
1222 (fn.defpen): Likewise.
1223 (fndef): Adjust call to finish_function.
1224 * pt.c (instantiate_decl): Likewise.
1225 * rtti.c (syntheisze_tinfo_fn): Likewise.
1226 * semantics.c (expand_body): Likewise.
1227 * tree.c: Include ggc.h.
1228 (mark_list_hash): New function.
1229 (binding_init): Remove.
1230 (init_cplus_unsave): Rename to ...
1231 (init_tree): This. Add GC roots.
1233 1999-09-05 Mark Mitchell <mark@codesourcery.com>
1235 Get ready for garbage collection.
1236 * Makefile.in (CXX_TREE_H): Add varray.h
1237 (lex.o): Depend on ggc.h.
1239 (decl2.o): Likewise.
1240 (method.o): Likewise.
1241 (search.o): Likewise.
1244 * class.c: Include ggc.h.
1245 (current_class_name): Remove.
1246 (current_class_type): Likewise.
1247 (current_access_specifier): Likewise.
1248 (previous_class_type): Likewise.
1249 (previous_class_values): Likewise.
1250 (class_cache_firstobj): Likewise.
1251 (current_lang_base): Likewise.
1252 (current_lang_stack): Likewise.
1253 (current_lang_stacksize): Likewise.
1254 (lang_name_c): Likewise.
1255 (lang_name_cplusplus): Likewise.
1256 (lang_name_java): Likewise.
1257 (current_lang_name): Likewise.
1258 (base_layout_decl): Likewise.
1259 (access_default_node): Likewise.
1260 (access_public_node): Likewise.
1261 (access_protected_node): Likewise.
1262 (access_private_node): Likewise.
1263 (access_default_virtual_node): Likewise.
1264 (access_public_virtual_node): Likewise.
1265 (access_protected_virtual_node): Likewise.
1266 (access_private_virtual_node): Likewise.
1267 (signed_zero_node): Likewise.
1268 (init_class_processing): Don't build base_layout_decl.
1269 (push_lang_context): Adjust now that current_lang_base is a varray.
1270 (pop_lang_context): Likewise.
1271 * cp-tree.h: Include varray.h.
1272 (cp_global_trees): Add access_default, access_public,
1273 access_protected, access_private, access_default_virtual,
1274 access_public_virtual, access_protected_virtual,
1275 access_private_virtual, ctor_identifier, delta2_identifier,
1276 delta_identifier, dtor_identifier, in_charge_identifier,
1277 index_identifier, nelts_identifier, this_identifier,
1278 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1279 lang_name_c, lang_name_cplusplus, lang_name_java,
1280 empty_except_spec, null, jclass, minus_one, terminate.
1281 (saved_scope): Move here from decl.c. Define globals in terms of
1282 saved_scope: current_namespace, current_class_name,
1283 current_class_type, current_access_specifier, current_lang_stack,
1284 current_lang_base, current_lang_name, current_function_parms,
1285 current_template_parms, processing_template_decl,
1286 processing_specialization, processing_explicit_instantiation,
1287 previous_class_type, previous_class_values, class_cache_firstobj.
1288 (scope_chain): New variable.
1289 (init_pt): New function.
1290 * decl.c (current_namespace): Remove.
1291 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1292 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1293 (delta_identifier, delta2_identifier): Likewise.
1294 (pfn_or_delta2_identifier, tag_identifier): Likewise
1295 (vt_off_identifier, empty_except_spec, null_node): Likewise.
1296 (current_function_parms, current_lang_base): Remove.
1297 (current_lang_stack, previous_class_values): Remove.
1298 (class_binding_level): Macroize.
1299 (saved_scope): Remove.
1300 (current_saved_scope): Rename to scope_chain.
1301 (mark_saved_scope): Adjust for new scope structure.
1302 (maybe_push_to_top_level): Likewise.
1303 (pop_from_top_level): Likewise.
1304 (duplicate_decls): Adjust now that current_lang_base is a varray.
1305 (build_typename_type): Call ggc_add_tree_hash_table_root.
1306 (init_decl_processing): Call init_pt. Call push_to_top_level to
1307 set up globals. Add GC roots.
1308 (xref_basetypes): Adjust now that current_lang_base is a varray.
1309 * decl.h (this_identifier): Remove.
1310 (in_charge_identifier): Likewise.
1311 * decl2.c: Don't include varray.h.
1312 (current_namespace): Remove.
1313 (init_decl2): Add GC roots.
1314 * except.c (Terminate): Remove.
1315 (init_exception_processing): Use terminate_node instead.
1316 (build_terminate_handler): Likewise.
1317 * init.c (nc_nelts_field_id): Remove.
1318 (minus_one): Likewise.
1319 (init_init_processing): Use minus_one_node and nelts_identifier
1320 instead. Add GC roots.
1321 (jclass_node): Remove.
1322 (build_new_1): Use nelts_identifier.
1323 (build_vec_init): Likewise.
1324 (build_vec_delete): Likewise.
1325 * lex.c: Include ggc.h.
1326 (defarg_fn): Move declaration early.
1327 (defarg_parms): Likewise.
1328 (init_parse): Add GC roots.
1329 (handle_cp_pragma): Remove redundant declaration of
1331 * method.c: Include ggc.h.
1332 (btypelist): Make it a varray. All uses changed.
1333 (ktypelist): Likewise.
1334 (init_method): Add GC roots.
1335 * pt.c: Don't include varray.h. Include ggc.h.
1336 (current_template_parms): Remove.
1337 (processing_template_decl): Likewise.
1338 (processing_specialization): Likewise.
1339 (processing_explicit_instantiation): Likewise.
1340 (init_pt): New function.
1341 * repo.c: Include ggc.h.
1342 (init_repo): Add GC roots.
1343 * search.c: Don't include varray.h.
1344 (_vptr_name): Remove.
1345 (lookup_field_1): Use vtpr_identifier instead.
1346 (expand_indirect_vtbls_init): Remove redundant declaration of
1347 in_charge_identifier.
1348 (init_search_processing): Use vptr_identifier.
1350 1999-09-05 Richard Henderson <rth@cygnus.com>
1351 Bernd Schmidt <bernds@cygnus.co.uk>
1352 Mark Mitchell <mark@codesourcery.com>
1354 * Makefile.in (parse.o): Depend on ggc.h.
1355 (decl2.o): Depend on ggc.h.
1356 (init.o): Depend on ggc.h.
1357 * cp-tree.h (init_decl2): Declare.
1358 (cp_parse_init): Likewise.
1359 * decl.c (ggc_p): Define to zero.
1360 (mark_saved_scope): New function.
1361 (init_decl_processing): Call cp_parse_init, and cp_decl2.
1363 (expand_static_init): Add GC roots.
1364 * decl2.c: Include ggc.h.
1365 (init_decl2): New function.
1366 * init.c: Include ggc.h.
1367 (init_init_processing): Add GC roots.
1368 * parse.y: Include ggc.h.
1369 (cp_parse_init): New function.
1371 1999-09-04 Mark Mitchell <mark@codesourcery.com>
1373 * decl.c (init_decl_processing): Set mark_lang_status.
1374 (lang_mark_false_label_stack): Adjust prototype.
1375 * decl2.c (grok_function_init): Remove extraneous declaration of
1378 * Make-lang.in (cc1plus): Remove dependency on GGC.
1379 * Makefile.in (OBJS): Don't mention ggc-simple.o.
1380 (OBJDEPS): Don't mention ggc-simple.o.
1382 * Make-lang.in (cc1plus): Depend on $(GGC).
1383 * Makefile.in (OBJS): Add ggc-simple.o.
1384 (OBJDEPS): Likewise.
1385 * cp-tree.h (language_function): Rename members to `x_' versions;
1386 we now have x_named_labels, x_ctor_label, x_dtor_label,
1387 x_base_init_list, x_member_init_list, x_base_init_expr,
1388 x_current_class_ptr, x_current_class_ref, x_last_tree,
1389 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1391 (dtor_label, ctor_label, current_base_init_list,
1392 current_member_init_list, base_init_expr, current_class_ptr,
1393 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1394 * decl.c: Include ggc.h.
1395 (last_dtor_insn): Adjust to use x_ names.
1396 (last_parm_cleanup_insn): Likewise.
1397 (original_result_rtx): Likewise.
1398 (named_labels): Likewise.
1399 (mark_binding_level): New function.
1400 (mark_cp_function_context): Likewise.
1401 (mark_false_label_stack): Likewise.
1402 (lang_mark_tree): Likewise.
1403 (lang_cleanup_tree): Likewise.
1405 1999-09-03 Mark Mitchell <mark@codesourcery.com>
1407 * Makefile.in (CXX_TREE_H): Include function.h.
1408 (decl.o): Don't depend on function.h.
1409 (decl2.o): Likewise.
1410 (typeck.o): Likewise.
1412 (method.o): Likewise.
1413 * cp-tree.h: Include function.h.
1414 (cp_function): Rename to language_function. Remove next.
1415 (cp_function_chain): Make it a macro, not a variable.
1416 (push_cp_function_context): Don't declare.
1417 (pop_cp_function_context): Likewise.
1418 * decl.c: Don't include function.h.
1419 (push_cp_function_context): Make it static. Make it suitable for
1420 a save_lang_status callback.
1421 (pop_cp_function_context): Likewise.
1422 (maybe_push_to_top_level): Call push_function_context_to, not
1423 push_cp_function_context.
1424 (pop_from_top_level): Call pop_function_context_from, not
1425 pop_cp_function_context.
1426 (init_decl_processing): Set save_lang_status and
1427 restore_lang_status. Call push_function_context_to, not
1428 push_cp_function_context.
1429 (cp_function_chain): Remove.
1430 * decl2.c: Don't include function.h.
1431 * except.c: Don't include function.h.
1432 (start_anon_func): Call push_function_context_to, not
1433 push_cp_function_context.
1434 (end_anon_func): Call pop_function_context_from, not
1435 pop_cp_function_context.
1436 * init.c: Don't include function.h.
1437 * lex.c (begin_definition_of_inclass_inline): Call
1438 push_function_context_to, not push_cp_function_context.
1439 (process_next_inline): Call pop_function_context_from, not
1440 pop_cp_function_context.
1441 * method.c: Don't include function.h.
1442 (synthesize_method): Call push_function_context_to, not
1443 push_cp_function_context. Call pop_function_context_from, not
1444 pop_cp_function_context.
1445 * typeck.c: Don't include function.h.
1447 * decl.c (expand_static_init): Tweak handling of static
1448 initializations for objects without constructors.
1450 1999-09-03 Nathan Sidwell <nathan@acm.org>
1452 * typeck.c (build_indirect_ref): Reject dereference of pointer to
1455 1999-09-02 Mark Mitchell <mark@codesourcery.com>
1457 * cp-tree.h (cp_function): Move here, from decl.c.
1458 (cp_function_chain): Declare.
1459 (dtor_label): New macro, instead of variable.
1460 (ctor_label): Likewise.
1461 (current_base_init_list): Likewise.
1462 (current_member_init_list): Likewise.
1463 (base_init_expr): Likewise.
1464 (current_class_ptr): Likewise.
1465 (current_class_ref): Likewise.
1466 (last_tree): Likewise.
1467 (last_expr_type): Likewise.
1468 (current_function_returns_value): Likewise.
1469 (current_function_returns_null): Likewise.
1470 (current_function_just_assigned_this): Likewise.
1471 (current_function_parms_stored): Likewise.
1472 (temp_name_counter): Likewise.
1473 (static_labelno): Likewise.
1474 (expanding_p): Likewise.
1475 (stmts_are_full_exprs_p): Likewise.
1476 (in_function_try_handler): Likewise.
1477 (lang_type): Remove nested type_flags. All uses changed.
1478 * call.c (ctor_label): Remove.
1479 (dtor_label): Likewise.
1480 * class.c (current_class_ptr): Remove.
1481 (current_class_ref): Likewise.
1482 * decl.c (static_labelno): Remove.
1483 (dtor_label): Likewise.
1484 (last_dtor_insn): New macro, instead of variable.
1485 (last_parm_cleanup_insn): Likewise.
1486 (original_result_rtx): Likewise.
1487 (in_function_try_handler): Remove.
1488 (named_label_uses): New macro, instead of variable.
1489 (named_labels): Likewise.
1490 (current_function_returns_value): Remove.
1491 (current_function_returns_null): Likewise.
1492 (current_function_assigns_this): New macro, instead of variable.
1493 (current_function_just_assigned_this): Likewise.
1494 (current_binding_level): Likewise.
1495 (init_decl_processing): Call push_cp_function_context.
1496 (cp_function): Move to cp-tree.h
1497 (cp_function_chain): Make it global.
1498 (temp_name_counter): Remove.
1499 (push_cp_function_context): Simplify.
1500 (pop_cp_function_context): Likewise.
1501 * decl2.c (temp_name_counter): Remove.
1502 * init_c (current_base_init_list): Likewise.
1503 (current_member_init_list): Likewise.
1504 (base_init_expr): Likewise.
1505 * method.c (static_labelno): Likewise.
1506 * pt.c (last_tree): Likewise.
1507 * semantics.c (expanding_p): Likewise.
1508 (stmts_are_full_exprs_p): Likewise.
1509 (last_expr_type): Likewise.
1510 * typeck.c (dtor_label): Likewise.
1511 (ctor_label): Likewise.
1513 1999-09-01 Alex Samuel <samuel@codesourcery.com>
1515 * decl2.c (arg_assoc_template_arg): New prototype. New function.
1516 (arg_assoc_class): Use arg_assoc_template_arg for template
1518 (arg_assoc): Likewise.
1519 * pt.c (mangle_class_name_for_template): Allow member template
1522 1999-09-02 Nathan Sidwell <nathan@acm.org>
1524 * call.c (build_conditional_expr): Warn on enum mismatches.
1525 (convert_arg_to_ellipsis): Move non-pod check to after
1528 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1530 * gxx.gperf (hash, is_reserved_word): Add prototypes.
1532 * init.c (build_vec_init): Initialize variable `try_block'.
1534 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1535 Likewise for bzero/memset.
1536 (token_getch, token_put_back): Add static prototypes. Remove
1537 `inline' from the definitions.
1538 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1540 1999-09-01 Mark Mitchell <mark@codesourcery.com>
1542 * cp-tree.h (lang_type): Move align into type_flags.
1543 (CLASSTYPE_ALIGN): Adjust accordingly.
1544 * call.c (direct_reference_binding): Remove misleading comment.
1546 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1548 * parse.y (language_string): Constify.
1550 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1552 * repo.c (getpwd): Don't prototype.
1553 * xref.c (getpwd): Likewise
1555 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1557 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1558 Remove hacks for stuff which now comes from libiberty.
1560 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
1562 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1564 1999-08-30 Mark Mitchell <mark@codesourcery.com>
1566 * cp-tree.h (begin_init_stmts): Declare.
1567 (finish_init_stmts): Likewise.
1568 * cvt.c (build_up_reference): Wrap the declaration of a temporary
1569 in a statement-expression so that we will see it when expanding
1570 tree structure later.
1571 * init.c (begin_init_stmts): Don't make it static.
1572 (finish_init_stmts): Likewise.
1574 * cp-tree.h (start_handler_parms): New function.
1575 (expand_start_catch_block): Take only one parameter.
1576 (start_handler_parms): New function.
1577 * decl.c (start_handler_parms): Define it.
1578 * except.c (process_start_catch_block): Take only one parameter.
1579 Don't call grokdeclarator here.
1580 (expand_start_catch_block): Don't call grokdeclarator here,
1582 * parse.y (handler_args): Adjust call to
1583 expand_start_catch_block. Use start_handler_parms.
1584 * pt.c (push_template_decl_real): Make permanent lists have
1586 (tsubst_expr): Adjust calls to expand_start_catch_block
1588 * semantics.c (expand_stmt): Likewise.
1590 1999-08-29 Alex Samuel <samuel@codesourcery.com>
1592 * pt.c (push_template_decl_real): Use template declaration from
1593 class type if it exists.
1595 1999-08-29 Mark Mitchell <mark@codesourcery.com>
1597 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1598 (maybe_inject_for_scope_var): Declare it.
1599 (initialize_local_var): Likewise.
1600 * decl.c (maybe_inject_for_scope_var): Make it global.
1601 (initialize_local_var): Likewise. Move cleanup handling here,
1602 from cp_finish_decl.
1603 (make_rtl_for_nonlocal_decl): Use
1604 push_obstacks_nochange/pop_obstacks, rather than
1605 end_temporary_allocation/resume_temporary_allocation.
1606 (cp_finish_decl): Try to complete the type of a variable when it
1607 is declared. Move cleanup-handling to initialize_local_var.
1608 (expand_static_init): Use tree-building code, rather than
1610 * decl2.c (get_temp_name): Assert non-initializedness of
1612 * init.c (create_temporary_var): Move RTL-assigning code to ...
1613 (get_temp_regvar): Here.
1614 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
1615 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
1616 call initialize_local_var to generate initialization code.
1618 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1620 * cp-tree.h (fndecl_as_string, type_as_string,
1621 type_as_string_real, args_as_string, decl_as_string,
1622 expr_as_string, code_as_string, language_as_string,
1623 parm_as_string, op_as_string, assop_as_string, cv_as_string,
1624 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1626 * errfn.c (cp_printer): Likewise.
1628 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1629 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1630 cp_file_of, code_as_string, language_as_string, parm_as_string,
1631 op_as_string, assop_as_string, args_as_string, cv_as_string):
1634 * tree.c (lang_printable_name): Likewise.
1636 1999-08-28 Richard Henderson <rth@cygnus.com>
1638 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1640 1999-08-28 Mark Mitchell <mark@codesourcery.com>
1642 * cp-tree.h (strip_array_types): New function.
1643 * decl.c (maybe_deduce_size_from_array_init): New function, split
1644 out from cp_finish_decl.
1645 (layout_var_decl): Likewise.
1646 (maybe_commonize_var): Likewise.
1647 (maybe_inject_for_scope_var): Likewise.
1648 (initialize_local_var): Likewise.
1649 (build_cleanup_on_safe_obstack): Likewise.
1650 (check_initializer): Likewise.
1651 (make_rtl_for_nonlocal_decl): Likewise.
1652 (cp_finish_decl): Use them.
1653 * typeck.c (strip_array_types): New function.
1655 * cp-tree.def (LABEL_STMT): New tree node.
1656 * cp-tree.h (LABEL_STMT_LABEL): New macro.
1657 (shadow_label): Remove.
1658 (declare_local_label): New function.
1659 (finish_label_decl): Likewise.
1660 * decl.c (make_label_decl): New function, split out from
1662 (shadowed_labels): Remove.
1663 (binding_level): Add shadowed_labels.
1664 (clear_binding_level): Remove.
1665 (push_binding_level): Just bzero the new binding level.
1666 (pushlevel): Fix indentation.
1667 (pop_label): New function.
1668 (pop_labels): Likewise, split out from poplevel.
1669 (poplevel): Pop local labels. Use pop_labels.
1670 (maybe_push_to_top_level): Don't clear shadowed_labels.
1671 (lookup_label): Use make_label_decl.
1672 (shadow_label): Remove.
1673 (declare_local_label): New function.
1674 (define_label): Simplify.
1675 (start_function): Don't clear shadowed_labels.
1676 (cp_function): Remove shadowed_labels.
1677 (push_cp_function_context): Don't save shadowed_labels.
1678 (pop_cp_function_context): Don't restore it.
1679 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1680 * parse.y (label_decl): Use finish_label_decl.
1681 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1683 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1685 (finish_label_decl): New function.
1686 (expand_stmt): Handle LABEL_STMTs and local label declarations.
1688 1999-08-26 Mark Mitchell <mark@codesourcery.com>
1690 * decl.c (lookup_label): Build labels on the permanent obstack
1691 when building statement trees. Don't build RTL for labels when
1692 building statement trees.
1693 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1694 building statement trees.
1695 (finish_label_stmt): Likewise.
1696 (expand_stmt): Adjust accordingly.
1697 * pt.c (tsubst_expr); Likewise.
1698 (do_decl_instantiation): Robustify.
1700 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1701 * tree.c (build_cplus_new): Set it.
1702 * expr.c (cplus_expand_expr): Use it.
1703 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1705 * decl.c (store_parm_decls): Reset immediate_size_expand.
1706 (finish_function): Likewise.
1708 * tree.c (cplus_unsave_expr_now): Don't return a value.
1710 * semantics.c (do_poplevel): Always initialize the return value.
1712 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
1714 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1715 * tree.h (cplus_unsave_expr_now) : Same.
1717 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1719 * decl.c (grokdeclarator): Amend comment.
1720 * except.c (expand_start_catch_block): Call push_template_decl for
1721 catch-block parameters.
1722 * method.c (synthesize_method): Build an empty compound statement
1723 for the body of a constructor.
1725 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
1727 * tree.c (cp_build_qualified_type_real): If we're asking for the
1728 same quals we already have, just return.
1730 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1732 * cp-tree.def (SUBOBJECT): New tree node.
1733 * cp-tree.h (CLEANUP_P): New macro.
1734 (SUBOBJECT_CLEANUP): Likewise.
1735 (keep_next_level): Add parameter.
1736 (get_temp_regvar): Don't declare.
1737 (emit_base_init): Remove parameter.
1738 (expand_aggr_init): Rename to build_aggr_init.
1739 (expand_vec_init): Rename to build_vec_init.
1740 (do_pushlevel): Remove.
1741 (do_poplevel): Likewise.
1742 (finish_cleanup): New function.
1743 (finish_subobject): Likewise.
1744 (stmts_are_full_exprs_p): New variable.
1745 * decl.c (keep_next_level): Add parameter.
1746 (cp_finish_decl): Use build_aggr_init, not
1747 expand_aggr_init. Use finish_expr_stmt to expand the code.
1748 (expand_static_init): Use tree-generating, not RTL-generating,
1749 functions to handle the initialization.
1750 (start_function): Remove dead code. Always have a momentary
1751 obstack inside the function, even before hitting the first curly
1753 (cplus_expand_expr_stmt): Move calls to
1754 expand_{start,end}_target_temps into semantics.c.
1755 (cp_function): Add stmts_are_full_exprs_p.
1756 (push_cp_function_context): Save it.
1757 (pop_cp_function_context): Restore it.
1758 * decl2.c (get_temp_regvar): Move to init.c.
1759 (do_static_initialization): Use build_{aggr,vec}_init.
1760 (do_static_destruction): Fix typo in comment.
1761 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1762 * except.c (expand_throw): Use create_temporary_var.
1763 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1764 * init.c (expand_vec_init_try_block): Remove.
1765 (expand_vec_init_catch_clause): Likewise.
1766 (get_temp_regvar): New function.
1767 (begin_init_stmts): Likewise.
1768 (finish_init_stmts): Likewise.
1769 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1771 (emit_base_init): Likewise. Remove unused parameter.
1772 (expand_virtual_init): Likewise.
1773 (expand_cleanup_for_base): Use finish_subobject.
1774 (expand_aggr_vbase_init_1): Simplify.
1775 (construct_virtual_bases): Use tree-generating functions to build
1777 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1778 (expand_default_init): Likewise.
1779 (expand_aggr_init_1): Likewise.
1780 (expand_vec_init): Rename to build_vec_init.
1781 * method.c (do_build_copy_constructor): Use tree-generating
1782 functions. Don't call clear_last_expr.
1783 (do_build_assign_ref): Likewise.
1784 (synthesize_method): Call clear_last_expr here.
1785 * parse.y (base_init): Don't call clear_last_expr here.
1786 (nodecls): Likewise.
1787 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1788 * semantics.c (do_pushlevel): Move to here.
1789 (do_poplevel): Likewise.
1790 (stmts_are_full_exprs_p): New variable.
1791 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1792 (finish_for_stmt): Use finish_expr_stmt.
1793 (finish_cleanup): New function.
1794 (finish_function_try_block): Fix indentation.
1795 (finish_subobject): New function.
1796 (setup_vtbl_ptr): Call keep_next_level here.
1797 (finish_stmt_expr): Handle a block with no scope inside the
1798 statement-expression.
1799 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1801 * tree.c (search_tree): Handle INIT_EXPR.
1803 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1804 * typeck2.c (store_init_value): Change expand_aggr_init to
1805 build_aggr_init in comment.
1807 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1809 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1811 1999-08-25 Nathan Sidwell <nathan@acm.org>
1813 * decl2.c (handle_class_head): Be graceful about additional
1814 scope qualifiers. Adjust comments to reflect reality.
1816 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1818 * call.c (build_conditional_expr): Fix typo.
1819 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1820 lvalue before trying to mess with the sides.
1822 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1824 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1826 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1828 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1830 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1831 Return arbitrary pointer or NULL.
1832 (check_eh_spec): Call __throw_type_match_rtti_2.
1833 * tinfo.h (*::dcast): Return int. Add valp parm.
1834 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1835 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1836 (__throw_type_match_rtti): Now just a wrapper.
1838 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1839 (init_exception_processing): Don't initialize them.
1841 1999-08-23 Paul Burchard <burchard@pobox.com>
1843 * decl.c (check_default_argument): Fix typo.
1845 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1847 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1849 * dump.c (dump_next_stmt): New function.
1850 (dequeue_and_dump): Use it.
1852 * pt.c (tsubst_copy): Make sure to initialize return value for a
1853 STMT_EXPR, even when processing_template_decl.
1854 * semantics.c (finish_stmt_expr): A statement-expression whose
1855 last statement is not an expression-statement has type `void'.
1857 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1859 * semantics.c (finish_stmt_expr): Fix typo in comment.
1860 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1862 * init.c (build_vec_delete_1): Make the children of a permanent
1863 BIND_EXPR permanent.
1864 * pt.c (register_specialization): Don't register a specialization
1867 1999-08-18 Andrew Haley <aph@cygnus.com>
1869 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1870 for all integer parameter types larger than long long.
1872 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1874 * pt.c (redeclare_class_template): Merge default template
1875 arguments in both directions.
1877 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1878 compiler_error message.
1880 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1882 * cp-tree.h: Declare flag_use_repository.
1883 * pt.c (do_decl_instantiation): Don't complain about duplicate
1884 instantiation with -frepo.
1885 (do_type_instantiation): Likewise.
1887 * pt.c (push_template_decl_real): Complain about everything
1888 that isn't a valid template.
1890 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1893 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1895 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1896 * decl2.c (build_expr_from_tree): Handle it.
1897 * error.c (dump_expr): Likewise.
1898 * pt.c (for_each_template_parm): Likewise.
1899 (tsubst_copy): Likewise.
1900 * tree.c (search_tree): Likewise.
1901 * semantics.c (finish_pseudo_destructor_call): Create it.
1903 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1905 * search.c (setup_class_bindings): Robustify.
1906 * typeck.c (common_type): Use same_type_p, not pointer equality,
1909 * cp-tree.h (build_lang_field_decl): Remove.
1910 * class.c (build_vtable): Replace calls to build_lang_field_decl
1911 with build_lang_decl.
1912 (prepare_fresh_vtable): Likewise.
1913 (finish_struct_1): Likewise.
1914 (init_class_processing): Likewise.
1915 * decl.c (push_using_decl): Likewise.
1916 (init_decl_processsing): Likewise.
1917 (grokvardecl): Likewise.
1918 (build_ptrmemfunc_type): Likewise.
1919 (grokdeclarator): Likewise.
1920 (build_enumerator): Likewise.
1921 * decl2.c (grok_x_components): Likewise.
1922 (do_class_using_decl): Likewise.
1923 * except.c (call_eh_info): Likewise.
1924 * init.c (init_init_processing): Likewise.
1925 * rtti.c (expand_class_decl): Likewise.
1926 * tree.c (build_base_fields): Likewise.
1927 (build_vbase_pointer_fields): Likewise.
1928 * lex.c (build_lang_decl): Build declarations on the permanent
1929 obstack if we're building statmeent trees.
1930 (retrofit_lang_decl): Handle both the full lang_decl and also the
1931 smaller lang_decl_flags here.
1932 (build_lang_field_decl): Remove.
1933 * pt.c (push_template_decl_real): Issue errors for variable
1934 declarations that are not static members.
1936 1999-08-18 Richard Henderson <rth@cygnus.com>
1938 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1941 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1943 * cp-tree.h (back_end_hook): New variable.
1944 * decl2.c (back_end_hook): Define it.
1945 (finish_file): If it's non-NULL, call it.
1947 * decl.c (add_decl_to_level): New function.
1948 (push_local_binding): Use it.
1949 (find_binding): Fix typo in comment.
1950 (pushdecl): Use add_decl_to_level. Put templates on the
1951 corresponding namespace-scope binding levels.
1952 * dump.c (dequeue_and_dump): Print the specializations of a
1954 * pt.c (push_template_decl_real): Don't push a template multiple
1957 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1959 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1960 (CALL_DECLARATOR_QUALS): Likewise.
1961 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1962 * decl.c (grokdeclarator): Adjust to use them.
1963 * decl2.c (grokfield): Likewise.
1964 (reparse_absdcl_as_casts): Likewise.
1965 * lex.c (make_call_declarator): Likewise.
1966 (set_quals_and_spec): Likewise.
1967 * pt.c (tsubst): Likewise.
1968 * tree.c (mapcar): Remove special hack to handle third operand of
1971 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1973 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1974 * class.c (build_vtable): Use build_lang_field_decl to build the
1975 VAR_DECLs for vtables.
1976 (prepare_fresh_vtable): Likewise.
1977 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1978 CAN_HAVE_FULL_LANG_DECL_P.
1979 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1980 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1981 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1982 (build_lang_field_decl): Likewise.
1983 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1986 * cp-tree.def (STMT_EXPR): New tree node.
1987 * cp-tree.h (STMT_EXPR_STMT): New macro.
1988 (store_return_init): Change prototype.
1989 (finish_named_return_value): New function.
1990 (expand_stmt): Likewise.
1991 (expand_body): Likewise.
1992 (begin_stmt_tree): Likewise.
1993 (finish_stmt_tree): Likewise.
1994 (expanding_p): New variable.
1995 (last_expr_type): Likewise.
1996 (building_stmt_tree): New macro.
1997 * decl.c (start_function): Use building_stmt_tree, not
1998 processing_template_decl, where appropriate.
1999 (store_parm_decls): Likewise.
2000 (store_return_init): Move most of the body to semantics.c.
2001 (finish_function): Use building_stmt_tree.
2002 (finish_stmt): Clear last_expr_type here.
2003 (cp_function): Add expanding_p, last_tree, last_expr_type.
2004 (push_cp_function_context): Save them.
2005 (pop_cp_function_context): Restore them.
2006 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2007 * error.c (dump_expr): Handle STMT_EXPR.
2008 * except.c (expand_start_catch_block): Use building_stmt_tree.
2010 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2011 (do_case): Move add_tree call to semantics.c.
2012 * parse.y (return_init): Use finish_named_return_value.
2013 (for.init.statement): Use finish_expr_stmt.
2014 * parse.c: Regenerated.
2015 * pt.c (do_pushlevel): Move to semantics.c.
2016 (do_poplevel): Likewise.
2017 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2018 (tsubst_expr): Don't expand all the way to RTL here. Handle
2019 RETURN_INIT and CTOR_INITIALIZER.
2020 (instantiate_decl): Call expand_body after tsubst'ing into
2022 * semantics.c (expand_stmts): New function.
2023 (expanding_p): New variable.
2024 (last_expr_type): Likewise.
2025 (finish_expr_stmt): Use building_stmt_tree.
2026 (begin_if_stmt): Likewise.
2027 (finish_if_stmt_cond): Likewise.
2028 (finish_then_clause): Likewise.
2029 (begin_else_clause): Likewise.
2030 (finish_else_clause): Likewise.
2031 (begin_while_stmt): Likewise.
2032 (finish_while_stmt_cond): Likewise.
2033 (finish_while_stmt): Likewise.
2034 (finish_do_body): Likewise.
2035 (finish_do_stmt): Likewise.
2036 (finish_return_stmt): Likewise.
2037 (begin_for_stmt): Likewise.
2038 (fnish_for_init_stmt): Likewise.
2039 (finish_for_cond): Likewise.
2040 (finish_for_expr): Likewise.
2041 (finish_for_stmt): Likewise.
2042 (finish_break_stmt): Likewise.
2043 (finish_continue_stmt): Likewise.
2044 (finish_switch_cond): Likewise.
2045 (finish_switch_stmt): Likewise.
2046 (finish_case_label): Call add_tree here if necessary.
2047 (finish_goto_statement): Use building_stmt_tree.
2048 (begin_try_block): Likewise.
2049 (begin_function_try_block): Likewise.
2050 (finish_try_block): Likewise.
2051 (finish_function_try_block): Likewise.
2052 (finish_handler_sequence): Likewise.
2053 (finish_function_handler_sequence): Likewise.
2054 (begin_handler): Likewise.
2055 (finish_handler_parms): Likewise.
2056 (finish_handler): Likewise.
2057 (begin_compound_stmt): Likewise.
2058 (finish_compound_stmt): Likewise.
2059 (finish_asm_stmt): Likewise.
2060 (finish_label_stmt): Likewise.
2061 (finish_named_return_value): New function.
2062 (setup_vtbl_ptr): Moved here from decl2.c.
2063 (do_pushlevel): Moved here from pt.c.
2064 (do_poplevel): Likewise.
2065 (begin_stmt_expr): Use building_stmt_tree.
2066 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
2067 when building_stmt_tree.
2068 (begin_stmt_tree): New function.
2069 (finish_stmt_tree): Likewise.
2070 (expand_stmt): Likewise.
2071 (expand_body): Likewise.
2072 * tree.c (build_cplus_method_type): Make sure the argument types
2073 end up on the same obstack as the METHOD_TYPE.
2074 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2075 THROW_EXPR, STMT_EXPR.
2076 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
2077 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
2078 sorry, if an unsupported node is encountered.
2079 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2080 (c_expand_return): Don't call add_tree here.
2082 1999-08-15 Mark Mitchell <mark@codesourcery.com>
2084 * pt.c (check_default_tmpl_args): Don't check in local scopes.
2085 (tsubst_decl): Make sure the declaration is on a saveable
2086 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2088 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2090 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
2092 Speed up Koenig lookup.
2093 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
2094 to return namespaces we've looked at.
2095 * decl2.c (lookup_using_namespace): Likewise.
2096 (add_function): Don't call ovl_member.
2097 (lookup_arg_dependent): Initialize k.namespaces to the list of
2098 namespaces seen in unqualified lookup.
2099 * call.c (equal_functions): Move here from tree.c.
2100 (joust): Use it to handle duplicate candidates.
2101 * tree.c (ovl_member): Use ==.
2103 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2105 * cp-tree.def (DECL_STMT): Make it smaller.
2106 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2107 (lang_decl): ... here. Add next.
2108 (DECL_SAVED_TREE): Adjust accordingly.
2109 (DECL_IMPLICIT_TYPEDEF_P): New macro.
2110 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2111 (DECL_STMT_DECL): Likewise.
2112 (create_implicit_typedef): New function.
2113 (maybe_push_decl): Likewise.
2114 (tsubst_default_argument): New function.
2115 (at_function_scope_p): Likewise.
2116 (add_decl_stmt): Likewise.
2117 (push_permanent_obstack): Likewise.
2118 * call.c (convert_default_arg): Use tsubst_default_argument.
2119 * class.c (add_method): Use push_permanent_obstack.
2120 (build_self_reference): Create a TEMPLATE_DECL for the
2121 self-reference, if necessary.
2122 * decl.c (pseudo_global_level_p): Only look at the current binding
2124 (push_binding): Use push_permanent_obstack.
2125 (create_implicit_typedef): New function.
2127 (duplicate_decls): Use push_permanent_obstack.
2128 (maybe_push_decl): New function.
2129 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
2130 (start_decl_1): Remove dead code.
2131 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
2132 pseudo_global_level_p.
2133 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2135 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
2136 pseudo_global_level_p.
2137 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2139 (get_sentry): Use push_permanent_obstack.
2140 * dump.c (dequeue_and_dump): Enable DECL_STMT.
2141 * except.c (call_eh_info): Use push_permanent_obstack.
2142 (build_eh_type_ref): Likewise.
2143 (do_pop_exception): Likewise.
2144 (expand_eh_spec): Likewise.
2145 (alloc_eh_object): Likewise.
2146 (expand_throw): Likewise.
2147 * init.c (build_java_class_ref): Likewise.
2148 * lex.c (get_time_identifier): Likewise.
2149 (free_lang_decl_chain): Correct type.
2150 (retrofit_lang_decl): Adjust accordingly.
2151 (build_lang_field_decl): Likewise.
2152 * lex.h (free_lang_decl_chain): Likewise.
2153 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2154 * parse.c: Regenerated.
2155 * pt.c (tsubst_default_arguments): New function.
2156 (retrieve_local_specialization): Likewise.
2157 (register_local_specialization): Likewise.
2158 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
2159 pseudo_global_level_p to determine whether or not a template is
2161 (lookup_template_class): Likewise. Use create_implicit_typedef.
2162 (instantiate_class_template): Call tsubst_default_arguments for
2163 member functions, if appropriate.
2164 (tsubst_default_argument): New function.
2165 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
2166 * search.c (at_function_scope_p): New function.
2167 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2168 (finish_label_stmt): Likewise.
2169 (add_decl_stmt): New function.
2170 (begin_class_definition): Likewise.
2171 (finish_typeof): Likewise.
2172 * tree.c (copy_template_template_parm): Likewise.
2173 (copy_to_permanent): Likewise.
2174 (push_permanent_obstack): Define.
2175 (mark_addressable): Use it.
2176 * typeck.c (mark_addressable): Likewise.
2178 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
2180 * cp-tree.h (init_cplus_unsave): New.
2181 (cplus_unsave_expr_now): New.
2182 * lex.c (init_parse): Call init_cplus_unsave.
2183 * tree.c (init_cplus_unsave): New.
2184 (cplus_unsave_expr_now): New.
2186 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2188 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
2189 decl_constant_value to simplify array bounds.
2191 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
2193 * lang-options.h: Add -fms-extensions.
2194 * cp-tree.h: Declare flag_ms_extensions.
2195 * decl2.c: Define it.
2196 * class.c (instantiate_type): Don't complain about taking the address
2197 of a bound member function if -fms-extensions.
2198 * typeck.c (build_unary_op): Likewise.
2199 * decl.c (grokdeclarator): Or about implicit int.
2200 * init.c (resolve_offset_ref): Or about implicit '&'.
2202 1999-08-11 Mark Mitchell <mark@codesourcery.com>
2204 * cp-tree.h (minimal_parse_mode): Remove.
2205 (finish_label_stmt): New function.
2206 * decl.c (saved_scope): Remove minimal parse mode.
2207 (maybe_push_to_top_level): Don't save it.
2208 (pop_from_top_level): Don't restore it.
2209 (define_label): Split out template-handling code to semantics.c.
2210 (start_decl): Don't use minimal_parse_mode.
2211 (cp_finish_decl): Likewise.
2212 (start_function): Don't increment it.
2213 (store_return_init): Don't use it.
2214 (finish_function): Don't decrement it.
2215 * parse.y (label_colon): Use finish_label_stmt throughout.
2216 * parse.c: Regenerated.
2217 * pt.c (minimal_parse_mode): Don't define it.
2218 (tsubst_expr): Use finish_label_stmt.
2219 * semantics.c (finish_label_stmt): New function.
2221 * dump.c (queue): Be careful when computing bitmasks.
2222 (dequeue_and_dump): Describe binfos as binfos, not as
2225 * parse.y (pedantic): Give it itype. Adjust usage accordingly
2227 * parse.c: Regenerated.
2229 * Make-lang.in (CXX_SRCS): Remove sig.c.
2230 * Makefile.in (CXX_OBJS): Remove sig.o.
2232 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2233 (CPTI_SIGNATURE_TYPE): Likewise.
2234 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2235 (opaque_type_node): Likewise.
2236 (signature_type_node): Likewise.
2237 (sigtable_entry_type): Likewise.
2238 (flag_handle_signatures): Likewise.
2239 (lang_type): Remove is_signature, is_signature_pointer,
2240 is_signature_reference, has_opaque_typedecls,
2241 sigtables_has_been_generated. Adjust dummy. Remove signature,
2242 signature_pointer_to, signature_reference_to.
2243 (IS_SIGNATURE): Remove.
2244 (SET_SIGNATURE): Remove.
2245 (CLEAR_SIGNATURE): Remove.
2246 (IS_SIGNATURE_POINTER): Remove.
2247 (IS_SIGNATURE_REFERENCE): Remove.
2248 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2249 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2250 (CLASSTYPE_SIGNATURE): Remove.
2251 (SIGNATURE_TYPE): Remove.
2252 (SIGNATURE_METHOD_VEC): Remove.
2253 (SIGNATURE_POINTER_TO): Remove.
2254 (SIGNATURE_REFERENCE_TO): Remove.
2255 (lang_decl_flags): Remove is_default_implementation. Rename
2256 memfunc_pointer_to to saved_tree.
2257 (IS_DEFAULT_IMPLEMENTATION): Remove.
2258 (DECL_MEMFUNC_POINTER_TO): Remove.
2259 (DECL_MEMFUNC_POINTING_TO): Remove.
2260 (DECL_SAVED_TREE): Adjust definition.
2261 (tag_types): Remove signature_type_node.
2262 (SIGNATURE_FIELD_NAME): Remove.
2263 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2264 (SIGNATURE_OPTR_NAME): Likewise.
2265 (SIGNATURE_SPTR_NAME): Likewise.
2266 (SIGNATURE_POINTER_NAME): Likewise.
2267 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2268 (SIGNATURE_REFERENCE_NAME): Likewise.
2269 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2270 (SIGTABLE_PTR_TYPE): Likewise.
2271 (SIGTABLE_NAME_FORMAT): Likewise.
2272 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2273 (SIGTABLE_TAG_NAME): Likewise.
2274 (SIGTABLE_VB_OFF_NAME): Likewise.
2275 (SIGTABLE_VT_OFF_NAME): Likewise.
2276 (finish_base_specifiers): Change prototype.
2277 (build_signature_pointer_type): Remove.
2278 (build_signature_reference_type): Remove.
2279 (build_signature_pointer_constructor): Remove.
2280 (build_signature_method_call): Remove.
2281 (build_optr_ref): Likewise.
2282 (append_signature_fields): Likewise.
2283 (signature_error): Likewise.
2284 * call.c (build_this): Remove signature support.
2285 (build_over_call): Likewise.
2286 (build_new_method_call): Likewise.
2287 * class.c (add_implicitly_declared_members): Likewise.
2288 (finish_struct_1): Likewise.
2289 (finish_struct): Likewise.
2290 * cvt.c (cp_convert_to_pointer): Likewise.
2291 (convert_to_pointer_force): Likewise.
2292 (ocp_convert): Likewise.
2293 * decl.c (sigtable_decl_p): Remove.
2294 (init_decl_processing): Remove support for signatures.
2295 (cp_finish_decl): Likewise.
2296 (grokdeclarator): Likewise.
2297 (grokparms): Likewise.
2298 (xref_tag): Likewise.
2299 (start_function): Likewise.
2300 (start_method): Likewise.
2301 * decl2.c (finish_sigtable_vardecl): Remove.
2302 (flag_handle_signatures): Remove.
2303 (lang_f_options): Remove handle-signatures.
2304 (grokfield): Remove support for signatures.
2305 (grokbitfield): Likewise.
2306 (finish_file): Likewise.
2307 (reparse_absdcl_as_casts): Likewise.
2308 * error.c (dump_type_real): Likewise.
2309 (dump_function_decl): Likewise.
2310 * friend.c (make_friend_class): Likewise.
2311 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2312 * hash.h: Regenerated.
2313 * init.c (build_new_1): Remove support for signatures.
2314 * lang-options.h: Remove -fhandle-signatures,
2315 -fno-handle-signatures.
2316 * lex.c (init_parse): Remove support for signatures.
2317 (yyprint): Likewise.
2318 * lex.h (rid): Remove RID_SIGNATURE.
2319 * method.c (build_decl_overload_real): Remove support for
2321 (hack_identifier): Likewise.
2322 * parse.y (base_class): Likewise.
2323 (base_class.1): Likewise.
2324 (access_specifier): Likewise.
2325 * search.c (lookup_member): Likewise.
2326 * semantics.c (finish_qualified_object_call_expr): Likewise.
2327 (finish_template_type_parm): Likewise.
2328 (begin_class_definition): Likewise.
2329 (finish_base_specifier): Likewise.
2331 * tree.c (build_cplus_method_type): Remove support for signatures.
2332 * typeck.c (require_complete_type): Likewise.
2333 (c_sizeof): Likewise.
2334 (c_alignof): Likewise.
2335 (build_object_ref): Likewise.
2336 (build_component_ref): Likewise.
2337 (build_indirect_ref): Likewise.
2338 (build_c_cast): Likewise.
2339 (build_modify_expr): Likewise.
2340 (convert_for_initialization): Likewise.
2341 * typeck2.c (signature_error): Remove.
2342 (store_init_value): Remove support for signatures.
2343 (digest_init): Likewise.
2344 (build_x_arrow): Likewise.
2345 (build_functional_cast): Likewise.
2346 * xref.c (GNU_xref_decl): Likewise.
2348 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2350 * lex.c (do_identifier): Remove unnecessary lookup of class field.
2352 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2354 * decl2.c (set_decl_namespace): Do not complain about non-matching
2355 decls if processing a template.
2357 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2359 * decl.c (build_ptrmemfunc_type): Handle qualified
2360 pointer-to-member types here.
2361 * tree.c (cp_build_qualified_type_real): Simplify handling here.
2363 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2365 * lex.c (lang_identify): Likewise.
2367 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
2369 * Makefile.in: Update dependencies.
2370 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2372 * decl.c: Include "function.h"
2373 (cleanup_label, return_label): Delete declarations.
2374 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2375 (finish_function): Rename last_parm_insn variable to
2376 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
2377 * decl2.c: Include "function.h".
2378 (rtl_expr_chain): Delete declaration.
2379 * method.c: Include "function.h"
2380 * tree.c (build_vbase_pointer_fields): Don't initialize
2381 DECL_SAVED_INSNS with NULL_RTX.
2382 * typeck.c: Include "function.h"
2384 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
2386 * semantics.c (begin_function_try_block, finish_function_try_block,
2387 finish_function_handler_sequence): New fns.
2388 * parse.y (function_try_block): Use them.
2389 * pt.c (instantiate_decl): Likewise.
2391 * cp-tree.h: Declare in_function_try_handler.
2392 * decl.c: Define it.
2393 (start_function): Clear it.
2394 (struct cp_function, push_cp_function_context): Save it.
2395 (pop_cp_function_context): Restore it.
2396 * parse.y (function_try_block): Set and clear it.
2397 * except.c (expand_end_catch_block): Rethrow if we reach the end
2398 of a function-try-block handler in a ctor or dtor.
2399 * typeck.c (c_expand_return): Complain about returning from a
2400 function-try-block handler of a ctor.
2402 * parse.y (function_try_block): Call end_protect_partials
2403 before expand_start_all_catch.
2405 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
2407 * decl.c (struct binding_level): Add eh_region field.
2408 (push_binding_level): Set it.
2409 (define_label): Complain about jumping into an EH block.
2411 * ptree.c (print_lang_type): Print the real type of a PMF.
2412 Print what exceptions a fn type throws.
2414 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2416 * class.c (count_fields, add_fields_to_vec): Add static prototype.
2418 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2419 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2422 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2425 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2428 * dump.c (queue_and_dump_index, dump_int, dump_string,
2429 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2431 (dump_stmt): Add static prototype.
2433 * errfn.c (cp_thing): Constify a char*.
2435 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2436 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2437 dump_expr): Constify a char*.
2439 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2440 read_line_number): Add static prototype.
2441 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2442 (real_yylex): Move label `letter' into the scope where it is used.
2444 * method.c (build_mangled_template_parm_index, build_overload_int,
2445 build_decl_overload_real, get_id_2): Constify a char*.
2447 * search.c (check_final_overrider): Make static.
2449 * typeck.c (composite_pointer_type): Constify a char*.
2451 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2453 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2454 we're looking at a class.
2456 * decl.c (lookup_name_real): Set the complain flag if we're
2457 looking for a namespace member.
2459 * lex.c (real_yylex): We can have a number with no digits.
2461 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2463 * search.c (binfo_from_vbase): New fn.
2464 * cp-tree.h: Declare it.
2465 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2466 from pointer to member of virtual base.
2467 * typeck.c (get_delta_difference): Likewise.
2469 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
2471 * pt.c (tsubst): Use build_index_type to build in-template array
2472 index type. Fixes g++.oliva/dwarf1.C.
2473 * decl.c (grokdeclarator): Likewise, just for consistency, as it
2474 doesn't seem to trigger the bug without it.
2476 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2478 * typeck2.c (add_exception_specifier): Use complete_type.
2480 1999-08-06 Mark Mitchell <mark@codesourcery.com>
2482 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2483 (dump_binary_op): Bulletproof.
2484 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2485 * tree.c (search_tree): Don't enumerate all the nodes of classes
2486 `1', `2', and `<'; handle them generically. Don't be sorry about
2487 "unrecognized tree codes"; just abort.
2488 (no_linkage_check): Don't do linkage checks for templates.
2490 * tree.c (cp_build_qualified_type_real): Handle
2491 pointer-to-member-function types correctly.
2493 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
2495 * decl.c (pushdecl): Only give an error for shadowing a parm
2496 from *this* function.
2498 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
2500 * typeck2.c: Update URLs and mail addresses.
2502 1999-08-04 Nathan Sidwell <nathan@acm.org>
2504 * cp-tree.h (empty_except_spec): New global var.
2505 (compexcepttypes): Remove prototype.
2506 (comp_except_specs): Prototype new global function.
2507 (add_exception_specifier): Prototype new global function.
2508 * decl.c (empty_except_spec): Define new global var.
2509 (duplicate_decls): Use comp_except_specs, reword error message.
2510 (init_decl_processing): Initialize empty_except_spec.
2511 Adjust build_exception_variant calls.
2512 * parse.y (exception_specification_opt): Use empty_except_spec.
2513 (ansi_raise_identifier): Call check_for_new_type.
2514 (ansi_raise_identifiers): Use add_exception_specifier.
2515 * pt.c (tsubst): Use add_exception_specifier to build exception
2517 * search.c (check_final_overrider): New static function, broken
2518 out of get_matching_virtual. Check throw specifiers, reword
2520 (get_matching_virtual): Use check_final_overrider.
2521 * tree.c (build_exception_variant): Use comp_except_specs.
2522 * typeck.c (compexcepttypes): Remove.
2523 (comp_except_types): New static function, helper for
2524 comp_except_specs. Compare two types as exception specifiers.
2525 (comp_except_specs): New global function, compare two exception
2527 (comptypes): Adjust for comp_except_specs.
2528 * typeck2.c (add_exception_specifier): New global function.
2530 * class.c (check_for_override): Reword error message.
2532 1999-08-03 Nathan Sidwell <nathan@acm.org>
2534 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2535 * cp-tree.h (struct lang_type): Added non_pod_class flag.
2536 (CLASSTYPE_NON_POD_P): New macro to access it.
2537 * class.c (finish_struct_1): Determine non-PODness.
2538 Check for arrays of pointers (-Weffc++).
2539 Remove array inspection duplicated code.
2540 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2541 Use CLASSTYPE_NON_POD_P.
2543 1999-08-03 Nathan Sidwell <nathan@acm.org>
2545 * class.c (duplicate_tag_error): Preserve template information.
2547 1999-08-03 Nathan Sidwell <nathan@acm.org>
2549 * decl.c (start_enum): Show location of previous definition.
2550 * parse.y (enumlist_opt): New reduction.
2551 (structsp): Simplify enum rules to use enumlist_opt.
2553 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
2555 * lex.c (yyprint): Handle PFUNCNAME.
2557 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2558 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2560 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
2562 * decl.c (start_decl): Set attributes before duplicate_decls call.
2564 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2566 * Make-lang.in (CXX_SRCS): Add dump.c.
2567 * Makefile.in (CXX_OBJS): Add dump.o.
2568 (dump.o): New target.
2569 * cp-tree.h (DECL_CONV_FN_P): Document.
2570 (DECL_OVERLOADED_OPERATOR_P): New function.
2571 (TYPE_PTRMEM_CLASS_TYPE): New macro.
2572 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2573 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2574 (ASM_VOLATILE_P): New macro.
2575 (STMT_LINENO): Likewise.
2576 (cp_namespace_decls): New function.
2577 (dump_node_to_file): New function.
2578 * decl.c (cp_namespace_decls): New function.
2579 (walk_namespaces_r): Use it.
2580 (wrapup_globals_for_namespace): Likewise.
2581 * decl2.c (flag_dump_translation_unit): New variable.
2582 (lang_decode_option): Handle -fdump-translation-unit.
2583 (finish_file): If flag_dump_translation_unit is set, dump the
2586 * lang-options.h: Add -fdump-translation-unit.
2587 * pt.c (tsubst_template_parms): Robustify.
2588 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2589 (tsubst_expr): Use STMT_LINENO.
2590 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
2591 for invalid cv-qualifiers even while building templates.
2593 1999-08-02 Richard Henderson <rth@cygnus.com>
2595 * call.c: Include defaults.h instead of expr.h.
2598 * typeck.c: Include defaults.h.
2600 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2602 * lex.c (errorcount, sorrycount): Don't declare.
2603 * repo.c (errorcount, sorrycount): Likewise.
2604 * typeck2.c (errorcount, sorrycount): Likewise.
2606 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2608 * call.c (convert_default_arg, build_over_call): Change all uses of
2609 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2610 Ensure expr.h is included.
2611 * decl.c (grokparams): Ditto.
2612 * pt.c (tsubst_decl): Ditto.
2613 * typeck.c (convert_arguments): Ditto.
2615 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
2617 * class.c (mark_overriders): Fix order of args to overrides.
2618 (warn_hidden): Likewise. Fix for having virtual and non-virtual
2619 functions with the same name.
2621 1999-08-02 Richard Henderson <rth@cygnus.com>
2623 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2625 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2627 * call.c (build_conditional_expr): Fix typo in comment.
2629 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
2631 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2632 case_stack; use in_control_zone_p.
2633 * typeck.c (c_expand_return): Likewise.
2635 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
2637 * except.c (catch_clauses): Delete declaration.
2639 1999-07-30 Mark Mitchell <mark@codesourcery.com>
2641 * call.c (build_conditional_expr): Call convert_from_reference to
2642 avoid reference/non-reference type confusion. Fix typo.
2644 1999-07-30 Richard Henderson <rth@cygnus.com>
2646 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2647 * cp-tree.h (initializer_constant_valid_p): Remove.
2649 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2651 * call.c (conditional_conversion): Don't build BASE_CONVs for
2652 conversions between things that have the same type.
2653 (build_conditional_expr): Tweak.
2654 (convert_like): Some BASE_CONVs really do require the generation
2657 * init.c (perform_member_init): Don't go through build_modify_expr
2658 for simple initializations.
2660 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
2662 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2663 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2664 virtual functions and MI. Simplify.
2666 * method.c: Remove prototype for largest_union_member.
2667 * pt.c (determine_specialization): Fix uninitialized warning.
2668 * lex.c (real_yylex): Likewise.
2670 1999-07-27 Mark Mitchell <mark@codesourcery.com>
2672 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2675 * cp-tree.h (BINFO_VIRTUALS): Document new format.
2676 * class.c (modify_one_vtable): Change prototype accordingly.
2677 (modify_all_vtables): Likewise.
2678 (modify_all_direct_vtables): Likewise.
2679 (modify_all_indirect_vtables): Likewise.
2680 (build_vtable_entry_for_fn): New function.
2681 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2682 (modify_vtable_entry): Likewise.
2683 (add_virtual_function): Likewise.
2684 (build_vtbl_initializer): New function.
2685 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2686 (fixup_vtable_deltas1): Likewise.
2687 (fixup_vtable_deltas): Likewise.
2688 (override_one_vtable): Likewise.
2689 (finish_struct_1): Likewise.
2691 * error.c (dump_expr): Likewise.
2692 * search.c (get_abstract_virtuals_1): Likewise.
2693 (get_abstract_virtuals): Likewise.
2694 (expand_upcast_fixups): Likewise.
2695 * tree.c (debug_binfo): Likewise.
2696 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2697 __pure_virtual here.
2699 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2701 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2702 as per 1999-07-26 change.
2704 * typeck.c (c_sizeof): Don't allow non-static data members.
2705 (expr_sizeof): Likewise.
2707 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
2709 * input.c (feed_input): Only touch lineno and input_filename
2710 if !USE_CPPLIB. Save the old values before setting the new ones.
2712 * input.c (feed_input): Add file, line parms.
2713 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2714 (real_yylex): Check linemode before input_redirected().
2716 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2717 from op new to warning.
2719 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2721 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2722 * call.c: All uses changed.
2723 * typeck.c: Likewise.
2725 1999-07-26 Nathan Sidwell <nathan@acm.org>
2727 * exception.cc (__cplus_type_matcher): Match __eh_matcher
2730 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2732 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2733 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2734 (strip_top_quals): Declare.
2735 (ncp_convert): Likewise.
2736 (type_after_usual_arithmetic_converions): Likewise.
2737 (composite_pointer_type): Likewise.
2738 * call.c (strip_top_quals): Don't make it static.
2739 (promoted_arithmetic_type_p): New function.
2740 (conditional_conversion): Likewise.
2741 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2742 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
2743 for converting a type to itself.
2744 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2745 (implicit_conversion): Make sure the from and to types are
2747 (add_builtin_candidate): Correct handling of ?: operator.
2748 (add_builtin_candidates): Improve documentation.
2749 (build_conditional_expr): New function.
2750 (can_convert): Implement in terms of can_convert_arg.
2751 (ncp_convert): New function.
2752 * typeck.c (type_after_usual_arithmetic_conversions): New
2753 function, split out from common_type.
2754 (composite_pointer_type): New function, split out from
2755 build_conditional_expr.
2756 (common_type): Use type_after_usual_arithmetic_conversions.
2757 Remove redundant attribute merging.
2758 (comptypes): Tidy. Handle COMPLEX_TYPE.
2759 (build_binary_op_nodefault): Use null_ptr_cst_p.
2760 (build_conditional_expr): Remove.
2761 (convert_for_assignment): Use new conversion functions.
2763 * cp-tree.h (abstract_virtuals_error): Change declaration.
2764 * typeck2.c (abstract_virtuals_error): Check to see if an error
2765 ocurred, and return a boolean value accordingly.
2766 (build_functional_cast): Adjust accordingly.
2767 * class.c (finish_struct_1): Likewise.
2768 * cvt.c (ocp_convert): Likewise.
2769 * decl.c (cp_finish_decl): Likewise.
2770 (grokparams): Likewise.
2771 (grok_op_properties): Likewise.
2772 (start_function): Likewise.
2773 * init.c (build_new_1): Likewise.
2775 * pt.c (unify): Don't get confused by pointers-to-member functions.
2777 * search.c (build_cplus_new): Robustify.
2779 1999-07-24 Richard Henderson <rth@cygnus.com>
2781 * gxx.gperf (__builtin_va_arg): New.
2782 * parse.y (VA_ARG): New token.
2783 (unary_expr): Recognize it.
2785 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2787 * g++FAQ.texi: Deleted per Joe Buck's request.
2788 * Makefile.in: Corresponding changes.
2790 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2792 * lex.c: Sync with C frontend.
2793 (whitespace_cr): New fn.
2794 (skip_white_space): Use it.
2795 (init_parse): Reorder.
2796 (yyprint): Support CONSTANT.
2797 (pragma_getc, pragma_ungetc): Bring back.
2798 (read_line_number): Change in_system_header directly.
2799 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2800 (parse_float): Update to C version.
2801 (yylex): Handle '$' under the letter case.
2802 Remove looking_for_typename handling.
2803 Support hex floating point constants.
2804 Follow C's lead for choosing type of integer constants.
2805 Rearrange stuff to match C frontend.
2806 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2807 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2809 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2811 * call.c (reference_binding): Tweak.
2812 (mayble_handle_implicit_object): Use direct_reference_binding to
2813 create the right implicit conversion sequence.
2815 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2817 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2818 if we're converting to a reference type.
2820 * call.c (NEED_TEMPORARY_P): New macro.
2821 (standard_conversion): Set it, for derived-to-base conversions.
2822 (reference_related_p): New function.
2823 (reference_compatible_p): Likewise.
2824 (convert_class_to_reference): Likewise.
2825 (direct_reference_binding): Likewise.
2826 (reference_binding): Rework for standards-compliance.
2827 (convert_like): Adjust accordingly.
2828 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2829 are now built up in reference_binding.
2830 (initialize_reference): New function.
2831 * cp-tree.h (ICS_USER_FLAG): Document.
2832 (ICS_THIS_FLAG): Likewise.
2833 (ICS_BAD_FLAG): Likewise.
2834 (NEED_TEMPORARY_P): Likewise.
2835 (cp_lvalue_kind): New type.
2836 (real_lvalue_p): Return it.
2837 * error.c (dump_expr): Provide more accurate representation for
2839 * init.c (expand_default_init): Do not try to perform implicit
2840 conversions for a brace-enclosed initializer.
2841 * search.c (lookup_conversions): Document.
2842 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2844 (real_lvalue_p): Adjust accordingly.
2845 (lvalue_p): Likewise.
2846 (build_cplus_new): Don't allow the creation of an abstract class.
2847 * typeck.c (convert_for_initialization): Use initialize_reference.
2849 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2851 * lex.c (real_yylex) : Correct the test for overflow when lexing
2854 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2856 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2857 not DECL_BUILT_IN, to determine if a function is internally declared.
2858 (duplicate_decls): Likewise. Improve handling of builtins.
2859 (push_overloaded_decl): Remove special handling of builtins.
2861 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2863 * decl.c (grokdeclarator): Pull out decl_constant_value in
2866 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2867 * cp-tree.h, pt.c, semantics.c: Adjust.
2868 * method.c (largest_union_member): Remove.
2870 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2872 * lex.c (token_getch, token_put_back): New fns.
2873 (real_yylex): Use them.
2875 * lex.c (lang_init): Generalize.
2876 (lang_init_options): Tell cpplib this is C++.
2877 (nextchar): Remove. Replace uses with put_back.
2878 (skip_white_space): Handle linemode here. Optimize for cpplib.
2879 (extend_token_buffer_to): New fn.
2880 (extend_token_buffer): Use it.
2881 (read_line_number, check_newline): Just deal with tokens.
2882 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2883 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2884 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2885 * parse.y (PAREN_STAR_PAREN): Remove.
2886 * input.c: Don't use the putback machinery with cpplib.
2887 (sub_getch): Fold back into getch.
2888 (getch): Don't handle linemode here.
2889 (feed_input): Unget any text in the token buffer.
2891 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2892 nextyychar, nextyylval): Remove.
2894 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2895 Jason Merrill <jason@yorick.cygnus.com>
2897 * lex.c (indent_level): New variable.
2898 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2899 (consume_string): Make this smart about USE_CPPLIB.
2900 (yyungetc): Use put_back function.
2901 (pragma_getc, pragma_ungetc): Functions deleted.
2902 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2903 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2905 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2906 Also, clean up cases where we redundantly set token_buffer[0].
2907 (read_line_number): New fn.
2908 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2909 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2910 (sub_getch): Conditionalize out code that's not appropriate if
2912 (put_back): Rewrite in case USE_CPPLIB is defined.
2913 (input_redirected): Ditto.
2915 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2917 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2918 c_global_trees and accessor macros defined in c-common.h.
2919 (cp_tree_index): New enumeration.
2920 (cp_global_trees): Declare new array. Add accessor macros for it, and
2921 delete declarations of tree nodes replaced by it.
2922 (builtin_function): Delete macro, add declaration for new function.
2924 * decl.c: Delete definitions for tree nodes that were replaced by
2925 cp_global_trees and c_global_trees.
2926 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2927 to generate the common builtins here.
2928 (builtin_function): New function.
2929 * decl2.c (abort_fndecl): Delete declaration.
2930 * except.c (expand_builtin_return_address): Delete declaration.
2931 (builtin_return_address_fndecl): Delete variable.
2932 (const_ptr_type_node): Delete declaration.
2933 * lex.c (cons_up_default_function): Delete declaration of
2935 * parse.y (void_list_node): Delete declaration.
2936 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2938 (const_string_type_node): Delete declaration.
2939 * search.c (abort_fndecl): Delete declaration.
2940 * Makefile.in: Update dependencies.
2942 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2944 * pt.c (check_default_tmpl_args): Move test for missing default
2945 arguments here, from ...
2946 (end_template_parm_list): Here.
2948 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2950 * decl.c (lookup_nested_type): Remove.
2951 (pushtag): Don't call it.
2953 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2955 * Makefile.in (INTERFACE): Bump to 2.
2957 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2959 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2960 instructions to gcc.gnu.org. Removed e-mail address.
2962 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2964 * pt.c (determine_specialization): Tighten error-checking.
2965 (end_template_parm_list): Likewise.
2967 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2969 * pt.c (check_default_tmpl_args): Handle friends defined in the
2970 class just like member functions defined in the class.
2972 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2973 Jason Merrill <jason@yorick.cygnus.com>
2975 * cp-tree.h (struct lang_decl): Added field for storing sorted
2976 FIELD_DECLs (used in TYPE_DECLs).
2977 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2978 (DECL_SORTED_FIELDS): New macro.
2979 * class.c (method_name_cmp): New function.
2980 (finish_struct_methods): Modified to support sorting and searching
2982 (finish_struct_anon): Changed code in inner loop to use ELT rather
2983 than UELT (which required an extra indirection for every reference).
2984 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2985 (finish_struct_1): Sort fields.
2986 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2987 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2988 Also, switch to using array indexing rather than a changing pointer.
2989 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2992 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2994 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2995 casts in system headers or extern "C" blocks.
2997 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3000 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
3002 * decl2.c (write_virtuals): Deleted declaration.
3003 * cp-tree.h (write_virtuals): Deleted extern declaration.
3004 * class.c (finish_struct_1): Removed #if 0'd code that mentions
3006 * semantics.c (begin_class_definition): Rewrite code to not depend
3009 * lex.c (cp_pragma_interface): New function.
3010 (cp_pragma_implementation): Likewise.
3011 (handle_cp_pragma): Call them.
3013 * typeck.c (comptypes): Simplify C code in look_hard.
3015 * xref.c (PALLOC): Use xcalloc, not calloc.
3016 (SALLOC): Use xmalloc, not malloc.
3018 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3020 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3023 * decl.c (duplicate_decls): If a redeclaration doesn't match the
3024 initial declaration, then don't save the inline info and by all
3025 means don't mark the function as a builtin function.
3027 * decl.c (lookup_name_real): Set NONCLASS to 1 if
3028 CURRENT_CLASS_TYPE is 0.
3030 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3033 * ptree.c (print_lang_type): Added vtable-needs-writing.
3035 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
3037 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3039 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
3041 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3042 Merged into c-common.
3044 1999-07-05 Dave Brolley <brolley@cygnus.com>
3046 * lex.c (errorcount): Declare it.
3047 (finish_parse): Update errorcount for when using CPPLIB.
3049 1999-07-05 Mark Mitchell <mark@codesourcery.com>
3051 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3053 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3054 * decl.c (push_class_binding): Use it.
3055 (lookup_name_real): Likewise.
3057 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
3059 * cp-tree.h (widest_integer_literal_type_node,
3060 widest_unsigned_literal_type) : New.
3061 * decl.c (widest_integer_literal_type_node,
3062 widest_unsigned_literal_type) : New.
3063 (init_decl_processing): Handle/use the two new types.
3064 * lex.c (real_yylex): Same.
3065 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3068 1999-07-01 Mark Mitchell <mark@codesourcery.com>
3070 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3071 to anonymous cv-qualified types.
3073 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
3075 * lex.c (real_yylex) : Change integer literal overflow handling to
3078 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3080 1999-06-28 Richard Henderson <rth@cygnus.com>
3082 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3084 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
3086 * error.c (dump_type_real): Handle TREE_LIST again.
3088 * typeck.c (comp_target_parms): Don't complain about
3089 converting from () to (...) if !flag_strict_prototype.
3091 * decl.c (grokdeclarator): Update the names of all variants when
3094 1999-06-21 Mark Mitchell <mark@codesourcery.com>
3096 * init.c (expand_aggr_vbase_init): Rename to
3097 construct_virtual_bases. Conditionalize construction here,
3099 (emit_base_init): Here.
3101 1999-06-19 Mark Mitchell <mark@codesourcery.com>
3103 * semantics.c (finish_asm_statement): Apply decay conversions to
3106 * decl.c (expand_static_init): When building an anonymous function
3107 for use with atexit, compute its body before and after entering
3110 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3113 1999-06-18 Mark Mitchell <mark@codesourcery.com>
3115 * init.c (expand_aggr_vbase_init): Add flag parameter.
3116 (build_partial_cleanup_for): Remove, inlining into ..
3117 (expand_cleanup_for_base): ... here. Take flag parameter.
3118 (emit_base_init): Pass the in_chrg parameter to
3119 emit_aggr_vbase_init.
3120 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3122 1999-06-16 Mark Mitchell <mark@codesourcery.com>
3124 * decl2.c (import_export_decl): Use same_type_p, rather than
3125 relying on pointer-equality for types.
3127 * method.c (do_build_copy_constructor): Simplify.
3129 * call.c (build_method_call): Remove bogus code for two-argument
3131 * init.c (build_new_1): Expand on comment, and remove dead code.
3133 * init.c (expand_cleanup_for_base): New function, split out
3135 (emit_base_init): Here.
3136 (expand_aggr_vbase_init): Use it.
3138 1999-06-15 Mark Mitchell <mark@codesourcery.com>
3140 * cp-tree.h (class_cache_firstobj): Declare.
3141 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3142 * class.c (permanent_obstack): Remove declaration.
3143 (class_cache_firstobj): Make it global.
3144 (add_method): Don't use permanent_obstack directly.
3145 (pushclass): Only free the class_cache_obstack if we know how far
3147 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3148 * decl.c: Remove dead comment.
3149 (saved_scope): Add class_cache_firstobj.
3150 (push_to_top_level): Save it.
3151 (pop_from_top_level): Restore it.
3152 (push_class_level_binding): Use push_cache_obstack, not
3153 maybe_push_cache_obstack.
3154 * search.c (push_class_decls): Likewise.
3156 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3158 * pt.c (tsubst_friend_function): Push into namespace of friend
3159 function before pushdecl'ing it.
3161 1999-06-14 Nathan Sidwell <nathan@acm.org>
3163 * call.c (build_new_op): Remove REF_BIND from all operands.
3165 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
3167 * init.c (build_new_1): Look up operator delete even if there was
3168 no explicit new placement.
3170 1999-06-08 Nathan Sidwell <nathan@acm.org>
3172 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3174 (build_throw): ... here. Call it.
3175 (process_start_catch_block): Call it.
3177 1999-06-07 Mark Mitchell <mark@codesourcery.com>
3179 * search.c (convert_pointer_to_single_level): Reimplement without
3182 1999-06-06 Mark Mitchell <mark@codesourcery.com>
3184 * method.c (is_back_referenceable_type): Back-reference bools when
3187 1999-06-07 Dave Brolley <brolley@cygnus.com>
3189 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3190 * input.c (putback_buffer): New structure type.
3191 (putback): Replaces putback_char member.
3192 (putback): Replaces putback_char static variable.
3193 (feed_input): Use putback.
3194 (end_input): Use putback.
3195 (sub_getch): Use putback.
3196 (put_back): Use putback.
3198 1999-06-05 Mark Mitchell <mark@codesourcery.com>
3200 * decl.c (grokdeclarator): Fix typo in last change.
3202 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
3204 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3205 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3207 1999-06-04 Nathan Sidwell <nathan@acm.org>
3209 * except.c (build_throw): Check throw expression validity.
3211 1999-06-03 Mark Mitchell <mark@codesourcery.com>
3213 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3214 just because flag_signed_bitfields is false.
3216 1999-06-03 Nathan Sidwell <nathan@acm.org>
3218 * semantics.c (begin_class_definition): Update the struct's
3220 * class.c (finish_struct): ... rather than here.
3222 * decl.c (make_typename_type): Don't rely on uninitialized
3225 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3227 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3229 1999-05-31 Mark Mitchell <mark@codesourcery.com>
3231 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3232 and friends rather than messing with current_obstack directly.
3233 (cp_build_qualified_type_real): Rework ARRAY_TYPE
3234 allocation to match practice throughout the rest of the
3237 1999-05-30 Mark Mitchell <mark@codesourcery.com>
3239 * lex.c (make_lang_type): Create TYPE_BINFO for
3240 TEMPLATE_TYPE_PARMs just like for non-template types.
3242 * decl.c (start_decl): Move checks on initialization to ...
3243 (cp_finish_decl): Here. Tidy formatting slightly.
3245 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3247 * decl.c (add_binding): Don't complain about a redeclaration of a
3248 semantically identical typedef in a local scope.
3250 1999-05-28 Nathan Sidwell <nathan@acm.org>
3252 * decl.c (complete_array_type): Allocate off same obstack. Fix
3253 DO_DEFAULT comment to match reality.
3255 * friend.c (make_friend_class): Fix diagnostic typo.
3257 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3259 * decl.c (lookup_namespace_name): Handle getting a
3261 (expand_static_init): Don't call pushdecl for implicitly declared
3262 `atexit' used to register destructors.
3264 1999-05-25 Mark Mitchell <mark@codesourcery.com>
3266 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3269 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3270 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
3271 by combining TEMPLATE_INFO and LEVEL into a single union.
3272 (DECL_TEMPLATE_INFO): Reformat.
3273 (DECL_SAVED_TREE): Document.
3274 (DECL_TEMPLATE_INJECT): Remove.
3275 * class.c (finish_struct): Remove code to deal with
3276 DECL_TEMPLATE_INJECT.
3278 * decl.c (maybe_process_template_type_declaration): Handle all new
3279 types in templates uniformly.
3280 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3282 * pt.c (lookup_template_class): Inject template instantiations of
3283 forward-declarations.
3284 (instantiate_class_template): Remove code processing
3285 DECL_TEMPLATE_INJECT.
3287 * pt.c (lookup_template_class): Tweak lookup to find member
3290 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3292 * semantics.c (finish_asm_stmt): Make strings permanent if they're
3295 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
3297 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3298 parts of pointer to data member types.
3300 1999-05-24 Mark Mitchell <mark@codesourcery.com>
3302 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3303 and then make it look like `abort'. Just use `abort' instead.
3305 * typeck.c (build_static_cast): Don't allow static_casts that cast
3307 (casts_away_constness_r): New function.
3308 (casts_away_constness): Likewise.
3310 * decl.c (lookup_tag): Remove code no longer needed after
3311 name-lookup improvements.
3312 * decl2.c (handle_class_head): Make error-recovery more robust.
3313 * friend.c (make_friend_class): Reject templated typename types.
3314 * lex.c (is_global): A template parameter isn't global.
3315 * parse.y (class_head): Robustify.
3316 * parse.c: Regenerated.
3318 1999-05-22 Mark Mitchell <mark@codesourcery.com>
3320 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3321 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
3323 * cp-tree.h (push_nested_namespace): Declare.
3324 (pop_nested_namespace): Likewise.
3325 * decl.c (push_nested_namespace): New function.
3326 (pop_nested_namespace): Likewise.
3327 * pt.c (instantiate_class_template): Use them.
3329 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3331 * cp-tree.h (cplus_expand_constant): Declare.
3332 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3333 converted from one pointer-to-object type to another.
3334 * expr.c (cplus_expand_constant): Don't make it static.
3335 * typeck.c (build_component_ref): Don't crash when presented with
3336 a component which is a TEMPLATE_DECL.
3337 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
3338 cast from a pointer-to-member constant to its own type does not
3339 result in a valid non-type template argument.
3341 1999-05-21 Mark Mitchell <mark@codesourcery.com>
3342 Nathan Sidwell <nathan@acm.org>
3344 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3345 * cp-tree.h: Fix typo in documentation on pointers-to-members.
3346 (cp_build_qualified_type): Make it a macro.
3347 (cp_build_qualified_type_real): Declare.
3348 * decl.c (grokdeclarator): Remove misleading comment. Avoid
3349 problem with template parameters and restrict-qualification.
3350 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3351 * hash.h: Regenerated.
3352 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3354 (NORID): Remove definition.
3355 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3356 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
3357 (fn_type_unification): Check that the function type resulting from
3358 the deduction is legal.
3359 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3360 (unify): Use cp_build_qualified_type_real.
3361 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3362 (cp_build_qualified_type): Rename to ...
3363 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3364 and modify appropriately.
3366 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3367 reveal optimization opportunities.
3369 * pt.c (tsubst): Don't issue error messages when we're not
3370 complaining, even if we see a qualified function type.
3371 (check_cv_quals_for_unify): Don't allow a qualified function
3374 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3376 * class.c (instantiate_type): Downgrade errors for object-dependent
3377 memfn refs to pedwarn.
3379 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3381 * decl.c (grokdeclarator): Don't treat [] as indicating a
3382 zero-sized array in a typedef.
3384 * call.c (build_object_call): Don't look at DECL_NAME for a type.
3385 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3386 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3388 * pt.c (for_each_template_parm): Rework to match documentation.
3389 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3391 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3393 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3395 * class.c (finish_base_struct): Allow non-COM bases for COM classes
3396 except at the leftmost position.
3397 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3398 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3399 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3401 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3402 (build_cplus_new): Make sure that what we return is of the right type.
3404 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3406 * cp-tree.h (make_ptrmem_cst): New function.
3407 * expr.c (cplus_expand_constant): Split out from ...
3408 (cplus_expand_expr): Here. Use cplus_expand_constant.
3409 (init_cplus_expand): Set lang_expand_constant.
3410 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3412 * tree.c (make_ptrmem_cst): Define.
3413 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3414 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3416 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3418 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3420 * decl2.c (start_static_storage_duration_function): Fix comment.
3421 (finish_file): Create static storage duration functions lazily.
3423 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3425 Implement anonymous structs.
3426 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3427 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3428 * class.c (finish_struct_1): Remove redundant check for anon struct.
3429 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3430 (check_tag_decl): Check for anonymous struct here.
3431 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3432 * init.c (sort_member_init, emit_base_init): Handle getting fields
3433 as well as names in current_member_init_list.
3434 (perform_member_init): Handle getting an anon aggr.
3435 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3436 (do_build_copy_constructor): Likewise.
3438 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3440 * tree.c (cp_build_qualified_type): Don't allow qualified function
3443 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
3445 * gxxint.texi: Fix typo.
3447 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3449 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3450 * class.c (finish_struct_1): Use CLASS_TYPE_P.
3451 * ptree.c (print_lang_type): Likewise.
3452 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3454 * typeck2.c (digest_init): Likewise.
3456 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
3458 * call.c (joust): Compare the types of the conv ops, not the
3459 target types of the conversions.
3461 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
3463 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3466 1999-05-17 Mark Mitchell <mark@codesourcery.com>
3468 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3469 * decl.c (grokfndecl): Don't allow inline declarations of friend
3470 template specializations, or friend template specializations with
3472 * pt.c (tsubst): Handle substitution into array types that does
3473 not yield a fixed upper bound, even when not processing a
3475 (tsubst_copy): Deal with the fact that the second operand to a
3476 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3477 * search.c (marked_pushdecls_p): Don't descend into
3478 TEMPLATE_TYPE_PARMs and the like.
3479 (unmarked_pushdecls_p): Likewise.
3481 * call.c (build_over_call): Don't throw away
3482 initializations/copies of empty classes; use MODIFY_EXPR and
3483 INIT_EXPR as for non-empty classes.
3484 * class.c (finish_struct_1): Put the padding byte for an empty
3485 class on the TYPE_NONCOPIED_PARTS list for the class.
3487 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3489 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3490 indicate a reference to a field that is a qualified name.
3492 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
3494 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3495 ASM_OUTPUT_CONSTRUCTOR.
3497 * friend.c (do_friend): Add attrlist arg. Remove support for
3498 getting a non-decl as 'decl'.
3499 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
3501 (grokdeclarator): Adjust.
3502 * cp-tree.h: Adjust.
3504 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3506 * cp-tree.h (permanent_p): New function.
3507 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3508 possibly complex tree node.
3509 * tree.c (mapcar): Adjust comments, and follow coding standards in
3511 (permanent_p): New function.
3513 1999-05-13 Per Bothner <bothner@cygnus.com>
3515 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
3516 primitive Java types, if we actually see `extern "Java"'.
3518 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3520 * lang-specs.h: Pass -$ to the preprocessor.
3522 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
3524 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3525 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3526 (resolve_offset_ref): Don't handle a raw baselink.
3527 * cvt.c (build_expr_type_conversion): Likewise.
3528 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3529 convert_for_initialization): Likewise.
3530 * class.c (instantiate_type): Handle seeing a baselink under an
3532 * error.c (dump_expr): Likewise.
3533 * pt.c (for_each_template_parm): Likewise.
3534 (resolve_overloaded_unification): Likewise.
3535 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3536 * typeck.c (expr_sizeof): Also complain about other permutations
3537 of overloaded functions.
3539 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
3541 * init.c (resolve_offset_ref): Don't return a raw method.
3543 * typeck.c (decay_conversion): Don't handle a raw method.
3544 Resolve all OFFSET_REFs.
3545 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3546 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
3547 same_type_p for pmf bits. Don't use build_binary_op to compare
3548 raw pointers to methods.
3549 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3550 to decide when to call resolve_offset_ref.
3551 (build_c_cast, convert_for_initialization): Likewise.
3552 * cvt.c (build_expr_type_conversion): Likewise.
3554 1999-05-06 Nathan Sidwell <nathan@acm.org>
3556 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3558 1999-05-05 Mark Mitchell <mark@codesourcery.com>
3560 * decl2.c (start_objects): Don't let static constructors and
3561 destructors get inlined.
3563 * parse.y (nested_name_specifier): Make sure ordinary types are
3564 complete, just like template types.
3565 * parse.c: Regenerated.
3567 * pt.c (check_explicit_specialization): Improve error messages.
3569 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
3571 * typeck.c (string_conv_p): Use same_type_p to check whether we
3572 try to convert between char and wchar_t.
3574 1999-05-03 Mark Mitchell <mark@codesourcery.com>
3576 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3577 lookup to error_mark_node here.
3578 (lookup_member): Revise documentation. Add comments. Don't set
3579 the TREE_TYPE to error_mark_node here, and don't build up an extra
3580 TREE_LIST for ambiguous lookups.
3581 (setup_class_bindings): Adjust accordingly.
3582 (push_class_decls): Revise out-of-date comments.
3584 * typeck.c (build_const_cast): Tighten checks for legality.
3586 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3588 * init.c (build_member_call): Lookup names coming from
3589 namespace-scoped LOOKUP_EXPR.
3591 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
3593 * gxxint.texi: Add documentation for 'I'.
3595 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3597 * tinfo.cc (operator==): Qualify type_info with std::.
3599 1999-05-02 Mark Mitchell <mark@codesourcery.com>
3601 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
3602 (DECL_COMDAT): Remove definition.
3604 1999-05-01 Mark Mitchell <mark@codesourcery.com>
3606 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3609 1999-04-30 Mark Mitchell <mark@codesourcery.com>
3611 * class.c (build_vtable): Use build_lang_decl when building
3612 vtables, not just build_decl.
3613 (prepare_fresh_vtable): Likewise.
3614 * decl.c (wrapup_globals_for_namespace): Mark vtables as
3615 DECL_EXTERNAL when calling wrapup_global_declarations.
3616 * decl2.c (priority_info_s): Add initializations_p and
3617 destructions_p members.
3618 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3619 when deciding what vtables to write out.
3620 (ssdf_decls): New variable.
3621 (ssdf_decls_used): Likewise.
3622 (start_static_storage_duration_function): Deal with being called
3623 multiple times. Avoid inlining this function.
3624 (generate_inits_for_priority): Deal with reuse of priority map.
3625 (get_priority_info): Clear initializations_p and destructions_p.
3626 (do_static_initialization): Tweak comment.
3627 (do_static_destruction): Likewise. Fix condition on sentries for
3629 (generate_ctor_or_dtor_function): Call all of the static storage
3631 (generate_ctor_or_dtor_function_for_priority): Check
3632 initializations_p and destructions_p to see what priorities need
3633 initialization functions.
3634 (finish_file): Rework to generate multiple static storage duration
3635 functions, rather than just one.
3637 * typeck.c (build_const_cast): Tweak last change to handle
3638 templates correctly.
3640 * typeck.c (build_const_cast): Disallow use of const_cast to
3641 anything but a pointer or reference type.
3643 1999-04-30 Nathan Sidwell <nathan@acm.org>
3645 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3648 1999-04-29 Mark Mitchell <mark@codesourcery.com>
3650 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3651 (finish_file): Indent comments properly.
3653 1999-04-29 Richard Henderson <rth@cygnus.com>
3655 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3656 (do_static_destruction): Likewise.
3658 1999-04-29 Nathan Sidwell <nathan@acm.org>
3660 * cp-tree.h (TYPE_NOTHROW_P): New macro.
3661 * decl2.c (delete_sanity): Warn on deleting void *.
3662 * init.c (build_new_1): Use TYPE_NOTHROW_P.
3663 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3664 throwing operator new.
3666 1999-04-28 Nathan Sidwell <nathan@acm.org>
3668 * cp-tree.h (build_component_addr): Remove prototype.
3669 * typeck.c (build_component_addr): Make static. Remove MSG
3671 (build_component_addr): Remove MSG parameter, clean up
3673 (build_x_function_call): Use cp_error.
3674 (build_unary_op): Adjust call of build_component_addr.
3676 1999-04-28 Mark Mitchell <mark@codesourcery.com>
3678 * pt.c (tsubst_friend_class): Check for NULL.
3680 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3682 * search.c (binfo_for_vtable): Initialize bfvi.var.
3684 1999-04-27 Nathan Sidwell <nathan@acm.org>
3686 * rtti.c (build_x_typeid): Check rtti is enabled.
3688 1999-04-26 Mark Mitchell <mark@codesourcery.com>
3690 * search.c (is_subobject_of_p): Make sure we're looking at the
3693 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
3695 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3697 1999-04-23 Mark Mitchell <mark@codesourcery.com>
3699 * decl2.c (finish_file): Tweak handling of extern inlines so that
3700 they are not unnecessarily put out.
3702 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3703 such as base classes.
3705 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
3707 * tree.c (build_exception_variant): Fix typo: use the chain of U,
3708 not trying V, while cycling through U.
3710 1999-04-22 Mark Mitchell <mark@codesourcery.com>
3712 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3713 preserves_first_arg. Enlarge dummy accordingly.
3714 (DECL_TINFO_FN_P): New macro.
3715 (SET_DECL_TINFO_FN_P): Likeiwse.
3716 (DECL_RETURNS_FIRST_ARG): Remove.
3717 (DECL_PRESERVES_THIS): Likewise.
3718 (DECL_INIT_PRIORITY): New macro.
3719 (finish_struct_1): Change prototype.
3720 (cat_namespace_levels): Remove prototype.
3721 (vtable_decl_p): New prototype.
3722 (vtype_decl_p): Likewise.
3723 (sigtable_decl_p): Likewise.
3724 (walk_globals_pred): New typedef.
3725 (walk_globals_fn): Likewise.
3726 (walk_globals): New prototype.
3727 (walk_namespaces_fn): New typedef.
3728 (walk_namespaces): New prototype.
3729 (wrapup_globals_for_namespace): Likewise.
3730 (walk_vtables): Remove prototype.
3731 (walk_sigtables): Likewise.
3732 (instantiate_pending_templates): New prototype.
3733 * class.c (finish_struct_1): Don't return a value.
3734 * decl.h (pending_statics): Remove declaration.
3735 * decl.c (walk_namespaces_r): New function.
3736 (walk_globals_r): Likewise.
3737 (vtable_decl_p): Likewise.
3738 (vtype_decl_p): Likewise.
3739 (sigtable_decl_p): Likewise.
3740 (walk_namespaces): Likewise.
3741 (walk_globals_data): New type.
3742 (walk_globals): New function.
3743 (wrapup_globals_for_namespace): Likewise.
3744 (expand_static_init): Remove assertion. Remove redundancy in
3745 conditional. Don't put static data members in static_aggregates
3747 (finish_function): Remove redundancy in conditional. Don't set
3748 DECL_RETURNS_FIRST_ARG.
3749 (cat_namespace_levels): Remove.
3750 * decl2.c: Include splay-tree.h and varray.h.
3751 (priority_info_s): New structure.
3752 (finish_vtable_vardecl): Change prototype. Adjust for new calling
3754 (prune_vtable_vardecl): Likewise.
3755 (finish_sigtable_vardecl): Likewise.
3756 (setup_initp): Remove.
3759 (start_static_storage_duration_function): New function.
3760 (generate_inits_for_priority): Likewise.
3761 (finish_static_storage_duration_function): Likewise.
3762 (get_priority_info): Likewise.
3763 (do_static_initialization): Likewise.
3764 (do_static_destruction): Likewise.
3765 (do_static_initialization_and_destruction): Likewise.
3766 (generate_ctor_or_dtor_function): Likewise.
3767 (generate_ctor_and_dtor_functions_for_priority): Likewise.
3768 (pending_statics): Make it a varray.
3769 (pending_statics_used): New variable.
3770 (saved_inlines): Make it a varray.
3771 (saved_inlines_used): New variable.
3772 (finish_static_data_member): Change method of updating
3774 (mark_inline_for_output): Remove #if 0'd code. Change method of
3775 updating saved_inlines.
3776 (walk_vtables): Remove.
3777 (walk_sigtables): Likewise.
3778 (import_export_decl): Use DECL_TINFO_FN_P.
3779 (pending_templates): Remove declaration.
3780 (maybe_templates): Likewise.
3781 (static_aggregates_initp): Likewise.
3782 (setup_initp): Likewise.
3783 (finish_objects): Simplify.
3784 (INITIALIZE_P_IDENTIFIER): New macro.
3785 (PRIORITY_IDENTIFIER): New macro.
3786 (SSDF_IDENTIFIER): New macro.
3787 (initialize_p_decl): New variable.
3788 (priority_decl): Likewise.
3789 (ssdf_decl): Likewise.
3790 (priority_info_map): Likewise.
3791 (finish_file): Recode output of static intializers and other
3792 file-scope finalization tasks.
3793 * error.c (OB_END_TEMPLATE_ID): New macro.
3794 (dump_type_real): Use it.
3795 (dump_decl): Likewise.
3796 (dump_function_name): Likewise.
3797 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3799 (check_newline): Use walk_globals, not walk_vtables.
3800 * pt.c (pending_tempalte_expansions): Remove.
3801 (set_vardecl_interface_info): Likewise.
3802 (pending_templates): Make static.
3803 (maybe_templates): Likewise.
3804 (instantiate_class_template): Adjust call to finish_struct_1.
3805 (instantiate_pending_templates): New function.
3806 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3807 * tree.c (static_aggregates_initp): Remove.
3808 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3810 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3812 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3813 with the RTL code RETURN.
3814 * hash.h: Regenerated.
3815 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3816 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3817 * parse.c: Regenerated.
3818 * pt.c: Include varray.h. Include rtl.h since varray.h requires
3820 (inline_parm_levels): New variable.
3821 (inline_parm_levels_used): Likewise.
3822 (maybe_begin_member_template_processing): Update them.
3823 (maybe_end_member_template_processing): Use them, rather than
3824 guessing how many levels to pop.
3826 * decl.c (make_typename_type): Tighten error-checking.
3828 1999-04-20 Mark Mitchell <mark@codesourcery.com>
3830 * cp-tree.h (build_binary_op): Remove unneeded parameter.
3831 * class.c (build_vrable_entry_ref): Adjust call to
3833 * decl.c (expand_static_init): Likewise.
3834 (grokdeclarator): Likewise.
3835 (finish_function): Likewise.
3836 * decl2.c (delete_sanity): Likewise.
3837 (do_dtors): Likewise.
3838 (do_ctors): Likewise.
3839 * error.c (dump_type_suffix): Likewise.
3840 * expr.c (cplus_expand_expr): Likewise.
3841 * init.c (resolve_offset_ref): Likewise.
3842 (build_new): Likewise.
3843 (build_new_1): Likewise.
3844 (build_vec_delete_1): Likewise.
3845 (expand_vec_init_catch_clause): Likewise.
3846 (build_delete): Likewise.
3847 * pt.c (tsubst): Likewise.
3848 * rtti.c (synthesize_tinfo_fn): Likewise.
3849 * search.c (expand_upcast_fixups): Likewise.
3850 (expand_direct_vtbls_init): Likewise.
3851 * typeck.c (get_member_function_from_ptrfunc): Likewise.
3852 (build_binary_op_nodefault): Likewise.
3853 (point_int_sum): Likewise.
3854 (pointer_diff): Likewise.
3855 (build_unary_op): Likewise.
3856 (build_modify_expr): Likewise.
3857 (get_delta_difference): Likewise.
3858 (build_ptrmemfunc): Likewise.
3859 (expand_ptrmemfunc_cst): Likewise.
3861 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
3863 * decl.c (grokfndecl): Always call cplus_decl_attributes.
3864 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3866 1999-04-19 Mark Mitchell <mark@codesourcery.com>
3868 * cp-tree.h (finish_static_data_member_decl): New function.
3869 * decl2.c (finish_static_data_member_decl): Split out from ...
3871 * pt.c (instantiate_class_template): Use it here instead of
3873 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3874 finish_static_data_member_decl will do that. Explicit set
3875 DECL_EXTERNAL to match non-template processing.
3877 1999-04-18 Mark Mitchell <mark@codesourcery.com>
3879 * cp-tree.h (finish_class_definition): Add parameter.
3880 * parse.y (structsp): Use it. Don't call pop_scope here.
3881 * parse.c: Regenerated.
3882 * semantics.c (finish_class_definition): Pop it here.
3884 1999-04-17 Mark Mitchell <mark@codesourcery.com>
3886 * decl.c (xref_tag): Revise handling of nested template
3888 * pt.c (check_explicit_specialization): Tweak handling of friend
3889 templates in template classes.
3890 (tsubst_friend_class): Handle friend declarations for nested
3891 member template classes.
3893 1999-04-16 Mark Mitchell <mark@codesourcery.com>
3895 * class.c (finish_struct): Remove unused variable.
3896 (pushclass): Likewise.
3897 (invalidate_class_lookup_cache): Likewise.
3898 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3899 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3900 doesn't get obliterated.
3901 (make_typename_type): Handle template classes correctly.
3903 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3904 (storetags): Declare.
3905 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3906 (pushclass): Likewise. Use storetags to install tag declarations,
3908 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3909 * decl.c (storetags): Make it global.
3910 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3911 implicit typename declaration.
3912 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
3913 * method.c (hack_identifier): Likewise.
3914 * search.c (lookup_member): Likewise.
3916 * decl.c (warn_about_implicit_typename_lookup): New function.
3917 (lookup_name_real): Use it. Rework handling of implicit typename
3920 1999-04-15 Mark Mitchell <mark@codesourcery.com>
3922 * cp-tree.h (lookup_nested_field): Remove.
3923 * class.c (push_nested_class): Handle UNION_TYPEs.
3924 (pop_nested_class): Likewise.
3925 * decl.c (lookup_name_real): Don't call lookup_nested_field.