1 1999-09-30 Mark Mitchell <mark@codesourcery.com>
3 * decl.c (initialize_local_var): Handle static variables here.
4 (cp_finish_decl): Tweak handling of function-scope static
6 * semantics.c (expand_stmt): Handle DECL_STMTs for static
9 * method.c (emit_thunk): Don't crash when -fsyntax-only.
11 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
12 global_dtor_p. Add init_priority.
13 (DECL_ACCESS): Adjust accordingly.
14 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
15 (GLOBAL_INIT_PRIORITY): Likewise.
16 * decl.c (lang_mark_tree): Adjust accordingly.
17 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
18 and GLOBAL_INIT_PRIORITY.
19 * dump.c (dequeue_and_dump): Print them.
20 * ir.texi: Document them.
22 * decl2.c (struct priority_info_s): Remove initialization_sequence
23 and destruction_sequence.
24 (start_static_storage_duration_function): Return the body of the
25 function. Convert for function-at-a-time mode.
26 (generate_inits_for_priority): Remove.
27 (finish_static_storage_duration_function): Change prototype.
28 Adjust for function-at-a-time mode.
29 (do_static_initialization): Likewise.
30 (do_static_destruction): Likewise.
31 (do_static_initialization_and_destruction): Remove.
32 (start_static_initialization_or_destruction): New function.
33 (finish_static_initialization_or_destruction): Likewise.
34 (get_priority_info): Don't manipulation initialization_sequence or
36 (prune_vars_needing_no_initialization): New function.
37 (write_out_vars): Likewise.
38 (finish_file): Use the various new functions instead of the old.
40 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
42 * cp-tree.h (warn_float_equal): Declare.
43 * decl2.c (warn_float_equal): Define.
44 (lang_decode_option): Recognize -W[no-]float-equal.
45 * typeck.c (build_binary_op_nodefault): Conditionally warn
46 about equality tests of floating point types.
48 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
50 Support normal type_info-based EH mechanisms with -fno-rtti.
51 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
52 (build_eh_type_type_ref): Likewise.
53 (build_eh_type): Remove.
54 (expand_throw): Call build_eh_type_type, not build_eh_type.
55 * decl2.c (import_export_decl): Don't associate the tinfo fn with
56 the vtable if -fno-rtti.
57 * decl.c (init_decl_processing): Always init_rtti_processing.
59 * rtti.c (get_typeid): Don't complain about -fno-rtti.
61 * class.c (class_cache_obstack, class_obstack): Remove.
62 (init_class_processing): Don't initialize class_obstack.
63 (push_cache_obstack): Remove.
64 (pushclass): Don't call it.
65 * cp-tree.h: Remove prototype for push_cache_obstack.
66 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
67 (pushlevel_class): Don't push_decl_level.
68 (poplevel_class): Don't pop_stack_level.
69 (push_class_level_binding): Don't push_cache_obstack.
70 (init_decl_processing): Don't intialize decl_obstack.
71 * search.c (push_class_decls): Don't push_cache_obstack.
72 * tree.c (list_hash_add): Put hash node on permanent_obstack.
73 (hash_tree_cons): Don't mess with obstacks.
74 (print_lang_statistics): Don't print stats for class_obstack and
77 1999-09-29 Mark Mitchell <mark@codesourcery.com>
79 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
80 * ir.texi: Document DECL_EXTERNAL.
82 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
83 * ir.texi: Document THUNK_DECLs.
85 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
86 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
87 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
88 * error.c (dump_template_bindings): Remove unused parameter.
89 Handle multiple levels of template parameters.
90 (dump_template_decl): Use `parms', not `args', for template
91 parameters. Fix thinko.
92 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
93 flags to dump_template_bindings.
94 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
95 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
96 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
97 (tsubst_copy): Clarify variable name.
98 (most_general_template): Robustify.
100 1999-09-29 Nathan Sidwell <nathan@acm.org>
102 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
103 to change primary template rendering.
105 1999-09-29 Mark Mitchell <mark@codesourcery.com>
107 * cp-tree.h (UPT_TEMPLATE): Remove.
108 (UPT_PARMS): Likewise.
109 (DECL_NEEDED_P): New macro.
110 * decl2.c (finish_vtable_vardecl): Use it.
111 (finish_objects): Don't crash with -fsyntax-only.
112 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
114 * pt.c (tsubst_friend_function): Remove FIXME that talks about
116 (tsubst_expr): Correct handling of function try-blocks.
117 * semantics.c: Include flags.h.
118 (expand_body): Don't do RTL generation if -fsyntax-only.
119 * Makefile.in (semantics.o): Depends on flags.h.
121 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
123 * pt.c (most_general_template): Adjust declaration.
125 * cp-tree.h: (most_general_template): Declare.
127 * error.c (dump_template_value): Rename to ...
128 (dump_template_argument): This.
129 (dump_template_argument_list): New function.
131 (dump_template_parameter): New function.
132 (dump_template_decl): Use it.
133 (dump_template_bindings): New function.
134 (dump_function_decl): Use it. Pretty print function template
137 1999-09-28 Nathan Sidwell <nathan@acm.org>
139 * decl.c (grokdeclarator): Distinguish parameter context for
140 diagnostics. Tidy up missing type diagnostic.
141 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
143 1999-09-28 Mark Mitchell <mark@codesourcery.com>
145 * ir.texi: Improve documentation for TARGET_EXPR.
147 1999-09-27 Nathan Sidwell <nathan@acm.org>
149 Augment stringification of trees.
150 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
151 (fndecl_as_string, type_as_string_real, args_as_string,
152 code_as_string, language_as_string, parm_as_string,
153 op_as_string, assop_as_string, cv_as_string): Remove.
154 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
155 (context_as_string): Declare new function.
156 * error.c (cp_printers): Move definition.
158 (OB_END_TEMPLATE_ID): Adjust.
159 (interesting_scope_p): Remove.
160 (dump_scope): New static function.
161 (dump_qualifiers): Adjust prototype, reimplement.
162 (dump_template_value): Use tree_string_flags.
163 (dump_type_real): Move back to dump_type.
164 (dump_type): Adjust prototype. Use tree_string_flags.
165 (dump_aggr_type): Likewise. Use dump_template_parms.
166 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
168 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
169 (dump_simple_decl): Likewise.
170 (dump_decl): Likewise. Use dump_template_decl.
171 (dump_template_decl): New static function broken out of dump_decl.
172 (dump_function_decl): Adjust prototype. Use tree_string_flags.
173 (dump_parameters): Likewise. Prefix space.
174 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
175 (dump_function_name): Likewise. Use dump_template_parms.
176 (dump_template_parms): New static function broken out of
178 (dump_expr_list): Adjust prototype. Use tree_string_flags.
179 (dump_expr): Likewise.
180 (fndecl_as_string): Removed
181 (type_as_string_real): Removed
182 (dump_binary_op): Adjust prototype. Use tree_string_flags.
183 (dump_unary_op): Likewise.
184 (type_as_string): Likewise.
185 (expr_as_string): Likewise.
186 (decl_as_string): Likewise.
187 (context_as_string): New function.
188 (lang_decl_name): Adjust.
189 (decl_to_string): New static print callback.
190 (expr_to_string): Likewise.
191 (fndecl_to_string): Likewise.
192 (code_as_string): Renamed to ...
193 (code_to_string): ... here. Adjust.
194 (language_as_string): Renamed to ...
195 (language_to_string): ... here. Adjust.
196 (parm_as_string): Renamed to ...
197 (parm_to_string): ... here.
198 (op_as_string): Renamed to ...
199 (op_to_string): ... here.
200 (assop_as_string): Renamed to ...
201 (assop_to_string): ... here.
202 (type_to_string): New static print callback.
203 (args_as_string): Renamed to ...
204 (args_to_string): ... here. Adjust.
205 (cv_as_string): Renamed to ...
206 (cv_to_string): ... here. Adjust.
207 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
208 (print_template_context): Likewise.
210 1999-09-26 Mark Mitchell <mark@codesourcery.com>
212 * cp-tree.h (expand_throw): Remove prototype.
213 * except.c (expand_throw): Make it static. Use tree-generation
214 functions, rather than RTL-generation functions.
215 (build_throw): Use it.
216 * expr.c: Include except.h.
217 (cplus_expand_expr): Don't call expand_throw here.
218 * Makefile.in (expr.o): Depend on except.h.
219 * ir.texi: Update documentation for THROW_EXPR.
221 * decl.c (start_function): Set x_dont_save_pending_sizes rather
222 than calling get_pending_sizes.
223 * init.c (build_new): Don't save and restore
224 immediate_size_expand; instead, assert that it has the expected
227 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
229 * lex.c (compiler_error): Add missing call to va_end().
231 1999-09-25 Mark Mitchell <mark@codesourcery.com>
233 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
234 * ir.texi: Document RESULT_DECL and DECL_RESULT.
236 * cp-tree.h (check_return_expr): New function.
237 * decl.c (finish_constructor_body): New function.
238 (pushdecl): Put global friend functions in namespace binding
239 level, not the class binding level.
240 (finish_destructor_body): Make sure the dtor_label is always
241 defined. Fix typo in comment.
242 (finish_function): Move generation of constructor-termination code
243 to semantic-analysis time. Move generation of implicit `main'
244 return value to semantic-analysis time.
245 * semantics.c (finish_return_stmt): Generate goto's to
246 ctor_label/dtor_label here. Use check_return_expr to do semantic
247 analysis on the returned expression.
248 * typeck.c (maybe_warn_about_returning_address_of_local): New
249 function split out from c_expand_return.
250 (check_return_expr): Likewise.
251 (c_expand_return): Just generate the RTL for the return.
253 1999-09-24 Mark Mitchell <mark@codesourcery.com>
255 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
256 (cleanup_type): Likewise.
257 (search_tree): Change prototype.
258 * decl.c (local_variable_p): Adjust for new interface to
260 (check_default_argument): Likewise.
261 * error.c (dump_expr): Handle INIT_EXPR.
262 * except.c (expand_throw): Don't make cleanup_type a local static.
263 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
264 * init.c (build_new): Call build_new_1 directly, rather than
266 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
267 processing file-scope initializers.
268 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
269 * tree.c: Include splay-tree.h
270 (no_linkage_helper): Adjust for new interface to search_tree.
271 (search_tree): Pass around pointers to tree nodes, rather than the
272 nodes themselves. Handle VEC_INIT_EXPR.
273 (no_linkage_check): Adjust for new interface to search_tree.
274 (mapcar): Handle VEC_INIT_EXPR.
275 (target_remap): New variable.
277 (bot_replace): New function.
278 (break_out_target_exprs): Use it to remap all variables used in a
279 default argument expression.
280 * typeck.c (build_modify_expr): Don't crash when outside a
281 function and presented with an INIT_EXPR assignment
282 * Makefile.in (tree.o): Depend on splay-tree.h.
284 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
286 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
288 (builtin_function): New arg CLASS. Arg CODE now of type int. All
290 Set the builtin's DECL_BUILT_IN_CLASS.
292 1999-09-24 Mark Mitchell <mark@codesourcery.com>
294 * decl.c (pushdecl): Don't make local declarations of extern
295 variables give the variable a DECL_CONTEXT for the function.
296 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
297 Don't accidentally make RTL for local declarations.
298 (emit_local_var): Handle declarations with asm-specifiers here.
300 1999-09-23 Mark Mitchell <mark@codesourcery.com>
302 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
305 * cp-tree.h (language_function): Add cannot_inline.
306 * decl.c (start_function): Restore current_function_cannot_inline
307 from the saved value.
308 (save_function_data): Save current_function_cannot_inline.
309 * decl2.c (start_objects): Change prototype. Build the function
310 in function-at-a-time mode.
311 (finish_objects): Likewise.
312 (generate_ctor_or_dtor_function): Adjust accordingly.
314 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
315 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
316 Don't call expand_anon_union_decl here
317 * semantics.c (exapnd_stmt): Call it here, instead.
318 * typeck.c (mark_addressable): Addressed variables are implicitly
321 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
323 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
324 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
325 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
326 * cp-tree.h: Add tree checking macros to various tree access
328 * ptree.c (print_lang_decl): Test for function or variable
329 before accessing template info.
331 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
333 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
334 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
335 * decl2.c (lang_f_options): Add -fshort-wchar.
336 * cp-tree.h: Declare flag_short_wchar.
337 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
340 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
342 * ir.texi: Fix formatting errors and typos.
344 1999-09-22 Mark Mitchell <mark@codesourcery.com>
346 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
348 * decl.c (pushdecl): Do create a binding for extern "C" functions,
349 but not for their DECL_ASSEMBLER_NAMEs.
350 (lookup_name_current_level): Fix formatting.
351 (xref_tag): Likewise.
352 * decl2.c (start_objects): Mark static constructors and
355 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
357 * decl.c (define_case_label): Don't crash if we're not in a switch.
359 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
360 * lang-options.h: Restore -fthis-is-variable. Remove help strings
361 for unsupported flags.
363 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
365 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
366 Accept and warn about -fthis-is-variable.
368 1999-09-21 Mark Mitchell <mark@codesourcery.com>
370 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
371 CLEANUP_STMT, and SCOPE_STMT.
373 * decl2.c (lang_decode_option): Adjust, in the wake of recent
374 changes to option processing.
376 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
378 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
379 function pointer from pmfs with no object given.
380 (convert_for_assignment): Do not return error when converting
383 1999-09-21 Alex Samuel <samuel@codesourcery.com>
385 * lex.c (internal_filename): New variable.
386 (INTERNAL_FILENAME): New macro.
387 (init_parse): Allocate internal_filename and mark as root. Use it
388 instead of a string constant.
390 1999-09-21 Nathan Sidwell <nathan@acm.org>
392 Reimplement dynamic cast and catch matching.
393 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
394 * search.c (dynamic_cast_base_recurse): New function.
395 (get_dynamic_cast_base_type): New function for dynamic cast.
396 * rtti.c (build_dynamic_cast_1): Determine source and target
397 class relationship. Call __dynamic_cast_2.
398 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
399 (__user_type_info::dyncast): New dynamic cast dispatcher.
400 (__user_type_info::sub_kind): New nested enumeration.
401 (__user_type_info::contained_p): sub_kind predicate.
402 (__user_type_info::contained_public_p): Likewise.
403 (__user_type_info::contained_nonpublic_p): Likewise.
404 (__user_type_info::contained_nonvirtual_p: Likewise.
405 (__user_type_info::upcast_result): New nested struct.
406 (__user_type_info::dyncast_result): New nested struct.
407 (*::do_upcast): New catch function.
408 (*::do_dyncast): New dynamic cast function.
409 (__user_type_info::find_public_subobj): New dynamic cast
411 (*::do_find_public_subobj): New dynamic cast helper function.
412 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
413 (__user_type_info::dyncast): Define dynamic cast dispatcher.
414 (*::do_upcast): Define catch function.
415 (*::do_dyncast): Define dynamic cast function.
416 (*::do_find_public_subobj): Define dynamic cast helper function.
417 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
418 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
419 (__dynamic_cast_2): New dynamic cast runtime.
421 1999-09-20 Mark Mitchell <mark@codesourcery.com>
423 * cp-tree.h (finish_stmt_expr): Change prototype.
424 * expr.c (cplus_expand_expr): Adjust call accordingly.
425 * init.c (finish_init_stmts): Likewise.
426 * parse.y (primary): Likewise.
427 * pt.c (tsubst_copy): Likewise.
428 * semantics.c (finish_stmt_expr): Don't take two parameters.
429 Don't remove generated BLOCKs from the block-tree.
431 Remove support for assigning to `this'.
432 * NEWS: Note that fact.
433 * class.c (build_vbase_path): Don't check flag_this_is_variable.
434 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
435 (language_function): Remove assigns_this, just_assigned_this, and
436 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
437 (base_init_expr): Remove.
438 (current_vcalls_possible_p): New macro.
439 (vtbls_set_up_p): Likewise.
440 (emit_base_init): Change prototype.
441 * decl.c (finish_destructor_body): New function, split out from
443 (current_function_assigns_this): Remove.
444 (current_function_just_assigned_this): Likewise.
445 (start_function): Don't set them.
446 (finish_function): Don't check them. Don't emit
447 base-initialization code here. Generate code for destructors when
448 doing semantic analysis.
449 (finish_stmt): Don't check current_function_just_assigned_this.
450 * decl2.c (lang_f_options): Remove this-is-variable.
451 (lang_decode_option): Likewise.
452 (grokclassfn): Don't check flag_this_is_variable.
453 * init.c (emit_base_init): Return the expression generated.
454 (construct_virtual_bases): Don't push/pop obstacks. Fix
456 (build_new_1): Don't check flag_this_is_variable.
457 (get_temp_regvar): Don't set DECL_REGISTER.
458 (build_vec_init): Don't call use_variable.
459 * lang-options.h: Remove "-fthis-is-variable" and
460 "-fno-this-is-variable".
461 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
462 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
464 * semantics.c (finish_expr_stmt_real): Rename to ...
465 (finish_expr_stmt): This. Remove assigned_this parameter.
466 (begin_if_stmt): Call do_pushlevel before starting the statement.
467 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
469 (setup_vtbl_ptr): Emit initialization code for bases and members
470 at semantic-analysis time. Emit code to initialize vtables in
472 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
473 Don't handle CTOR_INITIALIZER any more.
474 * typeck.c (build_modify_expr): Don't check for assignments to
476 (c_expand_return): Don't suggest assigning to `this'.
478 * Makefile.in (decl.o): Depend on RTL_H.
482 (method.o): Likewise.
483 (search.o): Likewise.
487 * decl.c (duplicate_decls): When a builtin function is redeclared
488 as static, make sure it is mangled correctly.
490 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
491 detail about the statement-tree.
493 1999-09-20 Nathan Sidwell <nathan@acm.org>
495 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
497 1999-09-20 Nick Clifton <nickc@cygnus.com>
499 * decl2.c (lang_decode_option): Extend comment.
501 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
503 * typeck.c: Include "tm_p.h".
505 1999-09-19 Mark Mitchell <mark@codesourcery.com>
509 1999-09-19 Paul Burchard <burchard@pobox.com>
511 * semantics.c (expand_stmt): Initialize return value.
513 1999-09-18 Paul Burchard <burchard@pobox.com>
515 * gxxint.texi: G++ now implements namespaces.
517 1999-09-18 Mark Mitchell <mark@codesourcery.com>
519 * decl.c (pop_label): Don't warn about unused labels more than
521 * semantics.c (finish_goto_stmt): Always marked used labels as
524 * decl.c (layout_var_decl): Change prototype. Call layout_decl
525 even when the declaration is external.
526 (cp_finish_decl): Adjust call to layout_var_decl.
527 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
529 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
531 * typeck.c (get_member_function_from_ptrfunc): Always consider
532 virtuality inside member pointer.
534 1999-09-17 Mark Mitchell <mark@codesourcery.com>
536 Turn on function-at-a-time processing.
537 * cp-tree.h (doing_semantic_analysis_p): New macro.
538 (SF_DEFAULT): Define to zero, not SF_EXPAND.
539 (start_handler_parms): Change prototype.
540 (expand_start_catch_block): Likewise.
541 (expand_end_catch_block): Likewise.
542 (expand_start_eh_spec): Likewise.
543 (expand_end_eh_spec): Declare.
544 (finish_handler_parms): Change prototype.
545 (begin_catch_block): Declare.
546 (finish_handler): Change prototype.
547 (do_pushlevel): Declare.
548 (do_poplevel): Likewise.
549 * decl.c (pushlevel): Don't create
550 binding levels when not doing semantic analysis.
551 (poplevel): Don't pop them.
552 (pushdecl): Assert that we are never called when not doing
554 (pushdecl_top_level): Use push_to_top_level.
555 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
556 label when expanding.
557 (cp_finish_decl): Only inject for-scope variables when doing
558 semantic analysis. Add comments.
559 (start_handler_parms): Return the handler parm.
560 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
561 already set. Reinitialize from saved function data if available.
562 Don't pushlevel when not doing semantic analysis.
563 (store_parm_decls): Only generate RTL when expanding. Only
564 pushdecl when doing semantic analysis. Set
565 current_eh_spec_try_block if appropriate.
566 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
567 Combine common code. Don't poplevel when not doing semantic
569 (push_cp_function_context): Don't expand functions without an
570 explicit call to expand_body.
571 (mark_lang_function): Make eh_spec_try_block and
573 * except.c (expand_end_eh_spec): Don't
575 (process_start_catch_block): Likewise.
576 (push_eh_cleanup): Use finish_decl_cleanup.
577 (initialize_handler_parm): New function.
578 (expand_start_catch_block): Use it.
579 (expand_end_catch_block): Use tree-generation functions, not
580 RTL-generation functions.
581 (expand_start_eh_spec): Likewise.
582 (expand_end_eh_spec): Likewise.
583 (expand_exception_blocks): Simplify.
584 (start_anon_func): Use do_pushlevel.
585 (end_anon_func): Use do_poplvel. Call expand_body for the
587 * expr.c (do_case): Don't call define_case_label.
588 * init.c (create_temporary_var): Set DECL_CONTEXT for local
590 * method.c (emit_thunk): Call expand_body for the
592 (sythesize_method): Likewise.
593 * parse.y (handler_args): Give it ttype.
594 (eat_saved_input): Call expand_body.
595 (base_init): Use do_pushlevel.
596 (pending_inline): Call expand_body.
597 (handler): Adjust calls to finish_handler_parms and
599 (handler_args): Don't call expand_start_catch_block. Return the
600 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
601 * parse.c: Regenerated.
602 * rtti.c (synthesize_tinfo_fn): Call finish_function.
603 * semantics.c (do_pushlevel): Give it external linkage. Build
605 (do_poplevel): Likewise.
606 (finish_case_label): Call define_case_label when doing semantic
608 (finish_goto_stmt): Create RTL for labels.
609 (finish_function_try_block): Set in_function_try_handler
611 (finish_function_handler_sequence): Unset it.
612 (finish_handler_parms): Use expand_start_catch_block even when
613 building a statement-tree.
614 (begin_catch_block): New function.
615 (finish_handler): Move a little RTL-generation logic here.
616 (finish_decl_cleanup): Allow cleanups for empty declarations.
617 (finish_named_return_value): Don't pushdecl when not doing
619 (expand_stmt): Don't do semantic analysis for variable
620 declarations. Handle START_CATCH_STMT. Call expand_label
621 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
622 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
623 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
624 RETURN_INIT and function try blocks.
626 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
627 x_scope_stmt_stack. Add x_in_charge_parm.
628 (current_eh_spec_try_block): New macro.
629 (current_scope_stmt_stack): Likewise.
630 (current_in_charge_parm): Likewise.
631 * decl.c (start_function): Initialize current_in_charge_parm.
632 (finish_function): Use current_in_charge_parm rather than looking
634 * search.c (expand_indirect_vtbls_init): Likewise.
636 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
637 (TRY_BLOCK): Likewise.
639 (START_CATCH_STMT): New tree node.
640 (SCOPE_STMT): Likewise.
641 * cp-tree.h (SCOPE_BEGIN_P): New macro.
642 (SCOPE_NULLIFIED_P): Likewise.
643 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
644 (struct lang_decl): Add saved_language_function.
645 (DECL_PENDING_INLINE_INFO): Adjust documentation.
646 (DECL_PENDING_INLINE_P): New macro.
647 (TYPE_TI_ARGS): Fix typo in comment.
648 (DECL_SAVED_TREE): Add to documentation.
649 (DECL_SAVED_FUNCTION_DATA): New macro.
650 (START_CATCH_TYPE): Likewise.
651 (SCOPE_END_P): New macro.
652 (declare_parm_level): Don't declare.
653 * decl.c (mark_lang_function): New function, split out from
654 mark_cp_function_context.
655 (save_function_data): New function.
656 (declare_parm_level): Remove.
657 (finish_function): Use save_function_data to squirrel away
658 important stuff for later use.
659 (mark_cp_function_context): Use mark_function_data.
660 (lang_mark_tree): Likewise.
661 * lex.c (begin_definition_of_inclass_inline): Set
662 DECL_PENDING_INLINE_P.
663 (store_pending_inline): Clear it.
664 * pt.c (tsubst_decl): Likewise.
666 1999-09-17 Nathan Sidwell <nathan@acm.org>
668 * call.c (perform_implicit_conversion): Deal with error_mark_node.
670 1999-09-17 Mark Mitchell <mark@codesourcery.com>
672 * decl.c (warn_extern_redeclared_static): Don't get confused by
673 static member functions.
674 (duplicate_decls): Merge DECL_THIS_STATIC.
676 * decl.c (expand_static_init): Make sure assignments to local
677 statics actually occur.
679 1999-09-17 Mark Mitchell <mark@codesourcery.com>
681 * cp-tree.h (poplevel_class): Declare.
682 * class.c (popclass): Use poplevel_class, not poplevel.
683 * decl.c (poplevel_class): Don't make it static. Don't return a
685 (poplevel): Don't call poplevel_class; abort in a class
686 binding level is seen.
687 * semantics.c (finish_translation_unit): Use pop_everything.
688 * parse.y (member_init): Allow errors.
689 (pending_inline): Call finish_function.
690 * parse.c: Regenerated.
691 * Makefile.in (CONFLICTS): Adjust.
693 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
695 * error.c: Reduce code duplication.
696 (dump_template_value): New function.
697 (dump_type_real): Use it.
698 (dump_decl): Likewise.
699 (dump_function_name): Likewise.
700 (dump_function_decl): Don't be too talkative about function return
703 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
705 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
707 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
709 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
711 * decl2.c (finish_file): Also call check_global_declarations for
712 the pending_statics list.
714 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
716 * lex.c (cp_pragma_implementation): Allow #pragma implementation
719 1999-09-15 Richard Henderson <rth@cygnus.com>
721 * lex.c (mark_impl_file_chain): Follow the next chain.
723 1999-09-15 Mark Mitchell <mark@codesourcery.com>
725 * decl.c (warn_extern_redeclared_static): Simplify. Catch
726 problems with extern "C" functions redeclared as static.
727 (duplicate_decls): When a builtin is redeclared static, make the
728 new function have internal linkage.
730 1999-09-15 Mark Mitchell <mark@codesourcery.com>
732 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
733 * pt.c (tsubst_copy): Likewise.
734 * tree.c (search_tree): Likewise.
737 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
739 * typeck2.c (ack): Don't declare progname.
741 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
743 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
744 filenames with ggc_alloc_string.
746 1999-09-14 Mark Mitchell <mark@codesourcery.com>
748 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
750 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
752 * cvt.c (build_up_reference): Likewise.
753 * tree.c (build_cplus_new): Likewise.
754 (get_target_expr): Likewise.
756 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
758 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
760 1999-09-13 Mark Mitchell <mark@codesourcery.com>
762 * cp-tree.h (build_target_expr): New function.
763 * call.c (build_conditional_expr): Use build_target_expr.
764 (convert_like): Likewise.
765 (build_over_call): Likewise.
766 * cvt.c (build_up_reference): Likewise.
767 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
768 (destroy_local_var): Here.
769 (build_target_expr): New function.
770 * tree.c (build_cplus_new): Use it.
771 (get_target_expr): Likewise.
773 1999-09-13 Nathan Sidwell <nathan@acm.org>
775 * typeck.c (expr_sizeof): Don't decay arrays and functions.
776 Remove misleading comment.
777 (build_compound_expr): Don't decay arrays.
779 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
781 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
784 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
786 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
788 * g++spec.c: Include gcc.h.
789 (lang_specific_driver): Constify a char*. Call xcalloc, not
790 xmalloc/bzero. All calls to the function pointer parameter now
791 explicitly call `fatal'.
793 1999-09-12 Mark Mitchell <mark@codesourcery.com>
795 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
796 * cvt.c (ocp_convert): Complete the from and destination types.
797 Adjust warning about functions always being `true' in conditionals.
798 * decl.c (duplicate_decls): Don't play funny games with abort.
799 * error.c (dump_expr): Handle OVERLOADs.
800 * spew.c (probe_obstack): Remove.
801 * typeck.c (condition_conversion): Use perform_implicit_conversion.
803 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
805 * cp-tree.h (auto_function, define_function): Adjust prototypes.
806 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
808 (auto_function): Likewise, for CODE arg.
809 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
810 (builtin_function): ... here.
812 1999-09-11 Mark Mitchell <mark@codesourcery.com>
814 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
815 (init_decl_processing): Don't set TREE_PERMANENT for the
817 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
818 (grokdeclarator): Likewise.
819 (grokparms): Don't check TREE_PERMANENT when building up lists.
820 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
821 (mark_inline_for_output): Likewise.
822 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
823 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
824 * lex.c (check_newline): Don't check ggc_p; it is always one.
825 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
826 * spew.c (yylex): Don't copy_node or probe_obstacks for
827 non-permanent CONSTANTs and STRINGs.
828 * tree.c (build_cplus_array_type_1): Don't fuss with
829 TREE_PERMANENT on ARRAY_TYPEs.
831 * cp-tree.def (CLEANUP_STMT): New node.
832 * cp-tree.h (language_function): Add name_declared.
833 (current_function_name_declared): New macro.
834 (CLEANUP_DECL): New macro.
835 (CLEANUP_EXPR): Likewise.
836 (emit_local_var): Likewise.
837 (finish_decl_cleanup): New function.
838 * cvt.c (build_up_reference): Simplify.
839 (ocp_convert): Remove dead code.
840 * decl.c (start_decl): Remove call to add_decl_stmt.
841 (grok_reference_init): Adjust, to handle bindings temporaries to
842 references. Remove dead code.
843 (initialize_local_var): Don't generate RTL for
844 declarations here, or build cleanups here. Don't fuss with
845 obstacks. Replace expand_start_target_temps calls with explicit
846 setting of stms_are_full_exprs_p.
847 (destroy_local_var): New function.
848 (emit_local_var): Likewise.
849 (cp_finish_decl): Use them, as appropriate.
850 (start_function): Announce template functions.
851 (store_parm_decls): Don't call declare_function_name here.
852 (finish_stmt): Don't start emit base-initialization code when just
853 building the statement-tree.
854 * init.c (create_temporary_var): Move add_decl_stmt call ...
855 (get_temp_regvar): Here.
856 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
857 cp_finish_decl would expect. Don't call add_decl_stmt.
858 * semantics.c (begin_compound_stmt): Call declare_function_name,
860 (finish_decl_cleanup): New function.
861 (expand_stmt): Use emit_local_var to output variables.
862 (expand_body): Set current_funtion_name_declared.
864 1999-09-10 Mark Mitchell <mark@codesourcery.com>
866 * cp-tree.h (finish_cleanup_try_block): New function.
867 * semantics.c (finish_cleanup_try_block): Add comment.
869 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
871 * cp-tree.h: Delete declarations for all tree nodes now moved to
873 * decl.c: Delete their definitions.
874 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
875 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
877 (init_decl_processing): Call build_common_tree_nodes and
878 build_common_tree_nodes_2 instead of building their nodes here.
879 Don't add gc roots for them.
881 1999-09-10 Mark Mitchell <mark@codesourcery.com>
883 * cp-tree.h (language_function): Rename expanding_p to
884 x_expanding_p. Rename named_label_uses to x_named_label_uses.
885 (expanding_p): Adjust accordingly.
886 (TREE_VIA_PRIVATE): Fix typo in comment.
887 (DECL_REFERENCE_SLOT): Remove.
888 (SET_DECL_REFERENCE_SLOT): Likewise.
889 * decl.c (named_label_uses): Adjust. Remove chicken comment.
890 (push_overloaded_decl): Don't truncate the chain of bindings when
891 adding an overloaded function.
892 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
893 (initialize_local_var): Fix typo in comment.
894 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
895 * decl2.c (start_objects): Make the fact that we are expanding
896 the generated function right away explicit.
897 (start_static_storage_duration_function): Likewise.
898 (finish_file): Fix typo in comment.
899 * init.c (build_vec_init): Correct bugs in handling cleanups.
900 * semantics.c (maybe_convert_cond): New function.
901 (FINISH_COND): Always store the condition, even if there's
903 (finish_if_stmt_cond): Use maybe_convert_cond.
904 (finish_while_stmt_cond): Likewise.
905 (finish_do_stmt): Likewise.
906 (finish_for_cond): Likewise.
907 (expand_cond): Adjust.
909 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
910 * init.c (perform_member_init): Remove obstack machinations.
911 (expand_cleanup_for_base): Likewise.
912 (finish_init_stmts): Mark the statement-expression as used.
913 * method.c (emit_thunk): Use tree-generating functions, not
915 (do_build_copy_constructor): Likewise.
916 (do_build_assign_ref): Likewise.
917 (synthesize_method): Likewise. Keep track of line numbers.
918 * pt.c (tsubst_expr): Handle various kinds of try blocks.
919 * semantics.c (expand_stmts): Remove.
920 (begin_function_try_block): Set FN_TRY_BLOCK_P.
921 (finish_function_try_block): Be careful rechaining
923 (expand_stmt): Loop through all the statements at a given level.
924 (exapnd_body): Be careful with line-numbers here too. Prepare for
925 being called directly from the parser.
927 * cp-tree.h (finish_function): Adjust prototype.
928 * decl.c (finish_function): Return the function compiled.
929 * pt.c (instantiate_decl): Don't play games with obstacks.
930 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
931 (search_tree): Likewise.
932 * typeck.c: Fix typo in comment.
933 * typeck2.c (store_init_value): Add comment.
935 * cp-tree.h (CPTI_ATEXIT): New macro.
936 (atexit_node): Likewise.
937 * decl.c (destroy_local_static): New function, broken out from ...
938 (expand_static_init): Here.
940 * rtti.c (get_tinfo_var): These should always be global
941 (expand_si_desc): Use tree, not RTL, functions to generate code.
942 (expand_class_desc): Likewise.
943 (expand_ptr_desc): Likewise.
944 (expand_attr_desc): Likewise.
945 (expand_generic_desc): Likewise.
946 (synthesize_tinfo_fn): Likewise.
948 1999-09-09 Mark Mitchell <mark@codesourcery.com>
950 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
951 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
953 (RECHAIN_STMST_FROM_CHAIN): Likewise.
955 * parse.y (simple_stmt): Fix typo in last change.
957 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
958 (STMT_IS_FULL_EXPR_P): Likewise.
959 (STMT_LINENO_FOR_FN_P): Likewise.
960 (prep_stmt): New function.
961 (building_stmt_tree): Tweak for safety.
962 * pt.c (tsubst_expr): Use prep_stmt throughout.
963 (add_tree): Move it to semantics.c
964 * semantics.c (add_tree): Move it here.
965 (finish_expr_stmt_real): New function.
966 (finish_expr_stmt): Use it.
967 (finish_if_stmt_cond): Use FINISH_COND.
968 (finish_while_stmt_cond): Likewise.
969 (finish_for_cond): Likewise.
970 (finish_stmt_tree): Tweak line-number handling.
971 (prep_stmt): New function.
972 (expand_stmt): Use it.
974 * cp-tree.h (begin_switch_stmt): Adjust prototype.
975 (finish_switch_cond): Likewise.
976 * parse.y (simple_stmt): Adjust accordingly.
977 * parse.c: Regenerated.
978 * pt.c (tsubst_expr): Adjust accordingly.
979 * semantics.c (expand_cond): New function.
980 (FINISH_COND): New macro.
981 (begin_switch_stmt): Build the SWITCH_STMT here.
982 (finish_switch_stmt_cond): Not here.
983 (expand_stmt): Adjust calls to begin_switch_stmt and
984 finish_switch_cond. Use expand_cond throughout.
986 * dump.c (dequeue_and_dump): Dump types for constants.
987 Describe DECL_ARG_TYPE more intuitively.
990 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
991 (lang_cleanup_tree): Remove.
992 * lex.c (make_lang_type): Use ggc_alloc to allocate
995 Reorganize per-function data.
996 * cp-tree.h (saved_scope): Add function_decl, bindings.
997 (language_function): Rename binding_level to bindings.
998 (cp_function_chain): Use the current_function, not the
999 outer_function_chain.
1000 (current_class_ptr): Make it work, even when there's no
1002 (current_class_ref): Likewise.
1003 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
1005 (clear_temp_name): Remove.
1006 * decl.c (check_function_type): New function, broken out from
1008 (current_binding_level): Adjust definition.
1009 (pushlevel): Simplify.
1010 (poplevel): Don't use named_label_uses when we're outside
1012 (mark_saved_scope): Mark function_decl and bindings.
1013 (maybe_push_to_top_level): Don't unconditionally push a new
1014 function context. Save bindings and the current_function_decl.
1015 Don't clear named_labels.
1016 (pop_from_top_level): Pop function context if appropriate.
1017 (init_decl_processing): Set init_lang_status and free_lang_status,
1018 rather than save_lang_status and restore_lang_status.
1019 (start_function): Take SF_* flags. Don't clear per-function data.
1020 Reorder and simplify to use new per-function data code. Add
1022 (store_parm_decls): Don't call init_function_start here.
1023 (finish_function): Adjust for new handling of per-function data.
1024 (push_cp_function_context): Simplify.
1025 (mark_cp_function_context): Change binding_level to bindings.
1026 * decl2.c (clear_temp_name): Remove.
1027 (start_objects): Use SF flags to start_function.
1028 (start_static_storage_duration_function): Likewise.
1029 * except.c (start_anon_func): Remove redundant calls to
1030 push_function_context_to. Use SF flags to start function.
1031 (end_anon_func): Remove redundant call to pop_function_context
1033 * lex.c (reinit_parse_for_function): Don't initialize per-function
1035 * method.c (emit_thunk): Clear current_function after calling
1036 assemble_end_function. Use SF flags for start_function.
1037 (synthesize_method): Use SF flags for start_function.
1038 * parse.c: Regenerated.
1039 * parse.y (fn.defpen): Likewise.
1040 (pending_inline): Clear current_function, even if something goes
1042 * pt.c (instantiate_decl): Use SF flags to start_function.
1043 Don't save and restore expanding_p.
1044 (add_tree): Handle the case where we are outside any function.
1045 (end_tree): Likewise.
1046 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1047 * semantics.c (begin_function_definition): Likewise.
1048 (expand_body): Likewise.
1050 1999-09-09 Nathan Sidwell <nathan@acm.org>
1052 * cp-tree.h (convert_to_void): Prototype new function.
1053 (require_complete_type_in_void): Remove prototype.
1054 * cvt.c (convert_to_void): New function.
1055 (ocp_convert): Use convert_to_void.
1056 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1058 * typeck.c (require_complete_type_in_void): Remove function.
1059 (build_compound_expr): Use convert_to_void.
1060 (build_static_cast): Likewise.
1061 (build_c_cast): Likewise.
1062 * semantics.c (finish_expr_stmt): Do not decay full expressions.
1064 * typeck.c (build_x_compound_expr): Add FIXME.
1066 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1068 * cp-tree.h (scratch_tree_cons): Remove.
1069 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1070 and perm_tree_cons with plain tree_cons.
1071 * class.c: Likewise.
1073 * decl2.c: Likewise.
1074 * except.c: Likewise.
1078 * method.c: Likewise.
1079 * parse.y: Likewise.
1083 * search.c: Likewise.
1084 * typeck.c: Likewise.
1085 * parse.c: Regenerated.
1086 * tree.c (build_srcloc): Simplify.
1088 1999-09-08 Mark Mitchell <mark@codesourcery.com>
1090 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1092 (LANG_DECL_PERMANENT): Remove.
1093 * decl.c (duplicate_decls): Don't mess about with obstacks trying
1095 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1096 * lex.c (free_lang_decl_chain): Remove.
1097 (build_lang_decl): Don't use obstacks.
1098 (retrofit_lang_decl): Likewise.
1099 (copy_lang_decl): Likewise.
1101 * cp-tree.h (saved_scope): Remove old_binding_level and
1102 function_decl. Tidy up.
1103 * decl.c (mark_saved_scope): Don't set them.
1104 (maybe_push_to_top_level): Clear memory.
1106 * decl.c (layout_var_decl): Change prototype. Don't complete
1107 types for external objects.
1108 (check_initializer): Likewise. Tidy.
1109 (initialize_local_var): Complete types here.
1110 (cp_finish_decl): Not here. Reorganize a little.
1111 (grokvardecl): Don't complete types here.
1113 * decl.c (start_function): Clear last_dtor_insn and
1114 last_parm_cleanup_insn.
1115 (push_cp_function_context): Just copy over a little of
1116 the old context, not all of it.
1118 * cp-tree.h (copy_to_permanent): Remove.
1119 (permanent_p): Likewise.
1120 * decl.c (building_typename_type): Don't use copy_to_permanent.
1121 (start_decl): Likewise.
1122 (grok_reference_init): Likewise.
1123 (cp_finish_decl): Likewise.
1124 * init.c (build_new_1): Don't use mapcar.
1125 (build_vec_delete_1): Don't use copy_to_permanent.
1126 (build_vec_init): Likewise.
1127 * parse.y (primary): Likewise.
1128 * parse.c: Regenerated.
1129 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1130 (lookup_template_class): Likewise.
1131 (tsubst_friend_function): Likewise.
1132 (instantiate_class_template): Likewise.
1133 (tsubst_decl): Likewise.
1135 (instantiate_template): Likewise.
1137 * rtti.c (get_tinfo_fn): Likewise.
1138 (build_dynamic_cast): Likewise.
1139 * semantics.c (finish_if_stmt_cond): Likewise.
1140 (finish_while_stmt_cond): Likewise.
1141 (finish_do_stmt): Likewise.
1142 (finish_for_cond): Likewise.
1143 (finish_for_expr): Likewise.
1144 (finish_cleanup): Likewise.
1145 (add_decl_stmt): Likewise.
1146 (finish_named_return_value): Likewise.
1147 (finish_qualified_call_expr): Likewise.
1148 * tree.c (perm_manip): Remove.
1149 (build_exception_variant): Don't use copy_to_permanent.
1150 (permanent_p): Remove.
1151 (copy_to_permament): Remove.
1152 (build_min_nt): Don't use copy_to_permanent.
1153 (build_min): Likewise.
1154 (min_tree_cons): Likewise.
1155 * typeckc.c (build_static_cast): Likewise.
1156 (build_reinterpret_cast): Likewise.
1157 (build_const_cast): Likewise.
1159 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1161 * decl.c (ggc_p): Set it to 1.
1162 (mark_saved_scope): Add prototype.
1164 1999-09-07 Richard Henderson <rth@cygnus.com>
1166 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1167 * typeck.c (self_promoting_args_p): Delete.
1169 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
1171 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1172 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1174 1999-09-07 Mark Mitchell <mark@codesourcery.com>
1176 * Makefile.in (tree.o): Depend on ggc.h.
1177 * class.c (make_method_vec): Remove.
1178 (free_method_vec): Likewise.
1179 (free_method_vecs): Remove.
1180 (add_method): Don't use them.
1181 * cp-tree.def (PTRMEM_CST): Make it longer.
1182 (TEMPLATE_PARM_INDEX): Make it shorter.
1183 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1184 (template_parm_index): Remove RTL field.
1185 (ptrmem_cst): Add RTL field.
1186 (finish_function): Removed parameter.
1187 (process_next_inline): Change prototype.
1188 (init_cplus_unsave): Rename to init_tree.
1189 (binding_init): Remove.
1190 * decl.c (free_binding_nodes): Remove.
1191 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
1192 (pop_binding): Don't use free_binding_nodes.
1193 (free_binding_vecs): Remove.
1194 (store_bindings): Don't use them.
1195 (pop_from_top_level): Likewise.
1196 (lookup_namespace_name): Simplify.
1197 (build_typename_type): Don't use obstack_free.
1198 (unqualified_namespace_lookup): Simplify.
1199 (lookup_name_real): Simplify.
1200 (start_function): Remove comment about leaks.
1201 (finish_function): Removed nested parameter. Call
1202 expand_end_bindings even when building_stmt_tree.
1203 Call ggc_push_context and ggc_pop_context around
1204 rest_of_compilation, if necessary.
1205 (mark_cp_function_context): Handle a NULL language-context.
1206 (lang_mark_false_label_stack): Fix typo.
1207 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1208 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
1209 pointer to method types.
1210 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1211 * decl2.c (finish_objects): Adjust call to finish_function.
1212 (finish_static_store_duration_function): Likewise.
1213 (do_nonmember_using_decl): Remove call to binding_init.
1214 * except.c (end_anon_func): Adjust call to finish_function.
1215 * lex.c (mark_impl_file_chain): New function.
1216 (init_parse): Call init_tree, not init_cplus_unsave.
1218 (cp_pramga_interface): Use xmalloc, not permalloc.
1219 (cp_pragma_implementation): Likewise.
1220 (begin_definition_of_inclass_inline): Simplify.
1221 (process_next_inline): Adjust prototype.
1222 (do_scoped_id): Don't call binding_init.
1223 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1224 * method.c (emit_thunk): Adjust call to finish_function.
1225 (synthesize_method): Likewise.
1226 * parse.y (%union): Add a new `pi' variant.
1227 (PRE_PARSED_FUNCTION_DECL): Use it.
1228 (fn.defpen): Likewise.
1229 (fndef): Adjust call to finish_function.
1230 * pt.c (instantiate_decl): Likewise.
1231 * rtti.c (syntheisze_tinfo_fn): Likewise.
1232 * semantics.c (expand_body): Likewise.
1233 * tree.c: Include ggc.h.
1234 (mark_list_hash): New function.
1235 (binding_init): Remove.
1236 (init_cplus_unsave): Rename to ...
1237 (init_tree): This. Add GC roots.
1239 1999-09-05 Mark Mitchell <mark@codesourcery.com>
1241 Get ready for garbage collection.
1242 * Makefile.in (CXX_TREE_H): Add varray.h
1243 (lex.o): Depend on ggc.h.
1245 (decl2.o): Likewise.
1246 (method.o): Likewise.
1247 (search.o): Likewise.
1250 * class.c: Include ggc.h.
1251 (current_class_name): Remove.
1252 (current_class_type): Likewise.
1253 (current_access_specifier): Likewise.
1254 (previous_class_type): Likewise.
1255 (previous_class_values): Likewise.
1256 (class_cache_firstobj): Likewise.
1257 (current_lang_base): Likewise.
1258 (current_lang_stack): Likewise.
1259 (current_lang_stacksize): Likewise.
1260 (lang_name_c): Likewise.
1261 (lang_name_cplusplus): Likewise.
1262 (lang_name_java): Likewise.
1263 (current_lang_name): Likewise.
1264 (base_layout_decl): Likewise.
1265 (access_default_node): Likewise.
1266 (access_public_node): Likewise.
1267 (access_protected_node): Likewise.
1268 (access_private_node): Likewise.
1269 (access_default_virtual_node): Likewise.
1270 (access_public_virtual_node): Likewise.
1271 (access_protected_virtual_node): Likewise.
1272 (access_private_virtual_node): Likewise.
1273 (signed_zero_node): Likewise.
1274 (init_class_processing): Don't build base_layout_decl.
1275 (push_lang_context): Adjust now that current_lang_base is a varray.
1276 (pop_lang_context): Likewise.
1277 * cp-tree.h: Include varray.h.
1278 (cp_global_trees): Add access_default, access_public,
1279 access_protected, access_private, access_default_virtual,
1280 access_public_virtual, access_protected_virtual,
1281 access_private_virtual, ctor_identifier, delta2_identifier,
1282 delta_identifier, dtor_identifier, in_charge_identifier,
1283 index_identifier, nelts_identifier, this_identifier,
1284 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1285 lang_name_c, lang_name_cplusplus, lang_name_java,
1286 empty_except_spec, null, jclass, minus_one, terminate.
1287 (saved_scope): Move here from decl.c. Define globals in terms of
1288 saved_scope: current_namespace, current_class_name,
1289 current_class_type, current_access_specifier, current_lang_stack,
1290 current_lang_base, current_lang_name, current_function_parms,
1291 current_template_parms, processing_template_decl,
1292 processing_specialization, processing_explicit_instantiation,
1293 previous_class_type, previous_class_values, class_cache_firstobj.
1294 (scope_chain): New variable.
1295 (init_pt): New function.
1296 * decl.c (current_namespace): Remove.
1297 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1298 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1299 (delta_identifier, delta2_identifier): Likewise.
1300 (pfn_or_delta2_identifier, tag_identifier): Likewise
1301 (vt_off_identifier, empty_except_spec, null_node): Likewise.
1302 (current_function_parms, current_lang_base): Remove.
1303 (current_lang_stack, previous_class_values): Remove.
1304 (class_binding_level): Macroize.
1305 (saved_scope): Remove.
1306 (current_saved_scope): Rename to scope_chain.
1307 (mark_saved_scope): Adjust for new scope structure.
1308 (maybe_push_to_top_level): Likewise.
1309 (pop_from_top_level): Likewise.
1310 (duplicate_decls): Adjust now that current_lang_base is a varray.
1311 (build_typename_type): Call ggc_add_tree_hash_table_root.
1312 (init_decl_processing): Call init_pt. Call push_to_top_level to
1313 set up globals. Add GC roots.
1314 (xref_basetypes): Adjust now that current_lang_base is a varray.
1315 * decl.h (this_identifier): Remove.
1316 (in_charge_identifier): Likewise.
1317 * decl2.c: Don't include varray.h.
1318 (current_namespace): Remove.
1319 (init_decl2): Add GC roots.
1320 * except.c (Terminate): Remove.
1321 (init_exception_processing): Use terminate_node instead.
1322 (build_terminate_handler): Likewise.
1323 * init.c (nc_nelts_field_id): Remove.
1324 (minus_one): Likewise.
1325 (init_init_processing): Use minus_one_node and nelts_identifier
1326 instead. Add GC roots.
1327 (jclass_node): Remove.
1328 (build_new_1): Use nelts_identifier.
1329 (build_vec_init): Likewise.
1330 (build_vec_delete): Likewise.
1331 * lex.c: Include ggc.h.
1332 (defarg_fn): Move declaration early.
1333 (defarg_parms): Likewise.
1334 (init_parse): Add GC roots.
1335 (handle_cp_pragma): Remove redundant declaration of
1337 * method.c: Include ggc.h.
1338 (btypelist): Make it a varray. All uses changed.
1339 (ktypelist): Likewise.
1340 (init_method): Add GC roots.
1341 * pt.c: Don't include varray.h. Include ggc.h.
1342 (current_template_parms): Remove.
1343 (processing_template_decl): Likewise.
1344 (processing_specialization): Likewise.
1345 (processing_explicit_instantiation): Likewise.
1346 (init_pt): New function.
1347 * repo.c: Include ggc.h.
1348 (init_repo): Add GC roots.
1349 * search.c: Don't include varray.h.
1350 (_vptr_name): Remove.
1351 (lookup_field_1): Use vtpr_identifier instead.
1352 (expand_indirect_vtbls_init): Remove redundant declaration of
1353 in_charge_identifier.
1354 (init_search_processing): Use vptr_identifier.
1356 1999-09-05 Richard Henderson <rth@cygnus.com>
1357 Bernd Schmidt <bernds@cygnus.co.uk>
1358 Mark Mitchell <mark@codesourcery.com>
1360 * Makefile.in (parse.o): Depend on ggc.h.
1361 (decl2.o): Depend on ggc.h.
1362 (init.o): Depend on ggc.h.
1363 * cp-tree.h (init_decl2): Declare.
1364 (cp_parse_init): Likewise.
1365 * decl.c (ggc_p): Define to zero.
1366 (mark_saved_scope): New function.
1367 (init_decl_processing): Call cp_parse_init, and cp_decl2.
1369 (expand_static_init): Add GC roots.
1370 * decl2.c: Include ggc.h.
1371 (init_decl2): New function.
1372 * init.c: Include ggc.h.
1373 (init_init_processing): Add GC roots.
1374 * parse.y: Include ggc.h.
1375 (cp_parse_init): New function.
1377 1999-09-04 Mark Mitchell <mark@codesourcery.com>
1379 * decl.c (init_decl_processing): Set mark_lang_status.
1380 (lang_mark_false_label_stack): Adjust prototype.
1381 * decl2.c (grok_function_init): Remove extraneous declaration of
1384 * Make-lang.in (cc1plus): Remove dependency on GGC.
1385 * Makefile.in (OBJS): Don't mention ggc-simple.o.
1386 (OBJDEPS): Don't mention ggc-simple.o.
1388 * Make-lang.in (cc1plus): Depend on $(GGC).
1389 * Makefile.in (OBJS): Add ggc-simple.o.
1390 (OBJDEPS): Likewise.
1391 * cp-tree.h (language_function): Rename members to `x_' versions;
1392 we now have x_named_labels, x_ctor_label, x_dtor_label,
1393 x_base_init_list, x_member_init_list, x_base_init_expr,
1394 x_current_class_ptr, x_current_class_ref, x_last_tree,
1395 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1397 (dtor_label, ctor_label, current_base_init_list,
1398 current_member_init_list, base_init_expr, current_class_ptr,
1399 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1400 * decl.c: Include ggc.h.
1401 (last_dtor_insn): Adjust to use x_ names.
1402 (last_parm_cleanup_insn): Likewise.
1403 (original_result_rtx): Likewise.
1404 (named_labels): Likewise.
1405 (mark_binding_level): New function.
1406 (mark_cp_function_context): Likewise.
1407 (mark_false_label_stack): Likewise.
1408 (lang_mark_tree): Likewise.
1409 (lang_cleanup_tree): Likewise.
1411 1999-09-03 Mark Mitchell <mark@codesourcery.com>
1413 * Makefile.in (CXX_TREE_H): Include function.h.
1414 (decl.o): Don't depend on function.h.
1415 (decl2.o): Likewise.
1416 (typeck.o): Likewise.
1418 (method.o): Likewise.
1419 * cp-tree.h: Include function.h.
1420 (cp_function): Rename to language_function. Remove next.
1421 (cp_function_chain): Make it a macro, not a variable.
1422 (push_cp_function_context): Don't declare.
1423 (pop_cp_function_context): Likewise.
1424 * decl.c: Don't include function.h.
1425 (push_cp_function_context): Make it static. Make it suitable for
1426 a save_lang_status callback.
1427 (pop_cp_function_context): Likewise.
1428 (maybe_push_to_top_level): Call push_function_context_to, not
1429 push_cp_function_context.
1430 (pop_from_top_level): Call pop_function_context_from, not
1431 pop_cp_function_context.
1432 (init_decl_processing): Set save_lang_status and
1433 restore_lang_status. Call push_function_context_to, not
1434 push_cp_function_context.
1435 (cp_function_chain): Remove.
1436 * decl2.c: Don't include function.h.
1437 * except.c: Don't include function.h.
1438 (start_anon_func): Call push_function_context_to, not
1439 push_cp_function_context.
1440 (end_anon_func): Call pop_function_context_from, not
1441 pop_cp_function_context.
1442 * init.c: Don't include function.h.
1443 * lex.c (begin_definition_of_inclass_inline): Call
1444 push_function_context_to, not push_cp_function_context.
1445 (process_next_inline): Call pop_function_context_from, not
1446 pop_cp_function_context.
1447 * method.c: Don't include function.h.
1448 (synthesize_method): Call push_function_context_to, not
1449 push_cp_function_context. Call pop_function_context_from, not
1450 pop_cp_function_context.
1451 * typeck.c: Don't include function.h.
1453 * decl.c (expand_static_init): Tweak handling of static
1454 initializations for objects without constructors.
1456 1999-09-03 Nathan Sidwell <nathan@acm.org>
1458 * typeck.c (build_indirect_ref): Reject dereference of pointer to
1461 1999-09-02 Mark Mitchell <mark@codesourcery.com>
1463 * cp-tree.h (cp_function): Move here, from decl.c.
1464 (cp_function_chain): Declare.
1465 (dtor_label): New macro, instead of variable.
1466 (ctor_label): Likewise.
1467 (current_base_init_list): Likewise.
1468 (current_member_init_list): Likewise.
1469 (base_init_expr): Likewise.
1470 (current_class_ptr): Likewise.
1471 (current_class_ref): Likewise.
1472 (last_tree): Likewise.
1473 (last_expr_type): Likewise.
1474 (current_function_returns_value): Likewise.
1475 (current_function_returns_null): Likewise.
1476 (current_function_just_assigned_this): Likewise.
1477 (current_function_parms_stored): Likewise.
1478 (temp_name_counter): Likewise.
1479 (static_labelno): Likewise.
1480 (expanding_p): Likewise.
1481 (stmts_are_full_exprs_p): Likewise.
1482 (in_function_try_handler): Likewise.
1483 (lang_type): Remove nested type_flags. All uses changed.
1484 * call.c (ctor_label): Remove.
1485 (dtor_label): Likewise.
1486 * class.c (current_class_ptr): Remove.
1487 (current_class_ref): Likewise.
1488 * decl.c (static_labelno): Remove.
1489 (dtor_label): Likewise.
1490 (last_dtor_insn): New macro, instead of variable.
1491 (last_parm_cleanup_insn): Likewise.
1492 (original_result_rtx): Likewise.
1493 (in_function_try_handler): Remove.
1494 (named_label_uses): New macro, instead of variable.
1495 (named_labels): Likewise.
1496 (current_function_returns_value): Remove.
1497 (current_function_returns_null): Likewise.
1498 (current_function_assigns_this): New macro, instead of variable.
1499 (current_function_just_assigned_this): Likewise.
1500 (current_binding_level): Likewise.
1501 (init_decl_processing): Call push_cp_function_context.
1502 (cp_function): Move to cp-tree.h
1503 (cp_function_chain): Make it global.
1504 (temp_name_counter): Remove.
1505 (push_cp_function_context): Simplify.
1506 (pop_cp_function_context): Likewise.
1507 * decl2.c (temp_name_counter): Remove.
1508 * init_c (current_base_init_list): Likewise.
1509 (current_member_init_list): Likewise.
1510 (base_init_expr): Likewise.
1511 * method.c (static_labelno): Likewise.
1512 * pt.c (last_tree): Likewise.
1513 * semantics.c (expanding_p): Likewise.
1514 (stmts_are_full_exprs_p): Likewise.
1515 (last_expr_type): Likewise.
1516 * typeck.c (dtor_label): Likewise.
1517 (ctor_label): Likewise.
1519 1999-09-01 Alex Samuel <samuel@codesourcery.com>
1521 * decl2.c (arg_assoc_template_arg): New prototype. New function.
1522 (arg_assoc_class): Use arg_assoc_template_arg for template
1524 (arg_assoc): Likewise.
1525 * pt.c (mangle_class_name_for_template): Allow member template
1528 1999-09-02 Nathan Sidwell <nathan@acm.org>
1530 * call.c (build_conditional_expr): Warn on enum mismatches.
1531 (convert_arg_to_ellipsis): Move non-pod check to after
1534 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1536 * gxx.gperf (hash, is_reserved_word): Add prototypes.
1538 * init.c (build_vec_init): Initialize variable `try_block'.
1540 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1541 Likewise for bzero/memset.
1542 (token_getch, token_put_back): Add static prototypes. Remove
1543 `inline' from the definitions.
1544 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1546 1999-09-01 Mark Mitchell <mark@codesourcery.com>
1548 * cp-tree.h (lang_type): Move align into type_flags.
1549 (CLASSTYPE_ALIGN): Adjust accordingly.
1550 * call.c (direct_reference_binding): Remove misleading comment.
1552 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1554 * parse.y (language_string): Constify.
1556 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1558 * repo.c (getpwd): Don't prototype.
1559 * xref.c (getpwd): Likewise
1561 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1563 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1564 Remove hacks for stuff which now comes from libiberty.
1566 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
1568 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1570 1999-08-30 Mark Mitchell <mark@codesourcery.com>
1572 * cp-tree.h (begin_init_stmts): Declare.
1573 (finish_init_stmts): Likewise.
1574 * cvt.c (build_up_reference): Wrap the declaration of a temporary
1575 in a statement-expression so that we will see it when expanding
1576 tree structure later.
1577 * init.c (begin_init_stmts): Don't make it static.
1578 (finish_init_stmts): Likewise.
1580 * cp-tree.h (start_handler_parms): New function.
1581 (expand_start_catch_block): Take only one parameter.
1582 (start_handler_parms): New function.
1583 * decl.c (start_handler_parms): Define it.
1584 * except.c (process_start_catch_block): Take only one parameter.
1585 Don't call grokdeclarator here.
1586 (expand_start_catch_block): Don't call grokdeclarator here,
1588 * parse.y (handler_args): Adjust call to
1589 expand_start_catch_block. Use start_handler_parms.
1590 * pt.c (push_template_decl_real): Make permanent lists have
1592 (tsubst_expr): Adjust calls to expand_start_catch_block
1594 * semantics.c (expand_stmt): Likewise.
1596 1999-08-29 Alex Samuel <samuel@codesourcery.com>
1598 * pt.c (push_template_decl_real): Use template declaration from
1599 class type if it exists.
1601 1999-08-29 Mark Mitchell <mark@codesourcery.com>
1603 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1604 (maybe_inject_for_scope_var): Declare it.
1605 (initialize_local_var): Likewise.
1606 * decl.c (maybe_inject_for_scope_var): Make it global.
1607 (initialize_local_var): Likewise. Move cleanup handling here,
1608 from cp_finish_decl.
1609 (make_rtl_for_nonlocal_decl): Use
1610 push_obstacks_nochange/pop_obstacks, rather than
1611 end_temporary_allocation/resume_temporary_allocation.
1612 (cp_finish_decl): Try to complete the type of a variable when it
1613 is declared. Move cleanup-handling to initialize_local_var.
1614 (expand_static_init): Use tree-building code, rather than
1616 * decl2.c (get_temp_name): Assert non-initializedness of
1618 * init.c (create_temporary_var): Move RTL-assigning code to ...
1619 (get_temp_regvar): Here.
1620 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
1621 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
1622 call initialize_local_var to generate initialization code.
1624 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1626 * cp-tree.h (fndecl_as_string, type_as_string,
1627 type_as_string_real, args_as_string, decl_as_string,
1628 expr_as_string, code_as_string, language_as_string,
1629 parm_as_string, op_as_string, assop_as_string, cv_as_string,
1630 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1632 * errfn.c (cp_printer): Likewise.
1634 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1635 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1636 cp_file_of, code_as_string, language_as_string, parm_as_string,
1637 op_as_string, assop_as_string, args_as_string, cv_as_string):
1640 * tree.c (lang_printable_name): Likewise.
1642 1999-08-28 Richard Henderson <rth@cygnus.com>
1644 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1646 1999-08-28 Mark Mitchell <mark@codesourcery.com>
1648 * cp-tree.h (strip_array_types): New function.
1649 * decl.c (maybe_deduce_size_from_array_init): New function, split
1650 out from cp_finish_decl.
1651 (layout_var_decl): Likewise.
1652 (maybe_commonize_var): Likewise.
1653 (maybe_inject_for_scope_var): Likewise.
1654 (initialize_local_var): Likewise.
1655 (build_cleanup_on_safe_obstack): Likewise.
1656 (check_initializer): Likewise.
1657 (make_rtl_for_nonlocal_decl): Likewise.
1658 (cp_finish_decl): Use them.
1659 * typeck.c (strip_array_types): New function.
1661 * cp-tree.def (LABEL_STMT): New tree node.
1662 * cp-tree.h (LABEL_STMT_LABEL): New macro.
1663 (shadow_label): Remove.
1664 (declare_local_label): New function.
1665 (finish_label_decl): Likewise.
1666 * decl.c (make_label_decl): New function, split out from
1668 (shadowed_labels): Remove.
1669 (binding_level): Add shadowed_labels.
1670 (clear_binding_level): Remove.
1671 (push_binding_level): Just bzero the new binding level.
1672 (pushlevel): Fix indentation.
1673 (pop_label): New function.
1674 (pop_labels): Likewise, split out from poplevel.
1675 (poplevel): Pop local labels. Use pop_labels.
1676 (maybe_push_to_top_level): Don't clear shadowed_labels.
1677 (lookup_label): Use make_label_decl.
1678 (shadow_label): Remove.
1679 (declare_local_label): New function.
1680 (define_label): Simplify.
1681 (start_function): Don't clear shadowed_labels.
1682 (cp_function): Remove shadowed_labels.
1683 (push_cp_function_context): Don't save shadowed_labels.
1684 (pop_cp_function_context): Don't restore it.
1685 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1686 * parse.y (label_decl): Use finish_label_decl.
1687 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1689 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1691 (finish_label_decl): New function.
1692 (expand_stmt): Handle LABEL_STMTs and local label declarations.
1694 1999-08-26 Mark Mitchell <mark@codesourcery.com>
1696 * decl.c (lookup_label): Build labels on the permanent obstack
1697 when building statement trees. Don't build RTL for labels when
1698 building statement trees.
1699 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1700 building statement trees.
1701 (finish_label_stmt): Likewise.
1702 (expand_stmt): Adjust accordingly.
1703 * pt.c (tsubst_expr); Likewise.
1704 (do_decl_instantiation): Robustify.
1706 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1707 * tree.c (build_cplus_new): Set it.
1708 * expr.c (cplus_expand_expr): Use it.
1709 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1711 * decl.c (store_parm_decls): Reset immediate_size_expand.
1712 (finish_function): Likewise.
1714 * tree.c (cplus_unsave_expr_now): Don't return a value.
1716 * semantics.c (do_poplevel): Always initialize the return value.
1718 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
1720 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1721 * tree.h (cplus_unsave_expr_now) : Same.
1723 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1725 * decl.c (grokdeclarator): Amend comment.
1726 * except.c (expand_start_catch_block): Call push_template_decl for
1727 catch-block parameters.
1728 * method.c (synthesize_method): Build an empty compound statement
1729 for the body of a constructor.
1731 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
1733 * tree.c (cp_build_qualified_type_real): If we're asking for the
1734 same quals we already have, just return.
1736 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1738 * cp-tree.def (SUBOBJECT): New tree node.
1739 * cp-tree.h (CLEANUP_P): New macro.
1740 (SUBOBJECT_CLEANUP): Likewise.
1741 (keep_next_level): Add parameter.
1742 (get_temp_regvar): Don't declare.
1743 (emit_base_init): Remove parameter.
1744 (expand_aggr_init): Rename to build_aggr_init.
1745 (expand_vec_init): Rename to build_vec_init.
1746 (do_pushlevel): Remove.
1747 (do_poplevel): Likewise.
1748 (finish_cleanup): New function.
1749 (finish_subobject): Likewise.
1750 (stmts_are_full_exprs_p): New variable.
1751 * decl.c (keep_next_level): Add parameter.
1752 (cp_finish_decl): Use build_aggr_init, not
1753 expand_aggr_init. Use finish_expr_stmt to expand the code.
1754 (expand_static_init): Use tree-generating, not RTL-generating,
1755 functions to handle the initialization.
1756 (start_function): Remove dead code. Always have a momentary
1757 obstack inside the function, even before hitting the first curly
1759 (cplus_expand_expr_stmt): Move calls to
1760 expand_{start,end}_target_temps into semantics.c.
1761 (cp_function): Add stmts_are_full_exprs_p.
1762 (push_cp_function_context): Save it.
1763 (pop_cp_function_context): Restore it.
1764 * decl2.c (get_temp_regvar): Move to init.c.
1765 (do_static_initialization): Use build_{aggr,vec}_init.
1766 (do_static_destruction): Fix typo in comment.
1767 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1768 * except.c (expand_throw): Use create_temporary_var.
1769 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1770 * init.c (expand_vec_init_try_block): Remove.
1771 (expand_vec_init_catch_clause): Likewise.
1772 (get_temp_regvar): New function.
1773 (begin_init_stmts): Likewise.
1774 (finish_init_stmts): Likewise.
1775 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1777 (emit_base_init): Likewise. Remove unused parameter.
1778 (expand_virtual_init): Likewise.
1779 (expand_cleanup_for_base): Use finish_subobject.
1780 (expand_aggr_vbase_init_1): Simplify.
1781 (construct_virtual_bases): Use tree-generating functions to build
1783 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1784 (expand_default_init): Likewise.
1785 (expand_aggr_init_1): Likewise.
1786 (expand_vec_init): Rename to build_vec_init.
1787 * method.c (do_build_copy_constructor): Use tree-generating
1788 functions. Don't call clear_last_expr.
1789 (do_build_assign_ref): Likewise.
1790 (synthesize_method): Call clear_last_expr here.
1791 * parse.y (base_init): Don't call clear_last_expr here.
1792 (nodecls): Likewise.
1793 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1794 * semantics.c (do_pushlevel): Move to here.
1795 (do_poplevel): Likewise.
1796 (stmts_are_full_exprs_p): New variable.
1797 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1798 (finish_for_stmt): Use finish_expr_stmt.
1799 (finish_cleanup): New function.
1800 (finish_function_try_block): Fix indentation.
1801 (finish_subobject): New function.
1802 (setup_vtbl_ptr): Call keep_next_level here.
1803 (finish_stmt_expr): Handle a block with no scope inside the
1804 statement-expression.
1805 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1807 * tree.c (search_tree): Handle INIT_EXPR.
1809 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1810 * typeck2.c (store_init_value): Change expand_aggr_init to
1811 build_aggr_init in comment.
1813 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1815 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1817 1999-08-25 Nathan Sidwell <nathan@acm.org>
1819 * decl2.c (handle_class_head): Be graceful about additional
1820 scope qualifiers. Adjust comments to reflect reality.
1822 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1824 * call.c (build_conditional_expr): Fix typo.
1825 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1826 lvalue before trying to mess with the sides.
1828 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1830 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1832 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1834 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1836 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1837 Return arbitrary pointer or NULL.
1838 (check_eh_spec): Call __throw_type_match_rtti_2.
1839 * tinfo.h (*::dcast): Return int. Add valp parm.
1840 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1841 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1842 (__throw_type_match_rtti): Now just a wrapper.
1844 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1845 (init_exception_processing): Don't initialize them.
1847 1999-08-23 Paul Burchard <burchard@pobox.com>
1849 * decl.c (check_default_argument): Fix typo.
1851 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1853 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1855 * dump.c (dump_next_stmt): New function.
1856 (dequeue_and_dump): Use it.
1858 * pt.c (tsubst_copy): Make sure to initialize return value for a
1859 STMT_EXPR, even when processing_template_decl.
1860 * semantics.c (finish_stmt_expr): A statement-expression whose
1861 last statement is not an expression-statement has type `void'.
1863 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1865 * semantics.c (finish_stmt_expr): Fix typo in comment.
1866 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1868 * init.c (build_vec_delete_1): Make the children of a permanent
1869 BIND_EXPR permanent.
1870 * pt.c (register_specialization): Don't register a specialization
1873 1999-08-18 Andrew Haley <aph@cygnus.com>
1875 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1876 for all integer parameter types larger than long long.
1878 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1880 * pt.c (redeclare_class_template): Merge default template
1881 arguments in both directions.
1883 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1884 compiler_error message.
1886 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1888 * cp-tree.h: Declare flag_use_repository.
1889 * pt.c (do_decl_instantiation): Don't complain about duplicate
1890 instantiation with -frepo.
1891 (do_type_instantiation): Likewise.
1893 * pt.c (push_template_decl_real): Complain about everything
1894 that isn't a valid template.
1896 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1899 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1901 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1902 * decl2.c (build_expr_from_tree): Handle it.
1903 * error.c (dump_expr): Likewise.
1904 * pt.c (for_each_template_parm): Likewise.
1905 (tsubst_copy): Likewise.
1906 * tree.c (search_tree): Likewise.
1907 * semantics.c (finish_pseudo_destructor_call): Create it.
1909 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1911 * search.c (setup_class_bindings): Robustify.
1912 * typeck.c (common_type): Use same_type_p, not pointer equality,
1915 * cp-tree.h (build_lang_field_decl): Remove.
1916 * class.c (build_vtable): Replace calls to build_lang_field_decl
1917 with build_lang_decl.
1918 (prepare_fresh_vtable): Likewise.
1919 (finish_struct_1): Likewise.
1920 (init_class_processing): Likewise.
1921 * decl.c (push_using_decl): Likewise.
1922 (init_decl_processsing): Likewise.
1923 (grokvardecl): Likewise.
1924 (build_ptrmemfunc_type): Likewise.
1925 (grokdeclarator): Likewise.
1926 (build_enumerator): Likewise.
1927 * decl2.c (grok_x_components): Likewise.
1928 (do_class_using_decl): Likewise.
1929 * except.c (call_eh_info): Likewise.
1930 * init.c (init_init_processing): Likewise.
1931 * rtti.c (expand_class_decl): Likewise.
1932 * tree.c (build_base_fields): Likewise.
1933 (build_vbase_pointer_fields): Likewise.
1934 * lex.c (build_lang_decl): Build declarations on the permanent
1935 obstack if we're building statmeent trees.
1936 (retrofit_lang_decl): Handle both the full lang_decl and also the
1937 smaller lang_decl_flags here.
1938 (build_lang_field_decl): Remove.
1939 * pt.c (push_template_decl_real): Issue errors for variable
1940 declarations that are not static members.
1942 1999-08-18 Richard Henderson <rth@cygnus.com>
1944 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1947 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1949 * cp-tree.h (back_end_hook): New variable.
1950 * decl2.c (back_end_hook): Define it.
1951 (finish_file): If it's non-NULL, call it.
1953 * decl.c (add_decl_to_level): New function.
1954 (push_local_binding): Use it.
1955 (find_binding): Fix typo in comment.
1956 (pushdecl): Use add_decl_to_level. Put templates on the
1957 corresponding namespace-scope binding levels.
1958 * dump.c (dequeue_and_dump): Print the specializations of a
1960 * pt.c (push_template_decl_real): Don't push a template multiple
1963 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1965 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1966 (CALL_DECLARATOR_QUALS): Likewise.
1967 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1968 * decl.c (grokdeclarator): Adjust to use them.
1969 * decl2.c (grokfield): Likewise.
1970 (reparse_absdcl_as_casts): Likewise.
1971 * lex.c (make_call_declarator): Likewise.
1972 (set_quals_and_spec): Likewise.
1973 * pt.c (tsubst): Likewise.
1974 * tree.c (mapcar): Remove special hack to handle third operand of
1977 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1979 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1980 * class.c (build_vtable): Use build_lang_field_decl to build the
1981 VAR_DECLs for vtables.
1982 (prepare_fresh_vtable): Likewise.
1983 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1984 CAN_HAVE_FULL_LANG_DECL_P.
1985 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1986 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1987 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1988 (build_lang_field_decl): Likewise.
1989 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1992 * cp-tree.def (STMT_EXPR): New tree node.
1993 * cp-tree.h (STMT_EXPR_STMT): New macro.
1994 (store_return_init): Change prototype.
1995 (finish_named_return_value): New function.
1996 (expand_stmt): Likewise.
1997 (expand_body): Likewise.
1998 (begin_stmt_tree): Likewise.
1999 (finish_stmt_tree): Likewise.
2000 (expanding_p): New variable.
2001 (last_expr_type): Likewise.
2002 (building_stmt_tree): New macro.
2003 * decl.c (start_function): Use building_stmt_tree, not
2004 processing_template_decl, where appropriate.
2005 (store_parm_decls): Likewise.
2006 (store_return_init): Move most of the body to semantics.c.
2007 (finish_function): Use building_stmt_tree.
2008 (finish_stmt): Clear last_expr_type here.
2009 (cp_function): Add expanding_p, last_tree, last_expr_type.
2010 (push_cp_function_context): Save them.
2011 (pop_cp_function_context): Restore them.
2012 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2013 * error.c (dump_expr): Handle STMT_EXPR.
2014 * except.c (expand_start_catch_block): Use building_stmt_tree.
2016 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2017 (do_case): Move add_tree call to semantics.c.
2018 * parse.y (return_init): Use finish_named_return_value.
2019 (for.init.statement): Use finish_expr_stmt.
2020 * parse.c: Regenerated.
2021 * pt.c (do_pushlevel): Move to semantics.c.
2022 (do_poplevel): Likewise.
2023 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2024 (tsubst_expr): Don't expand all the way to RTL here. Handle
2025 RETURN_INIT and CTOR_INITIALIZER.
2026 (instantiate_decl): Call expand_body after tsubst'ing into
2028 * semantics.c (expand_stmts): New function.
2029 (expanding_p): New variable.
2030 (last_expr_type): Likewise.
2031 (finish_expr_stmt): Use building_stmt_tree.
2032 (begin_if_stmt): Likewise.
2033 (finish_if_stmt_cond): Likewise.
2034 (finish_then_clause): Likewise.
2035 (begin_else_clause): Likewise.
2036 (finish_else_clause): Likewise.
2037 (begin_while_stmt): Likewise.
2038 (finish_while_stmt_cond): Likewise.
2039 (finish_while_stmt): Likewise.
2040 (finish_do_body): Likewise.
2041 (finish_do_stmt): Likewise.
2042 (finish_return_stmt): Likewise.
2043 (begin_for_stmt): Likewise.
2044 (fnish_for_init_stmt): Likewise.
2045 (finish_for_cond): Likewise.
2046 (finish_for_expr): Likewise.
2047 (finish_for_stmt): Likewise.
2048 (finish_break_stmt): Likewise.
2049 (finish_continue_stmt): Likewise.
2050 (finish_switch_cond): Likewise.
2051 (finish_switch_stmt): Likewise.
2052 (finish_case_label): Call add_tree here if necessary.
2053 (finish_goto_statement): Use building_stmt_tree.
2054 (begin_try_block): Likewise.
2055 (begin_function_try_block): Likewise.
2056 (finish_try_block): Likewise.
2057 (finish_function_try_block): Likewise.
2058 (finish_handler_sequence): Likewise.
2059 (finish_function_handler_sequence): Likewise.
2060 (begin_handler): Likewise.
2061 (finish_handler_parms): Likewise.
2062 (finish_handler): Likewise.
2063 (begin_compound_stmt): Likewise.
2064 (finish_compound_stmt): Likewise.
2065 (finish_asm_stmt): Likewise.
2066 (finish_label_stmt): Likewise.
2067 (finish_named_return_value): New function.
2068 (setup_vtbl_ptr): Moved here from decl2.c.
2069 (do_pushlevel): Moved here from pt.c.
2070 (do_poplevel): Likewise.
2071 (begin_stmt_expr): Use building_stmt_tree.
2072 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
2073 when building_stmt_tree.
2074 (begin_stmt_tree): New function.
2075 (finish_stmt_tree): Likewise.
2076 (expand_stmt): Likewise.
2077 (expand_body): Likewise.
2078 * tree.c (build_cplus_method_type): Make sure the argument types
2079 end up on the same obstack as the METHOD_TYPE.
2080 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2081 THROW_EXPR, STMT_EXPR.
2082 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
2083 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
2084 sorry, if an unsupported node is encountered.
2085 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2086 (c_expand_return): Don't call add_tree here.
2088 1999-08-15 Mark Mitchell <mark@codesourcery.com>
2090 * pt.c (check_default_tmpl_args): Don't check in local scopes.
2091 (tsubst_decl): Make sure the declaration is on a saveable
2092 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2094 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2096 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
2098 Speed up Koenig lookup.
2099 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
2100 to return namespaces we've looked at.
2101 * decl2.c (lookup_using_namespace): Likewise.
2102 (add_function): Don't call ovl_member.
2103 (lookup_arg_dependent): Initialize k.namespaces to the list of
2104 namespaces seen in unqualified lookup.
2105 * call.c (equal_functions): Move here from tree.c.
2106 (joust): Use it to handle duplicate candidates.
2107 * tree.c (ovl_member): Use ==.
2109 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2111 * cp-tree.def (DECL_STMT): Make it smaller.
2112 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2113 (lang_decl): ... here. Add next.
2114 (DECL_SAVED_TREE): Adjust accordingly.
2115 (DECL_IMPLICIT_TYPEDEF_P): New macro.
2116 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2117 (DECL_STMT_DECL): Likewise.
2118 (create_implicit_typedef): New function.
2119 (maybe_push_decl): Likewise.
2120 (tsubst_default_argument): New function.
2121 (at_function_scope_p): Likewise.
2122 (add_decl_stmt): Likewise.
2123 (push_permanent_obstack): Likewise.
2124 * call.c (convert_default_arg): Use tsubst_default_argument.
2125 * class.c (add_method): Use push_permanent_obstack.
2126 (build_self_reference): Create a TEMPLATE_DECL for the
2127 self-reference, if necessary.
2128 * decl.c (pseudo_global_level_p): Only look at the current binding
2130 (push_binding): Use push_permanent_obstack.
2131 (create_implicit_typedef): New function.
2133 (duplicate_decls): Use push_permanent_obstack.
2134 (maybe_push_decl): New function.
2135 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
2136 (start_decl_1): Remove dead code.
2137 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
2138 pseudo_global_level_p.
2139 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2141 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
2142 pseudo_global_level_p.
2143 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2145 (get_sentry): Use push_permanent_obstack.
2146 * dump.c (dequeue_and_dump): Enable DECL_STMT.
2147 * except.c (call_eh_info): Use push_permanent_obstack.
2148 (build_eh_type_ref): Likewise.
2149 (do_pop_exception): Likewise.
2150 (expand_eh_spec): Likewise.
2151 (alloc_eh_object): Likewise.
2152 (expand_throw): Likewise.
2153 * init.c (build_java_class_ref): Likewise.
2154 * lex.c (get_time_identifier): Likewise.
2155 (free_lang_decl_chain): Correct type.
2156 (retrofit_lang_decl): Adjust accordingly.
2157 (build_lang_field_decl): Likewise.
2158 * lex.h (free_lang_decl_chain): Likewise.
2159 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2160 * parse.c: Regenerated.
2161 * pt.c (tsubst_default_arguments): New function.
2162 (retrieve_local_specialization): Likewise.
2163 (register_local_specialization): Likewise.
2164 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
2165 pseudo_global_level_p to determine whether or not a template is
2167 (lookup_template_class): Likewise. Use create_implicit_typedef.
2168 (instantiate_class_template): Call tsubst_default_arguments for
2169 member functions, if appropriate.
2170 (tsubst_default_argument): New function.
2171 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
2172 * search.c (at_function_scope_p): New function.
2173 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2174 (finish_label_stmt): Likewise.
2175 (add_decl_stmt): New function.
2176 (begin_class_definition): Likewise.
2177 (finish_typeof): Likewise.
2178 * tree.c (copy_template_template_parm): Likewise.
2179 (copy_to_permanent): Likewise.
2180 (push_permanent_obstack): Define.
2181 (mark_addressable): Use it.
2182 * typeck.c (mark_addressable): Likewise.
2184 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
2186 * cp-tree.h (init_cplus_unsave): New.
2187 (cplus_unsave_expr_now): New.
2188 * lex.c (init_parse): Call init_cplus_unsave.
2189 * tree.c (init_cplus_unsave): New.
2190 (cplus_unsave_expr_now): New.
2192 1999-08-13 Mark Mitchell <mark@codesourcery.com>
2194 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
2195 decl_constant_value to simplify array bounds.
2197 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
2199 * lang-options.h: Add -fms-extensions.
2200 * cp-tree.h: Declare flag_ms_extensions.
2201 * decl2.c: Define it.
2202 * class.c (instantiate_type): Don't complain about taking the address
2203 of a bound member function if -fms-extensions.
2204 * typeck.c (build_unary_op): Likewise.
2205 * decl.c (grokdeclarator): Or about implicit int.
2206 * init.c (resolve_offset_ref): Or about implicit '&'.
2208 1999-08-11 Mark Mitchell <mark@codesourcery.com>
2210 * cp-tree.h (minimal_parse_mode): Remove.
2211 (finish_label_stmt): New function.
2212 * decl.c (saved_scope): Remove minimal parse mode.
2213 (maybe_push_to_top_level): Don't save it.
2214 (pop_from_top_level): Don't restore it.
2215 (define_label): Split out template-handling code to semantics.c.
2216 (start_decl): Don't use minimal_parse_mode.
2217 (cp_finish_decl): Likewise.
2218 (start_function): Don't increment it.
2219 (store_return_init): Don't use it.
2220 (finish_function): Don't decrement it.
2221 * parse.y (label_colon): Use finish_label_stmt throughout.
2222 * parse.c: Regenerated.
2223 * pt.c (minimal_parse_mode): Don't define it.
2224 (tsubst_expr): Use finish_label_stmt.
2225 * semantics.c (finish_label_stmt): New function.
2227 * dump.c (queue): Be careful when computing bitmasks.
2228 (dequeue_and_dump): Describe binfos as binfos, not as
2231 * parse.y (pedantic): Give it itype. Adjust usage accordingly
2233 * parse.c: Regenerated.
2235 * Make-lang.in (CXX_SRCS): Remove sig.c.
2236 * Makefile.in (CXX_OBJS): Remove sig.o.
2238 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2239 (CPTI_SIGNATURE_TYPE): Likewise.
2240 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2241 (opaque_type_node): Likewise.
2242 (signature_type_node): Likewise.
2243 (sigtable_entry_type): Likewise.
2244 (flag_handle_signatures): Likewise.
2245 (lang_type): Remove is_signature, is_signature_pointer,
2246 is_signature_reference, has_opaque_typedecls,
2247 sigtables_has_been_generated. Adjust dummy. Remove signature,
2248 signature_pointer_to, signature_reference_to.
2249 (IS_SIGNATURE): Remove.
2250 (SET_SIGNATURE): Remove.
2251 (CLEAR_SIGNATURE): Remove.
2252 (IS_SIGNATURE_POINTER): Remove.
2253 (IS_SIGNATURE_REFERENCE): Remove.
2254 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2255 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2256 (CLASSTYPE_SIGNATURE): Remove.
2257 (SIGNATURE_TYPE): Remove.
2258 (SIGNATURE_METHOD_VEC): Remove.
2259 (SIGNATURE_POINTER_TO): Remove.
2260 (SIGNATURE_REFERENCE_TO): Remove.
2261 (lang_decl_flags): Remove is_default_implementation. Rename
2262 memfunc_pointer_to to saved_tree.
2263 (IS_DEFAULT_IMPLEMENTATION): Remove.
2264 (DECL_MEMFUNC_POINTER_TO): Remove.
2265 (DECL_MEMFUNC_POINTING_TO): Remove.
2266 (DECL_SAVED_TREE): Adjust definition.
2267 (tag_types): Remove signature_type_node.
2268 (SIGNATURE_FIELD_NAME): Remove.
2269 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2270 (SIGNATURE_OPTR_NAME): Likewise.
2271 (SIGNATURE_SPTR_NAME): Likewise.
2272 (SIGNATURE_POINTER_NAME): Likewise.
2273 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2274 (SIGNATURE_REFERENCE_NAME): Likewise.
2275 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2276 (SIGTABLE_PTR_TYPE): Likewise.
2277 (SIGTABLE_NAME_FORMAT): Likewise.
2278 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2279 (SIGTABLE_TAG_NAME): Likewise.
2280 (SIGTABLE_VB_OFF_NAME): Likewise.
2281 (SIGTABLE_VT_OFF_NAME): Likewise.
2282 (finish_base_specifiers): Change prototype.
2283 (build_signature_pointer_type): Remove.
2284 (build_signature_reference_type): Remove.
2285 (build_signature_pointer_constructor): Remove.
2286 (build_signature_method_call): Remove.
2287 (build_optr_ref): Likewise.
2288 (append_signature_fields): Likewise.
2289 (signature_error): Likewise.
2290 * call.c (build_this): Remove signature support.
2291 (build_over_call): Likewise.
2292 (build_new_method_call): Likewise.
2293 * class.c (add_implicitly_declared_members): Likewise.
2294 (finish_struct_1): Likewise.
2295 (finish_struct): Likewise.
2296 * cvt.c (cp_convert_to_pointer): Likewise.
2297 (convert_to_pointer_force): Likewise.
2298 (ocp_convert): Likewise.
2299 * decl.c (sigtable_decl_p): Remove.
2300 (init_decl_processing): Remove support for signatures.
2301 (cp_finish_decl): Likewise.
2302 (grokdeclarator): Likewise.
2303 (grokparms): Likewise.
2304 (xref_tag): Likewise.
2305 (start_function): Likewise.
2306 (start_method): Likewise.
2307 * decl2.c (finish_sigtable_vardecl): Remove.
2308 (flag_handle_signatures): Remove.
2309 (lang_f_options): Remove handle-signatures.
2310 (grokfield): Remove support for signatures.
2311 (grokbitfield): Likewise.
2312 (finish_file): Likewise.
2313 (reparse_absdcl_as_casts): Likewise.
2314 * error.c (dump_type_real): Likewise.
2315 (dump_function_decl): Likewise.
2316 * friend.c (make_friend_class): Likewise.
2317 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2318 * hash.h: Regenerated.
2319 * init.c (build_new_1): Remove support for signatures.
2320 * lang-options.h: Remove -fhandle-signatures,
2321 -fno-handle-signatures.
2322 * lex.c (init_parse): Remove support for signatures.
2323 (yyprint): Likewise.
2324 * lex.h (rid): Remove RID_SIGNATURE.
2325 * method.c (build_decl_overload_real): Remove support for
2327 (hack_identifier): Likewise.
2328 * parse.y (base_class): Likewise.
2329 (base_class.1): Likewise.
2330 (access_specifier): Likewise.
2331 * search.c (lookup_member): Likewise.
2332 * semantics.c (finish_qualified_object_call_expr): Likewise.
2333 (finish_template_type_parm): Likewise.
2334 (begin_class_definition): Likewise.
2335 (finish_base_specifier): Likewise.
2337 * tree.c (build_cplus_method_type): Remove support for signatures.
2338 * typeck.c (require_complete_type): Likewise.
2339 (c_sizeof): Likewise.
2340 (c_alignof): Likewise.
2341 (build_object_ref): Likewise.
2342 (build_component_ref): Likewise.
2343 (build_indirect_ref): Likewise.
2344 (build_c_cast): Likewise.
2345 (build_modify_expr): Likewise.
2346 (convert_for_initialization): Likewise.
2347 * typeck2.c (signature_error): Remove.
2348 (store_init_value): Remove support for signatures.
2349 (digest_init): Likewise.
2350 (build_x_arrow): Likewise.
2351 (build_functional_cast): Likewise.
2352 * xref.c (GNU_xref_decl): Likewise.
2354 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2356 * lex.c (do_identifier): Remove unnecessary lookup of class field.
2358 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2360 * decl2.c (set_decl_namespace): Do not complain about non-matching
2361 decls if processing a template.
2363 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2365 * decl.c (build_ptrmemfunc_type): Handle qualified
2366 pointer-to-member types here.
2367 * tree.c (cp_build_qualified_type_real): Simplify handling here.
2369 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2371 * lex.c (lang_identify): Likewise.
2373 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
2375 * Makefile.in: Update dependencies.
2376 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2378 * decl.c: Include "function.h"
2379 (cleanup_label, return_label): Delete declarations.
2380 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2381 (finish_function): Rename last_parm_insn variable to
2382 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
2383 * decl2.c: Include "function.h".
2384 (rtl_expr_chain): Delete declaration.
2385 * method.c: Include "function.h"
2386 * tree.c (build_vbase_pointer_fields): Don't initialize
2387 DECL_SAVED_INSNS with NULL_RTX.
2388 * typeck.c: Include "function.h"
2390 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
2392 * semantics.c (begin_function_try_block, finish_function_try_block,
2393 finish_function_handler_sequence): New fns.
2394 * parse.y (function_try_block): Use them.
2395 * pt.c (instantiate_decl): Likewise.
2397 * cp-tree.h: Declare in_function_try_handler.
2398 * decl.c: Define it.
2399 (start_function): Clear it.
2400 (struct cp_function, push_cp_function_context): Save it.
2401 (pop_cp_function_context): Restore it.
2402 * parse.y (function_try_block): Set and clear it.
2403 * except.c (expand_end_catch_block): Rethrow if we reach the end
2404 of a function-try-block handler in a ctor or dtor.
2405 * typeck.c (c_expand_return): Complain about returning from a
2406 function-try-block handler of a ctor.
2408 * parse.y (function_try_block): Call end_protect_partials
2409 before expand_start_all_catch.
2411 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
2413 * decl.c (struct binding_level): Add eh_region field.
2414 (push_binding_level): Set it.
2415 (define_label): Complain about jumping into an EH block.
2417 * ptree.c (print_lang_type): Print the real type of a PMF.
2418 Print what exceptions a fn type throws.
2420 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2422 * class.c (count_fields, add_fields_to_vec): Add static prototype.
2424 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2425 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2428 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2431 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2434 * dump.c (queue_and_dump_index, dump_int, dump_string,
2435 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2437 (dump_stmt): Add static prototype.
2439 * errfn.c (cp_thing): Constify a char*.
2441 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2442 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2443 dump_expr): Constify a char*.
2445 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2446 read_line_number): Add static prototype.
2447 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2448 (real_yylex): Move label `letter' into the scope where it is used.
2450 * method.c (build_mangled_template_parm_index, build_overload_int,
2451 build_decl_overload_real, get_id_2): Constify a char*.
2453 * search.c (check_final_overrider): Make static.
2455 * typeck.c (composite_pointer_type): Constify a char*.
2457 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2459 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2460 we're looking at a class.
2462 * decl.c (lookup_name_real): Set the complain flag if we're
2463 looking for a namespace member.
2465 * lex.c (real_yylex): We can have a number with no digits.
2467 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2469 * search.c (binfo_from_vbase): New fn.
2470 * cp-tree.h: Declare it.
2471 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2472 from pointer to member of virtual base.
2473 * typeck.c (get_delta_difference): Likewise.
2475 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
2477 * pt.c (tsubst): Use build_index_type to build in-template array
2478 index type. Fixes g++.oliva/dwarf1.C.
2479 * decl.c (grokdeclarator): Likewise, just for consistency, as it
2480 doesn't seem to trigger the bug without it.
2482 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2484 * typeck2.c (add_exception_specifier): Use complete_type.
2486 1999-08-06 Mark Mitchell <mark@codesourcery.com>
2488 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2489 (dump_binary_op): Bulletproof.
2490 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2491 * tree.c (search_tree): Don't enumerate all the nodes of classes
2492 `1', `2', and `<'; handle them generically. Don't be sorry about
2493 "unrecognized tree codes"; just abort.
2494 (no_linkage_check): Don't do linkage checks for templates.
2496 * tree.c (cp_build_qualified_type_real): Handle
2497 pointer-to-member-function types correctly.
2499 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
2501 * decl.c (pushdecl): Only give an error for shadowing a parm
2502 from *this* function.
2504 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
2506 * typeck2.c: Update URLs and mail addresses.
2508 1999-08-04 Nathan Sidwell <nathan@acm.org>
2510 * cp-tree.h (empty_except_spec): New global var.
2511 (compexcepttypes): Remove prototype.
2512 (comp_except_specs): Prototype new global function.
2513 (add_exception_specifier): Prototype new global function.
2514 * decl.c (empty_except_spec): Define new global var.
2515 (duplicate_decls): Use comp_except_specs, reword error message.
2516 (init_decl_processing): Initialize empty_except_spec.
2517 Adjust build_exception_variant calls.
2518 * parse.y (exception_specification_opt): Use empty_except_spec.
2519 (ansi_raise_identifier): Call check_for_new_type.
2520 (ansi_raise_identifiers): Use add_exception_specifier.
2521 * pt.c (tsubst): Use add_exception_specifier to build exception
2523 * search.c (check_final_overrider): New static function, broken
2524 out of get_matching_virtual. Check throw specifiers, reword
2526 (get_matching_virtual): Use check_final_overrider.
2527 * tree.c (build_exception_variant): Use comp_except_specs.
2528 * typeck.c (compexcepttypes): Remove.
2529 (comp_except_types): New static function, helper for
2530 comp_except_specs. Compare two types as exception specifiers.
2531 (comp_except_specs): New global function, compare two exception
2533 (comptypes): Adjust for comp_except_specs.
2534 * typeck2.c (add_exception_specifier): New global function.
2536 * class.c (check_for_override): Reword error message.
2538 1999-08-03 Nathan Sidwell <nathan@acm.org>
2540 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2541 * cp-tree.h (struct lang_type): Added non_pod_class flag.
2542 (CLASSTYPE_NON_POD_P): New macro to access it.
2543 * class.c (finish_struct_1): Determine non-PODness.
2544 Check for arrays of pointers (-Weffc++).
2545 Remove array inspection duplicated code.
2546 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2547 Use CLASSTYPE_NON_POD_P.
2549 1999-08-03 Nathan Sidwell <nathan@acm.org>
2551 * class.c (duplicate_tag_error): Preserve template information.
2553 1999-08-03 Nathan Sidwell <nathan@acm.org>
2555 * decl.c (start_enum): Show location of previous definition.
2556 * parse.y (enumlist_opt): New reduction.
2557 (structsp): Simplify enum rules to use enumlist_opt.
2559 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
2561 * lex.c (yyprint): Handle PFUNCNAME.
2563 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2564 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2566 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
2568 * decl.c (start_decl): Set attributes before duplicate_decls call.
2570 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2572 * Make-lang.in (CXX_SRCS): Add dump.c.
2573 * Makefile.in (CXX_OBJS): Add dump.o.
2574 (dump.o): New target.
2575 * cp-tree.h (DECL_CONV_FN_P): Document.
2576 (DECL_OVERLOADED_OPERATOR_P): New function.
2577 (TYPE_PTRMEM_CLASS_TYPE): New macro.
2578 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2579 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2580 (ASM_VOLATILE_P): New macro.
2581 (STMT_LINENO): Likewise.
2582 (cp_namespace_decls): New function.
2583 (dump_node_to_file): New function.
2584 * decl.c (cp_namespace_decls): New function.
2585 (walk_namespaces_r): Use it.
2586 (wrapup_globals_for_namespace): Likewise.
2587 * decl2.c (flag_dump_translation_unit): New variable.
2588 (lang_decode_option): Handle -fdump-translation-unit.
2589 (finish_file): If flag_dump_translation_unit is set, dump the
2592 * lang-options.h: Add -fdump-translation-unit.
2593 * pt.c (tsubst_template_parms): Robustify.
2594 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2595 (tsubst_expr): Use STMT_LINENO.
2596 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
2597 for invalid cv-qualifiers even while building templates.
2599 1999-08-02 Richard Henderson <rth@cygnus.com>
2601 * call.c: Include defaults.h instead of expr.h.
2604 * typeck.c: Include defaults.h.
2606 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2608 * lex.c (errorcount, sorrycount): Don't declare.
2609 * repo.c (errorcount, sorrycount): Likewise.
2610 * typeck2.c (errorcount, sorrycount): Likewise.
2612 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2614 * call.c (convert_default_arg, build_over_call): Change all uses of
2615 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2616 Ensure expr.h is included.
2617 * decl.c (grokparams): Ditto.
2618 * pt.c (tsubst_decl): Ditto.
2619 * typeck.c (convert_arguments): Ditto.
2621 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
2623 * class.c (mark_overriders): Fix order of args to overrides.
2624 (warn_hidden): Likewise. Fix for having virtual and non-virtual
2625 functions with the same name.
2627 1999-08-02 Richard Henderson <rth@cygnus.com>
2629 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2631 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2633 * call.c (build_conditional_expr): Fix typo in comment.
2635 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
2637 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2638 case_stack; use in_control_zone_p.
2639 * typeck.c (c_expand_return): Likewise.
2641 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
2643 * except.c (catch_clauses): Delete declaration.
2645 1999-07-30 Mark Mitchell <mark@codesourcery.com>
2647 * call.c (build_conditional_expr): Call convert_from_reference to
2648 avoid reference/non-reference type confusion. Fix typo.
2650 1999-07-30 Richard Henderson <rth@cygnus.com>
2652 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2653 * cp-tree.h (initializer_constant_valid_p): Remove.
2655 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2657 * call.c (conditional_conversion): Don't build BASE_CONVs for
2658 conversions between things that have the same type.
2659 (build_conditional_expr): Tweak.
2660 (convert_like): Some BASE_CONVs really do require the generation
2663 * init.c (perform_member_init): Don't go through build_modify_expr
2664 for simple initializations.
2666 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
2668 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2669 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2670 virtual functions and MI. Simplify.
2672 * method.c: Remove prototype for largest_union_member.
2673 * pt.c (determine_specialization): Fix uninitialized warning.
2674 * lex.c (real_yylex): Likewise.
2676 1999-07-27 Mark Mitchell <mark@codesourcery.com>
2678 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2681 * cp-tree.h (BINFO_VIRTUALS): Document new format.
2682 * class.c (modify_one_vtable): Change prototype accordingly.
2683 (modify_all_vtables): Likewise.
2684 (modify_all_direct_vtables): Likewise.
2685 (modify_all_indirect_vtables): Likewise.
2686 (build_vtable_entry_for_fn): New function.
2687 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2688 (modify_vtable_entry): Likewise.
2689 (add_virtual_function): Likewise.
2690 (build_vtbl_initializer): New function.
2691 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2692 (fixup_vtable_deltas1): Likewise.
2693 (fixup_vtable_deltas): Likewise.
2694 (override_one_vtable): Likewise.
2695 (finish_struct_1): Likewise.
2697 * error.c (dump_expr): Likewise.
2698 * search.c (get_abstract_virtuals_1): Likewise.
2699 (get_abstract_virtuals): Likewise.
2700 (expand_upcast_fixups): Likewise.
2701 * tree.c (debug_binfo): Likewise.
2702 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2703 __pure_virtual here.
2705 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2707 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2708 as per 1999-07-26 change.
2710 * typeck.c (c_sizeof): Don't allow non-static data members.
2711 (expr_sizeof): Likewise.
2713 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
2715 * input.c (feed_input): Only touch lineno and input_filename
2716 if !USE_CPPLIB. Save the old values before setting the new ones.
2718 * input.c (feed_input): Add file, line parms.
2719 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2720 (real_yylex): Check linemode before input_redirected().
2722 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2723 from op new to warning.
2725 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2727 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2728 * call.c: All uses changed.
2729 * typeck.c: Likewise.
2731 1999-07-26 Nathan Sidwell <nathan@acm.org>
2733 * exception.cc (__cplus_type_matcher): Match __eh_matcher
2736 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2738 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2739 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2740 (strip_top_quals): Declare.
2741 (ncp_convert): Likewise.
2742 (type_after_usual_arithmetic_converions): Likewise.
2743 (composite_pointer_type): Likewise.
2744 * call.c (strip_top_quals): Don't make it static.
2745 (promoted_arithmetic_type_p): New function.
2746 (conditional_conversion): Likewise.
2747 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2748 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
2749 for converting a type to itself.
2750 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2751 (implicit_conversion): Make sure the from and to types are
2753 (add_builtin_candidate): Correct handling of ?: operator.
2754 (add_builtin_candidates): Improve documentation.
2755 (build_conditional_expr): New function.
2756 (can_convert): Implement in terms of can_convert_arg.
2757 (ncp_convert): New function.
2758 * typeck.c (type_after_usual_arithmetic_conversions): New
2759 function, split out from common_type.
2760 (composite_pointer_type): New function, split out from
2761 build_conditional_expr.
2762 (common_type): Use type_after_usual_arithmetic_conversions.
2763 Remove redundant attribute merging.
2764 (comptypes): Tidy. Handle COMPLEX_TYPE.
2765 (build_binary_op_nodefault): Use null_ptr_cst_p.
2766 (build_conditional_expr): Remove.
2767 (convert_for_assignment): Use new conversion functions.
2769 * cp-tree.h (abstract_virtuals_error): Change declaration.
2770 * typeck2.c (abstract_virtuals_error): Check to see if an error
2771 ocurred, and return a boolean value accordingly.
2772 (build_functional_cast): Adjust accordingly.
2773 * class.c (finish_struct_1): Likewise.
2774 * cvt.c (ocp_convert): Likewise.
2775 * decl.c (cp_finish_decl): Likewise.
2776 (grokparams): Likewise.
2777 (grok_op_properties): Likewise.
2778 (start_function): Likewise.
2779 * init.c (build_new_1): Likewise.
2781 * pt.c (unify): Don't get confused by pointers-to-member functions.
2783 * search.c (build_cplus_new): Robustify.
2785 1999-07-24 Richard Henderson <rth@cygnus.com>
2787 * gxx.gperf (__builtin_va_arg): New.
2788 * parse.y (VA_ARG): New token.
2789 (unary_expr): Recognize it.
2791 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2793 * g++FAQ.texi: Deleted per Joe Buck's request.
2794 * Makefile.in: Corresponding changes.
2796 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2798 * lex.c: Sync with C frontend.
2799 (whitespace_cr): New fn.
2800 (skip_white_space): Use it.
2801 (init_parse): Reorder.
2802 (yyprint): Support CONSTANT.
2803 (pragma_getc, pragma_ungetc): Bring back.
2804 (read_line_number): Change in_system_header directly.
2805 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2806 (parse_float): Update to C version.
2807 (yylex): Handle '$' under the letter case.
2808 Remove looking_for_typename handling.
2809 Support hex floating point constants.
2810 Follow C's lead for choosing type of integer constants.
2811 Rearrange stuff to match C frontend.
2812 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2813 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2815 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2817 * call.c (reference_binding): Tweak.
2818 (mayble_handle_implicit_object): Use direct_reference_binding to
2819 create the right implicit conversion sequence.
2821 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2823 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2824 if we're converting to a reference type.
2826 * call.c (NEED_TEMPORARY_P): New macro.
2827 (standard_conversion): Set it, for derived-to-base conversions.
2828 (reference_related_p): New function.
2829 (reference_compatible_p): Likewise.
2830 (convert_class_to_reference): Likewise.
2831 (direct_reference_binding): Likewise.
2832 (reference_binding): Rework for standards-compliance.
2833 (convert_like): Adjust accordingly.
2834 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2835 are now built up in reference_binding.
2836 (initialize_reference): New function.
2837 * cp-tree.h (ICS_USER_FLAG): Document.
2838 (ICS_THIS_FLAG): Likewise.
2839 (ICS_BAD_FLAG): Likewise.
2840 (NEED_TEMPORARY_P): Likewise.
2841 (cp_lvalue_kind): New type.
2842 (real_lvalue_p): Return it.
2843 * error.c (dump_expr): Provide more accurate representation for
2845 * init.c (expand_default_init): Do not try to perform implicit
2846 conversions for a brace-enclosed initializer.
2847 * search.c (lookup_conversions): Document.
2848 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2850 (real_lvalue_p): Adjust accordingly.
2851 (lvalue_p): Likewise.
2852 (build_cplus_new): Don't allow the creation of an abstract class.
2853 * typeck.c (convert_for_initialization): Use initialize_reference.
2855 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2857 * lex.c (real_yylex) : Correct the test for overflow when lexing
2860 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2862 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2863 not DECL_BUILT_IN, to determine if a function is internally declared.
2864 (duplicate_decls): Likewise. Improve handling of builtins.
2865 (push_overloaded_decl): Remove special handling of builtins.
2867 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2869 * decl.c (grokdeclarator): Pull out decl_constant_value in
2872 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2873 * cp-tree.h, pt.c, semantics.c: Adjust.
2874 * method.c (largest_union_member): Remove.
2876 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2878 * lex.c (token_getch, token_put_back): New fns.
2879 (real_yylex): Use them.
2881 * lex.c (lang_init): Generalize.
2882 (lang_init_options): Tell cpplib this is C++.
2883 (nextchar): Remove. Replace uses with put_back.
2884 (skip_white_space): Handle linemode here. Optimize for cpplib.
2885 (extend_token_buffer_to): New fn.
2886 (extend_token_buffer): Use it.
2887 (read_line_number, check_newline): Just deal with tokens.
2888 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2889 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2890 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2891 * parse.y (PAREN_STAR_PAREN): Remove.
2892 * input.c: Don't use the putback machinery with cpplib.
2893 (sub_getch): Fold back into getch.
2894 (getch): Don't handle linemode here.
2895 (feed_input): Unget any text in the token buffer.
2897 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2898 nextyychar, nextyylval): Remove.
2900 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2901 Jason Merrill <jason@yorick.cygnus.com>
2903 * lex.c (indent_level): New variable.
2904 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2905 (consume_string): Make this smart about USE_CPPLIB.
2906 (yyungetc): Use put_back function.
2907 (pragma_getc, pragma_ungetc): Functions deleted.
2908 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2909 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2911 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2912 Also, clean up cases where we redundantly set token_buffer[0].
2913 (read_line_number): New fn.
2914 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2915 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2916 (sub_getch): Conditionalize out code that's not appropriate if
2918 (put_back): Rewrite in case USE_CPPLIB is defined.
2919 (input_redirected): Ditto.
2921 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2923 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2924 c_global_trees and accessor macros defined in c-common.h.
2925 (cp_tree_index): New enumeration.
2926 (cp_global_trees): Declare new array. Add accessor macros for it, and
2927 delete declarations of tree nodes replaced by it.
2928 (builtin_function): Delete macro, add declaration for new function.
2930 * decl.c: Delete definitions for tree nodes that were replaced by
2931 cp_global_trees and c_global_trees.
2932 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2933 to generate the common builtins here.
2934 (builtin_function): New function.
2935 * decl2.c (abort_fndecl): Delete declaration.
2936 * except.c (expand_builtin_return_address): Delete declaration.
2937 (builtin_return_address_fndecl): Delete variable.
2938 (const_ptr_type_node): Delete declaration.
2939 * lex.c (cons_up_default_function): Delete declaration of
2941 * parse.y (void_list_node): Delete declaration.
2942 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2944 (const_string_type_node): Delete declaration.
2945 * search.c (abort_fndecl): Delete declaration.
2946 * Makefile.in: Update dependencies.
2948 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2950 * pt.c (check_default_tmpl_args): Move test for missing default
2951 arguments here, from ...
2952 (end_template_parm_list): Here.
2954 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2956 * decl.c (lookup_nested_type): Remove.
2957 (pushtag): Don't call it.
2959 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2961 * Makefile.in (INTERFACE): Bump to 2.
2963 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2965 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2966 instructions to gcc.gnu.org. Removed e-mail address.
2968 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2970 * pt.c (determine_specialization): Tighten error-checking.
2971 (end_template_parm_list): Likewise.
2973 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2975 * pt.c (check_default_tmpl_args): Handle friends defined in the
2976 class just like member functions defined in the class.
2978 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2979 Jason Merrill <jason@yorick.cygnus.com>
2981 * cp-tree.h (struct lang_decl): Added field for storing sorted
2982 FIELD_DECLs (used in TYPE_DECLs).
2983 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2984 (DECL_SORTED_FIELDS): New macro.
2985 * class.c (method_name_cmp): New function.
2986 (finish_struct_methods): Modified to support sorting and searching
2988 (finish_struct_anon): Changed code in inner loop to use ELT rather
2989 than UELT (which required an extra indirection for every reference).
2990 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2991 (finish_struct_1): Sort fields.
2992 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2993 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2994 Also, switch to using array indexing rather than a changing pointer.
2995 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2998 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
3000 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3001 casts in system headers or extern "C" blocks.
3003 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3006 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
3008 * decl2.c (write_virtuals): Deleted declaration.
3009 * cp-tree.h (write_virtuals): Deleted extern declaration.
3010 * class.c (finish_struct_1): Removed #if 0'd code that mentions
3012 * semantics.c (begin_class_definition): Rewrite code to not depend
3015 * lex.c (cp_pragma_interface): New function.
3016 (cp_pragma_implementation): Likewise.
3017 (handle_cp_pragma): Call them.
3019 * typeck.c (comptypes): Simplify C code in look_hard.
3021 * xref.c (PALLOC): Use xcalloc, not calloc.
3022 (SALLOC): Use xmalloc, not malloc.
3024 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3026 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3029 * decl.c (duplicate_decls): If a redeclaration doesn't match the
3030 initial declaration, then don't save the inline info and by all
3031 means don't mark the function as a builtin function.
3033 * decl.c (lookup_name_real): Set NONCLASS to 1 if
3034 CURRENT_CLASS_TYPE is 0.
3036 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3039 * ptree.c (print_lang_type): Added vtable-needs-writing.
3041 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
3043 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3045 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
3047 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3048 Merged into c-common.
3050 1999-07-05 Dave Brolley <brolley@cygnus.com>
3052 * lex.c (errorcount): Declare it.
3053 (finish_parse): Update errorcount for when using CPPLIB.
3055 1999-07-05 Mark Mitchell <mark@codesourcery.com>
3057 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3059 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3060 * decl.c (push_class_binding): Use it.
3061 (lookup_name_real): Likewise.
3063 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
3065 * cp-tree.h (widest_integer_literal_type_node,
3066 widest_unsigned_literal_type) : New.
3067 * decl.c (widest_integer_literal_type_node,
3068 widest_unsigned_literal_type) : New.
3069 (init_decl_processing): Handle/use the two new types.
3070 * lex.c (real_yylex): Same.
3071 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3074 1999-07-01 Mark Mitchell <mark@codesourcery.com>
3076 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3077 to anonymous cv-qualified types.
3079 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
3081 * lex.c (real_yylex) : Change integer literal overflow handling to
3084 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3086 1999-06-28 Richard Henderson <rth@cygnus.com>
3088 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3090 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
3092 * error.c (dump_type_real): Handle TREE_LIST again.
3094 * typeck.c (comp_target_parms): Don't complain about
3095 converting from () to (...) if !flag_strict_prototype.
3097 * decl.c (grokdeclarator): Update the names of all variants when
3100 1999-06-21 Mark Mitchell <mark@codesourcery.com>
3102 * init.c (expand_aggr_vbase_init): Rename to
3103 construct_virtual_bases. Conditionalize construction here,
3105 (emit_base_init): Here.
3107 1999-06-19 Mark Mitchell <mark@codesourcery.com>
3109 * semantics.c (finish_asm_statement): Apply decay conversions to
3112 * decl.c (expand_static_init): When building an anonymous function
3113 for use with atexit, compute its body before and after entering
3116 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3119 1999-06-18 Mark Mitchell <mark@codesourcery.com>
3121 * init.c (expand_aggr_vbase_init): Add flag parameter.
3122 (build_partial_cleanup_for): Remove, inlining into ..
3123 (expand_cleanup_for_base): ... here. Take flag parameter.
3124 (emit_base_init): Pass the in_chrg parameter to
3125 emit_aggr_vbase_init.
3126 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3128 1999-06-16 Mark Mitchell <mark@codesourcery.com>
3130 * decl2.c (import_export_decl): Use same_type_p, rather than
3131 relying on pointer-equality for types.
3133 * method.c (do_build_copy_constructor): Simplify.
3135 * call.c (build_method_call): Remove bogus code for two-argument
3137 * init.c (build_new_1): Expand on comment, and remove dead code.
3139 * init.c (expand_cleanup_for_base): New function, split out
3141 (emit_base_init): Here.
3142 (expand_aggr_vbase_init): Use it.
3144 1999-06-15 Mark Mitchell <mark@codesourcery.com>
3146 * cp-tree.h (class_cache_firstobj): Declare.
3147 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3148 * class.c (permanent_obstack): Remove declaration.
3149 (class_cache_firstobj): Make it global.
3150 (add_method): Don't use permanent_obstack directly.
3151 (pushclass): Only free the class_cache_obstack if we know how far
3153 (maybe_push_cache_obstack): Rename to push_cache_obstack.
3154 * decl.c: Remove dead comment.
3155 (saved_scope): Add class_cache_firstobj.
3156 (push_to_top_level): Save it.
3157 (pop_from_top_level): Restore it.
3158 (push_class_level_binding): Use push_cache_obstack, not
3159 maybe_push_cache_obstack.
3160 * search.c (push_class_decls): Likewise.
3162 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3164 * pt.c (tsubst_friend_function): Push into namespace of friend
3165 function before pushdecl'ing it.
3167 1999-06-14 Nathan Sidwell <nathan@acm.org>
3169 * call.c (build_new_op): Remove REF_BIND from all operands.
3171 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
3173 * init.c (build_new_1): Look up operator delete even if there was
3174 no explicit new placement.
3176 1999-06-08 Nathan Sidwell <nathan@acm.org>
3178 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3180 (build_throw): ... here. Call it.
3181 (process_start_catch_block): Call it.
3183 1999-06-07 Mark Mitchell <mark@codesourcery.com>
3185 * search.c (convert_pointer_to_single_level): Reimplement without
3188 1999-06-06 Mark Mitchell <mark@codesourcery.com>
3190 * method.c (is_back_referenceable_type): Back-reference bools when
3193 1999-06-07 Dave Brolley <brolley@cygnus.com>
3195 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3196 * input.c (putback_buffer): New structure type.
3197 (putback): Replaces putback_char member.
3198 (putback): Replaces putback_char static variable.
3199 (feed_input): Use putback.
3200 (end_input): Use putback.
3201 (sub_getch): Use putback.
3202 (put_back): Use putback.
3204 1999-06-05 Mark Mitchell <mark@codesourcery.com>
3206 * decl.c (grokdeclarator): Fix typo in last change.
3208 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
3210 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3211 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3213 1999-06-04 Nathan Sidwell <nathan@acm.org>
3215 * except.c (build_throw): Check throw expression validity.
3217 1999-06-03 Mark Mitchell <mark@codesourcery.com>
3219 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3220 just because flag_signed_bitfields is false.
3222 1999-06-03 Nathan Sidwell <nathan@acm.org>
3224 * semantics.c (begin_class_definition): Update the struct's
3226 * class.c (finish_struct): ... rather than here.
3228 * decl.c (make_typename_type): Don't rely on uninitialized
3231 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3233 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3235 1999-05-31 Mark Mitchell <mark@codesourcery.com>
3237 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3238 and friends rather than messing with current_obstack directly.
3239 (cp_build_qualified_type_real): Rework ARRAY_TYPE
3240 allocation to match practice throughout the rest of the
3243 1999-05-30 Mark Mitchell <mark@codesourcery.com>
3245 * lex.c (make_lang_type): Create TYPE_BINFO for
3246 TEMPLATE_TYPE_PARMs just like for non-template types.
3248 * decl.c (start_decl): Move checks on initialization to ...
3249 (cp_finish_decl): Here. Tidy formatting slightly.
3251 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3253 * decl.c (add_binding): Don't complain about a redeclaration of a
3254 semantically identical typedef in a local scope.
3256 1999-05-28 Nathan Sidwell <nathan@acm.org>
3258 * decl.c (complete_array_type): Allocate off same obstack. Fix
3259 DO_DEFAULT comment to match reality.
3261 * friend.c (make_friend_class): Fix diagnostic typo.
3263 1999-05-28 Mark Mitchell <mark@codesourcery.com>
3265 * decl.c (lookup_namespace_name): Handle getting a
3267 (expand_static_init): Don't call pushdecl for implicitly declared
3268 `atexit' used to register destructors.
3270 1999-05-25 Mark Mitchell <mark@codesourcery.com>
3272 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3275 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3276 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
3277 by combining TEMPLATE_INFO and LEVEL into a single union.
3278 (DECL_TEMPLATE_INFO): Reformat.
3279 (DECL_SAVED_TREE): Document.
3280 (DECL_TEMPLATE_INJECT): Remove.
3281 * class.c (finish_struct): Remove code to deal with
3282 DECL_TEMPLATE_INJECT.
3284 * decl.c (maybe_process_template_type_declaration): Handle all new
3285 types in templates uniformly.
3286 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3288 * pt.c (lookup_template_class): Inject template instantiations of
3289 forward-declarations.
3290 (instantiate_class_template): Remove code processing
3291 DECL_TEMPLATE_INJECT.
3293 * pt.c (lookup_template_class): Tweak lookup to find member
3296 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3298 * semantics.c (finish_asm_stmt): Make strings permanent if they're
3301 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
3303 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3304 parts of pointer to data member types.
3306 1999-05-24 Mark Mitchell <mark@codesourcery.com>
3308 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3309 and then make it look like `abort'. Just use `abort' instead.
3311 * typeck.c (build_static_cast): Don't allow static_casts that cast
3313 (casts_away_constness_r): New function.
3314 (casts_away_constness): Likewise.
3316 * decl.c (lookup_tag): Remove code no longer needed after
3317 name-lookup improvements.
3318 * decl2.c (handle_class_head): Make error-recovery more robust.
3319 * friend.c (make_friend_class): Reject templated typename types.
3320 * lex.c (is_global): A template parameter isn't global.
3321 * parse.y (class_head): Robustify.
3322 * parse.c: Regenerated.
3324 1999-05-22 Mark Mitchell <mark@codesourcery.com>
3326 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3327 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
3329 * cp-tree.h (push_nested_namespace): Declare.
3330 (pop_nested_namespace): Likewise.
3331 * decl.c (push_nested_namespace): New function.
3332 (pop_nested_namespace): Likewise.
3333 * pt.c (instantiate_class_template): Use them.
3335 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3337 * cp-tree.h (cplus_expand_constant): Declare.
3338 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3339 converted from one pointer-to-object type to another.
3340 * expr.c (cplus_expand_constant): Don't make it static.
3341 * typeck.c (build_component_ref): Don't crash when presented with
3342 a component which is a TEMPLATE_DECL.
3343 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
3344 cast from a pointer-to-member constant to its own type does not
3345 result in a valid non-type template argument.
3347 1999-05-21 Mark Mitchell <mark@codesourcery.com>
3348 Nathan Sidwell <nathan@acm.org>
3350 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3351 * cp-tree.h: Fix typo in documentation on pointers-to-members.
3352 (cp_build_qualified_type): Make it a macro.
3353 (cp_build_qualified_type_real): Declare.
3354 * decl.c (grokdeclarator): Remove misleading comment. Avoid
3355 problem with template parameters and restrict-qualification.
3356 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3357 * hash.h: Regenerated.
3358 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into