OSDN Git Service

* dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
2
3         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
4         CLEANUP_STMT, and SCOPE_STMT.
5
6         * decl2.c (lang_decode_option): Adjust, in the wake of recent
7         changes to option processing.
8
9 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10
11         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
12         function pointer from pmfs with no object given.
13         (convert_for_assignment): Do not return error when converting
14         pmfs.
15
16 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
17
18         * lex.c (internal_filename): New variable.
19         (INTERNAL_FILENAME): New macro.
20         (init_parse): Allocate internal_filename and mark as root.  Use it
21         instead of a string constant.
22
23 1999-09-21  Nathan Sidwell  <nathan@acm.org>
24
25         Reimplement dynamic cast and catch matching.
26         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
27         * search.c (dynamic_cast_base_recurse): New function.
28         (get_dynamic_cast_base_type): New function for dynamic cast.
29         * rtti.c (build_dynamic_cast_1): Determine source and target
30         class relationship. Call __dynamic_cast_2.
31         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
32         (__user_type_info::dyncast): New dynamic cast dispatcher.
33         (__user_type_info::sub_kind): New nested enumeration.
34         (__user_type_info::contained_p): sub_kind predicate.
35         (__user_type_info::contained_public_p): Likewise.
36         (__user_type_info::contained_nonpublic_p): Likewise.
37         (__user_type_info::contained_nonvirtual_p: Likewise.
38         (__user_type_info::upcast_result): New nested struct.
39         (__user_type_info::dyncast_result): New nested struct.
40         (*::do_upcast): New catch function.
41         (*::do_dyncast): New dynamic cast function.
42         (__user_type_info::find_public_subobj): New dynamic cast
43         helper dispatcher.
44         (*::do_find_public_subobj): New dynamic cast helper function.
45         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
46         (__user_type_info::dyncast): Define dynamic cast dispatcher.
47         (*::do_upcast): Define catch function.
48         (*::do_dyncast): Define dynamic cast function.
49         (*::do_find_public_subobj): Define dynamic cast helper function.
50         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
51         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
52         (__dynamic_cast_2): New dynamic cast runtime.
53
54 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
55
56         * cp-tree.h (finish_stmt_expr): Change prototype.
57         * expr.c (cplus_expand_expr): Adjust call accordingly.
58         * init.c (finish_init_stmts): Likewise.
59         * parse.y (primary): Likewise.
60         * pt.c (tsubst_copy): Likewise.
61         * semantics.c (finish_stmt_expr): Don't take two parameters.
62         Don't remove generated BLOCKs from the block-tree.
63
64         Remove support for assigning to `this'.
65         * NEWS: Note that fact.
66         * class.c (build_vbase_path): Don't check flag_this_is_variable.
67         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
68         (language_function): Remove assigns_this, just_assigned_this, and
69         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
70         (base_init_expr): Remove.
71         (current_vcalls_possible_p): New macro.
72         (vtbls_set_up_p): Likewise.
73         (emit_base_init): Change prototype.
74         * decl.c (finish_destructor_body): New function, split out from
75         finish_function.
76         (current_function_assigns_this): Remove.
77         (current_function_just_assigned_this): Likewise.
78         (start_function): Don't set them.
79         (finish_function): Don't check them.  Don't emit
80         base-initialization code here.  Generate code for destructors when
81         doing semantic analysis.
82         (finish_stmt): Don't check current_function_just_assigned_this.
83         * decl2.c (lang_f_options): Remove this-is-variable.
84         (lang_decode_option): Likewise.
85         (grokclassfn): Don't check flag_this_is_variable.
86         * init.c (emit_base_init): Return the expression generated.
87         (construct_virtual_bases): Don't push/pop obstacks.  Fix
88         typo.
89         (build_new_1): Don't check flag_this_is_variable.
90         (get_temp_regvar): Don't set DECL_REGISTER.
91         (build_vec_init): Don't call use_variable.
92         * lang-options.h: Remove "-fthis-is-variable" and
93         "-fno-this-is-variable".
94         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
95         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
96         expand_expr_stmt.
97         * semantics.c (finish_expr_stmt_real): Rename to ...
98         (finish_expr_stmt): This.  Remove assigned_this parameter.
99         (begin_if_stmt): Call do_pushlevel before starting the statement.
100         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
101         blocks.
102         (setup_vtbl_ptr): Emit initialization code for bases and members
103         at semantic-analysis time.  Emit code to initialize vtables in
104         destructors here.
105         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
106         Don't handle CTOR_INITIALIZER any more.
107         * typeck.c (build_modify_expr): Don't check for assignments to
108         this.
109         (c_expand_return): Don't suggest assigning to `this'.
110         
111         * Makefile.in (decl.o): Depend on RTL_H.
112         (decl2.o): Likewise.
113         (class.o): Likewise.
114         (call.o): Likewise.
115         (method.o): Likewise.
116         (search.o): Likewise.
117         (tree.o): Likewise.
118         (pt.o): Likewise.
119
120         * decl.c (duplicate_decls): When a builtin function is redeclared
121         as static, make sure it is mangled correctly.
122
123         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
124         detail about the statement-tree.
125         
126 1999-09-20  Nathan Sidwell  <nathan@acm.org>
127
128         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
129
130 1999-09-20  Nick Clifton  <nickc@cygnus.com>
131
132         * decl2.c (lang_decode_option): Extend comment.
133
134 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
135
136         * typeck.c: Include "tm_p.h".
137
138 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
139
140         * ir.texi: New file.
141
142 1999-09-19  Paul Burchard <burchard@pobox.com>
143
144         * semantics.c (expand_stmt): Initialize return value.
145
146 1999-09-18  Paul Burchard <burchard@pobox.com>
147
148         * gxxint.texi: G++ now implements namespaces.
149         
150 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
151
152         * decl.c (pop_label): Don't warn about unused labels more than
153         once.
154         * semantics.c (finish_goto_stmt): Always marked used labels as
155         used.
156
157         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
158         even when the declaration is external.
159         (cp_finish_decl): Adjust call to layout_var_decl.
160         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
161
162 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
163
164         * typeck.c (get_member_function_from_ptrfunc): Always consider
165         virtuality inside member pointer.
166
167 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
168
169         Turn on function-at-a-time processing.  
170         * cp-tree.h (doing_semantic_analysis_p): New macro.
171         (SF_DEFAULT): Define to zero, not SF_EXPAND.
172         (start_handler_parms): Change prototype.
173         (expand_start_catch_block): Likewise.
174         (expand_end_catch_block): Likewise.
175         (expand_start_eh_spec): Likewise.
176         (expand_end_eh_spec): Declare.
177         (finish_handler_parms): Change prototype.
178         (begin_catch_block): Declare.
179         (finish_handler): Change prototype.
180         (do_pushlevel): Declare.
181         (do_poplevel): Likewise.  
182         * decl.c (pushlevel): Don't create
183         binding levels when not doing semantic analysis.
184         (poplevel): Don't pop them.
185         (pushdecl): Assert that we are never called when not doing
186         semantic analysis.
187         (pushdecl_top_level): Use push_to_top_level.
188         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
189         label when expanding.
190         (cp_finish_decl): Only inject for-scope variables when doing
191         semantic analysis.  Add comments.
192         (start_handler_parms): Return the handler parm.
193         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
194         already set.  Reinitialize from saved function data if available.
195         Don't pushlevel when not doing semantic analysis.
196         (store_parm_decls): Only generate RTL when expanding.  Only
197         pushdecl when doing semantic analysis.  Set
198         current_eh_spec_try_block if appropriate.
199         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
200         Combine common code.  Don't poplevel when not doing semantic
201         analysis.
202         (push_cp_function_context): Don't expand functions without an
203         explicit call to expand_body.
204         (mark_lang_function): Make eh_spec_try_block and
205         x_scope_stmt_stack.  
206         * except.c (expand_end_eh_spec): Don't
207         declare.
208         (process_start_catch_block): Likewise.
209         (push_eh_cleanup): Use finish_decl_cleanup.
210         (initialize_handler_parm): New function.
211         (expand_start_catch_block): Use it.
212         (expand_end_catch_block): Use tree-generation functions, not
213         RTL-generation functions.
214         (expand_start_eh_spec): Likewise.
215         (expand_end_eh_spec): Likewise.
216         (expand_exception_blocks): Simplify.
217         (start_anon_func): Use do_pushlevel.
218         (end_anon_func): Use do_poplvel.  Call expand_body for the
219         function.  
220         * expr.c (do_case): Don't call define_case_label.  
221         * init.c (create_temporary_var): Set DECL_CONTEXT for local
222         variables.  
223         * method.c (emit_thunk): Call expand_body for the
224         thunk.
225         (sythesize_method): Likewise.  
226         * parse.y (handler_args): Give it ttype.
227         (eat_saved_input): Call expand_body.
228         (base_init): Use do_pushlevel.
229         (pending_inline): Call expand_body.
230         (handler): Adjust calls to finish_handler_parms and
231         finish_handler.
232         (handler_args): Don't call expand_start_catch_block.  Return the
233         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
234         * parse.c: Regenerated.
235         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
236         * semantics.c (do_pushlevel): Give it external linkage.  Build
237         SCOPE_STMTs.
238         (do_poplevel): Likewise.
239         (finish_case_label): Call define_case_label when doing semantic
240         analysis.
241         (finish_goto_stmt): Create RTL for labels.
242         (finish_function_try_block): Set in_function_try_handler
243         unconditionally.
244         (finish_function_handler_sequence): Unset it.
245         (finish_handler_parms): Use expand_start_catch_block even when
246         building a statement-tree.
247         (begin_catch_block): New function.
248         (finish_handler): Move a little RTL-generation logic here.
249         (finish_decl_cleanup): Allow cleanups for empty declarations.
250         (finish_named_return_value): Don't pushdecl when not doing
251         semantic analysis.
252         (expand_stmt): Don't do semantic analysis for variable
253         declarations.  Handle START_CATCH_STMT.  Call expand_label
254         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
255         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
256         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
257         RETURN_INIT and function try blocks.
258         
259         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
260         x_scope_stmt_stack.  Add x_in_charge_parm.
261         (current_eh_spec_try_block): New macro.
262         (current_scope_stmt_stack): Likewise.
263         (current_in_charge_parm): Likewise.
264         * decl.c (start_function): Initialize current_in_charge_parm.
265         (finish_function): Use current_in_charge_parm rather than looking
266         up __in_chrg.
267         * search.c (expand_indirect_vtbls_init): Likewise.
268
269         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
270         (TRY_BLOCK): Likewise.
271         (HANDLER): Likewise.
272         (START_CATCH_STMT): New tree node.
273         (SCOPE_STMT): Likewise.
274         * cp-tree.h (SCOPE_BEGIN_P): New macro.
275         (SCOPE_NULLIFIED_P): Likewise.
276         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
277         (struct lang_decl): Add saved_language_function.
278         (DECL_PENDING_INLINE_INFO): Adjust documentation.
279         (DECL_PENDING_INLINE_P): New macro.
280         (TYPE_TI_ARGS): Fix typo in comment.
281         (DECL_SAVED_TREE): Add to documentation.
282         (DECL_SAVED_FUNCTION_DATA): New macro.
283         (START_CATCH_TYPE): Likewise.
284         (SCOPE_END_P): New macro.
285         (declare_parm_level): Don't declare.
286         * decl.c (mark_lang_function): New function, split out from
287         mark_cp_function_context.
288         (save_function_data): New function.
289         (declare_parm_level): Remove.
290         (finish_function): Use save_function_data to squirrel away
291         important stuff for later use.
292         (mark_cp_function_context): Use mark_function_data.
293         (lang_mark_tree): Likewise.
294         * lex.c (begin_definition_of_inclass_inline): Set
295         DECL_PENDING_INLINE_P.
296         (store_pending_inline): Clear it.
297         * pt.c (tsubst_decl): Likewise.
298
299 1999-09-17  Nathan Sidwell  <nathan@acm.org>
300
301         * call.c (perform_implicit_conversion): Deal with error_mark_node.
302
303 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
304
305         * decl.c (warn_extern_redeclared_static): Don't get confused by
306         static member functions.
307         (duplicate_decls): Merge DECL_THIS_STATIC.
308
309         * decl.c (expand_static_init): Make sure assignments to local
310         statics actually occur.
311
312 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
313
314         * cp-tree.h (poplevel_class): Declare.
315         * class.c (popclass): Use poplevel_class, not poplevel.
316         * decl.c (poplevel_class): Don't make it static.  Don't return a
317         value.
318         (poplevel): Don't call poplevel_class; abort in a class
319         binding level is seen.
320         * semantics.c (finish_translation_unit): Use pop_everything.
321         * parse.y (member_init): Allow errors.
322         (pending_inline): Call finish_function.
323         * parse.c: Regenerated.
324         * Makefile.in (CONFLICTS): Adjust.
325
326 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
327         
328         * error.c: Reduce code duplication.
329         (dump_template_value): New function.
330         (dump_type_real): Use it.
331         (dump_decl): Likewise.
332         (dump_function_name): Likewise.
333         (dump_function_decl): Don't be too talkative about function return
334         type variety.
335
336 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
337
338         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
339
340         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
341
342 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
343
344         * decl2.c (finish_file): Also call check_global_declarations for
345         the pending_statics list.
346
347 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
348
349         * lex.c (cp_pragma_implementation): Allow #pragma implementation
350         in header files.
351
352 1999-09-15  Richard Henderson  <rth@cygnus.com>
353
354         * lex.c (mark_impl_file_chain): Follow the next chain.
355
356 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
357
358         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
359         problems with extern "C" functions redeclared as static.
360         (duplicate_decls): When a builtin is redeclared static, make the
361         new function have internal linkage.
362         
363 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
364
365         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
366         * pt.c (tsubst_copy): Likewise.
367         * tree.c (search_tree): Likewise.
368         (mapcar): Likewise.
369
370 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
371
372         * typeck2.c (ack): Don't declare progname.
373
374 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
375
376         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
377         filenames with ggc_alloc_string.
378
379 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
380
381         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
382         TARGET_EXPR.
383         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
384         the TARGET_EXPR.
385         * cvt.c (build_up_reference): Likewise.
386         * tree.c (build_cplus_new): Likewise.
387         (get_target_expr): Likewise.
388         
389 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
390
391         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
392
393 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
394
395         * cp-tree.h (build_target_expr): New function.
396         * call.c (build_conditional_expr): Use build_target_expr.
397         (convert_like): Likewise.
398         (build_over_call): Likewise.
399         * cvt.c (build_up_reference): Likewise.
400         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
401         (destroy_local_var): Here.
402         (build_target_expr): New function.
403         * tree.c (build_cplus_new): Use it.
404         (get_target_expr): Likewise.
405
406 1999-09-13  Nathan Sidwell  <nathan@acm.org>
407
408         * typeck.c (expr_sizeof): Don't decay arrays and functions.
409         Remove misleading comment.
410         (build_compound_expr): Don't decay arrays.
411
412 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
413
414         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
415         class rvalues again.
416
417 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
418
419         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
420
421         * g++spec.c: Include gcc.h.
422         (lang_specific_driver): Constify a char*.  Call xcalloc, not
423         xmalloc/bzero.  All calls to the function pointer parameter now
424         explicitly call `fatal'.
425
426 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
427
428         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
429         * cvt.c (ocp_convert): Complete the from and destination types.
430         Adjust warning about functions always being `true' in conditionals.
431         * decl.c (duplicate_decls): Don't play funny games with abort.
432         * error.c (dump_expr): Handle OVERLOADs.
433         * spew.c (probe_obstack): Remove.
434         * typeck.c (condition_conversion): Use perform_implicit_conversion.
435         
436 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
437
438         * cp-tree.h (auto_function, define_function): Adjust prototypes.
439         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
440         changed.
441         (auto_function): Likewise, for CODE arg.
442         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
443         (builtin_function): ... here.
444
445 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
446
447         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
448         (init_decl_processing): Don't set TREE_PERMANENT for the
449         error_mark_node.
450         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
451         (grokdeclarator): Likewise.
452         (grokparms): Don't check TREE_PERMANENT when building up lists.
453         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
454         (mark_inline_for_output): Likewise.
455         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
456         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
457         * lex.c (check_newline): Don't check ggc_p; it is always one.
458         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
459         * spew.c (yylex): Don't copy_node or probe_obstacks for
460         non-permanent CONSTANTs and STRINGs.
461         * tree.c (build_cplus_array_type_1): Don't fuss with
462         TREE_PERMANENT on ARRAY_TYPEs.
463         
464         * cp-tree.def (CLEANUP_STMT): New node.
465         * cp-tree.h (language_function): Add name_declared.
466         (current_function_name_declared): New macro.
467         (CLEANUP_DECL): New macro.
468         (CLEANUP_EXPR): Likewise.
469         (emit_local_var): Likewise.
470         (finish_decl_cleanup): New function.
471         * cvt.c (build_up_reference): Simplify.
472         (ocp_convert): Remove dead code.
473         * decl.c (start_decl): Remove call to add_decl_stmt.
474         (grok_reference_init): Adjust, to handle bindings temporaries to
475         references.  Remove dead code.
476         (initialize_local_var): Don't generate RTL for
477         declarations here, or build cleanups here.  Don't fuss with
478         obstacks.  Replace expand_start_target_temps calls with explicit
479         setting of stms_are_full_exprs_p.
480         (destroy_local_var): New function.
481         (emit_local_var): Likewise.
482         (cp_finish_decl): Use them, as appropriate.
483         (start_function): Announce template functions.
484         (store_parm_decls): Don't call declare_function_name here.
485         (finish_stmt): Don't start emit base-initialization code when just
486         building the statement-tree.
487         * init.c (create_temporary_var): Move add_decl_stmt call ...
488         (get_temp_regvar): Here.
489         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
490         cp_finish_decl would expect.  Don't call add_decl_stmt.
491         * semantics.c (begin_compound_stmt): Call declare_function_name,
492         if appropriate.
493         (finish_decl_cleanup): New function.
494         (expand_stmt): Use emit_local_var to output variables.          
495         (expand_body): Set current_funtion_name_declared.
496         
497 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
498
499         * cp-tree.h (finish_cleanup_try_block): New function.
500         * semantics.c (finish_cleanup_try_block): Add comment.
501
502 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
503
504         * cp-tree.h: Delete declarations for all tree nodes now moved to
505         global_trees.
506         * decl.c: Delete their definitions.
507         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
508         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
509         provide defaults.
510         (init_decl_processing): Call build_common_tree_nodes and
511         build_common_tree_nodes_2 instead of building their nodes here.
512         Don't add gc roots for them.
513
514 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
515
516         * cp-tree.h (language_function): Rename expanding_p to
517         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
518         (expanding_p): Adjust accordingly.
519         (TREE_VIA_PRIVATE): Fix typo in comment.
520         (DECL_REFERENCE_SLOT): Remove.
521         (SET_DECL_REFERENCE_SLOT): Likewise.
522         * decl.c (named_label_uses): Adjust. Remove chicken comment.
523         (push_overloaded_decl): Don't truncate the chain of bindings when
524         adding an overloaded function.
525         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
526         (initialize_local_var): Fix typo in comment.
527         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
528         * decl2.c (start_objects): Make the fact that we are expanding
529         the generated function right away explicit.
530         (start_static_storage_duration_function): Likewise.
531         (finish_file): Fix typo in comment.
532         * init.c (build_vec_init): Correct bugs in handling cleanups.
533         * semantics.c (maybe_convert_cond): New function.
534         (FINISH_COND): Always store the condition, even if there's
535         a declaration.
536         (finish_if_stmt_cond): Use maybe_convert_cond.
537         (finish_while_stmt_cond): Likewise.
538         (finish_do_stmt): Likewise.
539         (finish_for_cond): Likewise.
540         (expand_cond): Adjust.
541         
542         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
543         * init.c (perform_member_init): Remove obstack machinations.
544         (expand_cleanup_for_base): Likewise.
545         (finish_init_stmts): Mark the statement-expression as used.
546         * method.c (emit_thunk): Use tree-generating functions, not
547         RTL.
548         (do_build_copy_constructor): Likewise.
549         (do_build_assign_ref): Likewise.
550         (synthesize_method): Likewise.  Keep track of line numbers.
551         * pt.c (tsubst_expr): Handle various kinds of try blocks.
552         * semantics.c (expand_stmts): Remove.
553         (begin_function_try_block): Set FN_TRY_BLOCK_P.
554         (finish_function_try_block): Be careful rechaining 
555         function try blocks.
556         (expand_stmt): Loop through all the statements at a given level.
557         (exapnd_body): Be careful with line-numbers here too.  Prepare for
558         being called directly from the parser.
559
560         * cp-tree.h (finish_function): Adjust prototype.
561         * decl.c (finish_function): Return the function compiled.
562         * pt.c (instantiate_decl): Don't play games with obstacks.
563         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
564         (search_tree): Likewise.
565         * typeck.c: Fix typo in comment.
566         * typeck2.c (store_init_value): Add comment.
567
568         * cp-tree.h (CPTI_ATEXIT): New macro.
569         (atexit_node): Likewise.
570         * decl.c (destroy_local_static): New function, broken out from ...
571         (expand_static_init): Here.
572
573         * rtti.c (get_tinfo_var): These should always be global
574         (expand_si_desc): Use tree, not RTL, functions to generate code.
575         (expand_class_desc): Likewise.
576         (expand_ptr_desc): Likewise.
577         (expand_attr_desc): Likewise.
578         (expand_generic_desc): Likewise.
579         (synthesize_tinfo_fn): Likewise.
580
581 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
582
583         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
584         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
585         RECHAIN_STMTS. 
586         (RECHAIN_STMST_FROM_CHAIN): Likewise.
587
588         * parse.y (simple_stmt): Fix typo in last change.
589
590         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
591         (STMT_IS_FULL_EXPR_P): Likewise.
592         (STMT_LINENO_FOR_FN_P): Likewise.
593         (prep_stmt): New function.
594         (building_stmt_tree): Tweak for safety.
595         * pt.c (tsubst_expr): Use prep_stmt throughout.
596         (add_tree): Move it to semantics.c
597         * semantics.c (add_tree): Move it here.
598         (finish_expr_stmt_real): New function.
599         (finish_expr_stmt): Use it.
600         (finish_if_stmt_cond): Use FINISH_COND.
601         (finish_while_stmt_cond): Likewise.
602         (finish_for_cond): Likewise.
603         (finish_stmt_tree): Tweak line-number handling.
604         (prep_stmt): New function.
605         (expand_stmt): Use it.
606         
607         * cp-tree.h (begin_switch_stmt): Adjust prototype.
608         (finish_switch_cond): Likewise.
609         * parse.y (simple_stmt): Adjust accordingly.
610         * parse.c: Regenerated.
611         * pt.c (tsubst_expr): Adjust accordingly.
612         * semantics.c (expand_cond): New function.
613         (FINISH_COND): New macro.
614         (begin_switch_stmt): Build the SWITCH_STMT here.
615         (finish_switch_stmt_cond): Not here.
616         (expand_stmt): Adjust calls to begin_switch_stmt and
617         finish_switch_cond.  Use expand_cond throughout.
618
619         * dump.c (dequeue_and_dump): Dump types for constants.
620         Describe DECL_ARG_TYPE more intuitively.
621         Handle ARRAY_REF.
622
623         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
624         (lang_cleanup_tree): Remove.
625         * lex.c (make_lang_type): Use ggc_alloc to allocate
626         TYPE_LANG_SPECIFIC.
627
628         Reorganize per-function data.
629         * cp-tree.h (saved_scope): Add function_decl, bindings.
630         (language_function): Rename binding_level to bindings.
631         (cp_function_chain): Use the current_function, not the
632         outer_function_chain.
633         (current_class_ptr): Make it work, even when there's no 
634         current function.
635         (current_class_ref): Likewise.
636         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
637         macros.
638         (clear_temp_name): Remove.
639         * decl.c (check_function_type): New function, broken out from
640         start_function.
641         (current_binding_level): Adjust definition.
642         (pushlevel): Simplify.
643         (poplevel): Don't use named_label_uses when we're outside
644         a function scope.
645         (mark_saved_scope): Mark function_decl and bindings.
646         (maybe_push_to_top_level): Don't unconditionally push a new
647         function context.  Save bindings and the current_function_decl.
648         Don't clear named_labels.
649         (pop_from_top_level): Pop function context if appropriate.
650         (init_decl_processing): Set init_lang_status and free_lang_status,
651         rather than save_lang_status and restore_lang_status.
652         (start_function): Take SF_* flags.  Don't clear per-function data.
653         Reorder and simplify to use new per-function data code.  Add
654         asserts.
655         (store_parm_decls): Don't call init_function_start here.
656         (finish_function): Adjust for new handling of per-function data.
657         (push_cp_function_context): Simplify.
658         (mark_cp_function_context): Change binding_level to bindings.
659         * decl2.c (clear_temp_name): Remove.
660         (start_objects): Use SF flags to start_function.
661         (start_static_storage_duration_function): Likewise.
662         * except.c (start_anon_func): Remove redundant calls to 
663         push_function_context_to.  Use SF flags to start function.
664         (end_anon_func): Remove redundant call to pop_function_context
665         from.
666         * lex.c (reinit_parse_for_function): Don't initialize per-function 
667         data.
668         * method.c (emit_thunk): Clear current_function after calling
669         assemble_end_function.  Use SF flags for start_function.
670         (synthesize_method): Use SF flags for start_function.
671         * parse.c: Regenerated.
672         * parse.y (fn.defpen): Likewise.
673         (pending_inline): Clear current_function, even if something goes
674         wrong.
675         * pt.c (instantiate_decl): Use SF flags to start_function.
676         Don't save and restore expanding_p.
677         (add_tree): Handle the case where we are outside any function.
678         (end_tree): Likewise.
679         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
680         * semantics.c (begin_function_definition): Likewise.
681         (expand_body): Likewise.
682         
683 1999-09-09  Nathan Sidwell  <nathan@acm.org>
684
685         * cp-tree.h (convert_to_void): Prototype new function.
686         (require_complete_type_in_void): Remove prototype.
687         * cvt.c (convert_to_void): New function.
688         (ocp_convert): Use convert_to_void.
689         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
690         expressions.
691         * typeck.c (require_complete_type_in_void): Remove function.
692         (build_compound_expr): Use convert_to_void.
693         (build_static_cast): Likewise.
694         (build_c_cast): Likewise.
695         * semantics.c (finish_expr_stmt): Do not decay full expressions.
696         
697         * typeck.c (build_x_compound_expr): Add FIXME.
698
699 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
700
701         * cp-tree.h (scratch_tree_cons): Remove.
702         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
703         and perm_tree_cons with plain tree_cons.
704         * class.c: Likewise.
705         * decl.c: Likewise.
706         * decl2.c: Likewise.
707         * except.c: Likewise.
708         * expr.c: Likewise.
709         * init.c: Likewise.
710         * lex.c: Likewise.
711         * method.c: Likewise.
712         * parse.y: Likewise.
713         * pt.c: Likewise.
714         * repo.c: Likewise.
715         * rtti.c: Likewise.
716         * search.c: Likewise.
717         * typeck.c: Likewise.
718         * parse.c: Regenerated.
719         * tree.c (build_srcloc): Simplify.
720         
721 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
722
723         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
724         Remove next.
725         (LANG_DECL_PERMANENT): Remove.
726         * decl.c (duplicate_decls): Don't mess about with obstacks trying
727         to free memory.
728         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
729         * lex.c (free_lang_decl_chain): Remove.
730         (build_lang_decl): Don't use obstacks.
731         (retrofit_lang_decl): Likewise.
732         (copy_lang_decl): Likewise.
733
734         * cp-tree.h (saved_scope): Remove old_binding_level and 
735         function_decl.  Tidy up.
736         * decl.c (mark_saved_scope): Don't set them.
737         (maybe_push_to_top_level): Clear memory.
738
739         * decl.c (layout_var_decl): Change prototype.  Don't complete
740         types for external objects.
741         (check_initializer): Likewise.  Tidy.
742         (initialize_local_var): Complete types here.
743         (cp_finish_decl): Not here.  Reorganize a little.
744         (grokvardecl): Don't complete types here.
745
746         * decl.c (start_function): Clear last_dtor_insn and
747         last_parm_cleanup_insn. 
748         (push_cp_function_context): Just copy over a little of
749         the old context, not all of it.
750
751         * cp-tree.h (copy_to_permanent): Remove.
752         (permanent_p): Likewise.
753         * decl.c (building_typename_type): Don't use copy_to_permanent.
754         (start_decl): Likewise.
755         (grok_reference_init): Likewise.
756         (cp_finish_decl): Likewise.
757         * init.c (build_new_1): Don't use mapcar.
758         (build_vec_delete_1): Don't use copy_to_permanent.
759         (build_vec_init): Likewise.
760         * parse.y (primary): Likewise.
761         * parse.c: Regenerated.
762         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
763         (lookup_template_class): Likewise.
764         (tsubst_friend_function): Likewise.
765         (instantiate_class_template): Likewise.
766         (tsubst_decl): Likewise.
767         (tsubst): Likewise.
768         (instantiate_template): Likewise.
769         (unify): Likewise.
770         * rtti.c (get_tinfo_fn): Likewise.
771         (build_dynamic_cast): Likewise.
772         * semantics.c (finish_if_stmt_cond): Likewise.
773         (finish_while_stmt_cond): Likewise.
774         (finish_do_stmt): Likewise.
775         (finish_for_cond): Likewise.
776         (finish_for_expr): Likewise.
777         (finish_cleanup): Likewise.
778         (add_decl_stmt): Likewise.
779         (finish_named_return_value): Likewise.
780         (finish_qualified_call_expr): Likewise.
781         * tree.c (perm_manip): Remove.
782         (build_exception_variant): Don't use copy_to_permanent.
783         (permanent_p): Remove.
784         (copy_to_permament): Remove.
785         (build_min_nt): Don't use copy_to_permanent.
786         (build_min): Likewise.
787         (min_tree_cons): Likewise.
788         * typeckc.c (build_static_cast): Likewise.
789         (build_reinterpret_cast): Likewise.
790         (build_const_cast): Likewise.
791         
792 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
793
794         * decl.c (ggc_p): Set it to 1.
795         (mark_saved_scope): Add prototype.
796
797 1999-09-07  Richard Henderson  <rth@cygnus.com>
798
799         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
800         * typeck.c (self_promoting_args_p): Delete.
801
802 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
803
804         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
805         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
806
807 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
808
809         * Makefile.in (tree.o): Depend on ggc.h.
810         * class.c (make_method_vec): Remove.
811         (free_method_vec): Likewise.
812         (free_method_vecs): Remove.
813         (add_method): Don't use them.
814         * cp-tree.def (PTRMEM_CST): Make it longer.
815         (TEMPLATE_PARM_INDEX): Make it shorter.
816         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
817         (template_parm_index): Remove RTL field.
818         (ptrmem_cst): Add RTL field.
819         (finish_function): Removed parameter.
820         (process_next_inline): Change prototype.
821         (init_cplus_unsave): Rename to init_tree.
822         (binding_init): Remove.
823         * decl.c (free_binding_nodes): Remove.
824         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
825         (pop_binding): Don't use free_binding_nodes.
826         (free_binding_vecs): Remove.
827         (store_bindings): Don't use them.
828         (pop_from_top_level): Likewise.
829         (lookup_namespace_name): Simplify.
830         (build_typename_type): Don't use obstack_free.
831         (unqualified_namespace_lookup): Simplify.
832         (lookup_name_real): Simplify.
833         (start_function): Remove comment about leaks.
834         (finish_function): Removed nested parameter.  Call
835         expand_end_bindings even when building_stmt_tree.
836         Call ggc_push_context and ggc_pop_context around
837         rest_of_compilation, if necessary.
838         (mark_cp_function_context): Handle a NULL language-context.
839         (lang_mark_false_label_stack): Fix typo.
840         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
841         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
842         pointer to method types.
843         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
844         * decl2.c (finish_objects): Adjust call to finish_function.
845         (finish_static_store_duration_function): Likewise.
846         (do_nonmember_using_decl): Remove call to binding_init.
847         * except.c (end_anon_func): Adjust call to finish_function.
848         * lex.c (mark_impl_file_chain): New function.
849         (init_parse): Call init_tree, not init_cplus_unsave.
850         Add GC roots.
851         (cp_pramga_interface): Use xmalloc, not permalloc.
852         (cp_pragma_implementation): Likewise.
853         (begin_definition_of_inclass_inline): Simplify.
854         (process_next_inline): Adjust prototype.
855         (do_scoped_id): Don't call binding_init.
856         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
857         * method.c (emit_thunk): Adjust call to finish_function.
858         (synthesize_method): Likewise.
859         * parse.y (%union): Add a new `pi' variant.
860         (PRE_PARSED_FUNCTION_DECL): Use it.
861         (fn.defpen): Likewise.
862         (fndef): Adjust call to finish_function.
863         * pt.c (instantiate_decl): Likewise.
864         * rtti.c (syntheisze_tinfo_fn): Likewise.
865         * semantics.c (expand_body): Likewise.
866         * tree.c: Include ggc.h.
867         (mark_list_hash): New function.
868         (binding_init): Remove.
869         (init_cplus_unsave): Rename to ...
870         (init_tree): This.  Add GC roots.
871         
872 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
873
874         Get ready for garbage collection.
875         * Makefile.in (CXX_TREE_H): Add varray.h
876         (lex.o): Depend on ggc.h.
877         (decl.o): Likewise.
878         (decl2.o): Likewise.
879         (method.o): Likewise.
880         (search.o): Likewise.
881         (pt.o): Likewise.
882         (repo.o): Likewise.
883         * class.c: Include ggc.h.
884         (current_class_name): Remove.
885         (current_class_type): Likewise.
886         (current_access_specifier): Likewise.
887         (previous_class_type): Likewise.
888         (previous_class_values): Likewise.
889         (class_cache_firstobj): Likewise.
890         (current_lang_base): Likewise.
891         (current_lang_stack): Likewise.
892         (current_lang_stacksize): Likewise.
893         (lang_name_c): Likewise.
894         (lang_name_cplusplus): Likewise.
895         (lang_name_java): Likewise.
896         (current_lang_name): Likewise.
897         (base_layout_decl): Likewise.
898         (access_default_node): Likewise.
899         (access_public_node): Likewise.
900         (access_protected_node): Likewise.
901         (access_private_node): Likewise.
902         (access_default_virtual_node): Likewise.
903         (access_public_virtual_node): Likewise.
904         (access_protected_virtual_node): Likewise.
905         (access_private_virtual_node): Likewise.
906         (signed_zero_node): Likewise.
907         (init_class_processing): Don't build base_layout_decl.
908         (push_lang_context): Adjust now that current_lang_base is a varray.
909         (pop_lang_context): Likewise.
910         * cp-tree.h: Include varray.h.
911         (cp_global_trees): Add access_default, access_public,
912         access_protected, access_private, access_default_virtual,
913         access_public_virtual, access_protected_virtual,
914         access_private_virtual, ctor_identifier, delta2_identifier, 
915         delta_identifier, dtor_identifier, in_charge_identifier,
916         index_identifier, nelts_identifier, this_identifier,
917         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
918         lang_name_c, lang_name_cplusplus, lang_name_java,
919         empty_except_spec, null, jclass, minus_one, terminate.
920         (saved_scope): Move here from decl.c.  Define globals in terms of
921         saved_scope: current_namespace, current_class_name,
922         current_class_type, current_access_specifier, current_lang_stack,
923         current_lang_base, current_lang_name, current_function_parms,
924         current_template_parms, processing_template_decl,
925         processing_specialization, processing_explicit_instantiation,
926         previous_class_type, previous_class_values, class_cache_firstobj.
927         (scope_chain): New variable.
928         (init_pt): New function.
929         * decl.c (current_namespace): Remove.
930         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
931         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
932         (delta_identifier, delta2_identifier): Likewise.
933         (pfn_or_delta2_identifier, tag_identifier): Likewise
934         (vt_off_identifier, empty_except_spec, null_node): Likewise.
935         (current_function_parms, current_lang_base): Remove.
936         (current_lang_stack, previous_class_values): Remove.
937         (class_binding_level): Macroize.
938         (saved_scope): Remove.
939         (current_saved_scope): Rename to scope_chain.
940         (mark_saved_scope): Adjust for new scope structure.
941         (maybe_push_to_top_level): Likewise.
942         (pop_from_top_level): Likewise.
943         (duplicate_decls): Adjust now that current_lang_base is a varray.
944         (build_typename_type): Call ggc_add_tree_hash_table_root.
945         (init_decl_processing): Call init_pt.  Call push_to_top_level to
946         set up globals.  Add GC roots.
947         (xref_basetypes): Adjust now that current_lang_base is a varray.
948         * decl.h (this_identifier): Remove.
949         (in_charge_identifier): Likewise.
950         * decl2.c: Don't include varray.h.
951         (current_namespace): Remove.
952         (init_decl2): Add GC roots.
953         * except.c (Terminate): Remove. 
954         (init_exception_processing): Use terminate_node instead.
955         (build_terminate_handler): Likewise.
956         * init.c (nc_nelts_field_id): Remove.
957         (minus_one): Likewise.
958         (init_init_processing): Use minus_one_node and nelts_identifier
959         instead.  Add GC roots.
960         (jclass_node): Remove.
961         (build_new_1): Use nelts_identifier.
962         (build_vec_init): Likewise.
963         (build_vec_delete): Likewise.
964         * lex.c: Include ggc.h.
965         (defarg_fn): Move declaration early.
966         (defarg_parms): Likewise.
967         (init_parse): Add GC roots.
968         (handle_cp_pragma): Remove redundant declaration of
969         pending_vtables.
970         * method.c: Include ggc.h.
971         (btypelist): Make it a varray.  All uses changed.
972         (ktypelist): Likewise.
973         (init_method): Add GC roots.
974         * pt.c: Don't include varray.h.  Include ggc.h.
975         (current_template_parms): Remove.
976         (processing_template_decl): Likewise.
977         (processing_specialization): Likewise.
978         (processing_explicit_instantiation): Likewise.
979         (init_pt): New function.
980         * repo.c: Include ggc.h.
981         (init_repo): Add GC roots.
982         * search.c: Don't include varray.h.
983         (_vptr_name): Remove.
984         (lookup_field_1): Use vtpr_identifier instead.
985         (expand_indirect_vtbls_init): Remove redundant declaration of
986         in_charge_identifier.
987         (init_search_processing): Use vptr_identifier.
988         
989 1999-09-05  Richard Henderson  <rth@cygnus.com>
990             Bernd Schmidt <bernds@cygnus.co.uk>
991             Mark Mitchell  <mark@codesourcery.com>
992
993         * Makefile.in (parse.o): Depend on ggc.h.
994         (decl2.o): Depend on ggc.h.
995         (init.o): Depend on ggc.h.
996         * cp-tree.h (init_decl2): Declare.
997         (cp_parse_init): Likewise.
998         * decl.c (ggc_p): Define to zero.
999         (mark_saved_scope): New function.
1000         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1001         Register GC roots.
1002         (expand_static_init): Add GC roots.
1003         * decl2.c: Include ggc.h.
1004         (init_decl2): New function.
1005         * init.c: Include ggc.h.
1006         (init_init_processing): Add GC roots.
1007         * parse.y: Include ggc.h.
1008         (cp_parse_init): New function.
1009         
1010 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1011
1012         * decl.c (init_decl_processing): Set mark_lang_status.
1013         (lang_mark_false_label_stack): Adjust prototype.
1014         * decl2.c (grok_function_init): Remove extraneous declaration of
1015         abort_fndecl.
1016
1017         * Make-lang.in (cc1plus): Remove dependency on GGC.
1018         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1019         (OBJDEPS): Don't mention ggc-simple.o.
1020
1021         * Make-lang.in (cc1plus): Depend on $(GGC).
1022         * Makefile.in (OBJS): Add ggc-simple.o.
1023         (OBJDEPS): Likewise.
1024         * cp-tree.h (language_function): Rename members to `x_' versions;
1025         we now have x_named_labels, x_ctor_label, x_dtor_label,
1026         x_base_init_list, x_member_init_list, x_base_init_expr,
1027         x_current_class_ptr, x_current_class_ref, x_last_tree,
1028         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1029         x_result_rtx. 
1030         (dtor_label, ctor_label, current_base_init_list,
1031         current_member_init_list, base_init_expr, current_class_ptr,
1032         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1033         * decl.c: Include ggc.h.
1034         (last_dtor_insn): Adjust to use x_ names.
1035         (last_parm_cleanup_insn): Likewise.
1036         (original_result_rtx): Likewise.
1037         (named_labels): Likewise.
1038         (mark_binding_level): New function.
1039         (mark_cp_function_context): Likewise.
1040         (mark_false_label_stack): Likewise.
1041         (lang_mark_tree): Likewise.
1042         (lang_cleanup_tree): Likewise.
1043         
1044 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1045
1046         * Makefile.in (CXX_TREE_H): Include function.h.
1047         (decl.o): Don't depend on function.h.
1048         (decl2.o): Likewise.
1049         (typeck.o): Likewise.
1050         (init.o): Likewise.
1051         (method.o): Likewise.
1052         * cp-tree.h: Include function.h.
1053         (cp_function): Rename to language_function.  Remove next.
1054         (cp_function_chain): Make it a macro, not a variable.
1055         (push_cp_function_context): Don't declare.
1056         (pop_cp_function_context): Likewise.
1057         * decl.c: Don't include function.h.
1058         (push_cp_function_context): Make it static.  Make it suitable for
1059         a save_lang_status callback.
1060         (pop_cp_function_context): Likewise.
1061         (maybe_push_to_top_level): Call push_function_context_to, not
1062         push_cp_function_context.
1063         (pop_from_top_level): Call pop_function_context_from, not
1064         pop_cp_function_context.
1065         (init_decl_processing):  Set save_lang_status and
1066         restore_lang_status.  Call push_function_context_to, not
1067         push_cp_function_context.
1068         (cp_function_chain): Remove.
1069         * decl2.c: Don't include function.h.
1070         * except.c: Don't include function.h.
1071         (start_anon_func): Call push_function_context_to, not
1072         push_cp_function_context.
1073         (end_anon_func):  Call pop_function_context_from, not
1074         pop_cp_function_context.
1075         * init.c: Don't include function.h.
1076         * lex.c (begin_definition_of_inclass_inline): Call
1077         push_function_context_to, not push_cp_function_context. 
1078         (process_next_inline):  Call pop_function_context_from, not
1079         pop_cp_function_context.
1080         * method.c: Don't include function.h.
1081         (synthesize_method): Call push_function_context_to, not
1082         push_cp_function_context.  Call pop_function_context_from, not
1083         pop_cp_function_context.
1084         * typeck.c: Don't include function.h.
1085         
1086         * decl.c (expand_static_init): Tweak handling of static
1087         initializations for objects without constructors.
1088
1089 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1090
1091         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1092         void.
1093
1094 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1095
1096         * cp-tree.h (cp_function): Move here, from decl.c.
1097         (cp_function_chain): Declare.
1098         (dtor_label): New macro, instead of variable.
1099         (ctor_label): Likewise.
1100         (current_base_init_list): Likewise.
1101         (current_member_init_list): Likewise.
1102         (base_init_expr): Likewise.
1103         (current_class_ptr): Likewise.
1104         (current_class_ref): Likewise.
1105         (last_tree): Likewise.
1106         (last_expr_type): Likewise.
1107         (current_function_returns_value): Likewise.
1108         (current_function_returns_null): Likewise.
1109         (current_function_just_assigned_this): Likewise.
1110         (current_function_parms_stored): Likewise.
1111         (temp_name_counter): Likewise.
1112         (static_labelno): Likewise.
1113         (expanding_p): Likewise.
1114         (stmts_are_full_exprs_p): Likewise.
1115         (in_function_try_handler): Likewise.
1116         (lang_type): Remove nested type_flags.  All uses changed.
1117         * call.c (ctor_label): Remove.
1118         (dtor_label): Likewise.
1119         * class.c (current_class_ptr): Remove.
1120         (current_class_ref): Likewise.
1121         * decl.c (static_labelno): Remove.
1122         (dtor_label): Likewise.
1123         (last_dtor_insn): New macro, instead of variable.
1124         (last_parm_cleanup_insn): Likewise.
1125         (original_result_rtx): Likewise.
1126         (in_function_try_handler): Remove.
1127         (named_label_uses): New macro, instead of variable.
1128         (named_labels): Likewise.
1129         (current_function_returns_value): Remove.
1130         (current_function_returns_null): Likewise.
1131         (current_function_assigns_this): New macro, instead of variable.
1132         (current_function_just_assigned_this): Likewise.
1133         (current_binding_level): Likewise.
1134         (init_decl_processing): Call push_cp_function_context.
1135         (cp_function): Move to cp-tree.h
1136         (cp_function_chain): Make it global.
1137         (temp_name_counter): Remove.
1138         (push_cp_function_context): Simplify.
1139         (pop_cp_function_context): Likewise.
1140         * decl2.c (temp_name_counter): Remove.
1141         * init_c (current_base_init_list): Likewise.
1142         (current_member_init_list): Likewise.
1143         (base_init_expr): Likewise.
1144         * method.c (static_labelno): Likewise.
1145         * pt.c (last_tree): Likewise.
1146         * semantics.c (expanding_p): Likewise.
1147         (stmts_are_full_exprs_p): Likewise.
1148         (last_expr_type): Likewise.
1149         * typeck.c (dtor_label): Likewise.
1150         (ctor_label): Likewise.
1151         
1152 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1153
1154         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1155         (arg_assoc_class): Use arg_assoc_template_arg for template
1156         arguments. 
1157         (arg_assoc): Likewise.
1158         * pt.c (mangle_class_name_for_template): Allow member template
1159         template arguments.
1160
1161 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1162
1163         * call.c (build_conditional_expr): Warn on enum mismatches.
1164         (convert_arg_to_ellipsis): Move non-pod check to after
1165         conversion.
1166
1167 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1168
1169         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1170
1171         * init.c (build_vec_init): Initialize variable `try_block'.
1172
1173         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1174         Likewise for bzero/memset.
1175         (token_getch, token_put_back): Add static prototypes.  Remove
1176         `inline' from the definitions.
1177         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1178
1179 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1180
1181         * cp-tree.h (lang_type): Move align into type_flags.
1182         (CLASSTYPE_ALIGN): Adjust accordingly.
1183         * call.c (direct_reference_binding): Remove misleading comment.
1184
1185 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1186
1187         * parse.y (language_string): Constify.
1188
1189 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1190
1191         * repo.c (getpwd): Don't prototype.
1192         * xref.c (getpwd): Likewise
1193
1194 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1195
1196         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1197         Remove hacks for stuff which now comes from libiberty.
1198
1199 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1200
1201         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1202
1203 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1204
1205         * cp-tree.h (begin_init_stmts): Declare.
1206         (finish_init_stmts): Likewise.
1207         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1208         in a statement-expression so that we will see it when expanding
1209         tree structure later.
1210         * init.c (begin_init_stmts): Don't make it static.
1211         (finish_init_stmts): Likewise.
1212
1213         * cp-tree.h (start_handler_parms): New function.
1214         (expand_start_catch_block): Take only one parameter.
1215         (start_handler_parms): New function.
1216         * decl.c (start_handler_parms): Define it.
1217         * except.c (process_start_catch_block): Take only one parameter.
1218         Don't call grokdeclarator here.
1219         (expand_start_catch_block): Don't call grokdeclarator here,
1220         either.
1221         * parse.y (handler_args): Adjust call to
1222         expand_start_catch_block.  Use start_handler_parms.
1223         * pt.c (push_template_decl_real): Make permanent lists have
1224         permanent elements.
1225         (tsubst_expr): Adjust calls to expand_start_catch_block
1226         appropriately.
1227         * semantics.c (expand_stmt): Likewise.
1228         
1229 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1230
1231         * pt.c (push_template_decl_real): Use template declaration from
1232         class type if it exists.
1233
1234 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1235
1236         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1237         (maybe_inject_for_scope_var): Declare it.
1238         (initialize_local_var): Likewise.
1239         * decl.c (maybe_inject_for_scope_var): Make it global.
1240         (initialize_local_var): Likewise.  Move cleanup handling here,
1241         from cp_finish_decl.
1242         (make_rtl_for_nonlocal_decl): Use
1243         push_obstacks_nochange/pop_obstacks, rather than
1244         end_temporary_allocation/resume_temporary_allocation.
1245         (cp_finish_decl): Try to complete the type of a variable when it
1246         is declared.  Move cleanup-handling to initialize_local_var.
1247         (expand_static_init): Use tree-building code, rather than
1248         RTL-building code.
1249         * decl2.c (get_temp_name): Assert non-initializedness of
1250         temporaries.
1251         * init.c (create_temporary_var): Move RTL-assigning code to ...
1252         (get_temp_regvar): Here.
1253         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1254         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1255         call initialize_local_var to generate initialization code.
1256         
1257 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1258
1259         * cp-tree.h (fndecl_as_string, type_as_string,
1260         type_as_string_real, args_as_string, decl_as_string,
1261         expr_as_string, code_as_string, language_as_string,
1262         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1263         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1264
1265         * errfn.c (cp_printer): Likewise.
1266
1267         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1268         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1269         cp_file_of, code_as_string, language_as_string, parm_as_string,
1270         op_as_string, assop_as_string, args_as_string, cv_as_string):
1271         Likewise.
1272
1273         * tree.c (lang_printable_name): Likewise.
1274
1275 1999-08-28  Richard Henderson  <rth@cygnus.com>
1276
1277         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1278
1279 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1280
1281         * cp-tree.h (strip_array_types): New function.
1282         * decl.c (maybe_deduce_size_from_array_init): New function, split
1283         out from cp_finish_decl.
1284         (layout_var_decl): Likewise.
1285         (maybe_commonize_var): Likewise.
1286         (maybe_inject_for_scope_var): Likewise.
1287         (initialize_local_var): Likewise.
1288         (build_cleanup_on_safe_obstack): Likewise.
1289         (check_initializer): Likewise.
1290         (make_rtl_for_nonlocal_decl): Likewise.
1291         (cp_finish_decl): Use them.
1292         * typeck.c (strip_array_types): New function.
1293         
1294         * cp-tree.def (LABEL_STMT): New tree node.
1295         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1296         (shadow_label): Remove.
1297         (declare_local_label): New function.
1298         (finish_label_decl): Likewise.
1299         * decl.c (make_label_decl): New function, split out from
1300         lookup_label.
1301         (shadowed_labels): Remove.
1302         (binding_level): Add shadowed_labels.
1303         (clear_binding_level): Remove.
1304         (push_binding_level): Just bzero the new binding level.
1305         (pushlevel): Fix indentation.
1306         (pop_label): New function.
1307         (pop_labels): Likewise, split out from poplevel.
1308         (poplevel): Pop local labels.  Use pop_labels.
1309         (maybe_push_to_top_level): Don't clear shadowed_labels.
1310         (lookup_label): Use make_label_decl.
1311         (shadow_label): Remove.
1312         (declare_local_label): New function.
1313         (define_label): Simplify.
1314         (start_function): Don't clear shadowed_labels.
1315         (cp_function): Remove shadowed_labels.
1316         (push_cp_function_context): Don't save shadowed_labels.
1317         (pop_cp_function_context): Don't restore it.
1318         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1319         * parse.y (label_decl): Use finish_label_decl.
1320         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1321         declarations.
1322         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1323         building_stmt_tree.
1324         (finish_label_decl): New function.
1325         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1326         
1327 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1328
1329         * decl.c (lookup_label): Build labels on the permanent obstack
1330         when building statement trees.  Don't build RTL for labels when
1331         building statement trees.
1332         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1333         building statement trees.
1334         (finish_label_stmt): Likewise.
1335         (expand_stmt): Adjust accordingly.
1336         * pt.c (tsubst_expr); Likewise.
1337         (do_decl_instantiation): Robustify.
1338         
1339         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1340         * tree.c (build_cplus_new): Set it.
1341         * expr.c (cplus_expand_expr): Use it.
1342         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1343         
1344         * decl.c (store_parm_decls): Reset immediate_size_expand.
1345         (finish_function): Likewise.
1346         
1347         * tree.c (cplus_unsave_expr_now): Don't return a value.
1348
1349         * semantics.c (do_poplevel): Always initialize the return value.
1350
1351 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1352
1353         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1354         * tree.h (cplus_unsave_expr_now) : Same.
1355
1356 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1357
1358         * decl.c (grokdeclarator): Amend comment.
1359         * except.c (expand_start_catch_block): Call push_template_decl for
1360         catch-block parameters.
1361         * method.c (synthesize_method): Build an empty compound statement
1362         for the body of a constructor.
1363
1364 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
1365
1366         * tree.c (cp_build_qualified_type_real): If we're asking for the
1367         same quals we already have, just return.
1368
1369 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1370
1371         * cp-tree.def (SUBOBJECT): New tree node.
1372         * cp-tree.h (CLEANUP_P): New macro.
1373         (SUBOBJECT_CLEANUP): Likewise.
1374         (keep_next_level): Add parameter.
1375         (get_temp_regvar): Don't declare.
1376         (emit_base_init): Remove parameter.
1377         (expand_aggr_init): Rename to build_aggr_init.
1378         (expand_vec_init): Rename to build_vec_init.
1379         (do_pushlevel): Remove.
1380         (do_poplevel): Likewise.
1381         (finish_cleanup): New function.
1382         (finish_subobject): Likewise.
1383         (stmts_are_full_exprs_p): New variable.
1384         * decl.c (keep_next_level): Add parameter.
1385         (cp_finish_decl): Use build_aggr_init, not
1386         expand_aggr_init.  Use finish_expr_stmt to expand the code.
1387         (expand_static_init): Use tree-generating, not RTL-generating,
1388         functions to handle the initialization.
1389         (start_function): Remove dead code.  Always have a momentary
1390         obstack inside the function, even before hitting the first curly
1391         brace.
1392         (cplus_expand_expr_stmt): Move calls to
1393         expand_{start,end}_target_temps into semantics.c.
1394         (cp_function): Add stmts_are_full_exprs_p.
1395         (push_cp_function_context): Save it.
1396         (pop_cp_function_context): Restore it.
1397         * decl2.c (get_temp_regvar): Move to init.c.
1398         (do_static_initialization): Use build_{aggr,vec}_init.
1399         (do_static_destruction): Fix typo in comment.
1400         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1401         * except.c (expand_throw): Use create_temporary_var.
1402         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1403         * init.c (expand_vec_init_try_block): Remove.
1404         (expand_vec_init_catch_clause): Likewise.
1405         (get_temp_regvar): New function.
1406         (begin_init_stmts): Likewise.
1407         (finish_init_stmts): Likewise.
1408         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
1409         structure here.
1410         (emit_base_init): Likewise.  Remove unused parameter.
1411         (expand_virtual_init): Likewise.
1412         (expand_cleanup_for_base): Use finish_subobject.
1413         (expand_aggr_vbase_init_1): Simplify.
1414         (construct_virtual_bases): Use tree-generating functions to build
1415         up initialization.
1416         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
1417         (expand_default_init): Likewise.
1418         (expand_aggr_init_1): Likewise.
1419         (expand_vec_init): Rename to build_vec_init.
1420         * method.c (do_build_copy_constructor): Use tree-generating
1421         functions.  Don't call clear_last_expr.
1422         (do_build_assign_ref): Likewise.
1423         (synthesize_method): Call clear_last_expr here.
1424         * parse.y (base_init): Don't call clear_last_expr here.
1425         (nodecls): Likewise.
1426         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1427         * semantics.c (do_pushlevel): Move to here.
1428         (do_poplevel): Likewise.
1429         (stmts_are_full_exprs_p): New variable.
1430         (finish_expr_stmt): Handle logic for temoprary cleanup here.
1431         (finish_for_stmt): Use finish_expr_stmt.
1432         (finish_cleanup): New function.
1433         (finish_function_try_block): Fix indentation.
1434         (finish_subobject): New function.
1435         (setup_vtbl_ptr): Call keep_next_level here.
1436         (finish_stmt_expr): Handle a block with no scope inside the
1437         statement-expression.
1438         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
1439         SUBOBJECT.
1440         * tree.c (search_tree): Handle INIT_EXPR.
1441         (mapcar): Likewise.
1442         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1443         * typeck2.c (store_init_value): Change expand_aggr_init to
1444         build_aggr_init in comment.
1445         
1446 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1447
1448         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1449
1450 1999-08-25  Nathan Sidwell  <nathan@acm.org>
1451
1452         * decl2.c (handle_class_head): Be graceful about additional
1453         scope qualifiers. Adjust comments to reflect reality.
1454
1455 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
1456
1457         * call.c (build_conditional_expr): Fix typo.
1458         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1459         lvalue before trying to mess with the sides.
1460
1461         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1462
1463 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
1464
1465         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1466
1467 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
1468
1469         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1470         Return arbitrary pointer or NULL.
1471         (check_eh_spec): Call __throw_type_match_rtti_2.
1472         * tinfo.h (*::dcast): Return int.  Add valp parm.
1473         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
1474         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1475         (__throw_type_match_rtti): Now just a wrapper.
1476
1477         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1478         (init_exception_processing): Don't initialize them.
1479
1480 1999-08-23  Paul Burchard <burchard@pobox.com>
1481
1482         * decl.c (check_default_argument): Fix typo.
1483
1484 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
1485
1486         * cp-tree.def (STMT_EXPR): Fix typo in node name.
1487
1488         * dump.c (dump_next_stmt): New function.
1489         (dequeue_and_dump): Use it.
1490         
1491         * pt.c (tsubst_copy): Make sure to initialize return value for a
1492         STMT_EXPR, even when processing_template_decl.
1493         * semantics.c (finish_stmt_expr): A statement-expression whose
1494         last statement is not an expression-statement has type `void'.  
1495         
1496 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
1497
1498         * semantics.c (finish_stmt_expr): Fix typo in comment.
1499         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1500         (mapcar): Likewise.
1501         * init.c (build_vec_delete_1): Make the children of a permanent
1502         BIND_EXPR permanent.
1503         * pt.c (register_specialization): Don't register a specialization
1504         more than once.
1505         
1506 1999-08-18  Andrew Haley  <aph@cygnus.com>
1507
1508         * method.c (process_overload_item): Call build_mangled_C9x_name ()
1509         for all integer parameter types larger than long long.
1510
1511 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1512
1513         * pt.c (redeclare_class_template): Merge default template
1514         arguments in both directions.
1515
1516         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
1517         compiler_error message.
1518
1519 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
1520
1521         * cp-tree.h: Declare flag_use_repository.
1522         * pt.c (do_decl_instantiation): Don't complain about duplicate
1523         instantiation with -frepo.
1524         (do_type_instantiation): Likewise.
1525
1526         * pt.c (push_template_decl_real): Complain about everything
1527         that isn't a valid template.
1528
1529         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1530         affect inlines.
1531
1532 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1533
1534         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1535         * decl2.c (build_expr_from_tree): Handle it.
1536         * error.c (dump_expr): Likewise.
1537         * pt.c (for_each_template_parm): Likewise.
1538         (tsubst_copy): Likewise.
1539         * tree.c (search_tree): Likewise.
1540         * semantics.c (finish_pseudo_destructor_call): Create it.
1541         
1542 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
1543
1544         * search.c (setup_class_bindings): Robustify.
1545         * typeck.c (common_type): Use same_type_p, not pointer equality,
1546         to compare types.
1547
1548         * cp-tree.h (build_lang_field_decl): Remove.
1549         * class.c (build_vtable): Replace calls to build_lang_field_decl
1550         with build_lang_decl.
1551         (prepare_fresh_vtable): Likewise.
1552         (finish_struct_1): Likewise.
1553         (init_class_processing): Likewise.
1554         * decl.c (push_using_decl): Likewise.
1555         (init_decl_processsing): Likewise.
1556         (grokvardecl): Likewise.
1557         (build_ptrmemfunc_type): Likewise.
1558         (grokdeclarator): Likewise.
1559         (build_enumerator): Likewise.
1560         * decl2.c (grok_x_components): Likewise.
1561         (do_class_using_decl): Likewise.
1562         * except.c (call_eh_info): Likewise.
1563         * init.c (init_init_processing): Likewise.
1564         * rtti.c (expand_class_decl): Likewise.
1565         * tree.c (build_base_fields): Likewise.
1566         (build_vbase_pointer_fields): Likewise.
1567         * lex.c (build_lang_decl): Build declarations on the permanent
1568         obstack if we're building statmeent trees.
1569         (retrofit_lang_decl): Handle both the full lang_decl and also the
1570         smaller lang_decl_flags here.
1571         (build_lang_field_decl): Remove.
1572         * pt.c (push_template_decl_real): Issue errors for variable
1573         declarations that are not static members.
1574
1575 1999-08-18  Richard Henderson  <rth@cygnus.com>
1576
1577         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1578         (mapcar): Likewise.
1579
1580 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1581
1582         * cp-tree.h (back_end_hook): New variable.
1583         * decl2.c (back_end_hook): Define it.
1584         (finish_file): If it's non-NULL, call it.
1585
1586         * decl.c (add_decl_to_level): New function.
1587         (push_local_binding): Use it.
1588         (find_binding): Fix typo in comment.
1589         (pushdecl): Use add_decl_to_level.  Put templates on the
1590         corresponding namespace-scope binding levels.
1591         * dump.c (dequeue_and_dump): Print the specializations of a
1592         template.
1593         * pt.c (push_template_decl_real): Don't push a template multiple
1594         times.
1595
1596 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1597
1598         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1599         (CALL_DECLARATOR_QUALS): Likewise.
1600         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1601         * decl.c (grokdeclarator): Adjust to use them.
1602         * decl2.c (grokfield): Likewise.
1603         (reparse_absdcl_as_casts): Likewise.
1604         * lex.c (make_call_declarator): Likewise.
1605         (set_quals_and_spec): Likewise.
1606         * pt.c (tsubst): Likewise.
1607         * tree.c (mapcar): Remove special hack to handle third operand of
1608         a CALL_EXPR.
1609
1610 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1611
1612         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1613         * class.c (build_vtable): Use build_lang_field_decl to build the
1614         VAR_DECLs for vtables.
1615         (prepare_fresh_vtable): Likewise.
1616         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1617         CAN_HAVE_FULL_LANG_DECL_P.
1618         (push_using_decl): Use build_lang_decl to build USING_DECLs.
1619         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1620         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1621         (build_lang_field_decl): Likewise.
1622         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1623         to copy.
1624         
1625         * cp-tree.def (STMT_EXPR): New tree node.
1626         * cp-tree.h (STMT_EXPR_STMT): New macro.
1627         (store_return_init): Change prototype.
1628         (finish_named_return_value): New function.
1629         (expand_stmt): Likewise.
1630         (expand_body): Likewise.
1631         (begin_stmt_tree): Likewise.
1632         (finish_stmt_tree): Likewise.
1633         (expanding_p): New variable.
1634         (last_expr_type): Likewise.
1635         (building_stmt_tree): New macro.
1636         * decl.c (start_function): Use building_stmt_tree, not
1637         processing_template_decl, where appropriate.
1638         (store_parm_decls): Likewise.
1639         (store_return_init): Move most of the body to semantics.c.
1640         (finish_function): Use building_stmt_tree.
1641         (finish_stmt): Clear last_expr_type here.
1642         (cp_function): Add expanding_p, last_tree, last_expr_type.
1643         (push_cp_function_context): Save them.
1644         (pop_cp_function_context): Restore them.
1645         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1646         * error.c (dump_expr): Handle STMT_EXPR.
1647         * except.c (expand_start_catch_block): Use building_stmt_tree.
1648         Use add_decl_stmt.
1649         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1650         (do_case): Move add_tree call to semantics.c.
1651         * parse.y (return_init): Use finish_named_return_value.
1652         (for.init.statement): Use finish_expr_stmt.
1653         * parse.c: Regenerated.
1654         * pt.c (do_pushlevel): Move to semantics.c.
1655         (do_poplevel): Likewise.
1656         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1657         (tsubst_expr): Don't expand all the way to RTL here.  Handle
1658         RETURN_INIT and CTOR_INITIALIZER.
1659         (instantiate_decl): Call expand_body after tsubst'ing into
1660         DECL_SAVED_TREE.
1661         * semantics.c (expand_stmts): New function.
1662         (expanding_p): New variable.
1663         (last_expr_type): Likewise.
1664         (finish_expr_stmt): Use building_stmt_tree.
1665         (begin_if_stmt): Likewise.
1666         (finish_if_stmt_cond): Likewise.
1667         (finish_then_clause): Likewise.
1668         (begin_else_clause): Likewise.
1669         (finish_else_clause): Likewise.
1670         (begin_while_stmt): Likewise.
1671         (finish_while_stmt_cond): Likewise.
1672         (finish_while_stmt): Likewise.
1673         (finish_do_body): Likewise.
1674         (finish_do_stmt): Likewise.
1675         (finish_return_stmt): Likewise.
1676         (begin_for_stmt): Likewise.
1677         (fnish_for_init_stmt): Likewise.
1678         (finish_for_cond): Likewise.
1679         (finish_for_expr): Likewise.
1680         (finish_for_stmt): Likewise.
1681         (finish_break_stmt): Likewise.
1682         (finish_continue_stmt): Likewise.
1683         (finish_switch_cond): Likewise.
1684         (finish_switch_stmt): Likewise.
1685         (finish_case_label): Call add_tree here if necessary.
1686         (finish_goto_statement): Use building_stmt_tree.
1687         (begin_try_block): Likewise.
1688         (begin_function_try_block): Likewise.
1689         (finish_try_block): Likewise.
1690         (finish_function_try_block): Likewise.
1691         (finish_handler_sequence): Likewise.
1692         (finish_function_handler_sequence): Likewise.
1693         (begin_handler): Likewise.
1694         (finish_handler_parms): Likewise.
1695         (finish_handler): Likewise.
1696         (begin_compound_stmt): Likewise.
1697         (finish_compound_stmt): Likewise.
1698         (finish_asm_stmt): Likewise.
1699         (finish_label_stmt): Likewise.
1700         (finish_named_return_value): New function.
1701         (setup_vtbl_ptr): Moved here from decl2.c.
1702         (do_pushlevel): Moved here from pt.c.
1703         (do_poplevel): Likewise.
1704         (begin_stmt_expr): Use building_stmt_tree.
1705         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
1706         when building_stmt_tree.
1707         (begin_stmt_tree): New function.
1708         (finish_stmt_tree): Likewise.
1709         (expand_stmt): Likewise.
1710         (expand_body): Likewise.
1711         * tree.c (build_cplus_method_type): Make sure the argument types
1712         end up on the same obstack as the METHOD_TYPE.
1713         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1714         THROW_EXPR, STMT_EXPR.
1715         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
1716         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
1717         sorry, if an unsupported node is encountered.
1718         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1719         (c_expand_return): Don't call add_tree here.
1720         
1721 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
1722
1723         * pt.c (check_default_tmpl_args): Don't check in local scopes.
1724         (tsubst_decl): Make sure the declaration is on a saveable
1725         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1726         variable.
1727         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1728         
1729 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
1730
1731         Speed up Koenig lookup.
1732         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
1733         to return namespaces we've looked at.
1734         * decl2.c (lookup_using_namespace): Likewise.
1735         (add_function): Don't call ovl_member.
1736         (lookup_arg_dependent): Initialize k.namespaces to the list of 
1737         namespaces seen in unqualified lookup.
1738         * call.c (equal_functions): Move here from tree.c.
1739         (joust): Use it to handle duplicate candidates.
1740         * tree.c (ovl_member): Use ==.
1741
1742 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1743
1744         * cp-tree.def (DECL_STMT): Make it smaller.
1745         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1746         (lang_decl): ... here.  Add next.
1747         (DECL_SAVED_TREE): Adjust accordingly.
1748         (DECL_IMPLICIT_TYPEDEF_P): New macro.
1749         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1750         (DECL_STMT_DECL): Likewise.
1751         (create_implicit_typedef): New function.
1752         (maybe_push_decl): Likewise.
1753         (tsubst_default_argument): New function.
1754         (at_function_scope_p): Likewise.
1755         (add_decl_stmt): Likewise.
1756         (push_permanent_obstack): Likewise.
1757         * call.c (convert_default_arg): Use tsubst_default_argument.
1758         * class.c (add_method): Use push_permanent_obstack.
1759         (build_self_reference): Create a TEMPLATE_DECL for the
1760         self-reference, if necessary.
1761         * decl.c (pseudo_global_level_p): Only look at the current binding
1762         level.
1763         (push_binding): Use push_permanent_obstack.
1764         (create_implicit_typedef): New function.
1765         (pushtag): Use it.
1766         (duplicate_decls): Use push_permanent_obstack.
1767         (maybe_push_decl): New function.
1768         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
1769         (start_decl_1): Remove dead code.
1770         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
1771         pseudo_global_level_p.
1772         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1773         template.
1774         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
1775         pseudo_global_level_p.
1776         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1777         a template.
1778         (get_sentry): Use push_permanent_obstack.
1779         * dump.c (dequeue_and_dump): Enable DECL_STMT.
1780         * except.c (call_eh_info): Use push_permanent_obstack.
1781         (build_eh_type_ref): Likewise.
1782         (do_pop_exception): Likewise.
1783         (expand_eh_spec): Likewise.
1784         (alloc_eh_object): Likewise.
1785         (expand_throw): Likewise.
1786         * init.c (build_java_class_ref): Likewise.
1787         * lex.c (get_time_identifier): Likewise.
1788         (free_lang_decl_chain): Correct type.
1789         (retrofit_lang_decl): Adjust accordingly.
1790         (build_lang_field_decl): Likewise.
1791         * lex.h (free_lang_decl_chain): Likewise.
1792         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1793         * parse.c: Regenerated.
1794         * pt.c (tsubst_default_arguments): New function.
1795         (retrieve_local_specialization): Likewise.
1796         (register_local_specialization): Likewise.
1797         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
1798         pseudo_global_level_p to determine whether or not a template is
1799         primary.
1800         (lookup_template_class): Likewise.  Use create_implicit_typedef.
1801         (instantiate_class_template): Call tsubst_default_arguments for
1802         member functions, if appropriate.
1803         (tsubst_default_argument): New function.
1804         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
1805         * search.c (at_function_scope_p): New function.
1806         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1807         (finish_label_stmt): Likewise.
1808         (add_decl_stmt): New function.
1809         (begin_class_definition): Likewise.
1810         (finish_typeof): Likewise.
1811         * tree.c (copy_template_template_parm): Likewise.
1812         (copy_to_permanent): Likewise.
1813         (push_permanent_obstack): Define.
1814         (mark_addressable): Use it.
1815         * typeck.c (mark_addressable): Likewise.
1816         
1817 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
1818
1819         * cp-tree.h (init_cplus_unsave): New.
1820         (cplus_unsave_expr_now): New.
1821         * lex.c (init_parse): Call init_cplus_unsave.
1822         * tree.c (init_cplus_unsave): New.
1823         (cplus_unsave_expr_now): New.
1824
1825 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1826
1827         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
1828         decl_constant_value to simplify array bounds.
1829
1830 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
1831
1832         * lang-options.h: Add -fms-extensions.
1833         * cp-tree.h: Declare flag_ms_extensions.
1834         * decl2.c: Define it.
1835         * class.c (instantiate_type): Don't complain about taking the address
1836         of a bound member function if -fms-extensions.
1837         * typeck.c (build_unary_op): Likewise.
1838         * decl.c (grokdeclarator): Or about implicit int.
1839         * init.c (resolve_offset_ref): Or about implicit '&'.
1840
1841 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
1842
1843         * cp-tree.h (minimal_parse_mode): Remove.
1844         (finish_label_stmt): New function.
1845         * decl.c (saved_scope): Remove minimal parse mode.
1846         (maybe_push_to_top_level): Don't save it.
1847         (pop_from_top_level): Don't restore it.
1848         (define_label): Split out template-handling code to semantics.c.
1849         (start_decl): Don't use minimal_parse_mode.
1850         (cp_finish_decl): Likewise.
1851         (start_function): Don't increment it.
1852         (store_return_init): Don't use it.
1853         (finish_function): Don't decrement it.
1854         * parse.y (label_colon): Use finish_label_stmt throughout.
1855         * parse.c: Regenerated.
1856         * pt.c (minimal_parse_mode): Don't define it.
1857         (tsubst_expr): Use finish_label_stmt.
1858         * semantics.c (finish_label_stmt): New function.
1859
1860         * dump.c (queue): Be careful when computing bitmasks.
1861         (dequeue_and_dump): Describe binfos as binfos, not as
1862         vectors.
1863         
1864         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
1865         throughout.     
1866         * parse.c: Regenerated.
1867         
1868         * Make-lang.in (CXX_SRCS): Remove sig.c.
1869         * Makefile.in (CXX_OBJS): Remove sig.o.
1870         (sig.o): Remove.
1871         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1872         (CPTI_SIGNATURE_TYPE): Likewise.
1873         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1874         (opaque_type_node): Likewise.
1875         (signature_type_node): Likewise.
1876         (sigtable_entry_type): Likewise.
1877         (flag_handle_signatures): Likewise.
1878         (lang_type): Remove is_signature, is_signature_pointer,
1879         is_signature_reference, has_opaque_typedecls,
1880         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
1881         signature_pointer_to, signature_reference_to.
1882         (IS_SIGNATURE): Remove.
1883         (SET_SIGNATURE): Remove.
1884         (CLEAR_SIGNATURE): Remove.
1885         (IS_SIGNATURE_POINTER): Remove.
1886         (IS_SIGNATURE_REFERENCE): Remove.
1887         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1888         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1889         (CLASSTYPE_SIGNATURE): Remove.
1890         (SIGNATURE_TYPE): Remove.
1891         (SIGNATURE_METHOD_VEC): Remove.
1892         (SIGNATURE_POINTER_TO): Remove.
1893         (SIGNATURE_REFERENCE_TO): Remove.
1894         (lang_decl_flags): Remove is_default_implementation.  Rename
1895         memfunc_pointer_to to saved_tree.
1896         (IS_DEFAULT_IMPLEMENTATION): Remove.
1897         (DECL_MEMFUNC_POINTER_TO): Remove.
1898         (DECL_MEMFUNC_POINTING_TO): Remove.
1899         (DECL_SAVED_TREE): Adjust definition.
1900         (tag_types): Remove signature_type_node.
1901         (SIGNATURE_FIELD_NAME): Remove.
1902         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1903         (SIGNATURE_OPTR_NAME): Likewise.
1904         (SIGNATURE_SPTR_NAME): Likewise.
1905         (SIGNATURE_POINTER_NAME): Likewise.
1906         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1907         (SIGNATURE_REFERENCE_NAME): Likewise.
1908         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1909         (SIGTABLE_PTR_TYPE): Likewise.
1910         (SIGTABLE_NAME_FORMAT): Likewise.
1911         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1912         (SIGTABLE_TAG_NAME): Likewise.
1913         (SIGTABLE_VB_OFF_NAME): Likewise.
1914         (SIGTABLE_VT_OFF_NAME): Likewise.
1915         (finish_base_specifiers): Change prototype.
1916         (build_signature_pointer_type): Remove.
1917         (build_signature_reference_type): Remove.
1918         (build_signature_pointer_constructor): Remove.
1919         (build_signature_method_call): Remove.
1920         (build_optr_ref): Likewise.
1921         (append_signature_fields): Likewise.
1922         (signature_error): Likewise.
1923         * call.c (build_this): Remove signature support.
1924         (build_over_call): Likewise.
1925         (build_new_method_call): Likewise.
1926         * class.c (add_implicitly_declared_members): Likewise.
1927         (finish_struct_1): Likewise.
1928         (finish_struct): Likewise.
1929         * cvt.c (cp_convert_to_pointer): Likewise.
1930         (convert_to_pointer_force): Likewise.
1931         (ocp_convert): Likewise.
1932         * decl.c (sigtable_decl_p): Remove.
1933         (init_decl_processing): Remove support for signatures.
1934         (cp_finish_decl): Likewise.
1935         (grokdeclarator): Likewise.
1936         (grokparms): Likewise.
1937         (xref_tag): Likewise.
1938         (start_function): Likewise.
1939         (start_method): Likewise.
1940         * decl2.c (finish_sigtable_vardecl): Remove.
1941         (flag_handle_signatures): Remove.
1942         (lang_f_options): Remove handle-signatures.
1943         (grokfield): Remove support for signatures.
1944         (grokbitfield): Likewise.
1945         (finish_file): Likewise.
1946         (reparse_absdcl_as_casts): Likewise.
1947         * error.c (dump_type_real): Likewise.
1948         (dump_function_decl): Likewise.
1949         * friend.c (make_friend_class): Likewise.
1950         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1951         * hash.h: Regenerated.
1952         * init.c (build_new_1): Remove support for signatures.
1953         * lang-options.h: Remove -fhandle-signatures,
1954         -fno-handle-signatures. 
1955         * lex.c (init_parse): Remove support for signatures.
1956         (yyprint): Likewise.
1957         * lex.h (rid): Remove RID_SIGNATURE.
1958         * method.c (build_decl_overload_real): Remove support for
1959         signatures. 
1960         (hack_identifier): Likewise.
1961         * parse.y (base_class): Likewise.
1962         (base_class.1): Likewise.
1963         (access_specifier): Likewise.
1964         * search.c (lookup_member): Likewise.
1965         * semantics.c (finish_qualified_object_call_expr): Likewise.
1966         (finish_template_type_parm): Likewise.
1967         (begin_class_definition): Likewise.
1968         (finish_base_specifier): Likewise.
1969         * sig.c: Remove.
1970         * tree.c (build_cplus_method_type): Remove support for signatures.
1971         * typeck.c (require_complete_type): Likewise.
1972         (c_sizeof): Likewise.
1973         (c_alignof): Likewise.
1974         (build_object_ref): Likewise.
1975         (build_component_ref): Likewise.
1976         (build_indirect_ref): Likewise.
1977         (build_c_cast): Likewise.
1978         (build_modify_expr): Likewise.
1979         (convert_for_initialization): Likewise.
1980         * typeck2.c (signature_error): Remove.
1981         (store_init_value): Remove support for signatures.
1982         (digest_init): Likewise.
1983         (build_x_arrow): Likewise.
1984         (build_functional_cast): Likewise.
1985         * xref.c (GNU_xref_decl): Likewise.
1986         
1987 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1988
1989         * lex.c (do_identifier): Remove unnecessary lookup of class field.
1990
1991 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1992
1993         * decl2.c (set_decl_namespace): Do not complain about non-matching
1994         decls if processing a template.
1995
1996 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
1997
1998         * decl.c (build_ptrmemfunc_type): Handle qualified
1999         pointer-to-member types here.
2000         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2001
2002 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2003
2004         * lex.c (lang_identify): Likewise.
2005
2006 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2007
2008         * Makefile.in: Update dependencies.
2009         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2010         NULL_RTX.
2011         * decl.c: Include "function.h"
2012         (cleanup_label, return_label): Delete declarations.
2013         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2014         (finish_function): Rename last_parm_insn variable to
2015         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2016         * decl2.c: Include "function.h".
2017         (rtl_expr_chain): Delete declaration.
2018         * method.c: Include "function.h"
2019         * tree.c (build_vbase_pointer_fields): Don't initialize
2020         DECL_SAVED_INSNS with NULL_RTX.
2021         * typeck.c: Include "function.h"
2022
2023 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2024
2025         * semantics.c (begin_function_try_block, finish_function_try_block,
2026         finish_function_handler_sequence): New fns.
2027         * parse.y (function_try_block): Use them.
2028         * pt.c (instantiate_decl): Likewise.
2029
2030         * cp-tree.h: Declare in_function_try_handler.
2031         * decl.c: Define it.
2032         (start_function): Clear it.
2033         (struct cp_function, push_cp_function_context): Save it.
2034         (pop_cp_function_context): Restore it.
2035         * parse.y (function_try_block): Set and clear it.
2036         * except.c (expand_end_catch_block): Rethrow if we reach the end
2037         of a function-try-block handler in a ctor or dtor.
2038         * typeck.c (c_expand_return): Complain about returning from a
2039         function-try-block handler of a ctor.
2040
2041         * parse.y (function_try_block): Call end_protect_partials
2042         before expand_start_all_catch.
2043
2044 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2045
2046         * decl.c (struct binding_level): Add eh_region field.
2047         (push_binding_level): Set it.
2048         (define_label): Complain about jumping into an EH block.
2049
2050         * ptree.c (print_lang_type): Print the real type of a PMF.
2051         Print what exceptions a fn type throws.
2052
2053 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2054
2055         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2056
2057         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2058         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2059         char*.
2060
2061         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2062         Constify a char*.
2063
2064         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2065         char*.
2066
2067         * dump.c (queue_and_dump_index, dump_int, dump_string,
2068         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2069         a char*.
2070         (dump_stmt): Add static prototype.
2071
2072         * errfn.c (cp_thing): Constify a char*.
2073
2074         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2075         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2076         dump_expr): Constify a char*.
2077
2078         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2079         read_line_number): Add static prototype.
2080         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2081         (real_yylex): Move label `letter' into the scope where it is used.
2082
2083         * method.c (build_mangled_template_parm_index, build_overload_int,
2084         build_decl_overload_real, get_id_2): Constify a char*.
2085
2086         * search.c (check_final_overrider): Make static.
2087
2088         * typeck.c (composite_pointer_type): Constify a char*.
2089
2090 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2091
2092         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2093         we're looking at a class.
2094
2095         * decl.c (lookup_name_real): Set the complain flag if we're
2096         looking for a namespace member.
2097
2098         * lex.c (real_yylex): We can have a number with no digits.
2099
2100         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2101
2102         * search.c (binfo_from_vbase): New fn.
2103         * cp-tree.h: Declare it.
2104         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2105         from pointer to member of virtual base.  
2106         * typeck.c (get_delta_difference): Likewise.
2107
2108 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2109
2110         * pt.c (tsubst): Use build_index_type to build in-template array
2111         index type.  Fixes g++.oliva/dwarf1.C.
2112         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2113         doesn't seem to trigger the bug without it.
2114
2115 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2116
2117         * typeck2.c (add_exception_specifier): Use complete_type.
2118
2119 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2120
2121         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2122         (dump_binary_op): Bulletproof.
2123         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2124         * tree.c (search_tree): Don't enumerate all the nodes of classes
2125         `1', `2', and `<'; handle them generically.  Don't be sorry about
2126         "unrecognized tree codes"; just abort.
2127         (no_linkage_check): Don't do linkage checks for templates.
2128         
2129         * tree.c (cp_build_qualified_type_real): Handle
2130         pointer-to-member-function types correctly.
2131
2132 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2133
2134         * decl.c (pushdecl): Only give an error for shadowing a parm 
2135         from *this* function.
2136
2137 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2138
2139         * typeck2.c: Update URLs and mail addresses.
2140
2141 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2142
2143         * cp-tree.h (empty_except_spec): New global var.
2144         (compexcepttypes): Remove prototype.
2145         (comp_except_specs): Prototype new global function.
2146         (add_exception_specifier): Prototype new global function.
2147         * decl.c (empty_except_spec): Define new global var.
2148         (duplicate_decls): Use comp_except_specs, reword error message.
2149         (init_decl_processing): Initialize empty_except_spec.
2150         Adjust build_exception_variant calls.
2151         * parse.y (exception_specification_opt): Use empty_except_spec.
2152         (ansi_raise_identifier): Call check_for_new_type.
2153         (ansi_raise_identifiers): Use add_exception_specifier.
2154         * pt.c (tsubst): Use add_exception_specifier to build exception
2155         specifier.
2156         * search.c (check_final_overrider): New static function, broken
2157         out of get_matching_virtual. Check throw specifiers, reword
2158         diagnostics.
2159         (get_matching_virtual): Use check_final_overrider.
2160         * tree.c (build_exception_variant): Use comp_except_specs.
2161         * typeck.c (compexcepttypes): Remove.
2162         (comp_except_types): New static function, helper for
2163         comp_except_specs. Compare two types as exception specifiers.
2164         (comp_except_specs): New global function, compare two exception
2165         specifiers.
2166         (comptypes): Adjust for comp_except_specs.
2167         * typeck2.c (add_exception_specifier): New global function.
2168         
2169         * class.c (check_for_override): Reword error message.
2170
2171 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2172
2173         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2174         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2175         (CLASSTYPE_NON_POD_P): New macro to access it.
2176         * class.c (finish_struct_1): Determine non-PODness.
2177         Check for arrays of pointers (-Weffc++).
2178         Remove array inspection duplicated code.
2179         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2180         Use CLASSTYPE_NON_POD_P.
2181
2182 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2183
2184         * class.c (duplicate_tag_error): Preserve template information.
2185
2186 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2187
2188         * decl.c (start_enum): Show location of previous definition.
2189         * parse.y (enumlist_opt): New reduction.
2190         (structsp): Simplify enum rules to use enumlist_opt.
2191
2192 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2193
2194         * lex.c (yyprint): Handle PFUNCNAME.
2195
2196         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2197         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2198
2199 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2200
2201         * decl.c (start_decl): Set attributes before duplicate_decls call.
2202
2203 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2204
2205         * Make-lang.in (CXX_SRCS): Add dump.c.
2206         * Makefile.in (CXX_OBJS): Add dump.o.
2207         (dump.o): New target.
2208         * cp-tree.h (DECL_CONV_FN_P): Document.
2209         (DECL_OVERLOADED_OPERATOR_P): New function.
2210         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2211         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2212         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2213         (ASM_VOLATILE_P): New macro.
2214         (STMT_LINENO): Likewise.
2215         (cp_namespace_decls): New function.
2216         (dump_node_to_file): New function.
2217         * decl.c (cp_namespace_decls): New function.
2218         (walk_namespaces_r): Use it.
2219         (wrapup_globals_for_namespace): Likewise.
2220         * decl2.c (flag_dump_translation_unit): New variable.
2221         (lang_decode_option): Handle -fdump-translation-unit.
2222         (finish_file): If flag_dump_translation_unit is set, dump the
2223         translation unit.
2224         * dump.c: New file.
2225         * lang-options.h: Add -fdump-translation-unit.
2226         * pt.c (tsubst_template_parms): Robustify.
2227         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2228         (tsubst_expr): Use STMT_LINENO.
2229         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2230         for invalid cv-qualifiers even while building templates.
2231         
2232 1999-08-02  Richard Henderson  <rth@cygnus.com>
2233
2234         * call.c: Include defaults.h instead of expr.h.
2235         * decl.c: Likewise.
2236         * pt.c: Likewise.
2237         * typeck.c: Include defaults.h.
2238
2239 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2240
2241         * lex.c (errorcount, sorrycount): Don't declare.
2242         * repo.c (errorcount, sorrycount): Likewise.
2243         * typeck2.c (errorcount, sorrycount): Likewise.
2244
2245 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2246
2247         * call.c (convert_default_arg, build_over_call): Change all uses of
2248         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2249         Ensure expr.h is included.
2250         * decl.c (grokparams): Ditto.
2251         * pt.c (tsubst_decl): Ditto.
2252         * typeck.c (convert_arguments): Ditto.
2253
2254 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2255
2256         * class.c (mark_overriders): Fix order of args to overrides.
2257         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2258         functions with the same name.
2259
2260 1999-08-02  Richard Henderson  <rth@cygnus.com>
2261
2262         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2263
2264 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2265
2266         * call.c (build_conditional_expr): Fix typo in comment.
2267
2268 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2269
2270         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2271         case_stack; use in_control_zone_p.
2272         * typeck.c (c_expand_return): Likewise.
2273
2274 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2275
2276         * except.c (catch_clauses): Delete declaration.
2277
2278 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2279
2280         * call.c (build_conditional_expr): Call convert_from_reference to
2281         avoid reference/non-reference type confusion.  Fix typo.
2282
2283 1999-07-30  Richard Henderson  <rth@cygnus.com>
2284
2285         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2286         * cp-tree.h (initializer_constant_valid_p): Remove.
2287
2288 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2289
2290         * call.c (conditional_conversion): Don't build BASE_CONVs for
2291         conversions between things that have the same type.
2292         (build_conditional_expr): Tweak.
2293         (convert_like): Some BASE_CONVs really do require the generation
2294         of code.
2295         
2296         * init.c (perform_member_init): Don't go through build_modify_expr
2297         for simple initializations.
2298
2299 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2300
2301         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2302         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2303         virtual functions and MI.  Simplify.
2304
2305         * method.c: Remove prototype for largest_union_member.
2306         * pt.c (determine_specialization): Fix uninitialized warning.
2307         * lex.c (real_yylex): Likewise.
2308
2309 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2310
2311         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2312         here too.
2313
2314         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2315         * class.c (modify_one_vtable): Change prototype accordingly.
2316         (modify_all_vtables): Likewise.
2317         (modify_all_direct_vtables): Likewise.
2318         (modify_all_indirect_vtables): Likewise.
2319         (build_vtable_entry_for_fn): New function.
2320         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2321         (modify_vtable_entry): Likewise.
2322         (add_virtual_function): Likewise.
2323         (build_vtbl_initializer): New function.
2324         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2325         (fixup_vtable_deltas1): Likewise.
2326         (fixup_vtable_deltas): Likewise.
2327         (override_one_vtable): Likewise.
2328         (finish_struct_1): Likewise.
2329
2330         * error.c (dump_expr): Likewise.
2331         * search.c (get_abstract_virtuals_1): Likewise.
2332         (get_abstract_virtuals): Likewise.
2333         (expand_upcast_fixups): Likewise.
2334         * tree.c (debug_binfo): Likewise.
2335         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2336         __pure_virtual here.
2337         
2338 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2339
2340         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2341         as per 1999-07-26 change.
2342
2343         * typeck.c (c_sizeof): Don't allow non-static data members.
2344         (expr_sizeof): Likewise.
2345
2346 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2347
2348         * input.c (feed_input): Only touch lineno and input_filename
2349         if !USE_CPPLIB.  Save the old values before setting the new ones.
2350
2351         * input.c (feed_input): Add file, line parms.
2352         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2353         (real_yylex): Check linemode before input_redirected().
2354
2355         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2356         from op new to warning.
2357
2358 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2359
2360         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2361         * call.c: All uses changed.
2362         * typeck.c: Likewise.
2363
2364 1999-07-26  Nathan Sidwell  <nathan@acm.org>
2365
2366         * exception.cc (__cplus_type_matcher): Match __eh_matcher
2367         prototype.
2368
2369 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2370
2371         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2372         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2373         (strip_top_quals): Declare.
2374         (ncp_convert): Likewise.
2375         (type_after_usual_arithmetic_converions): Likewise.
2376         (composite_pointer_type): Likewise.
2377         * call.c (strip_top_quals): Don't make it static.
2378         (promoted_arithmetic_type_p): New function.
2379         (conditional_conversion): Likewise.
2380         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2381         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
2382         for converting a type to itself.
2383         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2384         (implicit_conversion): Make sure the from and to types are
2385         complete.
2386         (add_builtin_candidate): Correct handling of ?: operator.
2387         (add_builtin_candidates): Improve documentation.
2388         (build_conditional_expr): New function.
2389         (can_convert): Implement in terms of can_convert_arg.
2390         (ncp_convert): New function.
2391         * typeck.c (type_after_usual_arithmetic_conversions): New
2392         function, split out from common_type.
2393         (composite_pointer_type): New function, split out from
2394         build_conditional_expr.
2395         (common_type): Use type_after_usual_arithmetic_conversions.
2396         Remove redundant attribute merging.
2397         (comptypes): Tidy.  Handle COMPLEX_TYPE.
2398         (build_binary_op_nodefault): Use null_ptr_cst_p.
2399         (build_conditional_expr): Remove.
2400         (convert_for_assignment): Use new conversion functions.
2401         
2402         * cp-tree.h (abstract_virtuals_error): Change declaration.
2403         * typeck2.c (abstract_virtuals_error): Check to see if an error
2404         ocurred, and return a boolean value accordingly.
2405         (build_functional_cast): Adjust accordingly.
2406         * class.c (finish_struct_1): Likewise.
2407         * cvt.c (ocp_convert): Likewise.
2408         * decl.c (cp_finish_decl): Likewise.
2409         (grokparams): Likewise.
2410         (grok_op_properties): Likewise.
2411         (start_function): Likewise.
2412         * init.c (build_new_1): Likewise.
2413
2414         * pt.c (unify): Don't get confused by pointers-to-member functions.
2415
2416         * search.c (build_cplus_new): Robustify.
2417         
2418 1999-07-24  Richard Henderson  <rth@cygnus.com>
2419
2420         * gxx.gperf (__builtin_va_arg): New.
2421         * parse.y (VA_ARG): New token.
2422         (unary_expr): Recognize it.
2423
2424 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
2425
2426         * g++FAQ.texi: Deleted per Joe Buck's request.
2427         * Makefile.in: Corresponding changes.
2428
2429 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2430
2431         * lex.c: Sync with C frontend.
2432         (whitespace_cr): New fn.
2433         (skip_white_space): Use it.
2434         (init_parse): Reorder.
2435         (yyprint): Support CONSTANT.
2436         (pragma_getc, pragma_ungetc): Bring back.
2437         (read_line_number): Change in_system_header directly.
2438         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2439         (parse_float): Update to C version.
2440         (yylex): Handle '$' under the letter case.
2441         Remove looking_for_typename handling.
2442         Support hex floating point constants.
2443         Follow C's lead for choosing type of integer constants.
2444         Rearrange stuff to match C frontend.
2445         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2446         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2447
2448 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
2449
2450         * call.c (reference_binding): Tweak.
2451         (mayble_handle_implicit_object): Use direct_reference_binding to
2452         create the right implicit conversion sequence.
2453
2454 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
2455
2456         * pt.c (convert_nontype_argument): Don't call decl_constant_value
2457         if we're converting to a reference type.
2458
2459         * call.c (NEED_TEMPORARY_P): New macro.
2460         (standard_conversion): Set it, for derived-to-base conversions.
2461         (reference_related_p): New function.
2462         (reference_compatible_p): Likewise.
2463         (convert_class_to_reference): Likewise.
2464         (direct_reference_binding): Likewise.
2465         (reference_binding): Rework for standards-compliance.
2466         (convert_like): Adjust accordingly.
2467         (maybe_handle_ref_bind): Simplify; the right conversion sequences
2468         are now built up in reference_binding.
2469         (initialize_reference): New function.
2470         * cp-tree.h (ICS_USER_FLAG): Document.
2471         (ICS_THIS_FLAG): Likewise.
2472         (ICS_BAD_FLAG): Likewise.
2473         (NEED_TEMPORARY_P): Likewise.
2474         (cp_lvalue_kind): New type.
2475         (real_lvalue_p): Return it.
2476         * error.c (dump_expr): Provide more accurate representation for
2477         AGGR_INIT_EXPRs.
2478         * init.c (expand_default_init): Do not try to perform implicit
2479         conversions for a brace-enclosed initializer.
2480         * search.c (lookup_conversions): Document.
2481         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
2482         appropriately.
2483         (real_lvalue_p): Adjust accordingly.
2484         (lvalue_p): Likewise.
2485         (build_cplus_new): Don't allow the creation of an abstract class.
2486         * typeck.c (convert_for_initialization): Use initialize_reference.
2487         
2488 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
2489
2490         * lex.c (real_yylex) : Correct the test for overflow when lexing
2491         integer literals.
2492
2493 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
2494
2495         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2496         not DECL_BUILT_IN, to determine if a function is internally declared.
2497         (duplicate_decls): Likewise.  Improve handling of builtins.
2498         (push_overloaded_decl): Remove special handling of builtins.
2499
2500         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2501
2502         * decl.c (grokdeclarator): Pull out decl_constant_value in
2503         templates, too.
2504
2505         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2506         * cp-tree.h, pt.c, semantics.c: Adjust.
2507         * method.c (largest_union_member): Remove.
2508
2509         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2510
2511         * lex.c (token_getch, token_put_back): New fns.
2512         (real_yylex): Use them.
2513
2514         * lex.c (lang_init): Generalize.
2515         (lang_init_options): Tell cpplib this is C++.
2516         (nextchar): Remove.  Replace uses with put_back.
2517         (skip_white_space): Handle linemode here.  Optimize for cpplib.
2518         (extend_token_buffer_to): New fn.
2519         (extend_token_buffer): Use it.
2520         (read_line_number, check_newline): Just deal with tokens.
2521         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
2522         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2523         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2524         * parse.y (PAREN_STAR_PAREN): Remove.
2525         * input.c: Don't use the putback machinery with cpplib.
2526         (sub_getch): Fold back into getch.
2527         (getch): Don't handle linemode here.
2528         (feed_input): Unget any text in the token buffer.
2529
2530         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2531         nextyychar, nextyylval): Remove.
2532
2533 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
2534             Jason Merrill  <jason@yorick.cygnus.com>
2535
2536         * lex.c (indent_level): New variable.
2537         (init_parse): Set cpp_token to CPP_DIRECTIVE.
2538         (consume_string): Make this smart about USE_CPPLIB.
2539         (yyungetc): Use put_back function.
2540         (pragma_getc, pragma_ungetc): Functions deleted.
2541         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2542         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2543         pragma_ungetc.
2544         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2545         Also, clean up cases where we redundantly set token_buffer[0].
2546         (read_line_number): New fn.
2547         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2548         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2549         (sub_getch): Conditionalize out code that's not appropriate if
2550         USE_CPPLIB.
2551         (put_back): Rewrite in case USE_CPPLIB is defined.
2552         (input_redirected): Ditto.
2553
2554 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2555
2556         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2557         c_global_trees and accessor macros defined in c-common.h.
2558         (cp_tree_index): New enumeration.
2559         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2560         delete declarations of tree nodes replaced by it.
2561         (builtin_function): Delete macro, add declaration for new function.
2562         Include c-common.h.
2563         * decl.c: Delete definitions for tree nodes that were replaced by
2564         cp_global_trees and c_global_trees.
2565         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2566         to generate the common builtins here.
2567         (builtin_function): New function.
2568         * decl2.c (abort_fndecl): Delete declaration.
2569         * except.c (expand_builtin_return_address): Delete declaration.
2570         (builtin_return_address_fndecl): Delete variable.
2571         (const_ptr_type_node): Delete declaration.
2572         * lex.c (cons_up_default_function): Delete declaration of
2573         void_list_node.
2574         * parse.y (void_list_node): Delete declaration.
2575         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2576         Delete variables.
2577         (const_string_type_node): Delete declaration.
2578         * search.c (abort_fndecl): Delete declaration.
2579         * Makefile.in: Update dependencies.
2580
2581 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2582
2583         * pt.c (check_default_tmpl_args): Move test for missing default
2584         arguments here, from ...
2585         (end_template_parm_list): Here.
2586
2587 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2588
2589         * decl.c (lookup_nested_type): Remove.
2590         (pushtag): Don't call it.
2591
2592 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2593
2594         * Makefile.in (INTERFACE): Bump to 2.
2595
2596 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2597         
2598         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2599         instructions to gcc.gnu.org.  Removed e-mail address.
2600
2601 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2602
2603         * pt.c (determine_specialization): Tighten error-checking.
2604         (end_template_parm_list): Likewise.
2605
2606 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2607
2608         * pt.c (check_default_tmpl_args): Handle friends defined in the
2609         class just like member functions defined in the class.
2610
2611 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2612             Jason Merrill  <jason@yorick.cygnus.com>
2613
2614         * cp-tree.h (struct lang_decl): Added field for storing sorted
2615         FIELD_DECLs (used in TYPE_DECLs).
2616         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2617         (DECL_SORTED_FIELDS): New macro.
2618         * class.c (method_name_cmp): New function.
2619         (finish_struct_methods): Modified to support sorting and searching
2620         methods.
2621         (finish_struct_anon): Changed code in inner loop to use ELT rather 
2622         than UELT (which required an extra indirection for every reference).
2623         (field_decl_cmp): New function to support sorting FIELD_DECLs.
2624         (finish_struct_1): Sort fields.
2625         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2626         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2627         Also, switch to using array indexing rather than a changing pointer.
2628         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2629         DECL_SORTED_FIELDS.
2630
2631 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
2632
2633         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2634         casts in system headers or extern "C" blocks.
2635
2636         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2637         errors to pedwarn.
2638
2639 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2640
2641         * decl2.c (write_virtuals): Deleted declaration.
2642         * cp-tree.h (write_virtuals): Deleted extern declaration.
2643         * class.c (finish_struct_1): Removed #if 0'd code that mentions
2644         write_virtuals.
2645         * semantics.c (begin_class_definition): Rewrite code to not depend
2646         on write_virtuals.
2647
2648         * lex.c (cp_pragma_interface): New function.
2649         (cp_pragma_implementation): Likewise.
2650         (handle_cp_pragma): Call them.
2651
2652         * typeck.c (comptypes): Simplify C code in look_hard.
2653
2654         * xref.c (PALLOC): Use xcalloc, not calloc.
2655         (SALLOC): Use xmalloc, not malloc.
2656
2657         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2658
2659         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2660         is NO_DEBUG.
2661
2662         * decl.c (duplicate_decls): If a redeclaration doesn't match the
2663         initial declaration, then don't save the inline info and by all
2664         means don't mark the function as a builtin function.
2665
2666         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
2667         CURRENT_CLASS_TYPE is 0.
2668
2669         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2670         NULL_TREE.
2671
2672         * ptree.c (print_lang_type): Added vtable-needs-writing.
2673
2674 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
2675
2676         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2677
2678 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
2679
2680         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2681         Merged into c-common.
2682
2683 1999-07-05  Dave Brolley  <brolley@cygnus.com>
2684
2685         * lex.c (errorcount): Declare it.
2686         (finish_parse): Update errorcount for when using CPPLIB.
2687
2688 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
2689
2690         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2691         parameters.
2692         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2693         * decl.c (push_class_binding): Use it.
2694         (lookup_name_real): Likewise.
2695
2696 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
2697
2698         * cp-tree.h (widest_integer_literal_type_node,
2699         widest_unsigned_literal_type) : New.
2700         * decl.c (widest_integer_literal_type_node,
2701         widest_unsigned_literal_type) : New.
2702         (init_decl_processing): Handle/use the two new types.
2703         * lex.c (real_yylex): Same.
2704         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2705         Same. 
2706
2707 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
2708
2709         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2710         to anonymous cv-qualified types.
2711
2712 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
2713
2714         * lex.c (real_yylex) : Change integer literal overflow handling to
2715         be like c-lex.c.
2716
2717         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2718
2719 1999-06-28  Richard Henderson  <rth@cygnus.com>
2720
2721         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2722
2723 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
2724
2725         * error.c (dump_type_real): Handle TREE_LIST again.
2726
2727         * typeck.c (comp_target_parms): Don't complain about 
2728         converting from () to (...) if !flag_strict_prototype.
2729
2730         * decl.c (grokdeclarator): Update the names of all variants when
2731         de-anonymizing.
2732
2733 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
2734
2735         * init.c (expand_aggr_vbase_init): Rename to
2736         construct_virtual_bases.  Conditionalize construction here, 
2737         rather than ...
2738         (emit_base_init): Here.
2739
2740 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
2741
2742         * semantics.c (finish_asm_statement): Apply decay conversions to
2743         input operands.
2744
2745         * decl.c (expand_static_init): When building an anonymous function
2746         for use with atexit, compute its body before and after entering
2747         the function.
2748
2749         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2750         EXIT_EXPR.
2751         
2752 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
2753
2754         * init.c (expand_aggr_vbase_init): Add flag parameter.
2755         (build_partial_cleanup_for): Remove, inlining into ..
2756         (expand_cleanup_for_base): ... here.  Take flag parameter.
2757         (emit_base_init): Pass the in_chrg parameter to
2758         emit_aggr_vbase_init. 
2759         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2760         
2761 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
2762
2763         * decl2.c (import_export_decl): Use same_type_p, rather than
2764         relying on pointer-equality for types.
2765
2766         * method.c (do_build_copy_constructor): Simplify.
2767
2768         * call.c (build_method_call): Remove bogus code for two-argument
2769         delete.
2770         * init.c (build_new_1): Expand on comment, and remove dead code.
2771
2772         * init.c (expand_cleanup_for_base): New function, split out
2773         from ...
2774         (emit_base_init): Here.
2775         (expand_aggr_vbase_init): Use it.
2776
2777 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
2778
2779         * cp-tree.h (class_cache_firstobj): Declare.
2780         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2781         * class.c (permanent_obstack): Remove declaration.
2782         (class_cache_firstobj): Make it global.
2783         (add_method): Don't use permanent_obstack directly.
2784         (pushclass): Only free the class_cache_obstack if we know how far
2785         back to free it.
2786         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2787         * decl.c: Remove dead comment.
2788         (saved_scope): Add class_cache_firstobj.
2789         (push_to_top_level): Save it.
2790         (pop_from_top_level): Restore it.
2791         (push_class_level_binding): Use push_cache_obstack, not
2792         maybe_push_cache_obstack.
2793         * search.c (push_class_decls): Likewise.
2794         
2795 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2796
2797         * pt.c (tsubst_friend_function): Push into namespace of friend
2798         function before pushdecl'ing it.
2799
2800 1999-06-14  Nathan Sidwell  <nathan@acm.org>
2801
2802         * call.c (build_new_op): Remove REF_BIND from all operands.
2803
2804 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
2805
2806         * init.c (build_new_1): Look up operator delete even if there was
2807         no explicit new placement.
2808
2809 1999-06-08  Nathan Sidwell  <nathan@acm.org>
2810
2811         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2812         of ...
2813         (build_throw): ... here. Call it.
2814         (process_start_catch_block): Call it.
2815
2816 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
2817
2818         * search.c (convert_pointer_to_single_level): Reimplement without
2819         using get_binfo.
2820
2821 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
2822
2823         * method.c (is_back_referenceable_type): Back-reference bools when
2824         not squangling.
2825
2826 1999-06-07  Dave Brolley  <brolley@cygnus.com>
2827
2828         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2829         * input.c (putback_buffer): New structure type.
2830         (putback): Replaces putback_char member.
2831         (putback): Replaces putback_char static variable.
2832         (feed_input): Use putback.
2833         (end_input): Use putback.
2834         (sub_getch): Use putback.
2835         (put_back): Use putback.
2836
2837 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
2838
2839         * decl.c (grokdeclarator): Fix typo in last change.
2840
2841 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
2842
2843         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2844         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2845
2846 1999-06-04  Nathan Sidwell  <nathan@acm.org>
2847
2848         * except.c (build_throw): Check throw expression validity.
2849
2850 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
2851
2852         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2853         just because flag_signed_bitfields is false.
2854
2855 1999-06-03  Nathan Sidwell  <nathan@acm.org>
2856
2857         * semantics.c (begin_class_definition): Update the struct's
2858         location here ...
2859         * class.c (finish_struct): ... rather than here.
2860
2861         * decl.c (make_typename_type): Don't rely on uninitialized
2862         variable.
2863
2864 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2865
2866         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2867
2868 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
2869
2870         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2871         and friends rather than messing with current_obstack directly.
2872         (cp_build_qualified_type_real): Rework ARRAY_TYPE
2873         allocation to match practice throughout the rest of the 
2874         compiler.
2875
2876 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
2877
2878         * lex.c (make_lang_type): Create TYPE_BINFO for
2879         TEMPLATE_TYPE_PARMs just like for non-template types.
2880
2881         * decl.c (start_decl): Move checks on initialization to ...
2882         (cp_finish_decl): Here.  Tidy formatting slightly.
2883
2884 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2885
2886         * decl.c (add_binding): Don't complain about a redeclaration of a
2887         semantically identical typedef in a local scope.
2888
2889 1999-05-28  Nathan Sidwell  <nathan@acm.org>
2890
2891         * decl.c (complete_array_type): Allocate off same obstack. Fix
2892         DO_DEFAULT comment to match reality.
2893
2894         * friend.c (make_friend_class): Fix diagnostic typo.
2895
2896 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2897
2898         * decl.c (lookup_namespace_name): Handle getting a
2899         TEMPLATE_ID_EXPR.
2900         (expand_static_init): Don't call pushdecl for implicitly declared
2901         `atexit' used to register destructors.
2902
2903 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
2904
2905         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2906         intialize a vtable.
2907
2908         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2909         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
2910         by combining TEMPLATE_INFO and LEVEL into a single union.
2911         (DECL_TEMPLATE_INFO): Reformat.
2912         (DECL_SAVED_TREE): Document.
2913         (DECL_TEMPLATE_INJECT): Remove.
2914         * class.c (finish_struct): Remove code to deal with
2915         DECL_TEMPLATE_INJECT. 
2916
2917         * decl.c (maybe_process_template_type_declaration): Handle all new
2918         types in templates uniformly.
2919         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2920         DECL_CONTEXT.
2921         * pt.c (lookup_template_class): Inject template instantiations of
2922         forward-declarations.
2923         (instantiate_class_template): Remove code processing
2924         DECL_TEMPLATE_INJECT.
2925         
2926         * pt.c (lookup_template_class): Tweak lookup to find member
2927         templates.
2928
2929         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2930         ASM_CV_QUAL.
2931         * semantics.c (finish_asm_stmt): Make strings permanent if they're
2932         used in a template.
2933         
2934 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
2935
2936         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2937         parts of pointer to data member types.
2938
2939 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
2940
2941         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2942         and then make it look like `abort'.  Just use `abort' instead.
2943         
2944         * typeck.c (build_static_cast): Don't allow static_casts that cast
2945         away constness.
2946         (casts_away_constness_r): New function.
2947         (casts_away_constness): Likewise.
2948
2949         * decl.c (lookup_tag): Remove code no longer needed after
2950         name-lookup improvements.
2951         * decl2.c (handle_class_head): Make error-recovery more robust.
2952         * friend.c (make_friend_class): Reject templated typename types.
2953         * lex.c (is_global): A template parameter isn't global.
2954         * parse.y (class_head): Robustify.
2955         * parse.c: Regenerated.
2956         
2957 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
2958
2959         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2960         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
2961         
2962         * cp-tree.h (push_nested_namespace): Declare.
2963         (pop_nested_namespace): Likewise.
2964         * decl.c (push_nested_namespace): New function.
2965         (pop_nested_namespace): Likewise.
2966         * pt.c (instantiate_class_template): Use them.
2967
2968         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2969
2970         * cp-tree.h (cplus_expand_constant): Declare.
2971         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2972         converted from one pointer-to-object type to another.
2973         * expr.c (cplus_expand_constant): Don't make it static.
2974         * typeck.c (build_component_ref): Don't crash when presented with
2975         a component which is a TEMPLATE_DECL.
2976         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
2977         cast from a pointer-to-member constant to its own type does not
2978         result in a valid non-type template argument.
2979
2980 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
2981             Nathan Sidwell  <nathan@acm.org>
2982         
2983         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2984         * cp-tree.h: Fix typo in documentation on pointers-to-members.
2985         (cp_build_qualified_type): Make it a macro.
2986         (cp_build_qualified_type_real): Declare.
2987         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
2988         problem with template parameters and restrict-qualification.
2989         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2990         * hash.h: Regenerated.
2991         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2992         the enumeration.
2993         (NORID): Remove definition.
2994         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2995         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
2996         (fn_type_unification): Check that the function type resulting from
2997         the deduction is legal.
2998         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2999         (unify): Use cp_build_qualified_type_real.
3000         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3001         (cp_build_qualified_type): Rename to ...
3002         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3003         and modify appropriately.
3004         
3005         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3006         reveal optimization opportunities.
3007
3008         * pt.c (tsubst): Don't issue error messages when we're not
3009         complaining, even if we see a qualified function type.
3010         (check_cv_quals_for_unify): Don't allow a qualified function
3011         type.
3012
3013 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3014
3015         * class.c (instantiate_type): Downgrade errors for object-dependent
3016         memfn refs to pedwarn.
3017
3018 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3019
3020         * decl.c (grokdeclarator): Don't treat [] as indicating a
3021         zero-sized array in a typedef.
3022
3023         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3024         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3025         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3026
3027         * pt.c (for_each_template_parm): Rework to match documentation.
3028         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3029
3030 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3031
3032         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3033
3034         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3035         except at the leftmost position.
3036         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3037         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3038         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3039
3040         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3041         (build_cplus_new): Make sure that what we return is of the right type.
3042
3043 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3044
3045         * cp-tree.h (make_ptrmem_cst): New function.
3046         * expr.c (cplus_expand_constant): Split out from ...
3047         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3048         (init_cplus_expand): Set lang_expand_constant.
3049         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3050
3051         * tree.c (make_ptrmem_cst): Define.
3052         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3053         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3054
3055 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3056
3057         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3058
3059         * decl2.c (start_static_storage_duration_function): Fix comment.
3060         (finish_file): Create static storage duration functions lazily.
3061
3062 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3063
3064         Implement anonymous structs.
3065         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3066         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3067         * class.c (finish_struct_1): Remove redundant check for anon struct.
3068         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3069         (check_tag_decl): Check for anonymous struct here.
3070         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3071         * init.c (sort_member_init, emit_base_init): Handle getting fields
3072         as well as names in current_member_init_list.
3073         (perform_member_init): Handle getting an anon aggr.
3074         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3075         (do_build_copy_constructor): Likewise.
3076
3077 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3078
3079         * tree.c (cp_build_qualified_type): Don't allow qualified function
3080         types.
3081
3082 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3083
3084         * gxxint.texi: Fix typo.
3085
3086 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3087
3088         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3089         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3090         * ptree.c (print_lang_type): Likewise.
3091         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3092         IS_AGGR_TYPE_CODE.
3093         * typeck2.c (digest_init): Likewise.
3094
3095 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3096
3097         * call.c (joust): Compare the types of the conv ops, not the
3098         target types of the conversions.
3099
3100 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3101
3102         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3103         was not given.
3104
3105 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3106
3107         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3108         * decl.c (grokfndecl): Don't allow inline declarations of friend
3109         template specializations, or friend template specializations with
3110         default arguments.
3111         * pt.c (tsubst): Handle substitution into array types that does
3112         not yield a fixed upper bound, even when not processing a
3113         template.
3114         (tsubst_copy): Deal with the fact that the second operand to a
3115         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3116         * search.c (marked_pushdecls_p): Don't descend into
3117         TEMPLATE_TYPE_PARMs and the like.
3118         (unmarked_pushdecls_p): Likewise.
3119         
3120         * call.c (build_over_call): Don't throw away
3121         initializations/copies of empty classes; use MODIFY_EXPR and
3122         INIT_EXPR as for non-empty classes.
3123         * class.c (finish_struct_1): Put the padding byte for an empty
3124         class on the TYPE_NONCOPIED_PARTS list for the class.
3125
3126 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3127
3128         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3129         indicate a reference to a field that is a qualified name.
3130
3131 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3132
3133         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3134         ASM_OUTPUT_CONSTRUCTOR.
3135
3136         * friend.c (do_friend): Add attrlist arg.  Remove support for
3137         getting a non-decl as 'decl'.
3138         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3139         rtl.
3140         (grokdeclarator): Adjust.
3141         * cp-tree.h: Adjust.
3142
3143 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3144
3145         * cp-tree.h (permanent_p): New function.
3146         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3147         possibly complex tree node.
3148         * tree.c (mapcar): Adjust comments, and follow coding standards in
3149         conditional.
3150         (permanent_p): New function.
3151
3152 1999-05-13  Per Bothner  <bothner@cygnus.com>
3153
3154         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3155         primitive Java types, if we actually see `extern "Java"'.
3156
3157 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3158
3159         * lang-specs.h: Pass -$ to the preprocessor.
3160
3161 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3162
3163         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3164         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3165         (resolve_offset_ref): Don't handle a raw baselink.
3166         * cvt.c (build_expr_type_conversion): Likewise.
3167         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3168         convert_for_initialization): Likewise.
3169         * class.c (instantiate_type): Handle seeing a baselink under an
3170         OFFSET_REF.
3171         * error.c (dump_expr): Likewise.        
3172         * pt.c (for_each_template_parm): Likewise.
3173         (resolve_overloaded_unification): Likewise.
3174         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3175         * typeck.c (expr_sizeof): Also complain about other permutations
3176         of overloaded functions.
3177
3178 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3179
3180         * init.c (resolve_offset_ref): Don't return a raw method.
3181         Use BASELINK_P.
3182         * typeck.c (decay_conversion): Don't handle a raw method.
3183         Resolve all OFFSET_REFs.
3184         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3185         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3186         same_type_p for pmf bits.  Don't use build_binary_op to compare
3187         raw pointers to methods.
3188         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3189         to decide when to call resolve_offset_ref.
3190         (build_c_cast, convert_for_initialization): Likewise.
3191         * cvt.c (build_expr_type_conversion): Likewise.
3192
3193 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3194
3195         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3196
3197 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3198
3199         * decl2.c (start_objects): Don't let static constructors and
3200         destructors get inlined.
3201
3202         * parse.y (nested_name_specifier): Make sure ordinary types are
3203         complete, just like template types.
3204         * parse.c: Regenerated.
3205
3206         * pt.c (check_explicit_specialization): Improve error messages.
3207
3208 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3209
3210         * typeck.c (string_conv_p): Use same_type_p to check whether we
3211         try to convert between char and wchar_t.
3212
3213 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3214
3215         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3216         lookup to error_mark_node here.
3217         (lookup_member): Revise documentation.  Add comments.  Don't set
3218         the TREE_TYPE to error_mark_node here, and don't build up an extra
3219         TREE_LIST for ambiguous lookups.
3220         (setup_class_bindings): Adjust accordingly.
3221         (push_class_decls): Revise out-of-date comments.
3222         
3223         * typeck.c (build_const_cast): Tighten checks for legality.
3224
3225 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3226
3227         * init.c (build_member_call): Lookup names coming from
3228         namespace-scoped LOOKUP_EXPR.
3229
3230 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3231
3232         * gxxint.texi: Add documentation for 'I'.
3233
3234 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3235
3236         * tinfo.cc (operator==): Qualify type_info with std::.
3237
3238 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3239
3240         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3241         (DECL_COMDAT): Remove definition.
3242
3243 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3244
3245         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3246         change.
3247
3248 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3249
3250         * class.c (build_vtable): Use build_lang_decl when building
3251         vtables, not just build_decl.
3252         (prepare_fresh_vtable): Likewise.
3253         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3254         DECL_EXTERNAL when calling wrapup_global_declarations.
3255         * decl2.c (priority_info_s): Add initializations_p and
3256         destructions_p members.
3257         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3258         when deciding what vtables to write out.
3259         (ssdf_decls): New variable.
3260         (ssdf_decls_used): Likewise.
3261         (start_static_storage_duration_function): Deal with being called
3262         multiple times.  Avoid inlining this function.
3263         (generate_inits_for_priority): Deal with reuse of priority map.
3264         (get_priority_info): Clear initializations_p and destructions_p.
3265         (do_static_initialization): Tweak comment.
3266         (do_static_destruction): Likewise.  Fix condition on sentries for
3267         destruction.
3268         (generate_ctor_or_dtor_function): Call all of the static storage
3269         duration functions.
3270         (generate_ctor_or_dtor_function_for_priority): Check
3271         initializations_p and destructions_p to see what priorities need
3272         initialization functions.
3273         (finish_file): Rework to generate multiple static storage duration
3274         functions, rather than just one.
3275
3276         * typeck.c (build_const_cast): Tweak last change to handle
3277         templates correctly.
3278
3279         * typeck.c (build_const_cast): Disallow use of const_cast to
3280         anything but a pointer or reference type.
3281
3282 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3283
3284         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3285         signature type.
3286
3287 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3288
3289         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3290         (finish_file): Indent comments properly.
3291
3292 1999-04-29  Richard Henderson  <rth@cygnus.com>
3293
3294         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3295         (do_static_destruction): Likewise.
3296
3297 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3298
3299         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3300         * decl2.c (delete_sanity): Warn on deleting void *.
3301         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3302         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3303         throwing operator new.
3304
3305 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3306
3307         * cp-tree.h (build_component_addr): Remove prototype.
3308         * typeck.c (build_component_addr): Make static. Remove MSG
3309         argument.
3310         (build_component_addr): Remove MSG parameter, clean up
3311         comment.
3312         (build_x_function_call): Use cp_error.
3313         (build_unary_op): Adjust call of build_component_addr.
3314
3315 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3316
3317         * pt.c (tsubst_friend_class): Check for NULL.
3318
3319 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3320
3321         * search.c (binfo_for_vtable): Initialize bfvi.var.
3322
3323 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3324
3325         * rtti.c (build_x_typeid): Check rtti is enabled.
3326
3327 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3328
3329         * search.c (is_subobject_of_p): Make sure we're looking at the
3330         right baseclasses.
3331
3332 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3333
3334         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3335
3336 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3337
3338         * decl2.c (finish_file): Tweak handling of extern inlines so that
3339         they are not unnecessarily put out.
3340
3341         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3342         such as base classes.
3343
3344 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3345
3346         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3347         not trying V, while cycling through U.
3348
3349 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3350
3351         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3352         preserves_first_arg.  Enlarge dummy accordingly.
3353         (DECL_TINFO_FN_P): New macro.
3354         (SET_DECL_TINFO_FN_P): Likeiwse.
3355         (DECL_RETURNS_FIRST_ARG): Remove.
3356         (DECL_PRESERVES_THIS): Likewise.
3357         (DECL_INIT_PRIORITY): New macro.
3358         (finish_struct_1): Change prototype.
3359         (cat_namespace_levels): Remove prototype.
3360         (vtable_decl_p): New prototype.
3361         (vtype_decl_p): Likewise.
3362         (sigtable_decl_p): Likewise.
3363         (walk_globals_pred): New typedef.
3364         (walk_globals_fn): Likewise.
3365         (walk_globals): New prototype.
3366         (walk_namespaces_fn): New typedef.
3367         (walk_namespaces): New prototype.
3368         (wrapup_globals_for_namespace): Likewise.
3369         (walk_vtables): Remove prototype.
3370         (walk_sigtables): Likewise.
3371         (instantiate_pending_templates): New prototype.
3372         * class.c (finish_struct_1): Don't return a value.
3373         * decl.h (pending_statics): Remove declaration.
3374         * decl.c (walk_namespaces_r): New function.
3375         (walk_globals_r): Likewise.
3376         (vtable_decl_p): Likewise.
3377         (vtype_decl_p): Likewise.
3378         (sigtable_decl_p): Likewise.
3379         (walk_namespaces): Likewise.
3380         (walk_globals_data): New type.
3381         (walk_globals): New function.
3382         (wrapup_globals_for_namespace): Likewise.
3383         (expand_static_init): Remove assertion.  Remove redundancy in
3384         conditional.  Don't put static data members in static_aggregates
3385         Tidy.
3386         (finish_function): Remove redundancy in conditional.  Don't set
3387         DECL_RETURNS_FIRST_ARG.
3388         (cat_namespace_levels): Remove.
3389         * decl2.c: Include splay-tree.h and varray.h.
3390         (priority_info_s): New structure.
3391         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
3392         conventions.
3393         (prune_vtable_vardecl): Likewise.
3394         (finish_sigtable_vardecl): Likewise.
3395         (setup_initp): Remove.
3396         (do_dtors): Remove.
3397         (do_ctors): Remove.
3398         (start_static_storage_duration_function): New function.
3399         (generate_inits_for_priority): Likewise.
3400         (finish_static_storage_duration_function): Likewise.
3401         (get_priority_info): Likewise.
3402         (do_static_initialization): Likewise.
3403         (do_static_destruction): Likewise.
3404         (do_static_initialization_and_destruction): Likewise.
3405         (generate_ctor_or_dtor_function): Likewise.
3406         (generate_ctor_and_dtor_functions_for_priority): Likewise.
3407         (pending_statics): Make it a varray.
3408         (pending_statics_used): New variable.
3409         (saved_inlines): Make it a varray.
3410         (saved_inlines_used): New variable.
3411         (finish_static_data_member): Change method of updating
3412         pending_statics.
3413         (mark_inline_for_output): Remove #if 0'd code.  Change method of
3414         updating saved_inlines.
3415         (walk_vtables): Remove.
3416         (walk_sigtables): Likewise.
3417         (import_export_decl): Use DECL_TINFO_FN_P.
3418         (pending_templates): Remove declaration.
3419         (maybe_templates): Likewise.
3420         (static_aggregates_initp): Likewise.
3421         (setup_initp): Likewise.
3422         (finish_objects): Simplify.
3423         (INITIALIZE_P_IDENTIFIER): New macro.
3424         (PRIORITY_IDENTIFIER): New macro.
3425         (SSDF_IDENTIFIER): New macro.
3426         (initialize_p_decl): New variable.
3427         (priority_decl): Likewise.
3428         (ssdf_decl): Likewise.
3429         (priority_info_map): Likewise.
3430         (finish_file): Recode output of static intializers and other
3431         file-scope finalization tasks.
3432         * error.c (OB_END_TEMPLATE_ID): New macro.
3433         (dump_type_real): Use it.
3434         (dump_decl): Likewise.
3435         (dump_function_name): Likewise.
3436         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3437         interface.
3438         (check_newline): Use walk_globals, not walk_vtables.
3439         * pt.c (pending_tempalte_expansions): Remove.
3440         (set_vardecl_interface_info): Likewise.
3441         (pending_templates): Make static.
3442         (maybe_templates): Likewise.
3443         (instantiate_class_template): Adjust call to finish_struct_1.
3444         (instantiate_pending_templates): New function.
3445         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3446         * tree.c (static_aggregates_initp): Remove.
3447         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3448         instead.
3449         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3450
3451         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3452         with the RTL code RETURN.
3453         * hash.h: Regenerated.
3454         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3455         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3456         * parse.c: Regenerated.
3457         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
3458         it.
3459         (inline_parm_levels): New variable.
3460         (inline_parm_levels_used): Likewise.
3461         (maybe_begin_member_template_processing): Update them.
3462         (maybe_end_member_template_processing): Use them, rather than
3463         guessing how many levels to pop.
3464
3465         * decl.c (make_typename_type): Tighten error-checking.
3466
3467 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
3468
3469         * cp-tree.h (build_binary_op): Remove unneeded parameter.
3470         * class.c (build_vrable_entry_ref): Adjust call to
3471         build_binary_op.
3472         * decl.c (expand_static_init): Likewise.
3473         (grokdeclarator): Likewise.
3474         (finish_function): Likewise.
3475         * decl2.c (delete_sanity): Likewise.
3476         (do_dtors): Likewise.
3477         (do_ctors): Likewise.
3478         * error.c (dump_type_suffix): Likewise.
3479         * expr.c (cplus_expand_expr): Likewise.
3480         * init.c (resolve_offset_ref): Likewise.
3481         (build_new): Likewise.
3482         (build_new_1): Likewise.
3483         (build_vec_delete_1): Likewise.
3484         (expand_vec_init_catch_clause): Likewise.
3485         (build_delete): Likewise.
3486         * pt.c (tsubst): Likewise.
3487         * rtti.c (synthesize_tinfo_fn): Likewise.
3488         * search.c (expand_upcast_fixups): Likewise.
3489         (expand_direct_vtbls_init): Likewise.
3490         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3491         (build_binary_op_nodefault): Likewise.
3492         (point_int_sum): Likewise.
3493         (pointer_diff): Likewise.
3494         (build_unary_op): Likewise.
3495         (build_modify_expr): Likewise.
3496         (get_delta_difference): Likewise.
3497         (build_ptrmemfunc): Likewise.
3498         (expand_ptrmemfunc_cst): Likewise.
3499
3500 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
3501
3502         * decl.c (grokfndecl): Always call cplus_decl_attributes.
3503         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3504
3505 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
3506
3507         * cp-tree.h (finish_static_data_member_decl): New function.
3508         * decl2.c (finish_static_data_member_decl): Split out from ...
3509         (grokfield): Here.
3510         * pt.c (instantiate_class_template): Use it here instead of
3511         trying to fake it.
3512         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3513         finish_static_data_member_decl will do that.  Explicit set
3514         DECL_EXTERNAL to match non-template processing.
3515
3516 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
3517
3518         * cp-tree.h (finish_class_definition): Add parameter.
3519         * parse.y (structsp): Use it.  Don't call pop_scope here.
3520         * parse.c: Regenerated.
3521         * semantics.c (finish_class_definition): Pop it here.
3522
3523 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
3524
3525         * decl.c (xref_tag): Revise handling of nested template
3526         declarations.
3527         * pt.c (check_explicit_specialization): Tweak handling of friend
3528         templates in template classes.
3529         (tsubst_friend_class): Handle friend declarations for nested
3530         member template classes.
3531
3532 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
3533
3534         * class.c (finish_struct): Remove unused variable.
3535         (pushclass): Likewise.
3536         (invalidate_class_lookup_cache): Likewise.
3537         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3538         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3539         doesn't get obliterated.
3540         (make_typename_type): Handle template classes correctly.
3541
3542         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3543         (storetags): Declare.
3544         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3545         (pushclass): Likewise.  Use storetags to install tag declarations,
3546         not pushtag.
3547         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3548         * decl.c (storetags): Make it global.
3549         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3550         implicit typename declaration.
3551         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
3552         * method.c (hack_identifier): Likewise.
3553         * search.c (lookup_member): Likewise.
3554
3555         * decl.c (warn_about_implicit_typename_lookup): New function.
3556         (lookup_name_real): Use it.  Rework handling of implicit typename
3557         extension.
3558
3559 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3560
3561         * cp-tree.h (lookup_nested_field): Remove.
3562         * class.c (push_nested_class): Handle UNION_TYPEs.
3563         (pop_nested_class): Likewise.
3564         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3565         (start_decl): Use push_nested_class, not just pushclass.
3566         (cp_finish_decl): Use pop_nested_class, not just popclass.
3567         * search.c (lookup_nested_field): Remove.
3568
3569         * cp-tree.h (lang_type): Add documentation.
3570         * decl2.c (handle_class_head): Create template declarations here,
3571         as appropriate.
3572         * parse.y (class_head): Return whether or not we entered a new
3573         scope, as well as the type named.
3574         (named_class_head): Likewise.
3575         (named_complex_class_head_sans_basetype): Likewise.
3576         (structsp): Adjust accordingly.  Pop scope when required.
3577         * parse.c: Regenerated.
3578         * pt.c (check_default_tmpl_args): Robustify.
3579         (redeclare_class_template): Likewise.
3580         (instantiate_class_template): An instantiation of an
3581         anonymous union is itself an anonymous union.
3582         * semantics.c (begin_class_definition): Don't create template
3583         declarations here.
3584
3585 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3586
3587         * parse.y (after_type_declarator_intern): New nonterminal.
3588         (after_type_declarator): Use it.
3589         (direct_after_type_declarator): Likewise.  Move above
3590         nonnested_type to fix reduce/reduce conflict resolution.
3591         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3592         * Makefile.in (CONFLICTS): Update.
3593
3594         * decl.c (define_label): Downgrade error for jumping over a
3595         non-POD decl to pedwarn.
3596
3597 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3598
3599         * cp-tree.h (popclass): Change declaration.
3600         (pop_nested_class): Likewise.
3601         (poplevel_class): Remove declaration.
3602         * call.c (convert_default_argument): Pass no arguments to
3603         popclass.
3604         * class.c (finish_struct_1): Likewise.
3605         (finish_struct): Likewise.
3606         (popclass): Remove argument.  Simplify code accordingly.
3607         (pop_nested_class): Likewise.
3608         * decl.c (poplevel_class): Declare it here, and make it static.
3609         (poplevel): Handle class scopes.
3610         (poplevel_class): Don't take an rgument.  Simplify.
3611         (pop_everything): Pass no arguments to pop_nested_class.
3612         (cp_finish_decl): Pass no arguments to popclass.
3613         (grokdeclarator): Pass no arguments to pop_nested_class.
3614         (finish_function): Likewise.
3615         * decl2.c (grokfield): Likewise.
3616         (pop_scope): Pass no arguments to popclass.
3617         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3618         * pt.c (instantiate_class_template): Move call to pushclass, and
3619         document.  Pass no arguments to popclass.
3620         (regenerate_decl_from_template): Likewise.
3621
3622 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
3623
3624         * typeck.c (build_unary_op): Handle taking the address of a unique
3625         bound non-static member function.
3626
3627 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3628
3629         * lang-options.h (-Wdeprecated): New flag.
3630         * decl2.c (warn_deprecated): New flag.
3631         (lang_decode_option): Deprecated this-is-variable,
3632         external-templates, alt-external-templates.
3633         Support -Wdeprecated.
3634         * errfn.c (cp_deprecated): New function.
3635
3636 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
3637
3638         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3639         of the decls themselves.
3640
3641         * pt.c (tsubst_function_type): Copy attributes over.
3642
3643         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
3644         and com_interface.
3645         * cp-tree.h: Add prototype.
3646         * decl.c (init_decl_processing): Set valid_lang_attribute.
3647
3648 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
3649
3650         * class.c (finish_struct_1): Look at the const-ness of the field's
3651         type, not the TREE_READONLY-ness of the declaration.
3652         * method.c (synthesize_method): Likewise.
3653         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3654         creating new declarations.
3655
3656 1999-04-13  Mike Stump  <mrs@wrs.com>
3657
3658         * decl2.c (import_export_decl): Because vtables always reference
3659         virtual functions, even if they are inlined, don't allow
3660         -fno-implement-inlines to not emit them, instead, emit them with
3661         the vtable.
3662         * decl.c (start_function): Likewise.
3663
3664 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
3665
3666         * cp-tree.h (struct lang_type): Add com_interface.
3667         (CLASSTYPE_COM_INTERFACE): New macro.
3668         * class.c (set_rtti_entry): COM interface classes have no RTTI
3669         entries in their vtables; adjust.
3670         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3671         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3672         finish_struct_1): Likewise.
3673         * decl2.c (mark_vtable_entries): Likewise.
3674         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3675         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3676         expand_upcast_fixups): Likewise.
3677         * tree.c (debug_binfo): Likewise.
3678
3679         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3680         * typeck.c (comptypes): If we get it, ignore attributes.
3681         * class.c (instantiate_type): Use BASELINK_P.  Change complain
3682         parameter to flags; 2 means ignore attributes.
3683         * call.c (build_op_delete_call): Pass it.
3684
3685         * decl.c (xref_tag): Only complain once about using a typedef-name
3686         with 'struct'.  Downgrade to pedwarn.
3687
3688         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3689
3690         * parse.y (absdcl_intern): New nonterminal.
3691         (absdcl, direct_abstract_declarator): Use it.
3692
3693         * pt.c (lookup_template_class): Look through implict typename.
3694
3695 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * friend.c (add_friend): Deal gracefully with error_mark_node.
3698         * method.c (build_overload_value): Handle pointers-to-members as
3699         template parameters.
3700
3701         * decl.c (push_binding): Fix typo in comment.
3702
3703 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
3704
3705         * error.c (dump_type_real): If a typename is a template-id, put
3706         out the template arguments.
3707         (dump_expr): Handle TEMPLATE_ID_EXPR.
3708         * pt.c (lookup_template_class): Now that full arguments are
3709         available everywhere, remove code that tried to guess them.
3710
3711 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
3712
3713         * decl.c (make_typename_type): Complain if we don't find a type
3714         when trying to make a typename type for a non-template type.
3715
3716 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
3717
3718         * decl.c (start_decl): Pass attributes to grokdeclarator.
3719         (grokdeclarator): Handle attributes on constructor-syntax
3720         initializers.
3721
3722 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
3723
3724         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3725         don't have types.
3726
3727         * search.c (template_self_reference_p): Tweak.
3728
3729 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
3730
3731         * init.c (build_offset_ref): Don't build yet another weird data
3732         structure to describe overloaded functions.
3733
3734 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
3735
3736         * cp-tree.h (BASELINK_P): New macro.
3737         (SET_BASELINK_P): Likewise.
3738         * init.c (build_member_call): Remove needless assignment in if
3739         statement.
3740         * search.c (lookup_field_r): Fix handling when we are looking
3741         specifically for a type; these are not hidden by functions and
3742         variables.
3743         (lookup_member): Use SET_BASELINK_P.
3744         * tree.c (is_overloaded_fn): Use BASELINK_P.
3745         (really_overloaed_fn): Likewise.
3746         (get_first_fn): Likewise.
3747
3748 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
3749
3750         * decl.c (lookup_name_current_level): Tweak, and improve
3751         documentation.
3752
3753         * class.c (maybe_fixup_vptrs): Remove declaration.
3754         (build_class_init_list): Likewise.
3755         * decl.c (pushdecl_class_level): Call check_template_shadow here
3756         ...
3757         (push_class_level_binding): ... not here.
3758         * search.c (dfs_push_type_decls): Only avoid
3759         template-self-reference TYPE_DECLs if they are from base classes.
3760
3761 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
3762
3763         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3764         nodes.  Tidy.
3765
3766 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
3767
3768         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3769         (finish_struct_1): Don't call build_class_init_list.
3770
3771 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
3772
3773         * tinfo.h (__class_type_info): Fix illegal declaration.
3774
3775         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3776         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3777         (IDENTIFIER_CLASS_VALUE): Improve documentation.
3778         (is_properly_derived_from): Declare.
3779         (invalidate_class_lookup_cache): Likewise.
3780         (maybe_maybe_note_name_used_in_class): Likewise.
3781         (note_name_declared_in_class): Likewise.
3782         (push_using_decl): Remove duplicate declaration.
3783         (id_in_current_class): Remove declaration.
3784         (push_class_binding): Change prototype.
3785         (clear_identitifer_class_values): Declare.
3786         * call.c (is_properly_derived_from): Make it global.
3787         (build_new_function_call): Be careful about updating candidates.
3788         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
3789         asked to make illegal calls.
3790         * class.c: Include splay-tree.h.
3791         (class_stack_node): Add names_used slot.
3792         (check_member_decl_is_same_in_complete_scope): Remove.
3793         (add_method): Fix comment.  Push the declaration into class
3794         scope.
3795         (finish_struct_1): When popping the class, pop the bindings too.
3796         Remove check for data member/function member conflict.
3797         (finish_struct): Remove calls to
3798         check_member_decl_is_same_in_complete_scope.  Change calls to
3799         popclass.
3800         (pushclass): Clear names_used in the class stack entry.
3801         Use invalidate_class_lookup_cache to remove cached entries, rather
3802         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
3803         before entering a new class.  Remove dead code.  Don't mess with
3804         current_function_decl when pushing declarations.
3805         (invalidate_class_lookup_cache): New function, split out from ...
3806         (popclass): Here.  Clean up names_used on our way out.
3807         (instantiate_type): Adjust.
3808         (build_self_reference): Don't push the declaration here.
3809         (maybe_note_name_used_in_class): New function.
3810         (note_name_declared_in_class): Likewise.
3811         * decl.c (add_binding): Change prototype.
3812         (find_class_binding_level): New function.
3813         (innermost_nonclass_level): Likewise.
3814         (current_binding_level): Update documentation.
3815         (inner_binding_level): Remove.  Replace with current_binding_level
3816         throughout.
3817         (push_binding_level): Remove special handling of
3818         class_binding_level.
3819         (pop_binding_level): Likewise.  Use find_class_binding_level.
3820         (suspend_binding_level): Likewise.
3821         (global_bindings_p): Use innermost_nonclass_level.
3822         (toplevel_bindings_p): Likewise.
3823         (namespace_bindings_p): Likewise.
3824         (pseudo_global_level_p): Likewise.
3825         (push_binding): Clear INHERITED_VALUE_BINDING_P.
3826         (add_binding): Check for illegal multiple declarations.  Return a
3827         value indicating whether or not the new binding was legal.
3828         (push_local_binding): Skip over class binding levels.  Check
3829         return value from add_binding.
3830         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
3831         note_name_declared_in_class.
3832         (pushlevel_class): Remove "fake out the rest of the compiler"
3833         code.
3834         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3835         (clear_identifier_class_values): New function.
3836         (pop_from_top_level): Use it.
3837         (pop_everything): Tweak.
3838         (maybe_process_template_type_declaration): Don't push the
3839         declaration for the template here.
3840         (pushtag): Don't push tag declarations into class scope here.
3841         (pushdecl): Apply DeMorgan's law for readability.
3842         (pushdecl_class_level): Remove special-case code for
3843         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
3844         (push_class_level_bindng): Deal with inherited bindings.
3845         (lookup_name_real): Remove special-case code for
3846         TYPE_BEING_DEFINED, and some implicit typename magic.
3847         (grokdeclarator): Handle COMPONENT_REF for a template function.
3848         (build_enumerator): Don't call pushdecl_class_level here.
3849         (id_in_current_class): Remove.
3850         * decl2.c (grokfield): Don't call pushdecl_class_level or
3851         check_template_shadow.
3852         * errfn.c (cp_file_of): Don't declare.
3853         (cp_line_of): Likewise.
3854         * error.c (dump_decl): Handle an OVERLOAD.
3855         (cp_file_of): Likewise.
3856         (cp_line_of): Likewise.
3857         * init.c (build_member_call): Handle a COMPONENT_REF.
3858         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3859         pushdecl_class_level.
3860         * method.c (hack_identifier): Build COMPONENT_REFs for references
3861         to member templates as well as member functions.  Remove dead
3862         code.
3863         * parse.y (left_curly): Remove.
3864         (nonnested_type): Call maybe_note_name_used_in_class, not
3865         pushdecl_class_level.
3866         * parse.c: Regenerated.
3867         (nested_name_specifier_1): Likewise.
3868         * pt.c (check_explicit_specialization): Adjust, for robustness.
3869         (check_template_shadow): Handle OVERLOADs.
3870         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3871         TEMPLATE_DECL, if appropriate.
3872         * search.c (envelope_add_decl): Remove.
3873         (dfs_pushdecls): Likewise.
3874         (dfs_compress_decls): Likewise.
3875         (dfs_push_decls): New function.
3876         (dfs_push_type_decls): Likewise.
3877         (setup_class_bindings): Likewise.
3878         (template_self_reference_p): Likewise.
3879         (lookup_field_r): Use it.
3880         (looup_member): Remove old comment.  Deal with ambiguity.
3881         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3882         and remove envelope processing.
3883         * semantics.c (begin_class_definition): Let pushclass push
3884         declarations for base classes.
3885         (finish_member_declaration): Push declarations into class scope.
3886         * typeck.c (build_component_ref): Just put an OVERLOAD into the
3887         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3888         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
3889         * Makefile.in (class.o): Depend on splay-tree.h.
3890
3891 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
3892
3893         * cvt.c (convert_pointer_to_real): Use same_type_p.
3894         * typeck.c (comp_target_types): Use same_type_p.
3895
3896 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
3897
3898         * semantics.c (begin_inline_definitions,
3899         finish_inline_definitions): Rename from finish_default_args and
3900         begin_inline_definitions, respectively, to something that isn't a
3901         total lie.  :)
3902         * parse.y (structsp): Adjust.
3903
3904         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3905         (list_hash_lookup): Likewise.
3906         (hash_tree_chain): Adjust.
3907         * pt.c (tsubst): Adjust.
3908         (tsubst_arg_types): Use plain hash_tree_cons.
3909         * cp-tree.h (hash_tree_cons_simple): Lose.
3910         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3911
3912 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3913
3914         * Makefile.in (hash.h): Generate using gperf language 'C', not
3915         'KR-C', so gperf uses the `const' keyword on strings.
3916
3917         * gxx.gperf (resword): Const-ify a char*.
3918
3919 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
3920
3921         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3922         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3923         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3924         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3925         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3926         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3927         tree.c: Adjust.
3928
3929 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
3930
3931         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3932
3933 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
3934
3935         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3936
3937 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
3938
3939         * cp-tree.h (add_friend): Declare.
3940         (add_friends): Likewise.
3941         * friend.c (add_friend): Make it global.  Don't add to
3942         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3943         (add_friends): Make it global.
3944         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3945         befriending class is a template.
3946         * parse.y (component_decl_1): Fix typo in comment.
3947         * parse.c: Regenerated.
3948         * pt.c (instantiate_class_template): Use add_friend and
3949         add_friends rather that duplicating some of their functionality
3950         here.
3951
3952 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
3953
3954         * call.c (build_field_call): Unify 'this' and non-'this' cases.
3955
3956         * typeck.c (build_indirect_ref): Check for 'this' sooner.
3957
3958 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3959
3960         * call.c (op_error): Const-ify a char*.
3961         (add_candidate, source_type, add_warning): Add static prototype.
3962         (print_z_candidates): Const-ify a char*.
3963
3964         * class.c (resolve_address_of_overloaded_function,
3965         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3966         (get_vtable_name, finish_struct_1): Const-ify a char*.
3967
3968         * cvt.c (convert_to_reference): Likewise.
3969
3970         * decl.c (redeclaration_error_message, record_builtin_type,
3971         record_unknown_type, member_function_or_else, bad_specifiers):
3972         Likewise.
3973         (find_binding, select_decl, unqualified_namespace_lookup,
3974         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3975         Add static prototype.
3976         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3977         implicitly_declare, record_builtin_java_type, define_function,
3978         grok_op_properties, tag_name): Const-ify a char*.
3979
3980         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3981         (define_function, finish_builtin_type): Const-ify a char*.
3982         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3983         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3984         (file_name_nondirectory): Const-ify a char*.
3985         (init_filename_times): Don't prototype.
3986         (compiler_error): Prototype.
3987         (yyerror, init_repo): Const-ify a char*.
3988         (build_srcloc): Don't prototype.
3989         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3990         Const-ify a char*.
3991         (warn_for_assignment): Don't prototype.
3992         (convert_for_initialization, readonly_error, check_for_new_type,
3993         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3994         Const-ify a char*.
3995
3996         * decl2.c (acceptable_java_type, output_vtable_inherit,
3997         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3998         merge_functions, decl_namespace, validate_nonmember_using_decl,
3999         do_nonmember_using_decl): Add static prototype.
4000         (lang_f_options): Const-ify a char*.
4001         (finish_builtin_type): Likewise.
4002         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4003         prototype.
4004
4005         * errfn.c: Include cp-tree.h.
4006         (cp_thing): Add static prototype.
4007         (compiler_error): Don't protoptype.
4008         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4009         passing it to `cp_thing'.
4010
4011         * error.c (interesting_scope_p): Add static prototype.
4012
4013         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4014         a char*.
4015
4016         * init.c (compiler_error): Don't prototype.
4017         (member_init_ok_or_else): Const-ify a char*.
4018         (build_java_class_ref): Add static prototype.
4019
4020         * lex.c (compiler_error): Don't prototype.
4021         (get_time_identifier, interface_strcmp, extend_token_buffer,
4022         handle_cp_pragma): Const-ify a char*.
4023         (is_global, init_filename_times): Add static prototype.
4024         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4025         (compiler_error): Change from fixed args to variable args.
4026         (yyerror): Const-ify a char*.
4027
4028         * parse.y (cond_stmt_keyword): Const-ify a char*.
4029         (parse_decl): Add static prototype.
4030
4031         * pt.c (template_args_equal, print_template_context): Likewise.
4032         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4033         (instantiate_class_template): Likewise.
4034
4035         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4036
4037         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4038         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4039
4040         * search.c (lookup_field_info, lookup_member): Likewise.
4041         (lookup_member): Cast the first argument of `bzero' to a PTR.
4042
4043         * sig.c (compiler_error): Don't prototype.
4044         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4045         (get_sigtable_name, build_member_function_pointer): Likewise.
4046
4047         * tree.c (compiler_error): Don't prototype.
4048         (no_linkage_helper, build_srcloc): Add static prototype.
4049         (build_vbase_pointer_fields): Const-ify a char*.
4050         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4051
4052         * typeck.c (compiler_error): Don't prototype.
4053         (convert_for_assignment): Const-ify a char*.
4054         (comp_cv_target_types): Add static prototype.
4055         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4056         build_component_addr, build_unary_op, convert_for_initialization):
4057         Const-ify a char*.
4058
4059         * typeck2.c (ack): Add static prototype and change from fixed args
4060         to variable args.
4061         (readonly_error, check_for_new_type): Const-ify a char*.
4062
4063         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4064         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4065         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4066         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4067         gen_assign, GNU_xref_member): Const-ify a char*.
4068
4069 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4070
4071         * gxxint.texi: Remove old discussion on copying virtual bases.
4072
4073 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4074
4075         * Make-lang.in: Remove all references to g++.o/g++.c.
4076         Link g++ from gcc.o.
4077
4078 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4079
4080         * decl2.c (comdat_linkage): Treat vtables like functions.
4081
4082 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4083
4084         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4085
4086 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4087
4088         * decl.c (init_decl_processing): Add `signed' type as a synonym
4089         for `int'.
4090
4091 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4092
4093         * typeck.c (common_type): Handle cv-qual unification for pointers
4094         to members.
4095
4096         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4097         on error.
4098         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4099         * lex.c (do_identifier): If we got error_mark_node, call
4100         lookup_name again.
4101
4102 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4103
4104         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4105         classes.
4106
4107 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4108
4109         * decl.c (lookup_name_real): Do nested field lookup regardless of
4110         TYPE_BEING_DEFINED.
4111
4112 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4113
4114         * cp-tree.h (lang_type): Remove has_assignment and
4115         has_real_assignment.  Add befriending_classes.
4116         (TYPE_HAS_ASSIGNMENT): Remove.
4117         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4118         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4119         (lang_decl): Document.
4120         (DECL_BEFRIENDING_CLASSES): New macro.
4121         (FRIEND_NAME): Move declaration to more obvious location.
4122         (FRIEND_DECLS): Likewise.
4123         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4124         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4125         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4126         (grok_op_properties): Likewise.
4127         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4128         (add_friend): Likewise.  Don't do weird things with assignment
4129         operators.  Update DECL_BEFRIENDING_CLASSES.
4130         (add_friends): Don't do weird things with assignment operators.
4131         (make_friend_class): Likewise.  Update
4132         CLASSTYPE_BEFRIENDING_CLASSES.
4133         * pt.c (instantiate_class_template): Don't set
4134         TYPE_HAS_ASSIGNMENT.
4135         (tsubst_copy): Substitute the TREE_TYPE for more unary
4136         expressions.
4137         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4138         * search.c (protected_accessible_p): New function.
4139         (friend_accessible_p): Likewise.
4140         (accessible_p): Use them.
4141
4142 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4143
4144         * pt.c (convert_nontype_argument): Don't create things that aren't
4145         PTRMEM_CSTs when applying a qualification conversion to a
4146         PTRMEM_CST.
4147
4148 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4149
4150         * Makefile.in (OBJS): Don't mention hash.o.
4151         (OBJDEPS): Likewise.
4152
4153 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4154
4155         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4156         * decl.c (expand_static_init): Make sure we don't add any after
4157         then.
4158
4159         * decl.c (cp_finish_decl): Move intelligence about handling
4160         DECL_COMDAT for variables from here...
4161         * decl2.c (comdat_linkage): ...to here.
4162         (maybe_make_one_only): Tweak.
4163         (import_export_decl): Call comdat_linkage for variables, too.
4164         (finish_file): Handle template statics properly.
4165
4166 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4167
4168         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4169         Document internals of pointer-to-member-functions.
4170         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4171         (PFN_FROM_PTRMEMFUNC): Likewise.
4172         (build_type_conversion): Remove unused parameter.
4173         (build_ptrmemfunc1): Declare.
4174         (expand_ptrmemfunc_cst): New function.
4175         (delta2_from_ptrmemfunc): Likewise.
4176         (pfn_from_ptrmemfunc): Likewise.
4177         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4178         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4179         (convert_to_reference): Remove unused parameter to
4180         build_type_conversion.
4181         (ocp_convert): Likewise.
4182         (build_user_type_conversion): Likewise.
4183         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4184         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4185         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4186         open when handling pointer-to-member functions.
4187         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4188         more stringent with pointers-to-members.
4189         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4190         (build_unary_op): Tidy ever-so-slightly.
4191         (build_conditional_expr): Remove extra parameter to
4192         build_type_conversion.
4193         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4194         we're using.
4195         (expand_ptrmemfunc_cst): Define.
4196         (delta2_from_ptrmemfunc): Likewise.
4197         (pfn_from_ptrmemfunc): Likewise.
4198
4199 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4200
4201         * init.c (build_member_call): Handle template-id expressions
4202         correctly.
4203         * typeck.c (build_x_function_call): Likewise.
4204
4205 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4206
4207         * friend.c (make_friend_class): Avoid core dump when
4208         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4209
4210 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4211
4212         * decl.c (start_function): Suppress normal linkage heuristics
4213         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4214
4215 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4216
4217         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4218         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4219
4220 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4221
4222         * parse.y (named_complex_class_head_sans_basetype):
4223         Do not push a scope for error_mark_node.
4224         (maybe_base_class_list): Likewise.
4225
4226         * decl.c (start_decl): Check for error_mark_node as a type.
4227         Detected by g++.brendan/array-refs.C.
4228         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4229         (maybe_build_cleanup_1): Likewise.  Detected by
4230         g++.jason/incomplete1.C.
4231
4232         * tree.c (build_dummy_object): Use void_zero_node instead of the
4233         error_mark_node.
4234         (is_dummy_object): Check for such a node.
4235         Detected by g++.bob/inherit1.C
4236
4237 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4238
4239         * method.c (old_backref_index): Split out...
4240         (flush_repeats): From here.  Rename back from try_old_backref.
4241         (build_mangled_name): Put back some old-style repeat handling.
4242
4243 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4244
4245         * lex.c: Don't include setjmp.h.
4246         (parse_float): New static function.
4247         (pf_args): New struct.
4248         (real_yylex): Use them in call to `do_float_handler'.
4249
4250 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4251
4252         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4253         * tree.c (layout_basetypes): Not here.
4254         * search.c (dfs_search): Remove; no longer used.
4255
4256 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4257
4258         * decl2.c (validate_nonmember_using_decl): Issue sensible
4259         error-messages on bogus qualifiers.
4260
4261 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4262
4263         * call.c (add_function_candidate): Fix uninitialized variable.
4264
4265         * Makefile.in (search.o): Add dependency on varray.h.
4266
4267 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4268
4269         * decl.c (duplicate_decls): Use same_type_p.
4270         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4271         same_type_p.  Don't try to handle repeats.  Return success.
4272         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4273         calls from old-style code, too.
4274         (check_ktype): Use same_type_p.
4275         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4276         (build_qualified_name): Simplify logic.
4277         (process_overload_item): Strip typedefs and quals at the top.
4278         (build_mangled_name_for_type_with_Gcode): Remove call to
4279         type_canonical_variant.
4280         (build_mangled_name): Likewise.  Remove support for old-style
4281         repeats, which have been disabled since 2.7.2.  Don't mess with
4282         TREE_USED.
4283         (build_decl_overload_real): Don't mess with TREE_USED.
4284
4285 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4286
4287         * error.c (cp_printers): Add 'F' escape character.
4288         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4289         Functionality moved to dump_parameters.
4290         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4291         (dump_function_decl): Extend meaning of V parameter.  Use
4292         dump_parameters and dump_exception_spec.
4293         (dump_parameters): New static function.
4294         (dump_exception_spec): New static function.
4295         (fndecl_as_string): Change argument semantics.  Use
4296         dump_function_decl directly.
4297
4298         * sig.c (build_signature_table_constructor): Use cp_error.
4299
4300 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4301
4302         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4303         Detected by g++.law/enum5.C.
4304
4305         * typeck.c (build_modify_expr): Check for errors after resolving
4306         offsets.  Detected by g++.brendan/static1.C.
4307
4308         * decl.c (complete_array_type): Ignore initial_value if it is an
4309         error.  Detected by g++.benjamin/17930.C.
4310
4311         * typeck2.c (process_init_constructor): Return error if one argument
4312         is in error.  Detected by g++.benjamin/13478.C.
4313
4314 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4315
4316         * decl.c (select_decl): Allow class templates when we need types.
4317         * decl2.c (ambiguous_decl): Likewise.
4318
4319 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4320
4321         * lex.c (do_identifier): Correct call to enforce_access.
4322         * search.c (accessible_p): Tweak comment.
4323
4324 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4325
4326         * semantics.c (begin_class_definition): Call build_self_reference.
4327         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4328
4329         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4330
4331         * search.c (dfs_canonical_queue): New function.
4332         (dfs_assert_unmarked_p): Likewise.
4333         (assert_canonical_unmarked): Likewise.
4334         (access_in_type): Use it.
4335         (accessible_p): Likewise.  Walk the whole tree when umarking.
4336
4337         * sig.c (build_signature_table_constructor): Use accessible_p
4338         instead of compute_access.
4339
4340 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4341
4342         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4343
4344 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4345
4346         * cp-tree.h (flag_access_control): Declare.
4347         (TREE_VIA_PPUBLIC): Document.
4348         (DECL_NONSTATIC_MEMBER_P): New macro.
4349         (enforce_access): Return an indication of whether or not access
4350         was permitted.
4351         (build_self_reference): Change prototype.
4352         (compute_access): Replace with ...
4353         (accessible_p): New function.
4354         (dfs_walk): Change prototype.
4355         (dfs_unmark): Likewise.
4356         (markedp): Likewise.
4357         * call.c (enforce_access): Use accessible_p.
4358         * class.c (build_self_reference): Insert the declaration into the
4359         list of members for this type, and make it public.
4360         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4361         * init.c (build_offset_ref): Use lookup_member, not three separate
4362         name-lookups.  Call enforce_access rather than checking for
4363         illegal accesses here.
4364         (resolve_offset_ref): Likewise.
4365         * lex.c (do_identifier): Likewise.
4366         * method.c (hack_identifier): Likewise.
4367         * parse.y (self_reference): Remove.
4368         (opt_component_decl_list): Don't use it.
4369         * parse.c: Regenerated.
4370         * pt.c (print_candidates): Generalize to handle lists of
4371         overloaded functions.
4372         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4373         not set.
4374         (get_template_base): Use new calling convention for dfs_walk.
4375         * search.c: Include varray.h.  Add prototypes.
4376         (dfs_walk): Accept a data pointer to pass to the work functions.
4377         All callers changed.  All work functions changed.
4378         (breadth_first_search): Rename to bfs_walk, and make consistent
4379         with dfs_walk.
4380         (dfs_walk_real): New function.
4381         (canonical_binfo): New function.
4382         (context_for_name_lookup): Likewise.
4383         (shared_marked_p): Likewise.
4384         (shared_unmarked_p): Likewise.
4385         (lokup_field_queue_p): Likewise.
4386         (lookup_field_r): Generalize to handle both functions and fields.
4387         (lookup_field): Just call lookup_member.
4388         (lookup_fnfields): Likewise.
4389         (lookup_member): Move body of lookup_field here and generalize.
4390         (dfs_accessible_queue_p): Likewise.
4391         (dfs_accessible_p): Likewise.
4392         (dfs_access_in_type): Likewise.
4393         (access_in_type): Likewise.
4394         (compute_access): Remove, and replace with ...
4395         (accessible_p): New function.
4396         (vbase_types): Remove.
4397         (vbase_decl_ptr_intermediate): Likewise.
4398         (vbase_decl_ptr): Likewise.
4399         (vbase_init_result): Likewise.
4400         (closed_envelopes): Likewise.
4401         (bvtable): Likewise.
4402
4403 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4404
4405         * call.c (add_function_candidate): Check for proper number of args
4406         before checking the validity of those args.
4407
4408 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
4409
4410         * cp-tree.h (struct lang_type): Add anon_union field.
4411         (ANON_UNION_TYPE_P): Use it instead of examining type.
4412         (SET_ANON_UNION_TYPE_P): New macro.
4413         * decl.c (check_tag_decl): Use it.
4414
4415         * search.c (compute_access): Handle non-type contexts earlier, and
4416         handle NULL_TREE.
4417
4418         * tree.c (build_exception_variant): Use copy_to_permanent.
4419
4420         * decl2.c (setup_initp): Give statics with no priority the default
4421         priority here.
4422         (do_dtors, do_ctors, finish_file): Remove special handling of
4423         non-prioritized statics.
4424
4425 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
4426
4427         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4428         * decl.c (make_typename_type): Don't issue an error if an
4429         immediate lookup fails; it migt be resolved later.
4430         * friend.c (is_friend): Add comment.
4431         * search.c (breadth_first_search): Add POSTFN and DATA
4432         parameters.  Tidy.  All callers changed.
4433         (lookup_field_queue_p): New function.
4434         (lookup_field_r): Likewise.
4435         (lookup_field_post): Likewise.
4436         (lookup_field): Use them, via breadth_first_search, instead of
4437         duplicating logic.
4438         (compute_access): Robustify.
4439         (lookup_fnfield_info): New structure.
4440
4441 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
4442
4443         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4444
4445 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
4446
4447         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4448         cc happy.
4449
4450         * decl2.c (import_export_class): Also return if
4451         CLASSTYPE_INTERFACE_ONLY is set.
4452
4453 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4454
4455         * decl.c (push_overloaded_decl): Only overwrite the old binding if
4456         there was one.
4457         * decl2.c (do_local_using_decl): Fix loop termination.
4458
4459 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
4460
4461         * cp-tree.h (determine_specialization): Don't declare.
4462         * pt.c (determine_specialization): Make it static.  Eliminate
4463         complain parameter.  Note that decl is always non-NULL now, and
4464         simplify accordingly.
4465
4466         * decl.c (maybe_push_to_top_level): Always call
4467         push_cp_function_context.
4468         (pop_from_top_level): Always call pop_cp_function_context.
4469
4470 1999-02-26  Nathan Sidwell  <nathan@acm.org>
4471
4472         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4473         diagnostics.
4474         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4475         * init.c (build_new_1): Extra arg to complete_type_or_else.
4476         (build_delete): Likewise.
4477         * typeck.c (require_complete_type): Likewise.
4478         (pointer_int_sum): Likewise.
4479         (pointer_diff): Likewise.
4480         (build_component_ref): Likewise.
4481
4482         * typeck2.c (incomplete_type_error): Always use cp_error.
4483         Show declaration of undefined type, if appropriate.
4484         Deal with UNKNOWN_TYPE nodes.
4485
4486         * typeck.c (require_complete_type): Use TYPE_SIZE as
4487         size_zero_node to mean incomplete type.
4488         (require_complete_type_in_void): New function.
4489         (build_compound_expr): Call complete_type_in_void for LHS.
4490         (build_c_cast): Call complete_type_in_void for void cast.
4491         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4492         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4493         require_complete_type_in_void.  Call it.
4494         * cp-tree.h (require_complete_type_in_void): Prototype new function.
4495
4496         * typeck.c (convert_arguments): Use alternative format for
4497         function decls.  Don't require_complete_type here.  Simplify
4498         diagnostic printing.
4499         (convert_for_initialization): Don't require_complete_type on RHS yet.
4500         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4501
4502         * call.c (build_over_call): Cope with qualified void return type.
4503         * semantics.c (finish_call_expr): Likewise.
4504         * typeck.c (build_function_call_real): Likewise.
4505         (c_expand_return): Likewise.
4506         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4507
4508         * call.c (print_z_candidates): Use alternate print format, to be
4509         consistent with (pt.c) print_candidates.
4510         * method.c (hack_identifier): List candidate members.
4511         * search.c (lookup_field): Build ambiguous list, and show it, if
4512         ambiguous.
4513
4514 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
4515
4516         * typeck.c (decay_conversion): Don't confuse constant array
4517         variables with their initializers.
4518
4519         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4520         merging decls.
4521         * pt.c (regenerate_decl_from_template): Tweak for clarity.
4522         (instantiate_decl): Mark a decl instantiated before regenerating
4523         it to avoid recursion.
4524         * tree.c (mapcar): Don't call decl_constant_value unless we know
4525         something is TREE_READONLY_DECL_P.
4526
4527         * class.c (check_for_override): Don't stop checking when we find
4528         the first overridden function.  Delete #if 0'd code.
4529         * search.c (get_matching_virtual): Likewise.
4530
4531 1999-02-25  Richard Henderson  <rth@cygnus.com>
4532
4533         * lang-specs.h: Define __FAST_MATH__ when appropriate.
4534
4535 1999-02-24  Mike Stump  <mrs@wrs.com>
4536
4537         * typeck.c (convert_for_assignment): Allow boolean integral constant
4538         expressions to convert to null pointer.
4539
4540 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4541
4542         * decl.c (lookup_namespace_name): Resolve namespace aliases.
4543
4544         * class.c (push_nested_class): Allow namespaces.
4545
4546         * decl2.c (set_decl_namespace): Add friendp parameter.
4547         * decl.c (grokfndecl): Pass it.
4548         (grokvardecl): Likewise.
4549         * cp-tree.h: Change declaration.
4550
4551 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
4552
4553         * pt.c (tsubst): Allow an array of explicit size zero.
4554
4555 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
4556
4557         * errfn.c: Change varargs code to look like toplev.c.
4558
4559         * method.c (process_modifiers): Don't prepend 'U' for char or
4560         wchar_t.
4561
4562 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4563
4564         * Make-lang.in (cplib2.ready): Don't consider updating
4565         cplib2 stuff if the current directory isn't writable, as
4566         it won't work (such as during a `make install').
4567
4568 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4569
4570         * decl2.c (start_objects): Make file scope constructors and
4571         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4572         ASM_OUTPUT_DESTRUCTOR are defined.
4573
4574 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4575
4576         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4577         (fn_type_unification): Adjust prototype.
4578         (lookup_fnfields_1): Declare.
4579         * call.c (add_template_candidate_real): Adjust call to
4580         fn_type_unification.
4581         * class.c (add_method): Don't allow duplicate declarations of
4582         constructors or destructors.
4583         (resolve_address_of_overloaded_function): Remove unused variable.
4584         Adjust call to fn_type_unification.
4585         * decl.c (grokfndecl): Be more robust in the face of illegal
4586         specializations.
4587         * decl2.c (check_classfn): Remove hokey handling of member
4588         templates.
4589         * pt.c (determine_specialization): Improve comments.  Adjust to
4590         handle template argument deduction as per the standard.
4591         (check_explicit_specialization): Fix comment spacing.  Handle
4592         type-conversion operators correctly.  Improve error-recovery.
4593         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4594         (get_bindings_real): Simplify handling of static members.
4595         * search.c (lookup_fnfields_1): Make it have external linkage.
4596         * typeck.c (compparms): Fix comment.
4597         (build_unary_op): Don't try to figure out which template
4598         specialization is being referred to when when the address-of
4599         operator is used with a template function.
4600
4601 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4602
4603         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4604         keyword to match an analogous change at the top level.
4605
4606         * tree.c (lvalue_or_else): Likewise.
4607
4608 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4609
4610         * decl.c (xref_basetypes): Comment.
4611         * pt.c (instantiate_class_template): Use xref_basetypes.
4612
4613 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
4614
4615         * cp-tree.h (tsubst): Change prototype.
4616         (tsubst_expr): Likewise.
4617         (tsubst_copy): Likewise.
4618         (type_unification): Remove prototype.
4619         * call.c (convert_default_arg): Adjust call to tsubst_expr.
4620         * class.c (resolve_address_of_overloaded_function): Just use
4621         fn_type_unification.
4622         * decl.c (grokdeclarator): Adjust call to tsubst.
4623         * method.c (build_template_parm_names): Likewise.
4624         * pt.c (GTB_VIA_VIRTUAL): New macro.
4625         (GTB_IGNORE_TYPE): Likewise.
4626         (resolve_overloaded_unification): Add `complain' parameter.
4627         (try_one_overload): Likewise.
4628         (tsubst_template_arg_vector): Likewise.
4629         (tsubst_template_parms): Likewise.
4630         (tsubst_aggr_type): Likewise.
4631         (tsubst_arg_types): Likewise.
4632         (tsubst_call_declarator_parms): Likewise.
4633         (unify): Remove explicit_mask.
4634         (type_unification_real): Likewise.
4635         (get_template_base_recursive): Likewise.
4636         (coerce_template_template_parms): Provide prototype.
4637         (tsubst_function_type): Likewise.
4638         (try_class_unification): New function.
4639         All callers changed to use new complain parameter.
4640         (get_template_base): Use try_class_unification.
4641         (unify): Adjust handling of classes derived from template types.
4642         (fn_type_unification): Substitute explicit arguments before
4643         unification.
4644
4645 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4646
4647         * decl.c (pushdecl): Remove dead code.
4648
4649 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
4650
4651         * decl2.c (finish_objects): Fix code I missed in previous change.
4652
4653 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
4654
4655         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4656         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4657
4658         * pt.c (maybe_process_partial_specialization): Complain about
4659         'template <>' on non-specialization.
4660
4661 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
4662
4663         * decl.c (grokdeclarator): Catch wierd declarators.
4664         * decl2.c (finish_file): Don't abort because of namespace parsing
4665         failure.
4666         (check_decl_namespace): Remove.
4667
4668 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
4669
4670         * cp-tree.h (get_template_base): Don't declare.
4671         (dfs_walk): Declare.
4672         (dfs_unmark): Likewise.
4673         (markedp): Likewise.
4674         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
4675         targs to get_template_base.
4676         (get_template_base_recursive): Move here from search.c.  Check to
4677         see that the base found can be instantiated to form the desired
4678         type.
4679         (get_template_base): Likewise.
4680         (get_class_bindings): Simplify.
4681         * search.c (get_template_base_recursive): Move to pt.c.
4682         (get_template_base): Likewise.
4683         (markedp): Make it global.
4684         (dfs_walk): Likewise.
4685         (dfs_unmark): Likewise.
4686
4687 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
4688
4689         * pt.c (maybe_process_partial_specialization): Complain about
4690         specialization in wrong namespace.
4691         * tree.c (decl_namespace_context): New fn.
4692
4693 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4694
4695         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4696         * pt.c (coerce_template_template_parms): Handle nested
4697         template template parameters.
4698
4699 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
4700
4701         * typeck2.c: Update email addresses.
4702
4703 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4704
4705         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4706         turned off.
4707
4708 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
4709
4710         * lex.c (retrofit_lang_decl): Split out...
4711         (build_lang_decl): From here.
4712         * decl.c (pushdecl): Call it for functions generated by the middle
4713         end that don't have DECL_LANG_SPECIFIC.
4714         * cp-tree.h: Declare it.
4715
4716         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
4717         (start_objects, finish_objects): Only use special
4718         init_priority code if the user specified a priority.
4719         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4720         objects.
4721
4722 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
4723
4724         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4725         mkstemp.o.  Get them from libiberty now.
4726         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4727
4728 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4729
4730         * decl2.c (lang_decode_option): Use read_integral_parameter.
4731
4732 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
4733
4734         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4735         before calling complete_type_or_else.
4736
4737 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4738
4739         * input.c (inline): Don't define, its handled by system.h.
4740
4741 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
4742
4743         * decl2.c: Don't define flag_no_ident here.  Don't process
4744         -f(no-)ident here.
4745         * cp-tree.h: Don't declare flag_no_ident here.
4746         * lang-specs.h: Map -Qn to -fno-ident.
4747
4748 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
4749
4750         * cp-tree.h (struct tree_binding): Replace scope field with a union.
4751         (BINDING_SCOPE): Adjust.
4752         * decl.c (BINDING_LEVEL): Adjust.
4753
4754 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
4755
4756         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4757         member constants.
4758
4759         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4760         a ctor initializer.
4761
4762         * tree.c (equal_functions): Fix name in prototype.
4763
4764         * decl.c (push_local_binding): Add FLAGS argument.
4765         (pushdecl, push_overloaded_decl): Pass it.
4766         * decl2.c (do_local_using_decl): Likewise.
4767         * cp-tree.h: Adjust prototype.
4768         * decl.c (poplevel): Fix logic.
4769
4770         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4771         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
4772         (cat_namespace_levels): Don't loop forever.
4773
4774 1999-01-25  Richard Henderson  <rth@cygnus.com>
4775
4776         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4777
4778 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
4779
4780         * class.c (resolve_address_of_overloaded_function): Mark the
4781         chosen function used.
4782
4783         * call.c (build_call): Make sure that a function coming in has
4784         been marked used already.
4785         * decl.c (expand_static_init): Call mark_used instead of
4786         assemble_external.
4787         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4788         alloc_eh_object, expand_throw): Likewise.
4789         * init.c (build_builtin_delete_call): Likewise.
4790         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4791         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4792         expand_generic_desc): Likewise.
4793
4794 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4795
4796         * tree.c (equal_functions): New function.
4797         (ovl_member): Call it.
4798
4799 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4800
4801         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4802
4803 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4804
4805         * decl.c (decls_match): Return 1 if old and new are identical.
4806         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4807
4808 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4809
4810         * decl.c (start_function): Make member functions one_only on windows.
4811         * decl2.c (import_export_decl): Likewise.
4812
4813         * decl.c (grokdeclarator): Don't complain about implicit int in
4814         a system header.  Change same-name field check to not complain in
4815         a system header instead of within extern "C".
4816
4817 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4818
4819         * cp-tree.h (PUSH_GLOBAL): New macro.
4820         (PUSH_LOCAL): Likewise.
4821         (PUSH_USING): Likewise.
4822         (namespace_bindings_p): Declare.
4823         (push_overloaded_decl): Likewise.
4824         * decl.c (push_overloaded_decl): Don't make it static.  Check for
4825         illegal declarations after using declarations here.
4826         (namespace_bindings_p): Likewise.
4827         (duplicate_decls): Don't consider declarations from different
4828         namespaces to be the same.
4829         (pushdecl): Use symbolic PUSH_ constants in calls to
4830         push_overloaded_decl.
4831         (push_overloaded_decl_1): Likewise.
4832         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4833         (do_nonmember_using_decl): Check for illegal using declarations
4834         after ordinary declarations here.
4835         (do_local_using_decl): Call pushdecl to insert declarations.
4836
4837 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
4838
4839         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4840
4841 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4842
4843         * tree.c (build_cplus_array_type_1): Don't call build_array_type
4844         for types involving template parameters.
4845
4846         * cp-tree.h (PARM_DECL_EXPR): Delete.
4847         (convert_default_arg): Change prototype.
4848         (check_default_argument): Declare.
4849         (search_tree): Likewise.
4850         * call.c (convert_default_arg): Take the function to which the
4851         default argument belongs as a parameter, and do any necessary
4852         instantiation here, instead of ...
4853         (build_over_call): Here.
4854         * decl.c (local_variable_p): New function.
4855         (check_default_argument): Likewise, split out and tidied from ...
4856         (grokparms): Here.
4857         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4858         * pt.c (tsubst_call_declarator_parms): New function.
4859         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
4860         with CALL_EXPRs, rather than trying to be clever.
4861         (tsubst): Use tsubst_call_declarator_parms.
4862         * tree.c (search_tree): Don't make it static.
4863         * typeck.c (convert_arguments): Use new interface to
4864         convert_default_arg.
4865
4866 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
4867
4868         * error.c (dump_function_decl): Don't print the argument types for
4869         a function when the verbosity level is negative.
4870
4871         * call.c (build_over_call): Check format attributes at call-time.
4872
4873         * pt.c (tsubst_copy): Fix comment.
4874         (unify): Don't allow unification with variable-sized arrays.
4875
4876         * semantics.c (finish_stmt_expr): When processing a template make
4877         the BIND_EXPR long-lived.
4878
4879 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
4880
4881         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4882         (import_export_vtable): Not here.
4883
4884 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4885
4886         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4887         non-static member function.
4888
4889 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4890
4891         * class.c (instantiate_type): Only diagnose illegal address of member
4892         function if complaining.
4893
4894         * decl.c (lookup_name_real): Remove duplicate code.
4895
4896 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4897
4898         * tree.c (copy_template_template_parm): Use permanent_obstack.
4899
4900 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4901
4902         * pt.c (unify): Remove restrictions on deduction of argument
4903         of template template parameters.
4904
4905 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4906
4907         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4908
4909         * class.c (resolve_address_of_overloaded_function): Show list of
4910         all candidates, when none of them match.
4911
4912 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
4913
4914         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4915         definition of 'casting away const' in reinterpret_cast<>.
4916
4917 1999-01-18  Graham  <grahams@rcp.co.uk>
4918
4919         * cvt.c: Add include for decl.h, remove extern for
4920         static_aggregates which is now provided by decl.h.
4921
4922         * Makefile.in (cvt.o): Add dependency for decl.h and missing
4923         dependencies for convert.h and flags.h.
4924
4925 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4926
4927         * decl2.c (do_dtors): Set current location to that of the
4928         decl, for sensible diagnostics and debugging.
4929         (check_classfn): Issue `incomplete type' error, if
4930         class is not defined.
4931
4932 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4933
4934         * cp-tree.h: Add prototype for bound_pmf_p.
4935
4936 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4937             Manfred Hollstein <manfred@s-direktnet.de>
4938
4939         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4940         -Wreturn-type.
4941
4942 1999-01-16  Nathan Sidwell  <nathan@acm.org>
4943
4944         * cp-tree.h (struct lang_type): Added has_mutable flag.
4945         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4946         (TYPE_HAS_MUTABLE_P): New macro to read it.
4947         (cp_has_mutable_p): Prototype for new function.
4948         * class.c (finish_struct_1): Set has_mutable from members.
4949         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4950         it contains a mutable.
4951         * typeck.c (cp_has_mutable_p): New function.
4952
4953 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
4954
4955         * pt.c (process_template_parm): Ignore top-level qualifiers on
4956         non-type parameters.
4957
4958         * decl.c (start_function): Use current_function_parms in the call
4959         to require_complete_type_for_parms, not the probably empty
4960         DECL_ARGUMENTS.
4961
4962 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
4963
4964         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4965
4966         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4967         that we don't suppress the other copies.
4968         * lex.c (handle_cp_pragma): Likewise.
4969
4970 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
4971
4972         * decl.c (grokdeclarator): Undo 1998-12-14 change.
4973         * tree.c (build_cplus_array_type_1): Likewise.
4974         * pt.c (instantiate_class_template): Remove misleading comment.
4975         (tsubst_aggr_type): Substitute if there are template parameters,
4976         regardless of whether or not they use template arguments.
4977         (unify): Likewise, but for unification.
4978
4979 1999-01-12  Richard Henderson  <rth@cygnus.com>
4980
4981         * cp-tree.h (flag_permissive): Declare extern.
4982
4983 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
4984
4985         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4986         here.
4987         (lang_type): Add is_partial_instantiation.  Decrease width of
4988         dummy.
4989         (PARTIAL_INSTANTIATION_P): New macro.
4990         (OPERATOR_TYPENAME_P): Remove.
4991         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4992         OPERATOR_TYPENAME_P.
4993         (grok_op_properties): Likewise.
4994         * friend.c (do_friend): Handle friends that are member functions
4995         correctly.
4996         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4997         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
4998         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
4999         any more partial instantiation than is absolutely necessary for
5000         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5001         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5002         * semantics.c (begin_class_definition): Handle partial
5003         specializations of a type that was previously partially
5004         instantiated.
5005
5006 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5007
5008         * g++spec.c (LIBSTDCXX): Provide default definition.
5009         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5010
5011 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5012
5013         * Make-lang.in (g++.o): Depend on prefix.h.
5014
5015 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5016
5017         * tree.c (bound_pmf_p): New fn.
5018         * typeck.c (build_c_cast): Use it.
5019
5020         * decl.c (grok_op_properties): Use same_type_p.
5021
5022 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5023
5024         * Makefile.in (cvt.o): Depend on toplev.h.
5025
5026         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5027
5028         * cvt.c: Include toplev.h.
5029
5030         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5031         definitions.
5032
5033         * init.c (expand_vec_init): Initialize variable `itype'.
5034
5035         * lex.c (yyerror): Cast the argument passed to a ctype function to
5036         an unsigned char.
5037
5038         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5039         in "HOST_BITS_PER_WIDE_INT >= 64".
5040
5041         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5042         ATTRIBUTE_UNUSED.
5043
5044 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5045
5046         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5047         * tree.c (build_exception_variant): Don't crash on empty throw
5048         specs.
5049
5050 1998-12-18  DJ Delorie  <dj@cygnus.com>
5051
5052         * cvt.c (convert_to_reference): Check for both error_mark_node
5053         and NULL_NODE after call to convert_for_initialization.
5054
5055 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5056
5057         * error.c (interesting_scope_p): New fn.
5058         (dump_simple_decl): Use it.
5059         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5060         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5061
5062 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5063
5064         * class.c (resolve_address_of_overloaded_function): Do conversion
5065         to correct type here, rather than ...
5066         (instantiate_type): Here.
5067
5068         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5069         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5070         (decl_template_parm_p): Remove.
5071         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5072         parameter.
5073         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5074         * pt.c (push_inline_template_parms_recursive): Set it.
5075         (decl_template_parm_p): Remove.
5076         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5077         (process_template_parm): Set it.
5078
5079 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5080
5081         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5082         if configured with cpplib.
5083
5084 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5085
5086         * decl.c (poplevel): Make sure ns_binding is initialized.
5087
5088         * decl.c (finish_function): Undo inadvertent change in previous
5089         patch.
5090
5091 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5092
5093         * class.c (pushclass): Tweak handling of class-level bindings.
5094         (resolve_address_of_overloaded_function): Update pointer-to-member
5095         handling.
5096         (instantiate_type): Likewise.
5097         * cvt.c (cp_convert_to_pointer): Likewise.
5098         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5099         Deal with `struct stat' hack.
5100         (binding_level): Add to documentation.
5101         (push_binding): Clear BINDING_TYPE.
5102         (add_binding): New function.
5103         (push_local_binding): Use it.
5104         (push_class_binding): Likewise.
5105         (poplevel): Adjust calls to pop_binding.
5106         (poplevel_class): Likewise.
5107         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5108         declarations to current binding level.
5109         (push_class_level_binding): Likewise.
5110         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5111         bindings.
5112         (lookup_namespace_name): Don't crash when confronted with a
5113         TEMPLATE_DECL.
5114         (lookup_name_real): Do `struct stat' hack in local binding
5115         contexts.
5116         (build_ptrmemfunc_type): Adjust documentation.
5117         (grokdeclarator): Don't avoid building real array types when
5118         processing templates unless really necessary.
5119         (finish_method): Adjust calls to pop_binding.
5120         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5121         not reparse_decl_as_expr.
5122         (build_expr_from_tree): Deal with a template-id as the function to
5123         call in a METHOD_CALL_EXPR.
5124         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5125         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5126         METHOD_TYPEs here.
5127         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5128         pointer-to-member types where necessary.
5129         * tree.c (build_cplus_array_type_1): Don't avoid building real
5130         array types when processing templates unless really necessary.
5131         (build_exception_variant): Compare the exception lists correctly.
5132
5133 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5134
5135         * cp-tree.def (CPLUS_BINDING): Update documentation.
5136         * cp-tree.h (LOCAL_BINDING_P): New macro.
5137         (lang_identifier): Rename local_value to bindings.
5138         (tree_binding): Make `scope' of type `void*', not `tree'.
5139         (BINDING_SCOPE): Update documentation.
5140         (IDENTIFIER_LOCAL_VALUE): Remove.
5141         (IDENTIFIER_CLASS_VALUE): Document.
5142         (IDENTIFIER_BINDING): New macro.
5143         (IDENTIFIER_VALUE): Likewise.
5144         (TIME_IDENTIFIER_TIME): Likewise.
5145         (TIME_IDENTIFIER_FILEINFO): Likewise.
5146         (IMPLICIT_TYPENAME_P): Likewise.
5147         (set_identifier_local_value): Remove.
5148         (push_local_binding): New function.
5149         (push_class_binding): Likewise.
5150         * class.c (pushclass): Update comments; use push_class_binding.
5151         * decl.c (set_identifier_local_value_with_scope): Remove.
5152         (set_identifier_local_value): Likewise.
5153         (push_binding): New function.
5154         (pop_binding): Likewise.
5155         (binding_level): Update documentation.  Remove shadowed.
5156         (BINDING_LEVEL): New macro.
5157         (free_binding_nodes): New variable.
5158         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5159         BLOCK_VARs when doing for-scope extension.  Remove effectively
5160         dead code.
5161         (pushlevel_class): Tweak formatting.
5162         (poplevel_class): Adjust for new name-lookup scheme.
5163         (print_binding_level): Likewise.
5164         (store_bindings): Likewise.
5165         (pushdecl): Likewise.
5166         (pushdecl_class_level): Likewise.
5167         (push_class_level_binding): Likewise.
5168         (push_overloaded_decl): Update comments.  Adjust for new
5169         name-lookup scheme.
5170         (lookup_name_real): Likewise.
5171         (lookup_name_current_level): Likewise.
5172         (cp_finish_decl): Likewise.
5173         (require_complete_types_for_parms): Likewise.  Remove misleading
5174         #if 0'd code.
5175         (grok_parms): Likewise.  Don't call
5176         require_complete_types_for_parms here.
5177         (grok_ctor_properties): Don't treat templates as copy
5178         constructors.
5179         (grop_op_properties): Or as assignment operators.
5180         (start_function): Document.  Adjust for new name-lookup scheme.
5181         (finish_function): Likewise.
5182         * decl2.c (do_local_using_decl): Use push_local_binding.
5183         * lex.c (begin_definition_of_inclass_inline): New function, split
5184         out from ...
5185         (do_pending_inlines): Here, and ...
5186         (process_next_inline): Here.
5187         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5188         (init_filename_times): Likewise.
5189         (extract_interface_info): Likewise.
5190         (ste_typedecl_interface_info): Likewise.
5191         (check_newline): Likewise.
5192         (dump_time_statistics): Likewise.
5193         (handle_cp_pragma): Likewise.
5194         (do_identifier): Adjust for new name-lookup scheme.
5195         * parse.y (function_try_block): Return ctor_initializer_opt value.
5196         (fndef): Use it.
5197         (fn.defpen): Pass appropriate values to start_function.
5198         (pending_inline): Use functor_try_block value, and pass
5199         appropriate values to finish_function.
5200         * pt.c (is_member_template): Update documentation; remove handling
5201         of FUNCTION_DECLs.  As per name, this function should deal only in
5202         TEMPLATE_DECLs.
5203         (decl_template_parm_p): Change name of olddecl parameter to decl.
5204         (check_template_shadow): Adjust for new name-lookup scheme.
5205         (lookup_template_class): Likewise.
5206         (tsubst_decl): Tweak so as not to confuse member templates with
5207         copy constructors and assignment operators.
5208         (unify): Handle UNION_TYPEs.
5209         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5210         (lang_print_xnode): Adjust for new name-lookup scheme.
5211         * typeck.c (mark_addressable): Likewise.
5212         (c_expand_return): Likewise.
5213
5214 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5215
5216         * decl.c (grokdeclarator): Allow field with same name as class
5217         in extern "C".
5218
5219         * decl.c (lookup_name_real): Don't limit field lookup to types.
5220         * class.c (check_member_decl_is_same_in_complete_scope): No error
5221         if icv and x are the same.
5222         * lex.c (do_identifier): Tweak error message.
5223
5224 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5225
5226         * decl.c (start_enum): Use push_obstacks, not
5227         end_temporary_allocation.
5228         (finish_enum): Call pop_obstacks.
5229
5230 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5231
5232         * class.c (instantiate_type): Return error_mark_node rather than
5233         junk.
5234
5235 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5236
5237         * cp-tree.h (most_specialized_instantiation): New function.
5238         (print_candidates): Likewise.
5239         * class.c (validate_lhs): Remove.
5240         (resolve_address_of_overloaded_function): New function, split out
5241         and then substantially reworked, from ...
5242         (instantiate_type): Use it.  Simplify.
5243         * cvt.c (convert_to_reference): Complain when caller has indicated
5244         that's the right thing to do.  Don't crash if instantiate_type
5245         fails.
5246         * pt.c: Substitute `parameters' for `paramters' throughout.
5247         (print_candidates): Don't make it static.
5248         (most_specialized_instantiation): Split out from ...
5249         (most_specialized): Here.
5250
5251 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5252
5253         * lex.c (lang_init_options): Initialize cpplib.
5254         * decl2.c (parse_options,cpp_initialized): Removed.
5255         (lang_decode_option): Move initialization of cpplib to
5256         lang_init_options.
5257
5258 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5259
5260         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5261         well as the TYPE_DECL, when a typedef name is assigned to a
5262         previously anonymous type.
5263
5264 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5265
5266         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5267         __cp_eh_info for getting the eh info pointer.  Add table_index to
5268         field list.
5269         (push_eh_cleanup): Don't increment 'handlers' data field.
5270         (process_start_catch_block): Don't set the 'caught' field.
5271
5272         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5273         exception info pointer within library routines.
5274         (__cp_eh_info): Use CP_EH_INFO.
5275         (__start_cp_handler): Get exception info pointer, set caught field,
5276         and increment the handlers field.  Avoids this being done by handlers.
5277         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5278         (uncaught_exception): Use CP_EH_INFO macro.
5279
5280 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5281
5282         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5283
5284 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5285
5286         * lex.c (check_newline): Add support for \ as `natural'
5287         characters in file names in #line to be consistent with #include
5288         handling.  We support escape processing in the # 1 "..." version of
5289         the command.  See also support in cp/lex.c.
5290
5291 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5292
5293         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5294         structure.
5295
5296 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5297
5298         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5299
5300         * error.c (dump_simple_decl): Also print namespace context.
5301         (dump_function_decl): Likewise.
5302
5303         * decl2.c (ambiguous_decl): Don't print old value if it's
5304         error_mark_node.
5305
5306         * decl.c (lookup_name_real): Fix handling of local types shadowed
5307         by a non-type decl.  Remove obsolete code.
5308         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5309
5310         * lang-options.h: Add -fpermissive.
5311         * decl2.c: Likewise.
5312         * cp-tree.h: Add flag_permissive.
5313         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5314         were specified, set flag_pedantic_errors.
5315         * call.c (build_over_call): Turn dropped qualifier messages
5316         back into pedwarns.
5317         * cvt.c (convert_to_reference): Likewise.
5318         * typeck.c (convert_for_assignment): Likewise.
5319
5320 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5321
5322         * decl2.c (coerce_new_type): Use same_type_p.
5323         (coerce_delete_type): Likewise.
5324
5325         * call.c (check_dtor_name): Return 1, not error_mark_node.
5326
5327 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5328
5329         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5330         if MULTIPLE_SYMBOL_SPACES.
5331
5332         * pt.c (check_template_shadow): New fn.
5333         * decl2.c (grokfield): Use it.
5334         * decl.c (pushdecl): Likewise.
5335         (pushdecl_class_level): Likewise.
5336         (start_method): Likewise.
5337         (xref_tag): Don't try to use 't' if we're defining.
5338
5339         * call.c (check_dtor_name): Just return an error_mark_node.
5340         * pt.c (lookup_template_class): Complain about using non-template here.
5341         * parse.y (apparent_template_type): Not here.
5342
5343         * pt.c (check_explicit_specialization): Complain about specialization
5344         with C linkage.
5345
5346         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5347
5348         * pt.c (convert_nontype_argument): Don't assume that any integer
5349         argument is intended to be a constant-expression.
5350
5351 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5352
5353         * class.c (handle_using_decl): Fix comment.  Don't lookup
5354         constructors in base classes.
5355         (validate_lhs): Fix typo in comment.
5356         * search.c (lookup_field_1): Don't return a USING_DECL.
5357
5358         * cp-tree.h (DECL_ACCESS): Improve documentation.
5359
5360         * decl.c (expand_static_init): Don't set the initialization-done
5361         flag until the initialization is done.
5362
5363 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
5364
5365         * decl2.c (validate_nonmember_using_decl): Complain about using
5366         declarations for class members.
5367
5368 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
5369
5370         * typeck2.c (process_init_constructor): Use same_type_p.
5371
5372         * decl.c (check_tag_decl): Don't warn about null decl inside a
5373         class.
5374
5375         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5376         UNIFY_ALLOW_NONE.
5377         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5378         (resolve_overloaded_unification): Strip baselinks.
5379
5380 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5381
5382         * g++spec.c: Don't prototype xmalloc.
5383
5384 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
5385
5386         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5387
5388         * decl.c (check_tag_decl): Do complain about null friend decl at
5389         file scope.
5390
5391 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5392
5393         * lex.c (make_lang_type): Clear the whole struct lang_type, not
5394         only the first multiple of sizeof (int).
5395
5396 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5397
5398         * decl.c (start_decl): An explicit specialization of a static data
5399         member is only a definition if it has an initializer.
5400
5401         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5402         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5403         cp_finish_decl.
5404         * init.c (expand_default_init): Check for DIRECT_BIND instead of
5405         DECL_ARTIFICIAL.
5406
5407         * call.c (build_over_call): Use build_decl.
5408
5409         * except.c (expand_throw): Just use convert, not
5410         build_reinterpret_cast.
5411
5412         * lex.c (handle_generic_pragma): Use token_buffer.
5413
5414         * decl.c (check_tag_decl): Don't complain about null friend decl.
5415
5416 1998-11-24  Dave Pitts  <dpitts@cozx.com>
5417
5418         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5419         first position.
5420         * lex.c (check_newline): Use ISALPHA.
5421         (readescape): Use ISGRAPH.
5422         (yyerror): Use ISGRAPH.
5423
5424 1998-11-24  Nathan Sidwell  <nathan@acm.org>
5425
5426         * search.c (get_abstract_virtuals): Do not use initial
5427         CLASSTYPE_ABSTRACT_VIRTUALS.
5428         * typeck2.c (abstract_virtuals_error): Show location of abstract
5429         declaration.
5430         * call.c (build_new_method_call): Use
5431         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5432         * class.c (finish_struct_bits): Don't bother working out whether
5433         get_abstract_virtuals will do anything, just do it.
5434
5435 1998-11-24  Graham  <grahams@rcp.co.uk>
5436
5437         * typeck.c (build_component_ref): Remove unused statement.
5438
5439 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5440
5441         * class.c (add_method): Catch invalid overloads.
5442
5443         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5444         * search.c (lookup_conversions): Handle getting real OVERLOADs.
5445         (add_conversions): Likewise.  Revert last change.
5446         * call.c (add_conv_candidate): Pass totype to add_candidate instead
5447         of fn.  Don't add a new candidate if the last one was for the same
5448         type.
5449         (print_z_candidates): Handle getting a type as a function.
5450         (joust): If we got two conversion candidates to the same type,
5451         just pick one.
5452         (build_object_call): Lose 'templates'.
5453         (build_user_type_conversion_1): Handle getting real OVERLOADs.
5454
5455 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5456
5457         * typeck2.c (process_init_constructor): If there are elements
5458         that don't have initializers and they need to have constructors
5459         run, supply them with initializers.
5460
5461         * class.c (finish_struct_1): A class with a 0-width bitfield is
5462         still empty.
5463
5464 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
5465
5466         * pt.c (instantiate_class_template): Don't try to figure out what
5467         specialization to use for a partial instantiation.  Correct
5468         typos in a couple of comments.  Avoid calling uses_template_parms
5469         multiple times.
5470
5471 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
5472
5473         * method.c (process_overload_item): Add call to
5474         build_mangled_C9x_name for intTI_type_nodes.
5475         (build_mangled_C9x_name): Add prototype, define.
5476         * decl.c (init_decl_processing): Add names for
5477         TImode_type_node.
5478
5479 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5480
5481         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5482
5483         * class.c (finish_struct_1): Set things up for 0-width bitfields
5484         like we do for others.
5485
5486         * decl.c (check_tag_decl): New fn.
5487         (shadow_tag): Split out from here.
5488         * decl2.c (grok_x_components): Call it.
5489
5490 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
5491
5492         * decl.c: Lose warn_about_return_type.
5493         (grokdeclarator): Always complain about implicit int, except for
5494         `main () { ... }'.
5495
5496         * decl.c (tag_name): New fn.
5497         (xref_tag): Complain about using typedef-name after class-key.
5498
5499         * init.c (expand_vec_init): Also keep going if from_array.
5500
5501         * tree.c (is_overloaded_fn): Also handle the output of
5502         build_offset_ref.
5503
5504         * decl.c (grokdeclarator): Use constructor_name when comparing
5505         field name against enclosing class.
5506         * class.c (finish_struct_anon): Likewise.
5507
5508 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
5509
5510         * decl.c (poplevel): Remove code to handle KEEP == 2.
5511         (finish_function): Don't confuse BLOCK-order when
5512         processing a destructor.
5513
5514 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5515
5516         * decl.c (require_complete_types_for_parms): Call layout_decl
5517         after we've completed the type.
5518
5519 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5520
5521         * decl2.c (validate_nonmember_using_decl): Allow using templates
5522         from the global namespace.
5523
5524 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5525
5526         Handle specifying template args to member function templates.
5527         * tree.c (build_overload): Always create an OVERLOAD for a template.
5528         * search.c (add_conversions): Handle finding an OVERLOAD.
5529         * decl2.c (check_classfn): Likewise.
5530         * lex.c (identifier_type): See through a baselink.
5531         * parse.y (do_id): Don't call do_identifier if we got a baselink.
5532         * class.c (instantiate_type, case TREE_LIST): Recurse.
5533
5534         * decl.c (grokdeclarator): Allow a boolean constant for array
5535         bounds, odd as that sounds.
5536
5537         * pt.c (unify): Be more strict about non-type parms, except for
5538         array bounds.
5539         (UNIFY_ALLOW_INTEGER): New macro.
5540
5541 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
5542
5543         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5544
5545 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
5546
5547         * semantics.c (begin_class_definition): Call
5548         maybe_process_partial_specialization before push_template_decl.
5549         Don't call push_template_decl for a specialization.
5550         * search.c (lookup_field): Do return a member template class.
5551         * decl2.c (handle_class_head): Handle member template classes.
5552
5553         * decl.c (grokdeclarator): A parm type need not be complete.
5554
5555         * pt.c (convert_nontype_argument): Fix thinko.
5556
5557 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5558
5559         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5560         (global_delete_fndecl): New variable.
5561         * decl.c (global_delete_fndecl): Define it.
5562         (init_decl_processing): Set it.
5563         * init.c (build_builtin_delete_call): Use it.
5564         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5565         nodes.
5566
5567 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5568
5569         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5570         type.
5571
5572         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5573         * call.c (build_object_call): Also support references to functions.
5574         * typeck.c (convert_for_initialization): Don't decay a function
5575         if the target is a reference to function.
5576
5577         * search.c (add_conversions): Get all the overloads from a class.
5578
5579         * decl.c (grok_ctor_properties): Complain about any constructor
5580         that will take a single arg of the class type by value.
5581
5582         * typeck2.c (build_functional_cast): Can't create objects of
5583         abstract classes this way.
5584         * cvt.c (ocp_convert): Likewise.
5585
5586         * decl.c (grokfndecl): Member functions of local classes are not
5587         public.
5588
5589 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5590
5591         * Make-lang.in (cc1plus): Add dependency on hash.o.
5592
5593 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5594
5595         * search.c (get_abstract_virtuals): Complain about virtuals with
5596         no final overrider.
5597         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5598         with no final overrider.
5599         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5600         on virtuals with no final overrider.
5601
5602         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5603
5604         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5605         after layout_type.
5606
5607         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5608
5609         * class.c (finish_struct_anon): Complain about non-fields.
5610         * decl2.c (build_anon_union_vars): Likewise.
5611
5612         * decl.c (grokdeclarator): Normal data members can't have the same
5613         name as the class, either.
5614         * class.c (finish_struct_anon): Neither can members of an
5615         anonymous union.
5616
5617 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
5618
5619         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5620         (TYPE_BINFO): Likewise.
5621         (IS_AGGR_TYPE): Tweak.
5622         (SET_IS_AGGR_TYPE): New macro.
5623         (CLASS_TYPE_P): Tweak.
5624         (lang_type): Group mark bitfields together.  Remove linenum.
5625         (CLASSTYPE_SOURCE_LINE): Remove macro.
5626         (CLASSTYPE_MARKED_N): New macro.
5627         (SET_CLASSTYPE_MARKED_N): Likewise.
5628         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5629         (CLASS_TYPE_MARKED_*): Use them.
5630         (SET_CLASSTYPE_MARKED_*): Likewise.
5631         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5632         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5633         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5634         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5635         * class.c (class_cache_obstack): New variable.
5636         (class_cache_firstobj): Likewise.
5637         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5638         (pushclass): Free the cache, when appropriate.
5639         (popclass): Tidy.
5640         (maybe_push_cache_obstack): Use class_cache_obstack.
5641         * decl.c (include hash.h).
5642         (typename_hash): New function.
5643         (typename_compare): Likewise.
5644         (build_typename_type): Check the hash table to avoid creating
5645         duplicates.
5646         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5647         (grokdeclarator): Use CLASS_TYPE_P.
5648         (xref_basetypes): Likewise.
5649         (start_function): Likewise.  Don't put current_class_ref on the
5650         permanent obstack.
5651         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5652         and TYPE_TI_ARGS.
5653         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5654         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5655         fields for types other than class types.  Do clear TYPE_ALIAS_SET
5656         for types other than class types, though.
5657         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5658         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5659         * pt.c (process_template_parm): Don't set
5660         CLASSTYPE_GOT_SEMICOLON.
5661         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5662         Coerce arguments on the momentary obstack.
5663         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5664         (instantiate_class_template): Calculate template arguments on the
5665         momentary obstack.  Tidy.
5666         (tsubst_template_arg_vector): Use make_temp_vec.
5667         (tsubst_aggr_type): Put template arguments on the momentary
5668         obstack.
5669         (tsubst_decl): Likewise.
5670         (tsubst): Copy the array bounds index to the permanent obstack
5671         before building index types.  Use new macros.
5672         (unify): Use new macros.
5673         (do_type_instantiation): Likewise.
5674         * search.c (lookup_fnfields_1): Use new macros.
5675         (dfs_pushdecls): Build envelopes on the cache obstack.
5676         (dfs_compress_decls): Use new macros.
5677         (push_class_decls): Build on the cache obstack.
5678         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5679         * sign.c (build_signature_pointer_or_reference_type): Use
5680         SET_IS_AGGR_TYPE.
5681         * tree.c (make_binfo): Check CLASS_TYPE_P.
5682         (copy_template_template_parm): Adjust.
5683         (make_temp_vec): Use push_expression_obstack.
5684         * typeck.c (complete_type): Use new macros.
5685         (comptypes): Likewise.
5686
5687 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
5688
5689         * pt.c (tsubst): Add diagnostics for invalid array, reference
5690         and pointer to member types.
5691
5692 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5693
5694         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5695
5696         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5697         Simplify.
5698
5699         * parse.y (structsp): Fix cut-and-paste error.
5700
5701         * init.c (build_new): Complain about non-integral size.
5702
5703         * parse.y (unary_expr): Complain about defining types in sizeof.
5704
5705         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5706
5707         * rtti.c (build_x_typeid): Complain about typeid without
5708         including <typeinfo>.
5709         (get_typeid): Likewise.  Complain about typeid of incomplete type.
5710         (get_tinfo_fn_dynamic): Likewise.
5711         (get_typeid_1): Not static anymore.
5712         * except.c (build_eh_type_type): Use get_typeid_1.
5713
5714         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5715         ambiguous or private bases.  Fix warning for reference cast.
5716
5717 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
5718
5719         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5720         * decl.c (duplicate_decls): Remove special-case code to deal with
5721         template friends, and just do the obvious thing.
5722         * pt.c (register_specialization): Tweak for clarity, and also to
5723         clear DECL_INITIAL for an instantiation before it is merged with a
5724         specialization.
5725         (check_explicit_specialization): Fix indentation.
5726         (tsubst_friend_function): Handle both definitions in friend
5727         declaration and outside friend declarations.
5728         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5729         (regenerate_decl_from_template): Tweak accordingly.
5730         (instantiate_decl): Likewise.
5731
5732 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5733
5734         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5735         member function reference to error.
5736         * cvt.c (ocp_convert): Complain about converting an overloaded
5737         function to void.
5738
5739         * init.c (build_offset_ref): Just return a lone static member
5740         function.
5741
5742         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5743         not internal ones.
5744
5745         * typeck.c (build_binary_op_nodefault): Improve error handling.
5746
5747         * decl.c (grokfndecl): Complain about making 'main' a template.
5748
5749         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5750
5751         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5752         TYPE_DECL in a template.
5753
5754 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
5755
5756         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5757
5758         * decl.c (struct cp_function): Add named_label_uses.
5759         (push_cp_function_context): Save it.
5760         (pop_cp_function_context): Restore it.
5761         (define_label): Also complain about jumping into the scope of
5762         non-POD objects that don't have constructors.
5763         * tree.c (pod_type_p): New fn.
5764
5765         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5766         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5767         (get_tinfo_fn): Not here.
5768         * repo.c (repo_get_id): Abort if we get called for an incomplete
5769         type.
5770
5771 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
5772
5773         * except.c (expand_throw): Make sure first argument to
5774         __cp_push_exception is of type `void*' to avoid spurious error
5775         messages.
5776
5777 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
5778
5779         * pt.c (try_one_overload): Take orig_targs again.  Only check for
5780         mismatches against them; we don't care what a previous call found.
5781         (resolve_overloaded_unification): Adjust.
5782
5783         * search.c (lookup_field): Don't return anything for a non-type
5784         field from a dependent type.
5785         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5786         in an array declarator.
5787         (start_decl): Push into the class before looking for the field.
5788
5789 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
5790
5791         * method.c (build_overload_value): Handle REFERENCE_TYPE.
5792
5793 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5794
5795         * decl.c (grokdeclarator): Allow namespace-scoped members if they
5796         are friends.
5797
5798 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
5799
5800         * pt.c (tsubst_decl): Don't mess with the global value of an
5801         un-mangled DECL_ASSEMBLER_NAME.
5802
5803 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
5804
5805         * decl.c (init_decl_processing): Remove CYGWIN conditional
5806         since CYGWIN is now able to deal with trapping signals.
5807
5808 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5809
5810         * cp-tree.h: Don't include gansidecl.h.
5811         * exception.cc: Include gansidecl.h (since we don't include config.h)
5812         * g++spec.c: Don't include gansidecl.h.
5813
5814 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
5815
5816         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
5817         size of dummy.
5818         (DECL_DEFINED_IN_CLASS_P): New macro.
5819         (TEMPLATE_PARMS_FOR_INLINE): Document.
5820         (check_static_variable_definition): New function.
5821         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5822         appropriate.
5823         (check_static_variable_definition): Split out from ...
5824         (grokdeclarator): Here.
5825         * pt.c (check_default_tmpl_args): New function, split out from ...
5826         (push_template_decl_real): Here.
5827         (instantiate_template): Fix comment.
5828
5829 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
5830
5831         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5832         (CP_TYPE_VOLATILE_P): Likewise.
5833         (CP_TYPE_RESTRICT_P): Likewise.
5834
5835 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
5836
5837         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5838
5839 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
5840
5841         * class.c (instantiate_type): Be more helpful.
5842
5843         * decl2.c (import_export_decl): Call import_export_class.
5844
5845         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5846         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5847         * pt.c (tsubst_copy): Likewise.
5848
5849 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
5850
5851         * init.c (expand_vec_init): Fix off-by-one error.
5852
5853 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
5854
5855         * parse.y (apparent_template_type): New type.
5856         (named_complex_class_head_sans_basetype): Use it.
5857         * Makefile.in (CONFLICTS): One new conflict.
5858         * parse.c: Regenerated.
5859
5860 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
5861
5862         * cp-tree.h (COMPARE_STRICT): New macro.
5863         (COMPARE_BASE): Likewise.
5864         (COMPARE_RELAXED): Likewise.
5865         (COMPARE_REDECLARATION): Likewise.
5866         (same_type_p): Likewise.
5867         (same_or_base_type_p): Likewise.
5868         * call.c (standard_conversion): Use them, in place of comptypes
5869         with numeric arguments.
5870         (reference_binding): Likewise.
5871         (convert_like): Likewise.
5872         (build_over_call): Likewise.
5873         (is_subseq): Likewise.
5874         (is_properly_derived_from): Likewise.
5875         (compare_ics): Likewise.
5876         (joust): Likewise.
5877         * class.c (delete_duplicate_fields_1): Likewise.
5878         (resolves_to_fixed_type_p): Likewise.
5879         (instantiate_type): Likewise.  Remove #if 0'd code.
5880         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
5881         (pushdecl): Likewise.
5882         (lookup_name_real): Likewise.
5883         (grokdeclarator): Likewise.  Check for illegal array declarations.
5884         (grokparms): Likewise.
5885         (grok_op_properties): Likewise.
5886         * decl2.c (check_classfn): Likewise.
5887         * friend.c (is_friend): Likewise.
5888         (make_friend_class): Likewise.
5889         * init.c (expand_aggr_init): Likewise.
5890         (expand_vec_init): Likewise.
5891         * pt.c (is_member_template_class): Remove declaration.
5892         (is_specialization_of): Use COMPARE_* and new macros.
5893         (comp_template_parms): Likewise.
5894         (convert_nontype_argument): Likewise.
5895         (coerce_template_template_parms): Likewise.
5896         (template_args_equal): Likewise.
5897         (lookup_template_class): Likewise.
5898         (type_unification_real): Likewise.
5899         (unify): Likewise.
5900         (get_bindings_real): Likewise.
5901         * search.c (covariant_return_p): Likewise.
5902         (get_matching_virtual): Likewise.
5903         * sig.c (match_method_types): Likewise.
5904         * tree.c (vec_binfo_member): Likewise.
5905         (cp_tree_equal): Likewise.
5906         * typeck.c (common_type): Likewise.
5907         (comp_array_types): Likewise.  Get issues involving unknown array
5908         bounds right.
5909         (comptypes): Update comments.  Use new flags.
5910         (comp_target_types): Use new macros.
5911         (compparms): Likewise.
5912         (comp_target_parms): Likewise.
5913         (string_conv_p): Likewise.
5914         (build_component_ref): Likewise.
5915         (build_indirect_ref): Likewise.
5916         (build_conditional_expr): Likewise.
5917         (build_static_cast): Likewise.
5918         (build_reinterpret_cast): Likewise.
5919         (build_const_cast): Likewise.
5920         (build_modify_expr): Likewise.
5921         (convert_for_assignment): Likewise.
5922         (comp_ptr_ttypes_real): Likewise.
5923         (ptr_reasonably_similar): Likewise.
5924         (comp_ptr_ttypes_const): Likewise.
5925
5926 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
5927
5928         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5929
5930 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
5931
5932         * decl2.c (delete_sanity): Pass integer_zero_node, not
5933         integer_two_node, to build_vec_delete.
5934         * init.c (build_array_eh_cleanup): Remove.
5935         (expand_vec_init_try_block): New function.
5936         (expand_vec_init_catch_clause): Likewise.
5937         (build_vec_delete_1): Don't deal with case that auto_delete_vec
5938         might be integer_two_node anymore.
5939         (expand_vec_init): Rework for initialization-correctness and
5940         exception-correctness.
5941         * typeck2.c (process_init_constructor): Make mutual exclusivity
5942         of cases more obvious.
5943
5944 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
5945
5946         * decl.c (lookup_name_real): OK, only warn if not lexing.
5947         Simplify suggested fix.
5948
5949         * cp-tree.h (IDENTIFIER_MARKED): New macro.
5950         * search.c (lookup_conversions): Use breadth_first_search.
5951         (add_conversions): Avoid adding two conversions to the same type.
5952         (breadth_first_search): Work with base binfos, rather
5953         than binfos and base indices.
5954         (get_virtual_destructor): Adjust.
5955         (tree_has_any_destructor_p): Adjust.
5956         (get_matching_virtual): Adjust.
5957
5958         * pt.c (push_template_decl_real): Generalize check for incorrect
5959         number of template parms.
5960         (is_member_template_class): #if 0.
5961
5962 1998-10-29  Richard Henderson  <rth@cygnus.com>
5963
5964         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5965         last.
5966
5967 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5968
5969         * lex.c: Call check_newline from lang_init always.  After
5970         calling cpp_start_read, set yy_cur and yy_lim to read from the
5971         cpplib token buffer.
5972
5973 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
5974
5975         * class.c (instantiate_type): Don't consider templates for a normal
5976         match.
5977
5978         * class.c (finish_struct_1): Don't complain about non-copy
5979         assignment ops in union members.
5980
5981         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5982         (prepare_fresh_vtable): Likewise.
5983         (finish_struct_1): Don't call import_export_class.
5984         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5985         (finish_prevtable_vardecl): Lose.
5986         (finish_file): Don't call it.
5987         * pt.c (instantiate_class_template): Likewise.
5988         * cp-tree.h: Remove it.
5989
5990         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5991         * decl.c (finish_function): Not here.
5992         (start_function): Do set DECL_INITIAL.
5993
5994         * pt.c (push_template_decl_real): Complain about default template
5995         args for enclosing classes.
5996
5997         * call.c (add_function_candidate): Treat conversion functions
5998         as coming from the argument's class.
5999         * cp-tree.h (DECL_CONV_FN_P): New fn.
6000         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6001         * class.c (add_method): Use DECL_CONV_FN_P.
6002         * decl2.c (check_classfn): Likewise.
6003         * error.c (dump_function_name): Likewise.
6004         (dump_function_decl): Likewise.
6005         * pt.c (fn_type_unification): Likewise.
6006         * search.c (add_conversions): Likewise.
6007
6008 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6009
6010         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6011         * method.c (hack_identifier): Also check for using RESULT_DECL
6012         from outer context.
6013
6014 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6015
6016         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6017         consistently.
6018
6019 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6020
6021         * call.c (standard_conversion): instantiate_type here.
6022         (reference_binding): And here.
6023         (implicit_conversion): Not here.
6024         (build_op_delete_call): No need to cons up an OVERLOAD.
6025         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6026         (convert_to_reference): And here.
6027         * decl.c (grok_reference_init): Not here.
6028         (grokparms): Or here.
6029         * typeck2.c (digest_init): Or here.
6030         * typeck.c (decay_conversion): Take the address of overloaded
6031         functions, too.
6032         (require_instantiated_type): Lose.
6033         (convert_arguments): Don't handle unknown types here.
6034         (build_c_cast): Likewise.
6035         (build_binary_op): Gut.
6036         (build_conditional_expr): Don't require_instantiated_type.
6037         (build_modify_expr): Likewise.
6038         (build_static_cast): Don't instantiate_type.
6039         (build_reinterpret_cast): Likewise.
6040         (build_const_cast): Likewise.
6041         (convert_for_initialization): Likewise.
6042         (build_ptrmemfunc): Use type_unknown_p.
6043         (convert_for_assignment): Also do default_conversion on overloaded
6044         functions.  Hand them off to ocp_convert.
6045
6046 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6047
6048         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6049         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6050
6051         * class.c (finish_struct_1): Use build_cplus_array_type to build
6052         array types.
6053         * decl.c (init_decl_processing): Likewise.
6054         * except.c (expand_end_eh_spec): Likewise.
6055         * search.c (expand_upcast_fixups): Simplify very slightly.
6056
6057 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6058
6059         * decl.c (grokdeclarator): Complain about a variable using
6060         constructor syntax coming back null from start_decl.
6061
6062         * friend.c (make_friend_class): Complain about trying to make
6063         a non-class type a friend.
6064
6065         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6066         (start_function): Not here.
6067
6068 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6069
6070         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6071
6072 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6073
6074         * typeck2.c (process_init_constructor): Only skip anonymous fields
6075         if they are bitfields.
6076
6077         * cp-tree.def (TYPEOF_TYPE): New code.
6078         * error.c (dump_type_real): Handle it.
6079         * pt.c (tsubst): Likewise.
6080         * tree.c (search_tree): Likewise.
6081         * semantics.c (finish_typeof): New fn.
6082         * parse.y (typespec): Use it.
6083         * cp-tree.h: Declare it.
6084
6085 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6086
6087         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6088
6089 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6090
6091         * typeck.c (convert_arguments): Don't handle pmf references
6092         specially.
6093
6094         * init.c (build_member_call): Don't try to convert to the base type
6095         if it's ambiguous or pedantic.
6096
6097         * typeck2.c (check_for_new_type): Only depend on pedantic for
6098         C-style casts.
6099
6100 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6101
6102         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6103         non-converting constructors.
6104
6105 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6106
6107         * gxxint.texi: Correct documentation for n, N, Q, and B.
6108
6109 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6110
6111         * parse.y (condition): Convert VAR_DECL from reference to indirect
6112         reference.
6113
6114 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6115
6116         * exception.cc (__cp_pop_exception): Free the original exception
6117         value, not the potentially coerced one.
6118
6119 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6120
6121         * Makefile.in (hash.h): Run gperf when necessary.
6122
6123         * cp-tree.h (CP_TYPE_READONLY): Remove.
6124         (CP_TYPE_VOLATILE): Likewise.
6125         (CP_TYPE_QUALS): New macro.
6126         (CP_TYPE_CONST_P): Likewise.
6127         (CP_TYPE_VOLATILE_P): Likewise.
6128         (CP_TYPE_RESTRICT_P): Likewise.
6129         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6130         (cp_build_type_variant): Rename to ...
6131         (cp_build_qualified_type): New function.
6132         (c_apply_type_quals_to_decl): Declare.
6133         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6134         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6135         (cp_type_qual_from_rid): New function.
6136         (compparms): Remove unused parameter.  All callers changed.
6137         (cp_type_quals): New function.
6138         (at_least_as_qualified_p): Likewise.
6139         (more_qualified_p): Likewise.
6140
6141         * call.c (standard_conversion): Replace calls to
6142         cp_build_type_variant with cp_build_qualified_type.  Use
6143         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6144         compare them.  Use CP_TYPE_* macros to check qualifiers.
6145         (reference_binding): Likewise.
6146         (implicit_conversion): Likewise.
6147         (add_builtin_candidates): Likewise.
6148         (build_over_call): Likewise.
6149         * class.c (overrides): Compare all qualifiers, not just `const',
6150         on method declarations.
6151         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6152         (convert_pointer_to_real): Likewise.
6153         (type_promotes_to): Likewise.
6154         * decl.c (check_for_uninitialized_const_var): New function.
6155         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6156         (cp_finish_decl): Use check_for_uninitialized_const_var.
6157         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6158         handle `restrict'.
6159         (grok_ctor_properties): Likewise.
6160         (grok_op_properties): Likewise.
6161         (start_function): Likewise.
6162         (rever_static_member_fn): Likewise.
6163         * decl2.c (grok_method_quals): Likewise.
6164         (grokfield): Likewise.
6165         * error.c (dump_readonly_or_volatile): Rename to ...
6166         (dump_qualifiers): New function.  Handle `restrict'.
6167         (dump_type_real): Use it.
6168         (dump_aggr_type): Likewise.
6169         (dump_type_prefix): Likewise.
6170         (dump_type_suffix): Likewise.
6171         (dump_function_decl): Likewise.
6172         (cv_as_string): Likewise.
6173         * gxx.gperf: Add __restrict and __restrict__.
6174         * gxxint.texi: Document `u' as used for `__restrict', and a few
6175         other previously undocumented codes.
6176         * hash.h: Regenerated.
6177         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6178         (build_member_call): Likewise.
6179         (build_new_1): Likewise.
6180         * lex.c (init_parse): Add entry for RID_RESTRICT.
6181         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6182         (cp_type_qual_from_rid): Define.
6183         * lex.h (enum rid): Add RID_RESTRICT.
6184         * method.c (process_modifiers): Deal with `restrict'.
6185         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6186         * parse.c: Regenerated.
6187         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6188         (tsubst_aggr_type): Likewise.
6189         (tsubst): Likewise.
6190         (check_cv_quals_for_unify): Likewise.
6191         (unify): Likewise.
6192         * rtti.c (init_rtti_processing): Likewise.
6193         (build_headof): Likewise.
6194         (get_tinfo_var): Likewise.
6195         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6196         (expand_class_desc): Likewise.
6197         (expand_attr_desc): Likewise.
6198         (synthesize_tinfo_fn): Likewise.
6199         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6200         (get_matching_virtual): Likewise.
6201         (expand_upcast_fixups): Likewise.
6202         * sig.c (build_signature_pointer_or_reference_name): Take
6203         type_quals, not constp and volatilep.
6204         (build_signature_pointer_or_reference_type): Likewise.
6205         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6206         (build_signature_pointer_constructor): Likewise.
6207         (build_signature_method_call): Likewise.
6208         * tree.c (build_cplus_array_type): Likewise.
6209         (cp_build_type_variant): Rename to ...
6210         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6211         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6212         (build_exception_variant): Likewise.
6213         (mapcar): Likewise.
6214         * typeck.c (qualif_type): Likewise.
6215         (common_type): Likewise.
6216         (comptypes): Likewise.
6217         (comp_cv_target_types): Likewise.
6218         (at_least_as_qualified_p): Define.
6219         (more_qualified_p): Likewise.
6220         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6221         (compparms): Likewise.
6222         (inline_conversion): Likewise.
6223         (string_conv_p): Likewise.
6224         (build_component_ref): Likewise.
6225         (build_indirect_ref): Likewise.
6226         (build_array_ref): Likewise.
6227         (build_unary_op): Likewise.
6228         (build_conditional_expr): Likewise.
6229         (build_static_cast): Likewise.
6230         (build_c_cast): Likewise.
6231         (build_modify_expr): Likewise.
6232         (convert_For_assignment): Likewise.
6233         (comp_ptr_ttypes_real): Likewise.
6234         (cp_type_quals): New function.
6235
6236 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6237
6238         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6239         (CP_TYPE_VOLATILE): Likewise.
6240         * decl.c (grokdeclarator): Use them.
6241         * tree.c (canonical_type_variant): Likewise.
6242
6243 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6244
6245         * parse.y (named_class_head): Push into class while parsing the
6246         base class list.
6247         * decl2.c (push_scope, pop_scope): New functions.
6248         * cp-tree.h: Declare them.
6249         * init.c (build_new_1): Delay cleanup until end of full expression.
6250
6251 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * typeck.c (build_component_ref): Use of a type here is an error.
6254
6255 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6256
6257         Revamp references to member functions.
6258         * method.c (hack_identifier): Call build_component_ref for a
6259         reference to a member function.
6260         * typeck.c (build_component_ref): Only return a single function
6261         if it's static.  Otherwise, return a COMPONENT_REF.
6262         (build_x_function_call): Handle a COMPONENT_REF.
6263         (build_unary_op): Handle all unknown-type things.
6264         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6265         * class.c (instantiate_type): Complain if the function we get is a
6266         nonstatic member function.  Remove code for finding "compatible"
6267         functions.
6268         * pt.c (tsubst_copy): Handle NOP_EXPR.
6269         * tree.c (build_dummy_object): New fn.
6270         (maybe_dummy_object): New fn.
6271         (is_dummy_object): New fn.
6272         * cp-tree.h: Declare them.
6273         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6274         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6275         * init.c (build_member_call): Use maybe_dummy_object and
6276         is_dummy_object.
6277         (build_offset_ref): Use maybe_dummy_object.
6278         (resolve_offset_ref): Use is_dummy_object.
6279         * typeck.c (build_x_function_call): Call build_dummy_object.
6280         (unary_complex_lvalue): Call is_dummy_object.
6281
6282         * typeck.c (build_component_addr): Make sure field is a field.
6283
6284         * call.c (build_new_op): Delete obsolete code.
6285
6286         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6287
6288 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6289
6290         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6291         std if std is ignored.
6292
6293 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6294
6295         * decl.c (grokvardecl): Fix thinko.
6296
6297         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6298         not the left.
6299
6300         * parse.y (fn.def2): Fix 'attrs' format.
6301
6302 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6303
6304         * Makefile.in (CONFLICTS): Update.
6305         * parse.y (expr_or_declarator_intern): New rule.
6306         (expr_or_declarator, direct_notype_declarator, primary,
6307         functional_cast): Use it.
6308         (notype_declarator_intern): New rule.
6309         (notype_declarator, complex_notype_declarator): Use it.
6310
6311 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6312
6313         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6314         (grokvardecl): Likewise.
6315
6316 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6317
6318         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6319         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6320
6321         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6322
6323         * pt.c (process_partial_specialization): Cast 1st argument of
6324         `bzero' to (PTR).
6325
6326         * tree.c (build_base_fields): Cast `base_align' to (int) when
6327         comparing against one.
6328
6329 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6330
6331         * decl.c (lookup_name_real): Handle template parameters for member
6332         templates where said parameters have the same name as the
6333         surrounding class.
6334
6335         * decl.c (expand_static_init): Build cleanups before entering the
6336         anonymous function used to do them to avoid access-checking
6337         confusion.
6338
6339         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6340         accidentally removed by previous change, and make DECL_RTL here.
6341         * class.c (add_method): Don't make DECL_RTL here.
6342
6343         * pt.c (for_each_template_parm): Don't examine uninstantiated
6344         default arguments.
6345
6346 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6347
6348         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6349
6350 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6351
6352         * class.c (add_method): Fix documentation to reflect previous
6353         changes.  Check for duplicate method declarations here.
6354         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6355         correctly; such things never match.
6356         (grokfndecl): Don't look for duplicate methods here.
6357         * decl2.c (check_classfn): Don't assume names are mangled.
6358         Don't add bogus member function declarations to a class before the
6359         class type is complete.
6360         (grokfield): Reformat error message.
6361         * method.c (set_mangled_name_for_decl): Don't mangle names while
6362         processing_template_decl.
6363
6364 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
6365
6366         * typeck.c (build_indirect_ref): Complain about a pointer to data
6367         member, too.
6368         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6369         data member.
6370         * init.c (resolve_offset_ref): Don't undo the above.
6371
6372         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6373         (struct lang_decl_flags): Add `bitfield'.
6374         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6375         DECL_BIT_FIELD.
6376         * decl2.c (grokbitfield, grok_alignof): Likewise.
6377         * init.c (build_offset_ref): Likewise.
6378         * typeck.c (build_component_addr, expr_sizeof): Likewise.
6379         * cvt.c (build_up_reference): Don't crash if taking the address
6380         returns error_mark_node.
6381
6382         * decl.c (grokfndecl): Also check ctype when checking for ::main().
6383
6384 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
6385
6386         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6387         Do mangling here.
6388         (grokdeclarator): Instead of here.
6389         * friend.c (do_friend): Lose special handling of ::main and
6390         __builtin_*.
6391         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6392
6393         * spew.c (yylex): Clear looking_for_typename if we got
6394         'enum { ... };'.
6395
6396 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
6397
6398         * class.c (maybe_warn_about_overly_private_class): Improve error
6399         messages for class with only private constructors.
6400
6401         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6402         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6403         (build_typename_type): New function.
6404         * decl.c (build_typename_type): Broken out from ...
6405         (make_typename_type): Use it.
6406         * search.c (lookup_field): Likewise.
6407
6408 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6409
6410         * pt.c (convert_nontype_argument): Check against type_referred_to.
6411         * decl.c (grokvardecl): Check for declarator name before building
6412         DECL_ASSEMBLER_NAME.
6413
6414 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
6415
6416         * pt.c (lookup_template_class): Add comment.
6417         (instantiate_class_template): Don't mark the _TYPE node for
6418         member class templates as an instantiation.
6419
6420 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
6421
6422         * decl.c (grokfndecl): Fix my thinko.
6423
6424 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
6425
6426         * tinfo2.cc (fast_compare): Remove.
6427         (before): Just use strcmp.
6428         * tinfo.cc (operator==): Just use strcmp.
6429
6430 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6431
6432         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6433         declarations.
6434
6435 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
6436
6437         * cp-tree.h (specializations_of_same_template_p): Remove.
6438         * search.c (get_template_base): Don't use it.
6439         (get_template_base_recursive): Likewise.
6440         * pt.c (specializations_of_same_template_p): Remove.
6441         (unify): Don't use it.
6442         (lookup_template_class): Find the correct parent when setting
6443         CLASSTYPE_TI_TEMPLATE.
6444
6445 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6446
6447         * tinfo.cc (operator==): Always compare names.
6448
6449 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
6450
6451         * decl.c (start_function): Fix cut-and-paste error.
6452
6453 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6454
6455         * inc/typeinfo: Add #pragma interface.
6456         (operator!=): Just call operator==.
6457         * tinfo.cc: Add #pragma implementation.
6458         (operator==): Move from inc/typeinfo and tinfo2.cc.
6459         Check __COMMON_UNRELIABLE instead of _WIN32.
6460
6461         * typeck2.c (my_friendly_abort): Add URL.
6462
6463 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6464
6465         * decl.c (start_method): Added extra parameter for attributes.
6466         * cp-tree.h (start_method): Update prototype.
6467         * parse.y (fn.def2): Update start_method parameter list.
6468
6469 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
6470
6471         * cp-tree.h (specializations_of_same_template_p): Declare.
6472         * pt.c (specializations_of_same_template_p): New function.
6473         (unify): Use it.
6474         * search.c (get_template_base): Use it.
6475         (get_template_base_recursive): Likewise.
6476
6477 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
6478
6479         * decl2.c (start_objects): Add new variable `joiner' and
6480         initialize it properly.
6481
6482 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
6483
6484         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6485         change to vtable types.
6486
6487         * cvt.c (ocp_convert): Avoid infinite recursion caused by
6488         1998-10-03 change.
6489
6490 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
6491
6492         * pt.c (resolve_overloaded_unification): New fn.
6493         (try_one_overload): Likewise.
6494         (unify): Don't fail on unknown type.
6495         (type_unification_real): Likewise.  Use resolve_overloaded_unification
6496         to handle an overloaded argument.
6497         (template_args_equal): Split out...
6498         (comp_template_args): From here.
6499         (determine_specialization): Also allow a template with more
6500         parms than were explicitly specified.
6501         * cp-tree.h: Add template_args_equal.
6502         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6503
6504 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
6505
6506         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6507         change.
6508
6509 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
6510
6511         * typeck.c (unsigned_type): Only return TItype nodes when
6512         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6513         (signed_type): Likewise.
6514         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6515         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6516         (init_decl_processing): Only create TItype nodes when
6517         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6518         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6519         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6520
6521 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6522
6523         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6524         (gxx.gperf): Update comments describing invocation flags.
6525         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6526
6527 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
6528
6529         * class.c (finish_struct_1): Add commentary on previous change.
6530
6531         * cp-tree.h (vtbl_ptr_type_node): New variable.
6532         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6533         already of the right type.
6534         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6535         Simplify code to grow vtable.
6536         * decl.c (vtbl_ptr_type_node): Define.
6537         (init_decl_processing): Initialize it.
6538
6539 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
6540
6541         * cp-tree.def (PTRMEM_CST): New tree node.
6542         * cp-tree.h (ptrmem_cst): New type.
6543         (lang_type): Remove local_typedecls.
6544         (dummy): Increase to 12 bits from 11.
6545         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6546         (PTRMEM_CST_CLASS): New macro.
6547         (PTRMEM_CST_MEMBER): Likewise.
6548         (current_access_specifier): New variable.
6549         (current_class_type): Remove duplicate declaration.
6550         (finish_struct): Change prototype.
6551         (unreverse_member_declarations): New function.
6552         (pushdecl_class_level): Change prototype.
6553         (grok_enum_decls): Remove.
6554         (fixup_anonymous_union): New function.
6555         (grok_x_components): Change prototype.
6556         (tsubst_chain): Remove.
6557         (finish_member_template_decl): Likewise.
6558         (check_explicit_specialization): Fix indentation.
6559         (finish_class_definition): Change prototype.
6560         (finish_member_class_template): Likewise.
6561         (finish_member_declaration): New function.
6562         (check_multiple_declarators): Likewise.
6563         * class.c (class_stack_node_t): New type.
6564         (current_class_base): Remove.
6565         (current_class_stack): Change type.
6566         (current_access_specifier): New variable.
6567         (grow_method): Remove.
6568         (check_member_decl_is_same_in_complete_scope): Break out from
6569         finish_struct.
6570         (make_method_vec): New function.
6571         (free_method_vec): Likewise.
6572         (add_implicitly_declared_members): Break out from finish_struct_1.
6573         (free_method_vecs): New variable.
6574         (add_method): Rework for direct use from parser.
6575         (handle_using_decl): Watch for NULL_TREE while iterating through
6576         CLASSTYPE_METHOD_VEC.
6577         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6578         just do some error-checking.
6579         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6580         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6581         (finish_struct): Change prototype.  Simplify; fields and methods
6582         are already set up at this point.
6583         (init_class_processing): Set up current_class_stack.
6584         (pushclass): Save current_access_specifier.
6585         (popclass): Restore it.
6586         (currently_open_class): Simplify.
6587         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6588         * decl.c (saved_scope): Add access_specifier.
6589         (maybe_push_to_top_level): Save it.
6590         (pop_from_top_level): Restore it.
6591         (maybe_process_template_type_declaration): Use
6592         finish_member_declaration.
6593         (pushtag): Likewise.
6594         (pushdecl_class_level): Don't return a value.
6595         (fixup_anonymous_union): Break out from grok_x_components.
6596         (shadow_tag): Use it.
6597         (xref_tag): Complain about using an elaborated type specifier to
6598         reference a template type parameter or typedef name.
6599         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6600         (current_local_enum): Remove.
6601         (build_enumerator): Call finish_member_declaration.
6602         (grok_enum_decls): Remove.
6603         * decl2.c (grok_x_components): Simplify.
6604         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6605         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6606         (merge_functions): Add to comment.
6607         (arg_assoc_type): Prototype.
6608         (arg_assoc): Pass as many arguments as there are parameters.
6609         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6610         OFFSET_REF.
6611         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6612         PTRMEM_CST.
6613         * friend.c (do_friend): Lookup friends when in nested classes.
6614         Change comments.
6615         * init.c (build_offset_ref): Do lookup even for classes that are
6616         only partially defined.
6617         (decl_constant_value): Remove dead code.
6618         * method.c (build_overload_value): Remove hack where by TYPE was
6619         not a TYPE.  Handle PTRMEM_CST.
6620         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6621         should go.
6622         * parse.y (components, notype_components, component_decl,
6623         component_decl_1, component_declarator, component_declarator0):
6624         Now all are itype rather than ttype.  Rework to add members to
6625         classes on the fly.
6626         (typesqpecqual_reserved): Use check_multiple_declarators.
6627         (structsp): Update class to finish_class_definition.
6628         (do_xref_defn): Unsplit into named_class_head.
6629         (access_specifier): Set current_access_specifier.
6630         * pt.c (set_current_access_from_decl): New function.
6631         (finish_member_template_decl): Don't take the parameters.
6632         (comp_template_args): Make more robust.
6633         (lookup_template_class): Don't use current_local_enum.
6634         (for_each_template_parm): Handle PTRMEM_CST.
6635         (instantiate_class_template): Use set_current_access_from_decl,
6636         finish_member_declaration and unreverse_member_declarations.  Set
6637         lineno/input_filename before generating implicit member functions.
6638         (type_unification_real): Don't assume back-unification happens
6639         only for the last argument.
6640         (regenerate_decl_from_template): Call pushclass a bit earlier.
6641         (tsubst_chain): Remove.
6642         (tsubst_enum): Use set_current_access_from_decl.
6643         (set_mangled_name_for_template_decl): Fix indentation.
6644         * search.c (lookup_fnfields_1): Change iteration through
6645         CLASSTYPE_METHOD_VEC.
6646         (dfs_pushdecls): Likewise.
6647         (dfs_compress_decls): Likewise.
6648         (add_conversions): Likewise.
6649         * semantics.c (finish_class_definition): Don't take components.
6650         Change call to finish_struct.
6651         (finish_member_declaration): New function.
6652         (finish_member_class_template): Don't take template parameters.
6653         Change call to grok_x_components.  Call finish_member_template_decl.
6654         (check_multiple_declarators): New function.
6655         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6656         a passed in fieldlist.
6657         * tree.c (search_tree): Handle PTRMEM_CST.
6658         (mapcar): Likewise.
6659         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6660         INTEGER_CSTs, for pointer-to-data members.
6661
6662         * call.c (resolve_args): Resolve template specializations, if
6663         possible.
6664
6665 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6666
6667         * Makefile.in (spew.o): Depend on toplev.h.
6668
6669         * call.c (compare_ics): Initialize variables `deref_from_type2',
6670         `deref_to_type1' and `deref_to_type2'.
6671
6672         * except.c (get_eh_type): Hide prototype and definition.
6673         (process_start_catch_block_old): Remove unused static prototype.
6674
6675         * pt.c (tsubst_decl): Initialize variable `argvec'.
6676
6677         * spew.c: Include toplev.h.
6678
6679 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
6680
6681         * pt.c (instantiate_decl): Do save and restore file position.
6682
6683 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6684
6685         * method.c (build_decl_overload_real): Clear
6686         numeric_output_need_bar after __.
6687
6688 1998-10-05  Nathan Sidwell  <nathan@acm.org>
6689
6690         * call.c (build_new_method_call): Issue 'incomplete type' error,
6691         if class is not defined.
6692
6693 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6694
6695         * call.c (build_object_call): Move declaration of variable
6696         `fn' into the scope where it is used.  Don't access variable
6697         `fn' when it is uninitialized, instead use `fns'.
6698
6699 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6700
6701         * errfn.c (cp_thing): Print buf as a string not as a printf format
6702         to avoid problems with the operator%.  Consequently, `%%' sequences
6703         in format are copied as `%' in buf.
6704
6705 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
6706
6707         * pt.c (pop_tinst_level): Call extract_interface_info.
6708         (instantiate_decl): Don't save and restore file position.
6709
6710         * decl.c (cp_finish_decl): Make statics in extern inlines and
6711         templates common, if possible and the target doesn't support weak
6712         symbols.
6713
6714         * decl.c (grokdeclarator): Remove redundant calls to
6715         build_type_variant and some duplicated code.
6716         * sig.c (build_signature_reference_type): Only take the type parm.
6717         (build_signature_pointer_type): Likewise.
6718         * tree.c (build_cplus_method_type): Adjust.
6719         * cp-tree.h: Update.
6720
6721 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
6722
6723         * call.c (build_over_call): Make pedwarns about dropped qualifiers
6724         into full-fledged errors.
6725         * cvt.c (convert_to_reference): Likewise.
6726         * typeck.c (convert_for_assignment): Likewise.
6727
6728         * search.c (expand_upcast_vtables): In addition to unsetting
6729         TREE_READONLY, remove top-level const type qualifier.
6730
6731 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
6732
6733         * class.c (current_class_ptr, current_class_ref): Clarify
6734         documentation.
6735         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6736         NOP type conversions.
6737         * decl.c (decls_match): Use comptypes directly; ignore
6738         qualifiers on the DECL.
6739         (duplicate_decls): Remove qualifier checks on DECL.
6740         (grokdeclarator): Make the type built up include top-level
6741         qualifiers.
6742         * decl2.c (do_dtors): Fix spelling error.
6743         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6744         when printing type information.
6745         * init.c (build_new_1): Add documentation.  Deal with the fact
6746         that type of allocated memory now contains qualifiers.
6747         * lex.c (is_global): Improve error-recovery.
6748         * sig.c (build_member_function_pointer): Don't cast away const
6749         on fields of sigtable_entry_type.
6750         * tree.c (lvalue_type): Don't look at top-level qualifiers on
6751         expressions.
6752         * typeck.c (decay_conversion): Likewise.
6753         (build_component_ref): Make sure the type of the COMPONENT_REF
6754         contains top-level qualifiers, as appropriate.  Improve
6755         error-handling.
6756         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
6757         (build_array_ref): Likewise.
6758         (build_unary_op): Improve error-recovery.
6759         (unary_complex_lvalue): Make taking the address a bound member
6760         function an error, not a sorry.
6761         (build_conditional_expr): Look at the type qualifiers, not the
6762         qualifiers on the expression itself.
6763
6764 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
6765
6766         * decl2.c (merge_functions): Remove duplicates.
6767
6768         * decl2.c: Add -f{no-,}implicit-inline-templates.
6769         (import_export_decl): Check it.
6770
6771         * decl.c (lookup_name_real): Template parms also take precedence
6772         over implicit typename.  Only warn if yylex.
6773
6774         * typeck.c (build_conditional_expr): Only fold if ifexp is an
6775         INTEGER_CST.
6776
6777         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6778         instead of linkage.
6779
6780 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
6781
6782         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6783         * class.c (build_vbase_pointer): Use it.
6784         * rtti.c (expand_class_desc): Likewise.
6785         * tree.c (build_vbase_pointer_fields): Likewise.
6786
6787 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
6788
6789         * decl.c (start_decl): Add invocation of
6790         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6791         (start_function): Add invocation of
6792         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6793
6794         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6795         HANDLE_GENERIC_PRAGMAS.
6796
6797 1998-09-28  Anthony Green  <green@cygnus.com>
6798
6799         * semantics.c (finish_asm_stmt): Always permit volatile asms.
6800
6801 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
6802
6803         * decl.c (grokdeclarator): Tighten checks for invalid
6804         destructors.  Improve error-messages and error-recovery.
6805         * decl2.c (check_classfn): Don't assume that mangled destructor
6806         names contain type information.
6807
6808 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
6809
6810         * search.c (get_base_distance): Remove assert.
6811
6812         * decl2.c (build_anon_union_vars): Don't process a field with no
6813         name.
6814         (finish_anon_union): Also complain about local anon unions with no
6815         members.
6816
6817 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6818
6819         * decl.c (lookup_namespace_name): If the name is a namespace,
6820         return it immediately.
6821
6822 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6823
6824         * cp-tree.h (define_case_label): Remove unused parameter.
6825         (check_java_method): Likewise.
6826         (grokclassfn): Likewise.
6827         (expand_aggr_init): Likewise.
6828         (build_x_delete): Likewise.
6829         (maybe_end_member_template_processing): Likewise.
6830         (unshare_base_binfos): Add prototype.
6831         (string_conv_p): Likewise.
6832         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6833
6834         * cvt.c (build_up_reference): Remove unused parameter
6835         `checkconst', all callers changed.
6836         (build_type_conversion): Mark parameter `code' with
6837         ATTRIBUTE_UNUSED.
6838         (build_expr_type_conversion): Initialize variable `conv'.
6839
6840         * decl.c (push_namespace): Initialize variable `d'.
6841         (define_case_label): Remove unused parameter `decl', all callers
6842         changed.
6843
6844         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6845         `argc' with ATTRIBUTE_UNUSED.
6846         (grokclassfn): Remove unused parameter `cname', all callers
6847         changed.
6848         (check_java_method): Likewise for parameter `ctype'.
6849         (copy_assignment_arg_p): Mark parameter `virtualp' with
6850         ATTRIBUTE_UNUSED.
6851         (finish_prevtable_vardecl): Likewise for parameter `prev'.
6852
6853         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6854
6855         * init.c (expand_aggr_init_1): Remove unused parameter
6856         `alias_this', all callers changed.
6857         (expand_aggr_init): Likewise.
6858         (expand_default_init): Likewise.
6859         (build_new_1): Initialize variable `susp'.
6860         (build_x_delete): Remove unused parameter `type', all callers
6861         changed.
6862
6863         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6864         ATTRIBUTE_UNUSED.
6865         (readescape): Use (unsigned) value in shift.
6866         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
6867         comparing to a signed quantity.
6868
6869         * pt.c (maybe_end_member_template_processing): Remove unused
6870         parameter `decl', all callers changed.
6871         (check_explicit_specialization): Add braces around empty body in
6872         an else-statement.
6873         (current_template_args): Initialize variable `args'.
6874         (lookup_template_class): Likewise for variable `prev_local_enum'.
6875         (tsubst_decl): Likewise for variable `r'.
6876         (set_mangled_name_for_template_decl): Initialize variable
6877         `context'.
6878
6879         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6880         Likewise for variable `i'.
6881         (yylex): Initialize variable `trrr'.
6882
6883         * typeck.c (compparms): Mark variable `strict' with
6884         ATTRIBUTE_UNUSED.
6885
6886         * xref.c (simplify_type): Cast argument of ctype function to
6887         `unsigned char'.
6888
6889 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
6890
6891         * cp-tree.h (language_lvalue_valid): Remove.
6892         * decl.c (grokdeclarator): Don't disallow references to functions.
6893         * tree.c (lvalue_p_1): New function, combining duplicated
6894         code from ...
6895         (lvalue_p): Use it.
6896         (real_lvalue_p): Likewise.
6897         * typeck.c (language_lvalue_valid): Remove.
6898         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6899         they don't have TREE_READONLY set.
6900         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6901
6902 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6903
6904         * spew.c (yylex): Give diagnostic.
6905         * hash.h (is_reserved_word): Add export.
6906         * gxx.gperf: Likewise.
6907         * lex.h (rid): Add RID_EXPORT.
6908         * lex.c (init_parse): Likewise.
6909
6910 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6911
6912         * friend.c (do_friend): Make warning a full sentence.
6913
6914 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6915
6916         * parse.y (component_decl_list): Improve error-recovery.
6917
6918 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6919
6920         * decl.c (make_typename_type): Move error to point where name
6921         variable can be used by dump_type.
6922
6923 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6924
6925         * decl.c (grokfndecl): Improve error-recovery.
6926         * decl2.c (grokfield): Likewise.
6927         * pt.c (finish_member_template_decl): Likewise.
6928
6929 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6930
6931         * method.c (hack_identifier): Finding multiple members is always
6932         an error.
6933
6934 1998-09-21  Per Bothner  <bothner@cygnus.com>
6935
6936         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
6937
6938 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
6939
6940         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6941
6942 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
6943
6944         * class.c (maybe_warn_about_overly_private_class): Reformat.
6945
6946 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
6947
6948         * exception.cc (__cplus_type_matcher): Realign some code.
6949
6950 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
6951
6952         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6953         (tinfo2.o): Likewise.
6954         (exception.o): Likewise.
6955         (new.o): Likewise.
6956         (opnew.o): Likewise.
6957         (opnewnt.o): Likewise.
6958         (opvnew.o): Likewise.
6959         (opvnewnt.o): Likewise.
6960         (opdel.o): Likewise.
6961         (opdelnt.o): Likewise.
6962         (opvdel.o): Likewise.
6963         (opvdelnt.o): Likewise.
6964
6965 1998-09-16  Richard Henderson  <rth@cygnus.com>
6966
6967         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6968
6969 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
6970
6971         * call.c (build_field_call): Handle static data members too.
6972
6973         * typeck.c (comptypes): When comparing pointer types, check
6974         whether referred types match even in strictest modes.
6975
6976 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
6977
6978         * cp-tree.h: Revert previous change.
6979         (finish_struct_methods): Remove declaration.
6980         * class.c: Revert previous change.
6981         (maybe_warn_about_overly_private_class): New function.
6982         (finish_struct_methods): Declare here, and make static.  Remove
6983         unnecessary parameters.  Tidy slightly.  Use
6984         maybe_warn_about_overly_private_class.
6985         (finish_struct_1): Adjust.  Remove check for private constructors,
6986         now done elsewhere.
6987         (finish_struct): Adjust.
6988
6989 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
6990
6991         * except.c (expand_start_catch_block): No need to check for new
6992         exception model.
6993         (process_start_catch_block_old): Deleted.
6994         (process_start_catch_block): Add call to start_decl_1().
6995         (expand_end_catch_block): Add call to end_catch_handler().
6996         * exception.cc (__cplus_type_matcher): Only check the exception
6997         language if there is an exception table.
6998
6999 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7000
7001         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7002         as used to prevent conflicts with virtual function tables.
7003
7004 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7005
7006         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7007         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7008         * class.c (maybe_class_too_private_p): New function.
7009         (finish_struct_methods): Use it.
7010         (finish_struct_1): Likewise.
7011         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7012         appropriate.
7013
7014         * pt.c (check_specialization_scope): Fix spelling error.
7015         (check_explicit_specialization): Remove code to handle explicit
7016         specializations in class scope; they are now correctly diagnosed
7017         as errors.
7018
7019 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7020
7021         * decl.c (pushdecl): Don't copy types if the
7022         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7023         type.
7024
7025 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7026
7027         * class.c (get_enclosing_class): New function.
7028         (is_base_of_enclosing_class): Likewise.
7029         * cp-tree.h (get_enclosing_class): Declare.
7030         (is_base_of_enclosing_class): Likewise.
7031         * pt.c (coerce_template_parms): Use them.
7032
7033 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7034
7035         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7036         null to decide whether to use it.
7037
7038         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7039         * parse.y (base_class.1): Avoid crash on error.
7040
7041 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7042
7043         * decl.c (make_typename_type): If context is a namespace, the code
7044         is in error.
7045
7046 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7047
7048         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7049
7050 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7051
7052         * cp-tree.h (anonymous_namespace_name): Declare.
7053         * decl.c: Define it.
7054         (push_namespace): Use anonymous_namespace_name, rather than local
7055         static anon_name.
7056         * error.c (dump_decl): If a namespace is named
7057         anonymous_namespace_name, call it {anonymous}.
7058
7059         * decl.c (grokparms): Distinguish between references and pointers
7060         in error message.
7061
7062 1998-09-08  Richard Henderson  <rth@cygnus.com>
7063             Mark Mitchell  <mark@markmitchell.com>
7064
7065         * pt.c (process_partial_specialization): Consistently allocate
7066         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7067         tpd.parms, where appropriate.
7068
7069 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7070
7071         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7072         reorganizations.
7073
7074 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7075
7076         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7077         * class.c (finish_struct): Remove hackery to deal with explicit
7078         specializations in class scope.
7079         * decl.c (grokfndecl): Improve error-recovery.
7080         * decl2.c (grokfield): Likewise.
7081         * pt.c (check_specialization_scope): New function.
7082         (begin_specialization): Call it.
7083         (process_partial_specialization): New function, split out from
7084         push_template_decl.  Check partial specializations more
7085         stringently.
7086         (push_template_decl): Call it.
7087         (check_explicit_specialization): Don't attempt to handle explicit
7088         specializations in class scope.
7089         (template_parm_data): Document.  Add current_arg and
7090         arg_uses_template_parms.
7091         (mark_template_parm): Set it.
7092         (tsubst_arg_types): Remove unused variable.
7093         * semantics.c (begin_class_definition): Tweak.
7094
7095 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7096
7097         * inc/typeinfo (type_info::type_info(const char*)): Make
7098         `explicit'.
7099
7100         * cp-tree.h (hash_tree_cons_simple): New macro.
7101         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7102         (coerce_template_parms): Use make_temp_vec, instead of
7103         make_tree_vec.  Document this behavior.
7104         (lookup_template_class): Likewise.
7105         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7106         Remove dead code (and add assertion to check its deadness).  Fix
7107         bug w.r.t. exception specifications.
7108
7109 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7110
7111         * decl2.c (import_export_vtable): Always make artificials comdat.
7112         (import_export_decl): Likewise.
7113         * pt.c (mark_decl_instantiated): Likewise.
7114
7115 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7116
7117         * cp-tree.h (finish_globally_qualified_member_call_expr):
7118         Rename to ...
7119         (finish_qualified_call_expr).
7120         * semantics.c: Likewise.
7121         * parse.y (primary): Use it.
7122         * method.c (hack_identifier): Remove redundant code.
7123
7124         * init.c (resolve_offset_ref): Call convert_from_reference to
7125         handle members of reference type.  Improve error recovery.
7126
7127 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7128
7129         * cp-tree.h: Declare warn_nontemplate_friend.
7130         * decl2.c (lang_decode_option): Set.
7131         * lang-options.h: Add -Wnon-template-friend.
7132         * friend.c (do_friend): Use to toggle non-template function warning.
7133
7134 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7135
7136         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7137         corresponding INTEGER_CSTs when processing_template_decl.
7138         * pt.c (tsubst_enum): Tweak accordingly.
7139
7140 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7141
7142         * decl.c (pushdecl_class_level): Add warning here.
7143         (pushdecl): Tweak.
7144
7145 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7146
7147         * cvt.c (convert_pointer_to_real): Tidy.
7148         * search.c (get_base_distance_recursive): Simplify.
7149         (get_base_distance): Likewise.
7150
7151         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7152         parms.
7153
7154 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7155
7156         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7157         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7158         if unknown pragmas are encountered.
7159         (handle_sysv_pragma): Interpret return code from
7160         handle_pragma_token ().  Return success/failure indication rather
7161         than next unprocessed character.
7162         (pragma_getc): New function: retrieves characters from the
7163         input stream.  Defined when HANDLE_PRAGMA is defined.
7164         (pragma_ungetc): New function: replaces characters back into the
7165         input stream.  Defined when HANDLE_PRAGMA is defined.
7166
7167 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7168
7169         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7170         * class.c (build_vtable_entry_ref): Likewise.
7171
7172 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7173
7174         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7175         * decl2.c (import_export_decl): Likewise.
7176         * pt.c (instantiate_decl): Use it.
7177
7178 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7179
7180         * decl.c (lookup_name_real): Also do implicit typename thing for
7181         artificial TYPE_DECLs.
7182         * search.c (lookup_field): Likewise.
7183         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7184         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7185         (enter_scope_of): Extract type from implicit typename.
7186         (begin_class_definition): Likewise.
7187         * lex.c (identifier_type): Handle implicit typename when checking
7188         for SELFNAME.
7189
7190         * cp-tree.h: Declare flag_strict_prototype.
7191         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7192         -fstrict-prototype.
7193         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7194         specified, set it to the value of pedantic.
7195
7196 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7197
7198         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7199
7200 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7201
7202         * decl.c (finish_enum): Handle member enums of classes declared in
7203         template functions.
7204
7205         * decl2.c (grok_x_components): Strip attributes before calling
7206         groktypename.
7207
7208 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7209
7210         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7211         -fenum-int-equivalence and -fno-nonnull-objects.
7212         * class.c (check_for_override): Remove support for -fall-virtual.
7213         (finish_struct_1): Likewise.
7214         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7215         * typeck.c (build_binary_op_nodefault): Likewise.
7216         * cvt.c (ocp_convert): Likewise.
7217         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7218         * class.c (build_vbase_path): Likewise.
7219
7220 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7221
7222         * Makefile.in (INTERFACE): New, set to 1.
7223
7224 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7225
7226         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7227         comparing with global_namespace.
7228         (dump_aggr_type): Likewise.
7229
7230         * decl.c (grokfndecl): Issue error on declaration of friend
7231         templates with explicit template arguments.
7232
7233         * pt.c (convert_template_argument): New function, split out
7234         from...
7235         (coerce_template_parms): Here.
7236         (tsubst): Attempt better error-recovery.
7237
7238 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7239
7240         * pt.c (decl_template_parm_p): Add checks for
7241         TEMPLATE_TEMPLATE_PARM.
7242
7243 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7244
7245         * lex.c (do_identifier): Fix thinko in previous change.
7246
7247 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7248
7249         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7250         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7251
7252 1998-08-28  Richard Henderson  <rth@cygnus.com>
7253
7254         Add support for discarding unused virtual functions.
7255         * lang-options.h: Add -fvtable-gc.
7256         * cp-tree.h: Add flag_vtable_gc.
7257         * decl2.c (output_vtable_inherit): New fn.
7258         (finish_vtable_vardecl): Call it.
7259         * class.c (build_vtable_entry_ref): New fn.
7260         (build_vtbl_ref): Call it.
7261
7262 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7263
7264         * cp-tree.h (build_enumerator): Take the enumeration type as a
7265         parameter.
7266         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7267         enumeration constant values if we're processing_template_decls.
7268         Don't set the type for the CONST_DECLs either; that's done in
7269         build_enumerator.
7270         (build_enumerator): Take the enumeration type as a
7271         parameter.
7272         * lex.c (do_identifier): Don't resolve enumeration constants while
7273         processing template declarations, even if they happen to be
7274         TEMPLATE_PARM_INDEXs.
7275
7276         * parse.y (current_enum_type): New variable.
7277         (primary): Don't allow statement-expression in local classes just
7278         as we don't in global classes.
7279         (structsp): Use current_enum_type.
7280         (enum_list): Likewise.
7281         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7282         finish_enum; they no longer occur.
7283
7284         * cp-tree.h (finish_base_specifier): New function.
7285         * parse.y (base_class): Use it.
7286         * semantics.c (finish_base_specifier): Define it.
7287
7288         * parse.y (structsp): Warn on use of typename outside of template
7289         declarations.
7290
7291 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7292
7293         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7294         * lang-options.h: Remove +e options.
7295         * decl2.c (lang_decode_option): Likewise.
7296         (import_export_vtable): Don't check write_virtuals.
7297         (finish_vtable_vardecl, finish_file): Likewise.
7298         * search.c (dfs_debug_mark): Likewise.
7299         * semantics.c (begin_class_definition): Likewise.
7300         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7301
7302         * call.c (build_over_call): Check flag_elide_constructors.
7303         * decl2.c: flag_elide_constructors defaults to 1.
7304         * typeck.c (convert_arguments): Remove return_loc parm.
7305         (build_function_call_real): Adjust.
7306
7307         * search.c: Tear out all mi_matrix and memoize code.
7308         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7309         * lang-options.h: Remove documentation for -fhandle-exceptions,
7310         -fmemoize-lookups and -fsave-memoized.
7311         * cp-tree.h: Lose mi_matrix and memoize support.
7312         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7313         * class.c: Lose struct class_level.
7314         (pushclass, popclass): Lose memoize support.
7315         * init.c (build_offset_ref): Likewise.
7316
7317         Never change BINFO_INHERITANCE_CHAIN.
7318         * init.c (emit_base_init): Change modification of
7319         BINFO_INHERITANCE_CHAIN to an assert.
7320         * search.c (get_base_distance_recursive): Likewise.
7321         (get_base_distance): Likewise.
7322         (lookup_member): Likewise.
7323         (convert_pointer_to_single_level): Likewise.
7324         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7325         (lookup_fnfields): Likewise.
7326         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7327         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7328         (layout_basetypes): Call propagate_binfo_offsets instead of
7329         unshare_base_binfos.
7330         * decl.c (xref_basetypes): Call unshare_base_binfos.
7331         * pt.c (instantiate_class_template): Likewise.
7332         * tree.c (reverse_path): Remove 'copy' parm; always make a
7333         temporary copy.
7334         * class.c (build_vbase_path): Just call it.
7335         * search.c (compute_access): Likewise.  Don't re-reverse.
7336
7337 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7338
7339         * class.c (build_vbase_path): Use reverse_path.
7340         (finish_base_struct): Move warnings for inaccessible bases to
7341         layout_basetypes.
7342         (modify_one_vtable): Remove check of TREE_USED (binfo).
7343         (fixup_vtable_deltas1): Likewise.
7344         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7345         (xref_tag): Remove binfos parameter.
7346         (make_binfo): Remove chain parameter.
7347         (reverse_path): Add copy parameter.
7348         * decl.c (init_decl_processing): Change calls to xref_tag.
7349         (xref_tag): Remove binfos parameter.
7350         (xref_basetypes): Change calls to make_binfo.
7351         * decl2.c (grok_x_components): Change calls to xref_tag.
7352         (handle_class_head): Likewise.
7353         * friend.c (do_friend): Likewise.
7354         * lex.c (make_lang_type): Change calls to make_binfo.
7355         * parse.y (structsp): Change calls to xref_tag.
7356         (named_complex_class_head_sans_basetype): Likewise.
7357         (named_class_head): Likewise.
7358         * rtti.c (init_rtti_processing): Likewise.
7359         * search.c (compute_access): Change calls to reverse_path.
7360         (dfs_get_vbase_types): Change calls to make_binfo.
7361         (get_vbase_types): Remove dead code.
7362         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7363         (layout_basetypes): Warn here about inaccessible bases.
7364         (make_binfo): Remove chain parameter.
7365         (reverse_path): Add copy parameter.
7366
7367 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7368
7369         * class.c: #if 0 complete_type_p.
7370         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7371         * method.c (process_overload_item): Likewise.
7372         * typeck.c (comp_target_types): Likewise.
7373
7374         Stop sharing binfos for indirect virtual bases.
7375         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7376         (layout_basetypes): Likewise.
7377         (unshare_base_binfos): Copy vbases, too.
7378         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7379         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7380         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7381         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7382         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7383         reference to BINFO_VIA_PUBLIC.
7384         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7385         (push_class_decls): Use them.
7386         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7387         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7388
7389 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7390
7391         * decl.c (build_enumerator): Set DECL_CONTEXT for the
7392         CONST_DECLs.
7393
7394 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
7395
7396         * cp-tree.h (finish_enum): Change prototype.
7397         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7398         VALUES parameter.  Don't try to compute mins/maxs if
7399         processing_template_decl.
7400         * parse.y (structsp): Use new calling sequence for finish_enum.
7401         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
7402         (lookup_template_class): Remove unused variables.  Tweak.
7403         Register enums on instantiation list before substituting
7404         enumeration constants.
7405         (tsubst_decl): Remove unused variables.
7406         (regenerate_decl_from_template): Likewise.
7407
7408         * decl.c (duplicate_decls): Don't obliterate the
7409         DECL_TEMPLATE_INFO for a template if we're not replacing it with
7410         anything.
7411
7412         * lex.c (do_identifier): Fix typo in comment.
7413
7414 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7415
7416         * errfn.c: Remove stdarg.h/varargs.h.
7417         * tree.c: Likewise.
7418
7419 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
7420
7421         * pt.c (tsubst_copy): Only do typename overloading on an
7422         IDENTIFIER_NODE that happens to look like a typename if it actually
7423         has a type for us to use.
7424
7425 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7426
7427         * typeck.c (comp_cv_target_types): Split out...
7428         (comp_target_types): From here.  Don't allow cv-qual changes under
7429         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
7430         (build_ptrmemfunc): Pass 1 to nptrs.
7431         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7432
7433 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
7434
7435         * search.c (dependent_base_p): Don't compare a binfo to
7436         current_class_type; use the TREE_TYPE of the binfo instead.
7437
7438         * cp-tree.h (CLASS_TYPE_P): Revise definition.
7439
7440 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7441
7442         * decl.c (duplicate_decls): Don't complain about different
7443         exceptions from an internal decl even if pedantic.
7444
7445         * typeck.c (convert_for_assignment): Converting from pm of vbase
7446         to derived is an error, not a sorry.
7447
7448         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7449         * class.c (fixed_type_or_null): Rename from
7450         resolves_to_fixed_type_p.  Return the dynamic type of the
7451         expression, if fixed, or null.
7452         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
7453         does not match the static type.
7454         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
7455         resolves_to_fixed_type_p again.
7456
7457 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7458
7459         * pt.c (tsubst_decl): Move special case code for dealing with
7460         tricky friend templates here from ...
7461         (regenerate_decl_from_template): Here.
7462
7463 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7464
7465         * decl.c (start_decl): Remove redundant linkage check.
7466
7467 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
7468
7469         * typeck.c (c_expand_return): Handle the case that valtype
7470         is wider than the functions return type.
7471
7472 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7473
7474         * cp-tree.h (CLASS_TYPE_P): New macro.
7475         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7476         * pt.c (process_template_parm): Undo previous change.
7477
7478 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
7479
7480         * cp-tree.h: Declare.
7481         * pt.c (decl_template_parm_p): New function.
7482         * decl.c (pushdecl): Check decls for redeclaring template parms.
7483         (xref_tag): Make redeclaration an error, print decl.
7484         * decl2.c (grokfield): Check field_decls for redeclaration as well.
7485
7486 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7487
7488         * parse.y (primary): Fix up the type of string constants.
7489
7490 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7491
7492         * typeck.c (convert_for_initialization): Move check for odd uses
7493         of NULL to avoid duplicate warnings.
7494
7495 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7496
7497         * tree.c (lvalue_type): Fix for arrays.
7498         * typeck.c (string_conv_p): New fn.
7499         (convert_for_assignment): Use it.
7500         (build_unary_op): Use lvalue_type.
7501         * call.c (standard_conversion, convert_like): Use string_conv_p.
7502         (add_function_candidate): Use lvalue_type.
7503         * cvt.c (convert_to_reference): Likewise.
7504         * decl2.c (lang_decode_option): Ignore -traditional.
7505         * decl.c (init_decl_processing): flag_writable_strings inhibits
7506         flag_const_strings.
7507
7508 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
7509
7510         * lang-options.h (lang_options): Add fconst-strings to the list
7511         of valid options.
7512         * decl2.c (lang_f_options, lang_decode_option): Likewise.
7513
7514 1998-08-24  Nathan Sidwell  <nathan@acm.org>
7515
7516         * lex.c (real_yylex): Don't warn about long long constants if
7517         we're allowing long long.
7518
7519 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7520
7521         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7522         accessing bindings directly.
7523
7524         * search.c (my_tree_cons): Reimplement.
7525
7526         * lang-specs.h: Remove __HONOR_STD.
7527         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7528
7529 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
7530
7531         * decl.c (grokdeclarator): Complain about in-class initialization
7532         of aggregates and/or references.
7533         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7534         TEMPLATE_TYPE_PARMs.
7535
7536         * decl2.c (grok_array_decl): Add comment.
7537         (mark_used): Don't instantiate an explicit instantiation.
7538         * friend.c (make_friend_class): Remove bogus comment.  Fix check
7539         for partial specializations.
7540         * pt.c (check_explicit_specialization): Don't
7541         SET_DECL_EXPLICIT_INSTANTIATION here.
7542         (mark_decl_instantiated): Or here.
7543         (do_decl_instantiation): Do it here, instead.  Add checks for
7544         duplicate explicit instantiations, etc.  Tidy.
7545         (do_type_instantiation): Likewise.
7546         (instantiate_decl): Improve comments.  Complain about explicit
7547         instantiations where no definition is available.
7548
7549         * cp-tree.h (ansi_null_node): Remove.
7550         * call.c (build_over_call): Warn about converting NULL to an
7551         arithmetic type.
7552         * cvt.c (build_expr_type_conversion): Likewise.  Use
7553         null_ptr_cst_p instead of expanding it inline.
7554         * decl.c (ansi_null_node): Remove.
7555         (init_decl_processing): Make null_node always have integral type.
7556         * except.c (build_throw): Warn about converting NULL to an
7557         arithmetic type.
7558         * lex.c (init_parse): Remove handling of ansi_null_node.
7559         * pt.c (type_unification_real): Don't convert NULL to void* type.
7560         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7561         (convert_for_assignment): Warn about converting NULL to an
7562         arithmetic type.
7563         (convert_for_initialization): Likewise.
7564
7565 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7566
7567         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7568         * pt.c (coerce_template_parms): Use no_linkage_check.
7569         * decl.c (grokvardecl): Likewise.
7570         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7571
7572         * method.c (process_overload_item): Remove useless code.
7573
7574 1998-08-20  Per Bothner  <bothner@cygnus.com>
7575
7576         Handle new'ing of Java classes.
7577         * init.c (build_class_classref):  New function.
7578         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7579         constructor does not return this;  don't need to exception-protect.
7580
7581         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7582         * decl2.c (acceptable_java_type):  Handle template-derived types.
7583
7584 1998-08-20  Per Bothner  <bothner@cygnus.com>
7585
7586         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7587
7588 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7589
7590         * decl.c (duplicate_decls): Always merge the old and new patterns
7591         for templates, regardless of whether or not the new one has
7592         DECL_INITIAL.  Don't throw away specializations.  Merge
7593         DECL_SAVED_TREE.
7594         * pt.c (tsubst_decl): Use the right pattern when calculating the
7595         complete args for a new template instance.
7596         (do_decl_instantiation): Fix typo in comment.
7597         (regenerate_decl_from_template): Deal with tricky friend template
7598         case.
7599         (instantiate_decl): Likewise.
7600
7601 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7602
7603         * init.c (build_builtin_delete_call): Add missing assemble_external
7604         call.
7605
7606 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7607
7608         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7609
7610 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7611
7612         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7613         arithmetic.
7614         * except.c (build_throw): Warn when NULL is thrown, even with
7615         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
7616         thrown expression.
7617
7618         * cp-tree.h (ansi_null_node): New variable.
7619         * decl.c (ansi_null_node): New variable.
7620         (init_decl_processing): Initialize its type.
7621         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
7622         for null_node in non-ANSI mode.
7623         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7624         place of null_node to avoid spurious errors.
7625
7626 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
7627
7628         * cp-tree.h (enter_scope_of): New function.
7629         * parse.y (complex_direct_notype_declarator): Use it.
7630         * semantics.c (enter_scope_of): New function.
7631
7632 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
7633
7634         * decl.c (grokparms): No, here.
7635
7636         * decl.c (grokdeclarator): Catch parm with pointer to array of
7637         unknown bound here...
7638         * method.c (process_overload_item): ...not here.
7639
7640         * gxxint.texi: Remove obsolete documentation of overloading code.
7641
7642         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7643         * class.c (finish_struct_bits): Likewise.
7644
7645         * tree.c (lvalue_type): Fix for arrays.
7646         * typeck.c (build_unary_op): Use lvalue_type.
7647         * call.c (add_function_candidate): Likewise.
7648         * cvt.c (convert_to_reference): Likewise.
7649
7650         * decl2.c (lang_decode_option): Ignore -traditional.
7651
7652         * init.c (build_offset_ref): Don't mess with error_mark_node.
7653         * lex.c (do_scoped_id): Use cp_error.
7654
7655         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7656
7657 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7658
7659         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7660
7661 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
7662
7663         * cp-tree.h (set_identifier_local_value): Provide prototype.
7664
7665         * decl2.c (do_namespace_alias): Remove unused variables `binding'
7666         and `old'.
7667
7668 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
7669
7670         * Makefile.in: Rename BBISON to BISON so that it can be properly
7671         inherited from the parent makefile.
7672
7673 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7674
7675         * lang-options.h: Add -finit-priority.
7676         * decl2.c: Likewise.  Check flag_init_priority instead of
7677         USE_INIT_PRIORITY.
7678
7679         * decl2.c (setup_initp): New fn.
7680         (start_objects, finish_objects, do_ctors): Handle init_priority.
7681         (do_dtors, finish_file): Likewise.
7682
7683 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7684
7685         * pt.c (tsubst_copy): Hush warning.
7686
7687         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7688
7689 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
7690
7691         * pt.c (print_template_context): Don't abort when instantiating a
7692         synthesized method.
7693
7694         * decl.c (grokdeclarator): Issue errors on namespace qualified
7695         declarators in parameter lists or in class scope.
7696
7697 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
7698
7699         * pt.c (check_explicit_specialization): Don't abort on bogus
7700         explicit instantiations.
7701
7702 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
7703
7704         * typeck.c (require_complete_type): Use complete_type_or_else.
7705         (complete_type_or_else): Always return NULL_TREE on failure, as
7706         documented.
7707
7708         * pt.c (tsubst_aggr_type): Prototype.
7709         (tsubst_decl): New function, split out from tsubst.  Set
7710         input_filename and lineno as appropriate.
7711         (pop_tinst_level): Restore the file and line number saved in
7712         push_tinst_level.
7713         (instantiate_class_template): Set input_filename and lineno as
7714         appropriate.
7715         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
7716         context for a TYPENAME_TYPE is complete.
7717
7718         * decl2.c (grokbitfield): Issue errors on bitfields declared with
7719         function type.
7720         (do_dtors): As in do_ctors, pretend to be a member of the same
7721         class as a static data member while generating a call to its
7722         destructor.
7723
7724         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7725         conversions, even in complex virtual base class hierarchies.
7726
7727 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
7728
7729         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7730         (TYPE_TEMPLATE_INFO): Likewise.
7731         (SET_TYPE_TEMPLATE_INFO): Likewise.
7732         (ENUM_TI_TEMPLATE): Likewise.
7733         (ENUM_TI_ARGS): Likewise.
7734         (lookup_nested_type_by_name): Remove.
7735         * decl.c (maybe_process_template_type_declaration): Handle enums.
7736         (start_enum): Don't check for primary-template enum declarations
7737         here.
7738         (finish_enum): Clean up, document.  Make sure template enum
7739         constants get the correct type.
7740         (build_enumerator): Copy initializers for template enumerations,
7741         too.
7742         (grok_enum_decls): Document.
7743         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7744         better.  Build LOOKUP_EXPRs for local variables, even if they are
7745         TREE_PERMANENT.
7746         * pt.c (tsubst_enum): Remove field_chain parameter.
7747         (template_class_depth): Include the depth of surrounding function
7748         contexts.
7749         (push_template_decl): Check for primary-template enum declarations
7750         here.  Deal with enumeration templates.
7751         (lookup_template_class): Likewise.
7752         (for_each_template_parm): Likewise.
7753         (instantiate_class_template): Don't call tsubst_enum directly,
7754         call tsubst instead, to instantiate enums.  Deal with all
7755         field_chain issues here, not in tsubst_enum.
7756         (lookup_nested_type_by_name): Remove.
7757         (tsubst_aggr_type): Revise handling of enumeration types.
7758         (tsubst): Likewise.
7759         (tsubst_copy): Likewise.
7760         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7761
7762 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
7763
7764         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7765         uses template parameters.
7766         * method.c (build_template_parm_names): Use the full set of
7767         template arguments for tsubst'ing.
7768         (build_overload_identifier): Pass the full set of template
7769         arguments to build_template_parm_names, not just the
7770         innermost_args.
7771         * pt.c (TMPL_ARGS_DEPTH): Define using
7772         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7773         (NUM_TMPL_ARGS): New macro.
7774         (add_outermost_template_args): Deal with the case where the outer
7775         args will be completely discarded.
7776         (coerce_template_parms): Use the full set of template arguments
7777         for tsubst'ing.  Simplify.  Add some asserts.  Improve
7778         error messages.
7779         (lookup_template_class): Pass the full set of template arguments
7780         to coerce_template_parms.
7781         (tsubst): Add assertion.
7782         (do_type_instantiation): Don't instantiate member template
7783         classes.
7784
7785         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7786         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7787
7788 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
7789
7790         * method.c (set_mangled_name_for_decl): Change return type to void.
7791
7792         * decl.c (lookup_name_real): A namespace-level decl takes priority
7793         over implicit typename.  Avoid doing the same lookup twice.
7794
7795         * search.c (dependent_base_p): New fn.
7796         (dfs_pushdecls, dfs_compress_decls): Use it.
7797
7798         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7799         virtual functions if the type doesn't have any.
7800
7801 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
7802
7803         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7804         uses template parameters.
7805
7806 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
7807
7808         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
7809         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7810         * lex.c (do_identifier): Don't use a second argument, or a type,
7811         when building LOOKUP_EXPRs.
7812         (do_identifier): Likewise.
7813         (do_scoped_id): Likewise.
7814         * method.c (hack_identifier): Improve error message.
7815         * pt.c (lookup_template_function): Don't needlessly call
7816         copy_to_permanent or build_min.
7817         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
7818         necessary.
7819         (do_decl_instantiation): Improve error message.
7820         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7821         (build_min): Copy the type to the permanent obstack, too.
7822
7823 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
7824
7825         * init.c (init_init_processing): Remove BI* handling.
7826         (build_builtin_call): Remove.
7827         (build_builtin_delete_call): New fn.
7828         (build_delete): Use it.
7829
7830 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
7831
7832         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7833         (maybe_check_template_type): New function.
7834         * decl.c (maybe_process_template_type_declaration): New function,
7835         split out from pushtag  Call maybe_check_template_type.
7836         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
7837         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7838         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7839         * pt.c (template_class_depth_real): Generalization of ...
7840         (template_class_depth): Use it.
7841         (register_specialization): Use duplicate_decls for duplicate
7842         declarations of specializations.
7843         (maybe_check_template_type): New function.
7844         (push_template_decl_real): Fix comment.
7845         (convert_nontype_argument): Likewise.
7846         (lookup_template_class): Likewise.  Avoid an infinite loop on
7847         erroneous code.
7848         (tsubst_friend_function): Fix comment.
7849         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7850         an IDENTIFIER_NODE.
7851         * semantics.c (begin_function_definition): Use
7852         reset_specialization to note that template headers don't apply
7853         directly to declarations after the opening curly for a function.
7854
7855 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
7856
7857         * decl.c (push_overloaded_decl): Use current_namespace instead of
7858         DECL_CONTEXT (decl) to determine where we go.
7859
7860         * decl.c (lookup_name_real): Fix typo.
7861
7862 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
7863
7864         * friend.c (is_friend): Be lenient with member functions to deal
7865         with nested friends.
7866
7867 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
7868
7869         * class.c (finish_struct_1): Convert integer_zero_node to
7870         ssizetype before passing it to set_rtti_entry.
7871         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7872         of any size to a pointer.
7873
7874 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
7875
7876         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7877         (build_template_decl_overload): Remove.
7878         (set_mangled_name_for_decl): New function.
7879         (innermost_args): Remove is_spec parameter.
7880         (most_specialized, most_specialized_class): Remove declarations.
7881         (lookup_template_class): Add entering_scope parameter.
7882         (maybe_process_partial_specialization): New function.
7883         (finish_template_decl): Likewise.
7884         (finish_template_type): Likewise.
7885         * class.c (finish_struct): Clean up processing of member template
7886         specializations.
7887         * decl.c (pushtag): Fix formatting.
7888         (lookup_tag): Improve handling of pseudo-global levels.
7889         (make_typename_type): Adjust call to lookup_template_class.
7890         (shadow_tag): Use maybe_process_partial_specialization.
7891         (xref_tag): Improve handling of member friends.
7892         (start_function): Call push_nested_class before
7893         push_template_decl.  Don't call push_template_decl for
7894         specializations.
7895         * decl2.c (grok_x_components): Don't call xref_tag for
7896         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
7897         (grokclassfn): Use set_mangled_name_for_decl.
7898         (arg_assoc_class): Adjust call to innermost_args.
7899         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7900         * error.c (dump_function_name): Improve printing of template
7901         function names.
7902         * friend.c (is_friend): Don't compare types of decls to determine
7903         friendship, unless flag_guiding_decls.
7904         (make_friend_class): Partial specializations cannot be friends.
7905         (do_friend): Use set_mangled_name_for_decl.  Call
7906         push_template_decl_real instead of push_template_decl.
7907         * method.c (build_decl_overload_real): Remove prototype.  Give it
7908         external linkage.
7909         (build_overload_identififer): Adjust call to innermost_args.
7910         (build_template_decl_overload): Remove.
7911         (set_mangled_name_for_decl): New function.
7912         * parse.y (.finish_template_type): New non-terminal.
7913         (template_def): Use finish_template_decl.  Use template_extdef
7914         instead of extdef.
7915         (template_extdef, template_datadef): New non-terminals, containing
7916         only those rules for things which can be templates.
7917         (datadef): Tidy.
7918         (template_type, self_template_type): Use .finish_template_type.
7919         (named_class_head): Use maybe_process_partial_specialization.
7920         * pt.c (mangle_class_name_for_template): Remove context parameter.
7921         (get_class_bindings): Remove outer_args parameter.
7922         (complete_template_args): Remove.
7923         (add_outermost_template_args): New function.
7924         (register_specialization): Return the specialization.
7925         (unregister_specialization): New function.
7926         (tsubst_template_parms): Likewise.
7927         (most_specialized, most_specialized_class): Prototype here as
7928         static.
7929         (original_template): Rename to most_general_template.
7930         (tsubst_template_parms): New function.
7931         (set_mangled_name_for_template_decl): Likewise.
7932         (TMPL_ARGS_DEPTH): New macro.
7933         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7934         (TMPL_ARGS_LEVEL): New macro.
7935         (SET_TMPL_ARGS_LEVEL): Likewise.
7936         (TMPL_ARG): Likewise.
7937         (SET_TMPL_ARG): Likewise.
7938         (TMPL_ARGS_DEPTH): Likewise.
7939         (finish_member_template_decl): Use finish_template_decl.
7940         (maybe_process_partial_specialization): New function, split out
7941         from tsubst.
7942         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7943         (maybe_begin_member_template_processing): Use new macros.
7944         (is_member_template): Likewise.
7945         (is_member_template_class): Likewise.
7946         (add_to_template_args): Likewise.  Deal with multiple levels of
7947         args.
7948         (maybe_process_partial_specialization): New function.
7949         (retrieve_specialization): Add consistency check.
7950         (determine_specialization): Return full argument list.
7951         (check_explicit_specialization): Tweak friend handling.  Use full
7952         argument lists.  Simplify.
7953         (current_template_args): Use new macros.
7954         (push_template_decl_real): Change ill-named mainargs to specargs.
7955         Check that a partial specialization actually specializes at least
7956         one parameter.   Improve friend handling.  Modify for full
7957         template arguments.
7958         (classtype_mangled_name): Don't mangle the names of
7959         specializations.
7960         (lookup_template_class): Add entering_scope parameter.  Use it to
7961         avoid finding a template type when an instantiation is required.
7962         Simplify.  Use full template arguments.
7963         (tsubst_friend_function): Use unregister_specialization.  Use new
7964         macros.  Use full template arguments.
7965         (tsubst_friend_class): Substitute, using tsubst_template_parms,
7966         into the template parameters before passing them to
7967         redeclare_class_template.
7968         (instantiate_class_template): Simplify.  Use full template
7969         arguments.  Adjust calls to get_class_bindings.  Use
7970         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
7971         (innermost_args): Use new macros.
7972         (tsubst_aggr_type): New function, split out from tsubst.
7973         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7974         conventions for lookup_template_class.  Refine handling of partial
7975         instantiations.   Remove calls to complete_template_args.
7976         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
7977         and set_mangled_name_for_template_decl.
7978         (tsubst_copy): Use tsubst_aggr_type.
7979         (instantiate_template): Use full template arguments.
7980         (more_specialized): Improve formatting.
7981         (more_specialized_class): Adjust calls to get_class_bindings.
7982         (get_bindings_real): Don't call complete_template_args.
7983         (most_specialized): Don't overwrite input; create a new list.
7984         (most_specialized_class): Use most_general_template.
7985         (regenerate_decl_from_template): Use unregister_specialization.
7986         Use full template arguments.
7987         (instantiate_decl): Use full template arguments.
7988         (set_mangled_name_for_template_decl): New function.
7989         * semantics.c (begin_class_definition): Use
7990         maybe_process_partial_specialization.
7991         (finish_member_class_template): New function.
7992         (finish_template_decl): Likewise.
7993         (finish_template_type): Likewise.
7994         (typeck.c): Don't crash after issuing a compiler_error.
7995         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7996
7997 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
7998
7999         * typeck2.c (build_functional_cast): Handle default-initialization.
8000
8001         * call.c (build_over_call): Pass 1 to popclass.
8002
8003         * parse.y (direct_notype_declarator): Add precedence declaration
8004         to notype_unqualified_id case.
8005         * Makefile.in (EXPECT): Adjust.
8006
8007         * tree.c (ovl_member): Fix for single function in OVL.
8008
8009 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8010
8011         * c-lex.c (yylex): Fix boundary conditions in character literal and
8012         string literal loops.
8013
8014 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8015
8016         * decl.c (lookup_name_real): OK, do return the from_obj value
8017         unless got_object depends on template parms.
8018
8019         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8020
8021         * pt.c (coerce_template_parms): Also complain about local enums.
8022
8023         * cp-tree.h: Add prototype for set_identifier_local_value.
8024         * decl.c (set_identifier_local_value_with_scope): Make static,
8025         prototype.
8026         * search.c (covariant_return_p): Likewise.
8027         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8028
8029         * call.c (build_method_call): Only pull out the type of a destructor
8030         if it's a template type parm.
8031         * decl.c (lookup_name_real): Never return the from_obj value.
8032
8033 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8034
8035         * except.c (process_start_catch_block_old): Call start_decl_1 for
8036         catch parm.
8037         * decl.c (start_decl_1): Avoid duplicate error.
8038
8039         * init.c (expand_default_init): Only perform the initialization if
8040         it will do something.
8041
8042 1998-07-23  H.J. Lu  (hjl@gnu.org)
8043
8044         * parse.y (base_class): Check for invalid base class.
8045
8046 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8047
8048         * decl2.c (import_export_template): Fold in...
8049         (import_export_class): ...to here.  Handle dllimport/export.
8050
8051         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8052         (prepare_fresh_vtable): Likewise.
8053         * decl2.c (import_export_class): Split out...
8054         (finish_prevtable_vardecl): From here.
8055         * class.c (finish_struct_1): Call import_export_class if at_eof.
8056
8057         * decl.c (start_function): #if 0 mysterious code I wrote and have
8058         forgotten why.
8059         * rtti.c (get_tinfo_fn): If this is for a class type, set
8060         DECL_CONTEXT.
8061
8062 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8063
8064         * inc/exception: Change terminate and unexpected to ().
8065
8066         * parse.y (named_class_head_sans_basetype_defn): A
8067         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8068
8069 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8070
8071         * tree.c (canonical_type_variant): New fn to handle arrays.
8072         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8073         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8074         * method.c (process_overload_item): Use build_overload_value for
8075         arrays.
8076
8077 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8078
8079         * lex.c (mbchar.h): #include it.
8080         (GET_ENVIRONMENT): New macro.
8081         (init_parse): Set character set based on LANG environment variable.
8082         (real_yylex): Handle multibyte characters in character literals.
8083         (real_yylex): Handle multibyte characters in string literals.
8084
8085 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8086
8087         * lex.c (do_identifier): Look for class value even if we don't
8088         have a global value.  Do implicit declaration if parsing is 2.
8089         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8090         lookup.
8091
8092 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8093
8094         * decl.c (pushtag): Revert previous change.
8095         * pt.c (lookup_template_class): Don't put out debugging
8096         information for types that use template parameters.
8097
8098         * decl.c (pushtag): Don't put out debugging information for
8099         compiler-generated typedefs.
8100
8101         * error.c (dump_type_real): Don't crash when presented with
8102         intQI_type_node or the like.
8103
8104         * semantics.c (finish_translation_unit): Fix spelling error in
8105         comment.
8106
8107 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8108
8109         * decl.c (lookup_name_real): Pull out single function here.
8110         (select_decl): Not here.
8111         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8112
8113         * decl.c (qualify_lookup): Tweak again.
8114
8115         * pt.c (lookup_template_class): Don't mess with the context of the
8116         instantiation.
8117         * decl2.c (current_decl_namespace): Remove special handling for
8118         templates.
8119
8120         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8121         a member template specialization.
8122
8123         * tree.c (ovl_member): Use decls_match to compare functions.
8124         * decl.c (decls_match): Check the context of a function.
8125
8126         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8127         in Koenig lookup support rules.
8128         * semantics.c (finish_call_expr): Handle the new cases.
8129
8130         * typeck.c (build_x_function_call): Handle overloaded methods.
8131
8132         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8133
8134 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8135
8136         * semantics.c (finish_object_call_expr): Revert previous change.
8137         * call.c (build_new_method_call): Likewise.  Instead, convert
8138         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8139
8140 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8141
8142         * decl.c (qualify_lookup): Handle templates.
8143
8144         * decl2.c (do_using_directive): Don't pass ancestor.
8145         * decl.c (push_using_directive): Calculate ancestor.
8146
8147         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8148         * decl.c (pushdecl): Move type shadowing handling from here...
8149         (duplicate_decls): ...to here.
8150         * decl.c (set_identifier_local_value_with_scope): New fn.
8151         (pushdecl): Use it.
8152         (set_identifier_local_value, lookup_type_current_level): New fns.
8153         * decl2.c (do_local_using_decl): Handle types and binding level
8154         stuff properly.
8155
8156         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8157         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8158         (lookup_namespace_name): Likewise.
8159         * typeck.c (build_unary_op): Not here anymore.
8160
8161         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8162         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8163
8164         * decl.c (qualify_lookup): New fn.
8165         (lookup_name_real): Use it.
8166
8167 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8168
8169         * decl2.c (add_using_namespace): When directly using a namespace
8170         that was indirect before, promote it.
8171
8172         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8173         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8174         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8175         * decl.c (select_decl): Replace two flag parameters by one.
8176         (unqualified_namespace_lookup): Likewise, pass flag.
8177         (lookup_flags): New function.
8178         (lookup_name_real): Compute flags, pass them.
8179         (lookup_namespace_name): Call with zero-flag.
8180         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8181         according to flags.
8182         (lookup_using_namespace, qualified_lookup_using_namespace):
8183         Add flag parameter, pass them through.
8184         * lex.c (do_scoped_id): Call with zero-flag.
8185
8186 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8187
8188         * typeck.c (convert_for_assignment): Use comptypes.
8189
8190 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8191
8192         * semantics.c (finish_object_call_expr): Move test for the
8193         function called being a TYPE_DECL to ...
8194         * call.c (build_new_method_call): Here.
8195
8196 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8197
8198         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8199         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8200
8201         * lex.c (looking_for_typename): Don't initialize.
8202
8203         * decl2.c (ambiguous_decl): Clarify error message.
8204
8205         * decl.c (push_using_directive): Iterate over namespaces used
8206         indirectly.
8207
8208 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8209
8210         * decl2.c (add_using_namespace): Iterate over namespaces used
8211         indirectly.
8212
8213         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8214         (cat_namespace_levels): Ignore aliases.
8215         (duplicate_decls): Ignore duplicate aliases.
8216         * decl2.c (do_namespace_alias): Process block level namespace
8217         aliases.  Store alias with pushdecl.  Remove odr errors.
8218         * parse.y (namespace_alias): New non-terminal.
8219         (extdef): Use it.
8220
8221 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8222
8223         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8224         Handle TEMPLATE_TYPE_PARM.
8225         (arg_assoc): Rewrite.
8226
8227         * pt.c (complete_template_args): Don't look at the context unless
8228         we have to.
8229
8230         * method.c (build_decl_overload_real): Fix namespace handling.
8231
8232         * typeck.c (build_unary_op): Extract a lone function from an
8233         OVERLOAD.
8234
8235         * call.c (build_scoped_method_call): Handle getting a namespace
8236         for basetype in a destructor call.
8237         (check_dtor_name): Handle enums.
8238
8239         * parse.y (using_directive): New nonterminal.
8240         (extdef, simple_stmt): Use it.
8241
8242 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8243
8244         * decl2.c (add_function): Move error message ...
8245         (arg_assoc_namespace): ... from here.
8246
8247 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8248
8249         * parse.y (namespace_qualifier): Fix multiple level handling.
8250         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8251         (arg_assoc): Don't skip the first argument of a function.
8252
8253 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8254
8255         * search.c (my_tree_cons): Clean up.
8256
8257 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8258
8259         * call.c (joust): Don't warn about "confusing" conversions to the
8260         same type.
8261
8262 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8263
8264         * class.c (push_nested_class): Complain about namespaces.
8265         * decl.c (start_decl): Enter the object's namespace.
8266         (cp_finish_decl): Leave it.
8267         (grokdeclarator): Likewise.
8268         * decl2.c (check_decl_namespace): New function.
8269         (finish_file): Call it.
8270         * parse.y (complex_direct_notype_declarator): Set complexity
8271         of namespace-qualified ids to -1, enter the namespace.
8272
8273         * method.c (build_template_decl_overload): Expect _DECL as first
8274         parameter.  Put context temporarily into current_namespace.
8275         * pt.c (check_explicit_specialization): Change caller.
8276         (tsubst): Likewise.
8277
8278         * init.c (build_offset_ref): Call mark_used and
8279         convert_from_reference for namespace members.
8280
8281 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8282
8283         * search.c (my_tree_cons): The bitfield is at index 2.
8284
8285 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8286
8287         * lang-options.h: Format changed to work with new --help support
8288         in gcc/toplev.c
8289
8290 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8291
8292         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8293         Do Koenig lookup in CALL_EXPR.
8294         (arg_assoc): Handle error_mark.
8295         * lex.c (is_global): New function.
8296         (do_identifier): Expect arguments for Koenig lookup.
8297         * parse.y (primary): Add rules for calls of unqualified function calls.
8298         (do_id): Change call of do_identifier.
8299         * pt.c (finish_stmt_expr): Likewise.
8300         * semantics.c (finish_id_expr): Likewise.
8301         (finish_call_expr): Add integer parameter to indicate
8302         argument-dependent lookup.
8303
8304         * decl.c (struct binding_level): New field using_directives.
8305         (push_using_decl): Not sorry anymore.
8306         (push_using_directive): New function.
8307         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8308         (unqualified_namespace_lookup): New function, code from ...
8309         (lookup_name_real): ... here.
8310         * decl2.c (lookup_using_namespace): Pass using list instead of
8311         initial scope.
8312         (validate_nonmember_using_decl): New function.
8313         (do_nonmember_using_decl): New function.
8314         (do_toplevel_using_decl): Use them.
8315         (do_local_using_decl): New function.
8316         (do_using_directive): Support block-level directives.
8317         * parse.y (simple_stmt): Support using declarations and
8318         directives.
8319         (namespace_qualifier, namespace_using_decl): New non-terminals.
8320
8321         * xref.c (classname): New function.
8322         (GNU_xref_hier): Change class and base parameters to tree.
8323         * decl.c (xref_baseypes): Change caller.
8324         * friend.c (make_friend_class): Likewise.
8325
8326 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8327
8328         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8329         comparison.
8330
8331         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8332         template template parameter, record its use.
8333         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8334         its template arguments if exists.
8335
8336         * pt.c (coerce_template_template_parms): New function equivalent
8337         to coerce_template_parms when IS_TMPL_PARM is true.
8338         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8339         all callers changed.
8340
8341         (coerce_template_parms): Access ARGLIST properly when creating a
8342         new vector.  Only accept implicit TYPE_DECL as valid argument for
8343         a template template parameter when it is a base class of
8344         current_class_type.  Don't display error message when COMPLAIN is
8345         false.
8346
8347 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8348
8349         * repo.c (get_base_filename): Use file_name_nondirectory.
8350         (open_repo_file): Likewise.
8351         * cp-tree.h (file_name_nondirectory): Add prototype.
8352
8353 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8354
8355         * friend.c (do_friend): Pull the identifier out of declarator.
8356         Use cp_error and friends.
8357         * decl2.c (qualified_lookup_using_namespace): Fix call to
8358         purpose_member.
8359         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8360         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8361         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8362         * class.c (warn_hidden): Fix for OVERLOAD.
8363         From grahams@rcp.co.uk:
8364         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8365         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8366
8367 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
8368
8369         * g++.1 (-traditional): Remove duplicated documentation.
8370
8371 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
8372
8373         * method.c (flush_repeats): Add nrepeats parameter.
8374         (issue_nrepeats): Likewise.
8375         (is_back_referenceable_type): New function.  Don't back-reference
8376         TEMPLATE_TYPE_PARMs as well as simple types like integers.
8377         (build_mangled_name_for_type): Likewise.
8378         (build_mangled_name_for_type_with_Gcode): Likewise.
8379         (lasttype): Remove.
8380         (nrepeats): Likewise.
8381         (Nrepeats): Likewise.
8382         (start_squangling): Don't clear the variables removed above.
8383         (end_squangling): Likewise.
8384         (flush_repeats): Tidy.  Use nrepeats parameter rather than
8385         Nrepeats global.
8386         (issue_nrepeats): Likewise, but with nrepeats global.  Use
8387         is_backreferenceable_type.
8388         (build_overload_nested_name): Tidy.  Add comment.  Use
8389         build_mangled_name_for_type.
8390         (build_underscore_int): Comment.
8391         (build_overload_scope_ref): Use build_mangled_name_for_type.
8392         (build_overload_int): Likewise.
8393         (build_template_template_parm_names): Tidy.
8394         (build_template_parm_names): Use build_mangled_name_for_type.
8395         (build_overload_identifier): Add comments.
8396         (build_mangled_name_for_type_with_Gcode): Split out from
8397         build_mangled_name.
8398         (build_mangled_name_for_type): Use it.
8399         (build_mangled_name): Rework to use build_mangled_name_for_type
8400         and to not use global nrepeats/Nrepeats.  Tidy.
8401         (process_modifiers): Tidy.
8402         (check_btype): Use is_backreferenceable_type.  Add comment.
8403         Rename `node' to `type'.
8404         (process_overload_item): Set numeric_output_need_bar here.
8405         Use build_mangled_name_for_type.  Tidy.
8406         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
8407         build_mangled_name_for_type.
8408
8409         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8410         for TYPE_DECLs.
8411
8412 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
8413
8414         * cp-tree.h (warn_long_long): Define.
8415         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8416         warning "ANSI C++ does not support `long long'".
8417         * decl2.c (warn_long_long): Define.
8418         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8419
8420 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
8421
8422         * decl.c (xref_tag): Handle attributes between 'class' and name.
8423         * parse.y (aggr): Likewise.
8424         * semantics.c (finish_class_definition): Likewise.
8425         * Makefile.in (EXPECTED): Adjust.
8426
8427         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8428         * decl2.c: Define them.
8429         (lang_decode_option): Handle them.
8430         * lang-options.h: Add -foptional-diags.
8431         * class.c (finish_struct): Don't complain about multiple meanings of
8432         name if -fno-optional-diags.
8433         * decl.c (pushdecl_class_level): Likewise.
8434         * lex.c (real_yylex): Check warn_multichar.
8435
8436 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
8437
8438         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8439
8440         * tree.c (make_binfo): Fix length.
8441
8442 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
8443
8444         * decl2.c (lang_decode_option): Remove warn_template_debugging.
8445         * lang-options.h: Likewise.
8446
8447 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8448
8449         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8450         (process_start_catch_block): Likewise for variables
8451         `false_label_rtx', `call_rtx' and `return_value_rtx'.
8452
8453 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
8454
8455         * tree.c (build_srcloc): Make sure we allocate this node on the
8456         permanent obstack.
8457
8458 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
8459
8460         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8461         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8462         (lang_specific_driver): Only add -lm automatically if need_math is
8463         nonzero.
8464
8465 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
8466
8467         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
8468
8469 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8470
8471         * Makefile.in (EXPR_H): New dependency variable.
8472         (decl2.o): Depend on $(EXPR_H).
8473         (typeck.o): Likewise.
8474         (init.o): Likewise.
8475         (expr.o): Likewise.
8476
8477 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8478
8479         * decl.c (start_enum): Put local enums on permanent_obstack.
8480
8481 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
8482
8483         * cp-tree.h (c_get_alias_set): Declare.
8484         * decl.c (init_decl_processing): Set lang_get_alias_set.
8485
8486 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
8487
8488         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8489         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8490         flag for all function decls which are in the exception table.
8491         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8492         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8493         code is emitted for any referenced rtti function.
8494
8495 1998-06-25  Dave Brolley  <brolley@cygnus.com>
8496
8497         * lang-specs.h: Use new | syntax to eliminate
8498         string concatenation.
8499
8500 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
8501
8502         * cp-tree.h (CP_DECL_CONTEXT): New macro.
8503         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8504         * method.c (build_overload_nested_name): Likewise.
8505         * sig.c (build_signature_pointer_or_reference_type): Don't set
8506         DECL_CONTEXT.
8507
8508 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8509
8510         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8511         * cp-tree.h (FROB_CONTEXT): New macro.
8512         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8513         * decl.c (namespace_binding): Replace NULL_TREE with
8514         global_namespace.
8515         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8516         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8517         Likewise.
8518         * decl.c (pushtag): Use FROB_CONTEXT.
8519         (pushdecl, make_typename_type, define_function, grokdeclarator):
8520         Likewise.
8521         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8522         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8523         Likewise.
8524         * decl2.c (decl_namespace): Return global_namespace if no context.
8525         * method.c (build_overload_nested_name): Expect null as context.
8526         * pt.c (mangle_class_name_for_template): Do nothing for null
8527         contexts.
8528         (lookup_template_class): Allow for null id_context.
8529
8530 1998-06-25  Richard Henderson  <rth@cygnus.com>
8531
8532         * method.c (emit_thunk): Set current_function_is_thunk for the
8533         ASM_OUTPUT_MI_THUNK case as well.
8534
8535 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8536
8537         * exception.cc (__cplus_type_matcher): Get a match_info pointer
8538         instead of an exception table entry as a parameter.
8539
8540 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8541
8542         * parse.y (function_try_block): Don't call start_catch_handler.
8543         * except.c (call_eh_info): Remove coerced field from declaration.
8544         (build_eh_type_type_ref): New function to create an address of a
8545         rtti function for the new style exception tables.
8546         (expand_start_catch_block): Split function, this contains the
8547         common part.
8548         (process_start_catch_block_old): New function to perform the rest
8549         of expand_start_catch_block under old style exceptions.
8550         (process_start_catch_block_old): New function to perform the rest
8551         of expand_start_catch_block under new style exceptions.
8552         (expand_end_catch_block): Only pop the false label off the stack under
8553         the old style of exceptions.
8554         * semantics.c (finish_try_block): Don't call start_catch_handler.
8555         * exception.cc (struct cp_eh_info): Add original_value field.
8556         (__cplus_type_matcher): Perform type matching on the original exception
8557         value, and if we have a match, set the current value.
8558         (__cp_push_exception): Set the original exception value.
8559
8560 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8561
8562         * call.c (joust): Fix confusing conversion warning.
8563
8564         * call.c (build_op_delete_call): Add placement parm.  Check
8565         LOOKUP_SPECULATIVELY.
8566         * cp-tree.h, decl2.c, init.c: Adjust.
8567         * decl.c (finish_function): Use it.
8568
8569         * pt.c (tsubst): Diagnose creating void fields or variables.
8570
8571 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8572
8573         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8574
8575         * cp-tree.h (check_dtor_name): Add prototype.
8576
8577         * init.c (expand_member_init): Remove unused variables
8578         `ptr_type_node', `parm' and `rval'.
8579
8580         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8581         in call to fprintf.
8582         (lang_print_xnode): Likewise.
8583
8584         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8585         and use %ld specifier.
8586
8587         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8588         specifier in call to fprintf.
8589         (GNU_xref_member): Cast argument to sprintf to int.
8590
8591 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8592
8593         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8594         of struct members.
8595
8596 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8597
8598         * cp-tree.h: Prototype function `check_java_method'.
8599
8600 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8601
8602         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8603         * decl.c (pushdecl_class_level): Likewise.
8604
8605 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8606
8607         * pt.c (convert_nontype_argument): Issue an error when presented
8608         with an integer (real) constant that cannot be simplified to an
8609         INT_CST (REAL_CST).
8610
8611         * cp-tree.h (c_get_alias_set): Remove declaration added in
8612         1998-06-13 change that should never have been checked in.
8613
8614 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8615
8616         * typeck.c (build_binary_op_nodefault): Change % in format strings
8617         to %%.
8618
8619         * decl.c (grokvardecl): Don't build_static_name for decls that
8620         aren't at namespace scope.
8621
8622         * init.c (perform_member_init): Catch default-initialization of
8623         references.
8624
8625 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8626
8627         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8628
8629 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8630
8631         * method.c (hack_identifier): Complain about getting a namespace
8632         or class template.
8633         * typeck.c (decay_conversion): Remove check for namespaces.
8634         * typeck2.c (incomplete_type_error): Likewise.
8635         * parse.y (template_arg): Add PTYPENAME expansion.
8636
8637 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
8638
8639         * decl.c (grokvardecl): Don't build external assembler names for
8640         TYPENAMEs in other namespaces as there is no declarator.
8641         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8642         info from DECL_CONTEXT if it is NULL.
8643
8644 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
8645
8646         * call.c (check_dtor_name): Split out.
8647         (build_scoped_method_call): Use it.
8648         (build_method_call): Use it.
8649         * init.c (build_offset_ref): Use it.
8650
8651         * typeck.c (build_static_cast): Fix handling of pointers to members.
8652
8653         * decl.c (finish_function): Just return nothing from a constructor.
8654         * typeck.c (c_expand_return): Complain about returning a void
8655         expression from a destructor.
8656
8657 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
8658
8659         * class.c (alter_access): Accept a BINFO explaining how to get
8660         from the entity whose accessed is being altered to the type doing
8661         the altering.
8662         (handle_using_decl): New function containing code split out from ...
8663         (finish_struct_1): Here.
8664
8665         * cp-tree.h (complete_type_or_else): Declare.
8666         * init.c (build_new_1, build_delete): Use it.
8667         * typeck.c (require_complete_type): Use complete_type, rather than
8668         expanding it inline.
8669         (complete_type_or_else): New function.
8670         (build_component_ref): Use it.
8671         (pointer_int_sum): Make sure the type pointed to is complete.
8672         (pointer_diff): Likewise.
8673
8674         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8675         types.
8676
8677         * search.c (get_matching_virtual): Note that member templates
8678         cannot override virtual functions.
8679
8680 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
8681
8682         * pt.c (check_explicit_specialization): If DECLARATOR turned into
8683         an error_mark_node from lookup_template_function, return the same.
8684         (determine_specialization): Also make sure TEMPLATE_ID isn't an
8685         error_mark_node, before we try to read its operands.
8686         * decl.c (grokdeclarator): If we got an error_mark_node from
8687         check_explicit_specialization, just return it right back.
8688
8689 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
8690
8691         * class.c (instantiate_type): Don't treat template-ids that don't
8692         specify any template arguments as equivalent to ordinary
8693         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
8694         pointer-to-members for member templates.  Tidy slightly.
8695         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8696         * init.c (build_offset_ref): Handle template-ids like ordinary
8697         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8698         offset part of the OFFSET_REF.
8699         * typeck.c (build_unary_op): Change check for unknown types to
8700         look for OFFSET_REFs, not SCOPE_REFs.
8701
8702 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
8703
8704         * pt.c (is_member_template_class): New function.
8705         (push_template_decl_real): Use it.
8706
8707 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
8708
8709         * friend.c (do_friend): Add support for nested classes using
8710         member functions of the enclosing class as friends.
8711
8712 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
8713
8714         * call.c (convert_default_arg): Make global, not static.
8715         (convert_arg_for_ellipsis): Split out from ...
8716         (build_over_call): Here.
8717         * cp-tree.h (convert_default_arg); Declare.
8718         (convert_arg_to_ellipsis): Likewise.
8719         (do_member_init): Remove.
8720         * init.c (do_member_init): Remove; this code is dead.
8721         (expand_member_init): Remove much of this code; it is dead.
8722         * typeck.c (convert_arguments): Use convert_default_arg and
8723         convert_arg_for_ellipsis, rather than duplicating here.
8724
8725         * call.c (convert_like): Don't fail silently if
8726         build_user_type_conversion fails.  Always return error_mark_node
8727         for failure.
8728
8729 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8730
8731         * search.c (covariant_return_p): Complain about ambiguous base.
8732
8733         * typeck.c (build_component_ref): Diagnose ref to nested type.
8734
8735 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8736
8737         * decl.c (grokparms): Check that INIT isn't an error_mark_node
8738         before giving error about invalid type for default arg.
8739
8740 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8741
8742         * call.c (build_method_call): Fix thinko.
8743
8744 1998-06-10  Dave Brolley  <brolley@cygnus.com>
8745
8746         * decl2.c (lang_decode_option): New argc/argv interface.
8747         * cp-tree.h (lang_decode_option): New argc/argv interface.
8748         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8749         specified for cpplib-enabled compilers.
8750         * lex.c (lang_init): Don't check_newline for cpplib.
8751         (init_parse): Don't initialize cpplib here.
8752
8753 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8754
8755         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8756         piece before checking DECL_MUTABLE_P.
8757
8758 1998-06-10  John Carr  <jfc@mit.edu>
8759
8760         * tree.c (debug_binfo): Make printf format match arguments.
8761
8762         * error.c (OB_PUTI): Make printf format match arguments.
8763
8764 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8765
8766         * init.c (perform_member_init): Handle default-initialization.
8767
8768         * except.c (build_throw): Handle throwing NULL.
8769
8770         * typeck.c (build_x_function_call): Use resolve_offset_ref.
8771
8772         * search.c (compute_access): Only strip an anonymous union
8773         for a FIELD_DECL.
8774
8775         * call.c (add_builtin_candidates): Tweak.
8776
8777         * cvt.c (build_expr_type_conversion): Restore code for conversion
8778         from class types.
8779         * decl2.c (delete_sanity): Use it.  Clean up.
8780
8781         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8782
8783 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
8784
8785         * typeck.c (c_expand_return): Don't warn about void expressions on
8786         return statements in functions returning void.
8787
8788 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
8789
8790         * pt.c (fn_type_unification): Revise documentation.  Tidy.
8791         (type_unification): Likewise.
8792
8793 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
8794
8795         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8796         expand_end_catch.
8797         * parse.y (function_try_block): Rename expand_start_catch, and delete
8798         expand_end_catch.
8799         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8800         expand_end_catch.
8801
8802 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
8803
8804         * search.c (lookup_member): New fn.
8805         * class.c (finish_struct_1): Use it.
8806         * decl.c (lookup_name_real): Use it.
8807
8808 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8809
8810         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8811
8812         * cp-tree.h: Add prototype for `maybe_print_template_context' and
8813         `maybe_make_one_only'.
8814
8815         * decl.c (auto_function): Remove unused variable `decl'.
8816
8817         * decl2.c: Include dwarf2out.h and dwarfout.h.
8818
8819         * lex.c: Remove redundant declarations of `set_float_handler' and
8820         `asm_out_file'.
8821
8822 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
8823
8824         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8825         time flag.  Call __cp_eh_info instead of __cp_exception_info.
8826         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8827         (__cp_exception_info): Return offset into cp_eh_info structure to
8828         match what use to be the start of this structure.
8829         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8830         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8831         compile time flag.
8832         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8833         __cp_eh_info instead of __cp_exception_info.
8834
8835 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
8836
8837         * decl.c (cp_finish_decl): Disable inlining of extern inlines
8838         with static variables.
8839
8840 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
8841
8842         * init.c (build_offset_ref): Correct previous change to use build,
8843         not build_min.
8844
8845 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
8846
8847         * class.c (instantiate_type): Handle pointer-to-members where the
8848         member is a template.
8849         * init.c (build_offset_ref): Likewise.
8850         * typeck.c (build_unary_op): Likewise.
8851
8852 1998-06-07  Richard Henderson  <rth@cygnus.com>
8853
8854         * lex.c (lang_init_options): New function.
8855         (lang_init): Remove flag_exceptions == 2 hack.
8856
8857 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8858
8859         * search.c (envelope_add_decl): Tweak for implicit typename.
8860
8861         * call.c (joust): Also warn about confusing conversion op/constructor
8862         overload resolution.
8863
8864         * spew.c (yylex): Also return the TYPE_DECL if got_object.
8865         Don't clear got_object after '~'.
8866         * call.c (build_scoped_method_call): Tweak destructor handling.
8867         (build_method_call): Likewise.
8868         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8869         TYPE_MAIN_VARIANT for destructors.
8870         * semantics.c (finish_object_call_expr): Complain about calling a
8871         TYPE_DECL.
8872
8873 1998-06-05  Per Bothner  <bothner@cygnus.com>
8874
8875         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8876         Define - update needed by gcc.c change.
8877
8878 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8879
8880         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8881
8882 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8883
8884         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8885         * decl.c (lookup_name_real): Add namespaces_only parameter.
8886         If set, return only NAMESPACE_DECLs.
8887         (select_decl): Likewise.
8888         (identifier_type_value): Give additional parameter.
8889         (lookup_name_nonclass): Likewise.
8890         (lookup_name): Likewise.
8891         (find_binding): Skip namespace aliases.
8892         (binding_for_name): Likewise.
8893         (push_namespace): Check for namespace aliases.
8894         (lookup_name_namespace_only): New function.
8895         (begin_only_namespace_names, end_only_namespace_names): New functions.
8896         * decl2.c (set_decl_namespace): Skip namespace aliases.
8897         (do_using_directive): Likewise.
8898         (do_namespace_alias): Produce namespace aliases, fix alias
8899         redeclaration.
8900         * error.c (dump_decl): Support SCOPE_REF.
8901         * parse.y (extdef): Wrap lookup with namespace_only for namespace
8902         aliases and using declarations.
8903
8904 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
8905
8906         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8907
8908         * error.c (dump_expr): Clean up NEW_EXPR case.
8909
8910 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8911
8912         Suggested by Brendan Kehoe
8913         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8914         treat it as using ::decl.
8915
8916         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8917
8918         * tree.c (mapcar): Support NEW_EXPR.
8919
8920         * error.c (dump_expr): Support NEW_EXPR.
8921
8922 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
8923
8924         * method.c (make_thunk): Use overload machinery to make name.
8925         * search.c (covariant_return_p): New fn.
8926         (get_matching_virtual): Use it.
8927
8928         * init.c (build_new_1): Fix check for void.
8929
8930 1998-06-01  Per Bothner  <bothner@cygnus.com>
8931
8932         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
8933         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8934         java_int_type_node, java_long_type_node, java_float_type_node,
8935         java_double_type_node, java_char_type_node, java_boolean_type_node):
8936         New "primitive" types, with predefined names __java_byte etc.
8937         (record_builtin_java_type):  New function.
8938         (init_decl_processing):  Make Java types with record_builtin_java_type.
8939         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
8940         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
8941         (grokfndecl):  Call check_java_method for Java classes.
8942         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
8943         (process_overload_item):  Match types against specific
8944         java_XX_type_node types, rather than using is_java_type.
8945         * class.c (finish_struct_1):  Don't add default copy constructor
8946         or operator= if TYPE_FOR_JAVA.
8947         (pop_lang_conext):  Restore strict_prototyp proper if Java.
8948         * decl2.c (acceptable_java_type, check_java_method):  New functions.
8949         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
8950         (tsubst):  Move common statement after if statement.
8951         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
8952
8953 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
8954
8955         * pt.c (for_each_template_parm): Use first_rtl_op.
8956
8957         * tree.c (build_cplus_array_type_1): Also check index_type for
8958         template parms.
8959
8960 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
8961
8962         * pt.c (tsubst): Always copy BINFO_BASETYPES.
8963
8964 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
8965
8966         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8967         TYPE_SIZE_UNIT too.
8968
8969 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
8970
8971         * decl.c (grokdeclarator): Don't complain about in-class
8972         initialization of static consts if we don't really know the type
8973         of the variable.
8974
8975 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
8976
8977         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8978         * method.c (build_destructor_name): New fn.
8979         * decl2.c (maybe_retrofit_in_chrg): Split out...
8980         (grokclassfn): From here.  Reorganize.
8981         * decl.c (grok_ctor_properties): Make sure ctors for types with
8982         vbases have the in_chrg parm.
8983         * pt.c (instantiate_class_template): Update
8984         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
8985         grok_*_properties.
8986         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8987
8988 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
8989
8990         * pt.c (instantiate_decl): Make test for whether or not static
8991         variables should be instantiated early match its comment.
8992
8993 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
8994
8995         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8996         a member.
8997         (start_function): Call check_default_args.
8998         * decl2.c (grokfield): Don't call check_default_args.
8999         (check_default_args): Use cp_error_at.
9000         * lex.c (do_pending_defargs): Call check_default_args.
9001
9002 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9003
9004         * call.c (build_method_call): Make sure get_type_value returns
9005         something before we try to use its TYPE_MAIN_VARIANT.
9006         (build_scoped_method_call): Likewise.
9007
9008 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9009
9010         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9011         initialize an array.
9012
9013         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9014         DECL_VIRTUAL_P.
9015
9016         * friend.c (do_friend): Clarify template warning.
9017
9018 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9019
9020         * decl.c (shadow_label): Don't treat decls as identifiers.
9021         (maybe_push_to_top_level): Clear shadowed_labels.
9022
9023         * pt.c (instantiate_decl): Reset lineno and filename after calling
9024         regenerate_decl_from_template.
9025
9026         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9027         error_mark_node.
9028
9029 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9030
9031         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9032
9033 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9034
9035         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9036         (convert_nontype_argument): Handle cases when nontype template
9037         parameters become classes after substitution.
9038
9039 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9040
9041         * friend.c (is_friend): Use comptypes, rather than == to compare
9042         types.  Modify for new representation of template friends.
9043         (make_friend_class): Likewise.
9044         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9045         (instantiate_class_template): Deal with template friends.
9046
9047         * decl.c (store_parm_decls): Remove redundant call to
9048         expand_main_function.
9049
9050 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9051
9052         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9053         DECL_USE_TEMPLATE.
9054
9055 1998-05-26  Per Bothner  <bothner@cygnus.com>
9056
9057         * language_as_string:  Handle lang_java.
9058
9059 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9060
9061         * decl.c (pushdecl): Don't copy the type_decl.
9062
9063 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9064
9065         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9066         current_class_type.
9067         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9068
9069         * parse.y (complex_direct_notype_declarator): Use $1 to access
9070         scope of notype_qualified_id.
9071
9072 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9073
9074         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9075         (init_parse): Initialize cpplib interface.
9076
9077         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9078         empty continuation.
9079
9080 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9081
9082         * decl.c (pushtag): Avoid crashing on erroneous input.
9083
9084 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9085
9086         * decl.c (push_namespace): Only produce one unique name for
9087         anonymous namespaces.
9088         (get_unique_name): Remove.
9089
9090 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9091
9092         * call.c (tourney): Don't do any extra comparisons.
9093
9094         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9095
9096         * cp-tree.h (processing_template_parmlist): Declare.
9097         * decl.c (pushtag): Don't call push_template_decl when we
9098         shouldn't.
9099         * pt.c (processing_template_parmlist): New variable.
9100         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9101         (complete_template_args): Use it.
9102         (add_to_template_args): Likewise.
9103         (innermost_args): Likewise.
9104         (tsubst): Likewise.
9105         (begin_template_parm_list): Use processing_template_parmlist.
9106         (end_template_parm_list): Likewise.
9107
9108         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9109         * decl.c (grokdeclarator): Use it.
9110         * decl2.c (grok_x_components): Likewise.
9111         * init.c (initializing_context): Likewise.
9112         * method.c (do_build_copy_constructor): Likewise.
9113         (do_build_assign_ref): Likewise.
9114         * search.c (compute_access): Likewise.
9115         * typeck.c (build_component_ref): Likewise.
9116
9117         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9118         unnamed type a typedef name "for linkage purposes".
9119
9120         * pt.c (lookup_template_class): Don't look at
9121         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9122
9123         * method.c (build_overload_int): Handle error cases gracefully.
9124
9125         * pt.c (instantiate_decl): Handle static member variables
9126         correctly.
9127
9128         * pt.c (tsubst): Use the tsubst'd type when producing new
9129         TEMPLATE_PARM_INDEX nodes.
9130
9131 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9132
9133         * tree.c (cp_tree_equal): Handle pointers to member functions.
9134
9135         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9136         sure the type of the REF_BIND is a reference type.
9137         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9138         target_type for clarity.
9139
9140         * parse.y (xcond): Move call to condition_conversion ...
9141         * semantics.c (finish_for_cond): Here.
9142         * parse.c: Regenerated.
9143
9144 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9145
9146         * decl.c (push_namespace): Namespaces have type void.
9147         * typeck2.c (incomplete_type_error): Complain about namespace
9148         used as expression.
9149         * typeck.c (decay_conversion): Likewise.
9150
9151 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9152
9153         * error.c (dump_expr): Support namespaces.
9154
9155 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9156
9157         * cp-tree.def: Add SRCLOC.
9158         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9159         * tree.c (build_srcloc, build_srcloc_here): New fns.
9160         * pt.c (add_pending_template): Use build_srcloc_here.
9161         (push_tinst_level): Update last_template_error_tick before erroring.
9162         (instantiate_decl): Restore lineno and input_filename before
9163         calling add_pending_template.
9164         * decl2.c (finish_file): Set up lineno and input_filename for
9165         pending templates.
9166
9167 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9168
9169         * decl.c (lang_print_error_function): New fn.
9170         (init_decl_processing): Set print_error_function to use it.
9171         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9172
9173         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9174         ICS_BAD_FLAG.
9175
9176         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9177         copy-initialization.
9178
9179         * class.c (build_vtable_entry): Use int_fits_type_p.
9180         (build_vtable): Pass a signed offset to build_vtable_entry.
9181         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9182         set_rtti_entry): Likewise.
9183
9184 1998-05-22  Per Bothner  <bothner@cygnus.com>
9185
9186         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9187         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9188
9189 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9190
9191         * pt.c (print_template_context): Use fprintf instead of cp_error.
9192
9193         * pt.c (determine_specialization): Just return an error_mark_node.
9194         Also print the decl we want in error messages.  If we complain,
9195         return error_mark_node.
9196         (tsubst_friend_function): Set lineno and input_filename so
9197         error messages will be useful.
9198         (instantiate_template): Just return an error_mark_node.
9199         (check_explicit_specialization): Don't mess with a returned
9200         error_mark_node.
9201
9202         * pt.c (print_template_context): Add new argument.
9203         (maybe_print_template_context): New fn.
9204         (push_tinst_level): Increment tinst_level_tick.
9205         (pop_tinst_level): Likewise.
9206         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9207         xrealloc instead of xmalloc.
9208
9209         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9210
9211 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9212
9213         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9214         if the template we looked up is the same as the one we already
9215         have.
9216
9217 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9218
9219         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9220         (cpp_reader,parse_in): Add for cpplib.
9221         (check_newline): Call handle_sysv_pragma with new interface.
9222         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9223
9224         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9225         (sub_getch): Call GETC for cpplib.
9226
9227         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9228         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9229
9230         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9231
9232 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9233
9234         * decl2.c (maybe_make_one_only): New fn.
9235         (import_export_vtable): Use it.
9236         (import_export_decl): Likewise.
9237         * pt.c (mark_decl_instantiated): Likewise.
9238
9239 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9240
9241         * decl2.c (find_representative_member): Rename to ...
9242         (build_anon_union_vars): New function.
9243         (finish_anon_union): Fix stupidity of previous change.
9244
9245 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9246
9247         * decl.c (grokfndecl): Handle definition of specialization in
9248         friend declaration.
9249
9250         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9251
9252 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9253
9254         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9255         to look for type declarations.
9256         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9257         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9258         (finish_member_class_template): Declare.
9259         * decl.c (pushtag): Put member class templates on the
9260         CLASSTYPE_TAGS list, just as for ordinary member classes.
9261         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9262         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9263         IDENTIFIER_NAMESPACE_VALUEs.
9264         * parse.y (component_decl): Move code to ...
9265         * semantics.c (finish_member_class_template): New function.
9266         Don't put member class templates on the list of components for a
9267         class.
9268         * parse.c: Regenerated.
9269         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9270         In fact, don't use DECL_CONTEXT at all here.
9271
9272 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9273
9274         * decl.c (record_unknown_type): New function.
9275         (init_decl_processing): Call it for the unknown and global type
9276         nodes.
9277
9278 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9279
9280         * decl2.c (find_representative_member): New function.
9281         (finish_anon_union): Use it.
9282
9283         * cp-tree.h (MAIN_NAME_P): New macro.
9284         (DECL_MAIN_P): Likwise.
9285         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9286         (grokfndecl): Use the new macros.
9287         (grokdeclarator): Likewise.
9288         (start_function): Likewise.
9289         (store_parm_decls): Likewise.
9290         (finsh_function): Likewise.
9291         * friend.c (do_friend): Likewise.
9292         * typeck.c (build_function_call_real): Likewise.
9293         (build_unary_op): Likewise.
9294
9295 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9296
9297         * decl2.c (start_objects, finish_objects, do_dtors,
9298         do_ctors): Split out from...
9299         (finish_file): ...here.
9300
9301 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9302
9303         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9304         push_class_decls.
9305
9306 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9307
9308         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9309
9310         * error.c (dump_expr): Handle an ARROW_EXPR.
9311
9312 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9313
9314         * decl.c (saveable_obstack): Declare.
9315         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9316         declare, if necessary.
9317
9318 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9319
9320         * call.c (compare_qual): Remove.
9321         (is_subseq): Tweak.
9322         (is_properly_derived_from): New function.
9323         (maybe_handle_ref_bind): Likewise.
9324         (maybe_handle_implicit_object): Likewise.
9325         (compare_ics): Modify substantially to bring into conformance with
9326         the standard.
9327         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9328         (comp_cv_qualification): Declare.
9329         (comp_cv_qual_signature): Likewise.
9330         * typeck.c (comp_cv_qualification): Likewise.
9331         (comp_cv_qual_signature): Likewise.
9332
9333 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9334
9335         * Makefile.in (parse.o): Depend on toplev.h.
9336
9337         * class.c (typecode_p): Remove prototype and definition.
9338
9339         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9340         Add prototype.
9341
9342         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9343         definition.
9344
9345         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9346         in call to `cp_thing'.
9347         (cp_warning): Likewise for function pointer `warning'.
9348
9349         * except.c (do_function_call): Remove prototype and definition.
9350         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9351
9352         * method.c (is_java_type): Add prototype and make it static.
9353
9354         * parse.y: Include toplev.h.
9355
9356         * pt.c (type_unification): Remove unused variable `arg'.
9357         (instantiate_decl): Likewise for `save_ti'.
9358
9359         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9360
9361 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9362
9363         * init.c (build_member_call): Handle template_ids.
9364         * parse.y (primary): Add global_scope template_id.
9365
9366 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
9367
9368         * decl2.c (get_sentry): Use end_temporary_allocation.
9369         Don't declare permanent_obstack.
9370
9371 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
9372
9373         * parse.y (.finish_new_placement): New non-terminal.
9374         (unary_expr, new_type_id): Use it.
9375         * parse.c: Regenerated.
9376
9377 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
9378
9379         * pt.c (redeclare_class_template): Say where the original definition
9380         of the template-parameter's default argument appeared.
9381
9382 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
9383
9384         * call.c (build_over_call): Tweak empty class handling.
9385
9386         * decl.c (make_typename_type): Use currently_open_class.
9387
9388         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9389
9390 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9391
9392         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9393         for a type unless it is one.
9394
9395         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9396
9397 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
9398
9399         * Makefile.in (program_transform_name, objdir): Define.
9400
9401         * Makefile.in (BISON): Use bison from the build tree if it exists.
9402         (FLEX): Likewise.
9403
9404 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9405
9406         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9407
9408         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9409
9410 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
9411
9412         * call.c (build_scoped_method_call): Likewise.
9413
9414 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
9415
9416         * init.c (build_new_1): Call suspend_momentary around the creation
9417         of values that must be saved for exception handling.
9418         * parse.y (.build_new_placement): New non-terminal.
9419         (unary_expr, new_placement): Use it.
9420         * parse.c: Regenerated.
9421
9422 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
9423
9424         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9425         old and new types.
9426
9427         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9428         canonical type.
9429
9430         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9431
9432 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
9433
9434         * decl.c (start_decl): Revert problem change.
9435
9436         * Makefile.in (CONFLICTS): Fix.
9437
9438 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9439
9440         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9441
9442 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9443
9444         * class.c (finish_struct_1): Use BINFO_SIZE.
9445
9446         * decl.c (start_decl): Use 'tem'.
9447
9448 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
9449
9450         * exception.cc: Include eh-common.h.
9451         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9452         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9453         (__cp_push_exception): Initialize eh_info struct as well.
9454         * except.c: Remove local structs and include eh-common.h.
9455         (init_exception_processing): Set language and version codes.
9456         (call_eh_info): Add presence of eh_info to runtime description of
9457         struct cp_eh_info.
9458         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9459         * semantics.c (finish_try_block): Call start_catch_block() and
9460         end_catch_block().
9461         * parse.y (function_try_block): Call start_catch_block() and
9462         end_catch_block().
9463
9464 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
9465
9466         * typeck.c (original_type): New function.
9467         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9468         to see if they're actually the same.
9469         * cp-tree.h (original_type): Declare.
9470
9471 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9472
9473         * Makefile.in (lex.o): Depend on output.h.
9474
9475         * call.c (add_function_candidate): Remove unused variable `cand'.
9476         (add_conv_candidate): Likewise.
9477         (build_builtin_candidate): Likewise.
9478
9479         * cp-tree.h: Add prototype for `types_overlap_p'.
9480
9481         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9482
9483         * decl2.c (merge_functions): Remove unused variables `tmp' and
9484         `tempn'.
9485
9486         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9487         (code_as_string): Likewise.
9488         (language_as_string): Likewise.
9489         (parm_as_string): Likewise.
9490         (op_as_string): Likewise.
9491         (assop_as_string): Likewise.
9492         (cv_as_string): Likewise.
9493
9494         * lex.c: Include output.h.
9495
9496         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9497
9498         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9499         ATTRIBUTE_UNUSED.
9500
9501         * tinfo.cc (__class_type_info::dcast): Change the type of variable
9502         `i' from int to size_t.
9503
9504         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9505         ATTRIBUTE_UNUSED.
9506
9507 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
9508
9509         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9510         DECL_NAMESPACE_SCOPE_P.
9511         (lang_decl_name): Likewise.
9512         * pt.c (tsubst_friend_function, tsubst): Likewise.
9513         * decl.c (pushdecl, redeclaration_error_message, start_decl,
9514         cp_finish_decl, start_function): Likewise.
9515         * class.c (finish_struct_1): Likewise.
9516         * call.c (build_over_call): Likewise.
9517         (compare_ics): Use DERIVED_FROM_P.
9518
9519 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
9520
9521         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9522         * method.c (build_mangled_name): Use it.
9523         (build_decl_overload_real): Likewise.
9524
9525         * error.c (dump_simple_decl): New function, broken out from ...
9526         (dump_decl): Use it.
9527
9528 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
9529
9530         * ptree.c (lang_print_xnode): Add missing `break'.
9531
9532         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9533
9534         * call.c (add_template_candidate): Adjust for changes to
9535         fn_type_unification.
9536         (add_template_candidate_real): Likewise.
9537         (add_template_conv_candidate): Likewise.
9538         (build_user_type_conversion_1): Likewise.
9539         (build_new_function_call): Likewise.
9540         (build_object_call): Likewise.
9541         (build_new_op): Likewise.
9542         (build_new_method_call): Likewise.
9543         * class.c (instantiate_type): Likewise.
9544         * cp-tree.h (unification_kind_t): New type.
9545         (fn_type_unification): Adjust prototype.
9546         (type_unificaiton): Likewise.
9547         * pt.c (UNIFY_ALLOW_NONE): New macro.
9548         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9549         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9550         (UNIFY_ALLOW_DERIVED): Likewise.
9551         (unify): Change prototype.
9552         (maybe_adjust_types_for_deduction): New function.
9553         (check_cv_quals_for_unify): Likewise.
9554         (determine_specialization): Adjust.
9555         (fn_type_unification): Likewise.
9556         (type_unification): Likewise.
9557         (type_unification_real): Likewise.  Use
9558         maybe_adjust_types_for_deduction.  Fix mishandling of
9559         back-unification of template functions passed as arguments.  Pass
9560         appropriate combination of UNIFY_ALLOW_* to unify.
9561         (unify): Remove unused NTPARMS parameter.  Use
9562         check_cv_quals_for_unify.  Remove bogus code that allowed
9563         too-generous unification in order to adhere more closely to standard.
9564         (get_bindings_real): Adjust.
9565         (get_class_bindings): Likewise.
9566
9567         * method.c (build_overload_identifier): Only use the innermost
9568         template arguments when mangling.
9569         * pt.c (tsubst_template_argument_vector): New function.
9570         (complete_template_args): Deal with the situation where the
9571         extra_args contain more than one level of arguments.
9572         (lookup_template_class): Deal with member template classes, which
9573         may have more than one level of arguments.
9574         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9575         Improve handling of member template classes.  Use
9576         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9577         tsubst_template_argument_vector where appropriate.
9578         (regenerate_decl_from_template): Break out from ...
9579         (instantiate_decl): Here.
9580
9581         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9582         * parse.h: Regenerated.
9583         * parse.c: Really regenerated.
9584
9585         * cp-tree.h (finish_unary_op_expr): New function.
9586         (finish_id_expr): Likewise.
9587         (begin_new_placement): Likewise.
9588         (finish_new_placement): Likewise.
9589         (finish_declarator): Likewise.
9590         (finish_translation_unit): Likewise.
9591         (finish_parmlist): Likewise.
9592         (begin_class_definition): Likewise.
9593         (finish_class_definition): Likewise.
9594         (finish_default_args): Likewise.
9595         (finish_inline_definitions): Likewise.
9596         * parse.y (GCC_ASM_KEYWORD): Remove.
9597         (TYPENAME_ELLIPSIS): Likewise.
9598         * parse.c: Regenerated.
9599         Use new functions in semantics.c in the actions for many rules.
9600         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9601         * hash.h: Regenerated.
9602         * semantics.c (finish_expr_stmt): Allow NULL expr.
9603         (finish_unary_op_expr): New function, containing
9604         code previously in parse.y.
9605         (finish_id_expr): Likewise.
9606         (begin_new_placement): Likewise.
9607         (finish_new_placement): Likewise.
9608         (finish_declarator): Likewise.
9609         (finish_translation_unit): Likewise.
9610         (finish_parmlist): Likewise.
9611         (begin_class_definition): Likewise.
9612         (finish_class_definition): Likewise.
9613         (finish_default_args): Likewise.
9614         (finish_inline_definitions): Likewise.
9615
9616 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
9617
9618         * typeck.c (build_c_cast): Don't decay arrays and functions to
9619         pointer type when converting to a class type.
9620
9621 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
9622
9623         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9624         (DECL_CLASS_SCOPE_P): Likewise.
9625
9626 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
9627
9628         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9629         * decl2.c (constructor_name_full): Likewise.
9630
9631 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
9632
9633         * tree.c (mapcar): Add OVERLOAD support.
9634
9635         * init.c (resolve_offset_ref): We must use basetype_path before we
9636         destroy it with a call to convert_pointer_to.
9637
9638 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9639
9640         * class.c (currently_open_class): New fn.
9641         * decl.c (lookup_name_real): Use it.
9642         * search.c (lookup_field): Likewise.
9643
9644 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9645
9646         * cp-tree.def (OVERLOAD): New node.
9647         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9648         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9649         (NAMESPACE_BINDING): Remove.
9650         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9651         namespace_binding.
9652         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9653         Define.
9654         (tree_overload): New struct.
9655         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9656         (REAL_IDENTIFIER_TYPE_VALUE): Define.
9657         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9658         (lang_decl_flags): Remove in_namespace.
9659         (lang_decl): Remove chain.
9660         (DECL_CHAIN, DECL_NAMESPACE): Remove.
9661         (flag_honor_std): Declare extern.
9662         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9663         namespace_binding, set_namespace_binding,
9664         lookup_function_nonclass, cat_namespace_levels,
9665         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9666         scratch_ovl_cons, ovl_member, build_overload): Declare.
9667         (decl_list_length, get_namespace_id, current_namespace_id,
9668         overloaded_globals_p): Remove.
9669         (lookup_using_namespace, qualified_lookup_using_namespace): Change
9670         return type.
9671         (push_scratch_obstack): New macro.
9672         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9673         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9674         convs, fns.
9675         (build_new_function_call): Iterate using OVL_CHAIN.
9676         Print DECL_NAME in when reporting ambiguities.
9677         (build_object_call): Iterate using OVL_NEXT for fns, convs.
9678         (build_new_op): Call lookup_function_nonclass.
9679         Iterate using OVL_NEXT.
9680         (build_op_delete_call): Change detection of members.
9681         Do not wrap TREE_LIST around fields and single global functions.
9682         (build_over_call): Don't push a class level if the context is a
9683         namespace.
9684         (build_new_method_call): Iterate using OVL_NEXT.
9685         * class.c (add_method): Chain overloaded members using
9686         build_overload.  Remove copying of method.
9687         (grow_method): When iterating through the obstack, expect OVERLOAD
9688         nodes.  Chain overload members.
9689         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
9690         nodes in call to get_baselinks.
9691         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9692         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
9693         fdecls that are OVERLOAD nodes.
9694         (validate_lhs): New function.
9695         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
9696         code.  Use DECL_NAME in error messages.  Split code between global
9697         and member function processing.
9698         * decl.c (global_type_node): New static variable.
9699         (in_std): New global.
9700         (struct binding_level): New field usings.
9701         (resume_binding_level): Assert that we are not in a class.
9702         (toplevel_bindings_p): Just check for namespace_p or
9703         pseudo_global.
9704         (resume_level): Remove.
9705         (find_binding): New function.
9706         (binding_for_name): Call it.
9707         (namespace_binding, set_namespace_binding): New functions.
9708         (push_namespace): Associate binding level with new namespace,
9709         resume_binding_level for existing namespace.  Remove old code.
9710         Fake std by counting.
9711         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9712         (maybe_push_to_top_level): Save current namespace.
9713         (pop_from_top_level): Restore saved namespace.
9714         (pop_namespace): Call suspend_binding_level.  Remove old code.
9715         (cat_namespace_levels): New function.
9716         (set_identifier_type_value_with_scope): For namespace bindings,
9717         set BINDING_TYPE, and use global_type_node.
9718         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9719         (identifier_type_value): New function.
9720         (pushtag): If no context, use current_namespace.
9721         (duplicate_decls): Don't process DECL_CHAIN.
9722         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9723         already set.  Never reset it to NULL_TREE.  Lookup global variables
9724         in their namespace.  Push overloaded templates if they are on
9725         namespace level.
9726         (pushdecl_namespace_level): New function.
9727         (pushdecl_top_level): Implement using pushdecl_namespace_level.
9728         (pushdecl_using_decl): New function.
9729         (overloaded_globals_p): Remove.
9730         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9731         them.  Use namespace_binding and set_namespace_value.
9732         (redeclaration_error_message): Complain if the declarations come
9733         from different namespaces.
9734         (lookup_tag): On namespace level, look in the BINDING_TYPE.
9735         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
9736         old code.
9737         (select_decl): New function.
9738         (lookup_name_real): Call it for qualified and unqualified lookup.
9739         Pass tree_bindings from the stack.
9740         If prefer_type is 1, also accept namespaces.
9741         (lookup_function_nonclass): New function.
9742         (init_decl_processing): Set the binding level of the global
9743         namespace to global_binding_level.
9744         Build a proper type list for __builtin_apply.
9745         Initialize std_node to "fake std" if flag_honor_std is set.
9746         Initialize global_type_node.
9747         Allocated bad_alloc in namespace std if flag_honor_std.
9748         (define_function): Set the DECL_CONTEXT to the current_namespace.
9749         (start_decl): A namespace is not considered as a context here.  If
9750         the DECL_CONTEXT is a namespace, push the decl.
9751         (cp_finish_decl): Check for namespaces used as initializers.
9752         (grokfndecl): Add namespace parameter.  Remove processing of
9753         DECL_CHAIN.
9754         (grokvardecl): Add namespace parameter.
9755         (grokdeclarator): Process SCOPEs that are namespaces.  For
9756         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9757         (start_function): Check for contexts that are namespaces.
9758         Set context for declarations that have not been pushed.
9759         (store_parm_decls): Check for ::main only.
9760         (finish_function): Likewise.
9761         (start_method): Check for contexts that are namespaces.
9762         (start_method): Remove DECL_CHAIN processing.
9763         * decl2.c (flag_honor_std): Declare.
9764         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9765         (decl_namespace_list): New static global.
9766         (grok_x_components): Ignore namespaces as type contexts.
9767         (check_classfn): Expect OVERLOAD nodes.
9768         (grokfield): Remove DECL_CHAIN processing.
9769         (finish_file): Call cat_namespace_levels.
9770         (merge_functions): New function.
9771         (ambiguous_decl): Rewrite.
9772         (lookup_using_namespace): Produce tree_bindings.
9773         (qualified_lookup_using_namespace): Likewise.
9774         (set_decl_namespace, decl_namespace, current_decl_namespace,
9775         push_decl_namespace, pop_decl_namespace): New functions.
9776         (arg_lookup): New struct.
9777         (add_function, arg_assoc_namespace, arg_assoc_class,
9778         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9779         New functions.
9780         (get_namespace_id, current_namespace_id): Remove.
9781         (do_toplevel_using_decl): Rewrite.
9782         (do_class_using_decl): Complain about namespace qualifiers.
9783         (do_using_directive): Sorry if not on namespace level.  Complain
9784         about unknown namespaces.
9785         * error.c (dump_aggr_type): Check for namespace contexts.
9786         * except.c (init_exception_processing): Push terminate into std.
9787         * friend.c (is_friend): A namespace is not a context, here.
9788         * init.c (expand_member_init): Remove DECL_CHAIN processing.
9789         (build_offset_ref): Process OVERLOAD nodes.
9790         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9791         * lex.c (identifier_type): Loop using OVL_CHAIN.
9792         (see_typename): Set looking_for_typename to 2.
9793         (real_yylex): Likewise.
9794         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9795         (do_scoped_id): Expect OVERLOAD nodes.
9796         Change calling convention for qualified_lookup_using_namespace.
9797         (build_lang_decl): Don't set in_namespace anymore.
9798         * method.c (typevec_size): New global.
9799         (build_overload_nested_name): Return if global_namespace.
9800         Otherwise, always expect a declaration context.
9801         (build_qualified_name): Likewise.
9802         Make sure we don't write beyond typevec_size.
9803         (build_decl_overload_real): Likewise.
9804         Allocate one extra slot for the namespace.
9805         (hack_identifier): Mark code dead.
9806         Process OVERLOAD and NAMESPACE_DECL nodes.
9807         * parse.y (program): Pop namespaces until in global namespace.
9808         (extdef): In a using-declaration, don't discard the identifier if
9809         there is no declaration.
9810         (left_curly): Ignore type contexts which are namespaces.
9811         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9812         used as scope.
9813         * pt.c (template_class_depth): Expect types to be namespaces.
9814         (determine_specialization): Simplify by expecting OVERLOAD nodes.
9815         (push_template_decl): Push into namespace level.
9816         Reset ctx if it is a namespace.
9817         Set DECL_CONTEXT to current_namespace if not set already.
9818         Ignore real contexts that are namespaces.
9819         (mangle_class_name_for_template): Skip global_namespace.
9820         Mangle other namespaces as declarations.
9821         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9822         (lookup_template_class): Push into namespace of context.
9823         If the context is a namespace, set it to global_namespace.
9824         Use id_context for mangling.
9825         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9826         (tsubst_friend_function): Ignore namespace contexts.
9827         Push into namespace level.
9828         (tsubst): Handle NAMESPACE_DECL nodes.
9829         Remove DECL_CHAIN processing.
9830         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9831         * ptree.c (print_lang_identifier): Print bindings.
9832         (lang_print_xnode): Print OVERLOAD nodes.
9833         * rtti.c (init_rtti_processing): Push type_info into std.
9834         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9835         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9836         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9837         lookup_fnfields_here): Likewise.
9838         Process all nodes, instead of going through TREE_CHAIN.
9839         * sig.c (build_signature_pointer_or_reference_type): Set context
9840         to global_namespace.
9841         (build_signature_table_constructor): Expect OVERLOAD nodes.
9842         * spew.c (yylex): Save old setting of looking_for_typename.
9843         * tree.c (decl_list_length): Remove.
9844         (binding_init): New function.
9845         (count_functions): Rewrite.
9846         (is_overloaded_fn): Expect OVERLOAD nodes.
9847         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9848         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9849         ovl_member): New functions.
9850         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9851         (type_unknown_p): Likewise.
9852         (require_instantiated_type): Likewise.
9853         (build_component_ref): Declare code dead.
9854         (build_x_function_call): Create and expect OVERLOAD nodes.
9855         (build_function_call_real): Check for ::main only.
9856         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
9857         (convert_for_assignment): Check for TREE_LIST before accessing
9858         TREE_VALUE.
9859         * decl.c (duplicate_decls): Check for namespace bindings instead
9860         of global bindings.
9861         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9862         lookup_name_current_level, start_decl, xref_tag,
9863         finish_enum): Likewise.
9864         * init.c (build_offset_ref): Likewise.
9865         * search.c (lookup_field): Likewise.
9866         (lookup_fnfields): Likewise.
9867         (dfs_debug_mark): Likewise.
9868         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9869         (poplevel_class, pop_from_top_level): Likewise.
9870         * decl2.c (finish_method): Likewise.
9871         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9872         * decl.c (record_builtin_type): Likewise.
9873         (init_decl_processing, grokfndecl): Likewise.
9874         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9875         (make_lang_type): Likewise.
9876         * parse.y (make_thunk): Likewise.
9877         * pt.c (tsubst): Likewise.
9878         * tree.c (debug_binfo): Likewise.
9879         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9880         tinfo2.cc, inc/new.h: Add std qualifications.
9881         * inc/new: Wrap with namespace std if __HONOR_STD.
9882         * inc/typeinfo: Likewise.
9883
9884 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
9885
9886         * call.c (build_user_type_conversion_1): Handle second_conv
9887         properly for templates.
9888
9889 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
9890
9891         * method.c (build_decl_overload_real): Set TREE_USED flag to
9892         zero for build_type_variants nodes as well.
9893
9894 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
9895
9896         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9897
9898 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
9899
9900         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9901         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9902         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9903         xref.o): Add toplev.h dependencies.
9904
9905 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
9906
9907         * errfn.c (cp_error, cp_warning): Remove declarations for
9908         error and warning respectively.
9909
9910 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9911
9912         * error.c: Convert to using ctype macros defined in system.h.
9913         * method.c: Likewise.
9914         * xref.c: Likewise.
9915         * lex.c: Likewise.  Also remove redundant system header stuff.
9916
9917 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
9918
9919         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9920         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9921         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9922         xref.c: Add include of toplev.h.
9923
9924 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
9925
9926         * tree.c (perm_manip): Also regenerate the RTL of an extern.
9927         (copy_to_permanent): Use end_temporary_allocation.
9928
9929 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
9930
9931         * init.c (expand_vec_init): The initialization of each array
9932         element is a full-expression.
9933
9934 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
9935
9936         * method.c (build_mangled_name): Add a call to build_type_variant
9937         to get the right type.
9938
9939 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
9940
9941         * Makefile.in: Add .SUFFIXES.
9942
9943         * cp-tree.def: Remove NAMESPACE_DECL.
9944
9945 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
9946
9947         * call.c (build_over_call): Do evaluate arg even if it has empty
9948         class type.
9949         * decl.c (start_function): Don't push a member function.
9950
9951 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
9952
9953         * Makefile.in (g++FAQ.info): Put -o option before input file.
9954
9955 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
9956
9957         * gxxint.texi: Add info for squangling codes K and B.
9958
9959 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
9960
9961         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9962         the expression in templates.
9963         (finish_stmt_expr): Likewise.
9964
9965 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
9966
9967         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9968
9969 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
9970
9971         * decl.c (maybe_push_to_top_level): Always clear
9972         current_template_parms and processing_template_decl.
9973         (pushtag): Remove check of current_class_type and some comments,
9974         since maybe_push_to_top_level no longer creates confusion.
9975
9976 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
9977
9978         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9979         (DECL_CLASS_TEMPLATE_P): Likewise.
9980         (DECL_PRIMARY_TEMPLATE): Likewise.
9981         (PRIMARY_TEMPLATE_P): Use it.
9982         (push_template_decl_real): New function.
9983         (redeclare_class_template): Take new template parameters as
9984         input.
9985         (is_specialization_of): New function.
9986         (comp_template_args): Declare.
9987         * decl.c (pushtag): Handle friend template classes.
9988         (xref_tag): Likewise.  Use new calling convention for
9989         redeclare_class_template.
9990         * decl2.c (grok_x_components): Handle friend templates.
9991         * friend.c (is_friend): Use is_specialization_of where
9992         appropriate.  Deal with friend class templates.
9993         (make_friend_class): Let a class template be friends with itself.
9994         * pt.c (comp_template_args): Remove declaration.
9995         (tsubst_friend_class): New function.
9996         (push_template_decl_real): New function.
9997         (push_template_decl): Use it.
9998         (redeclare_class_template): Adjust for new calling convention.
9999         (comp_template_args): Give it external linkage.
10000         (instantiate_class_type): Use tsubst_friend_class to deal
10001         with friend templates.
10002         * typeck.c (comptypes): Use comp_template_args, rather than
10003         expanding it inline.
10004         * parse.y (component_decl): Handle a nested template type
10005         like other component type declarations.
10006
10007         * pt.c (check_explicit_specialization): Handle overloaded
10008         constructors correctly.
10009
10010         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10011         (lookup_template_class): Use it.
10012
10013 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10014
10015         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10016         * cp-tree.h: Add WRAPPER support.
10017         * call.c (add_candidate): Split out from add_*_candidate fns.
10018         (build_over_call): Take the candidate instead of function and args.
10019         Enforce access control here.  Emit overload warnings here.
10020         (add_warning): New fn.
10021         (joust): Add WARN parm.  If not set, call add_warning instead of
10022         printing a warning.  Re-enable some warnings.
10023         (tourney): Pass it.
10024         (convert_like): Adjust.
10025         (build_new_op): Adjust.
10026         (build_new_function_call): Adjust.
10027         (build_user_type_conversion_1): Adjust.
10028         (USER_CONV_FN): Adjust.
10029         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10030         build_int_wrapper): New fns.
10031
10032 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10033
10034         * pt.c (unify): Fix typo in previous change.
10035
10036 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10037
10038         * error.c (dump_type_real): Declare canonical_name.
10039
10040         * typeck.c (comp_target_types): Fix PMFs.
10041
10042 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10043
10044         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10045         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10046         TEMPLATE_DECL.
10047
10048         * pt.c (tsubst): Decrease the template-level of
10049         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10050         TEMPLATE_PARM_INDEX.
10051         (template_decl_level): New function.
10052         (unify): Make sure to record unifications for template
10053         parameters, even when the parameters exactly match the arguments.
10054         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10055         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10056         aren't from the level we're currently working on.
10057
10058 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10059
10060         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10061
10062         * decl2.c (check_member_template): Set DECL_IGNORED for member
10063         class templates, too.
10064
10065         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10066
10067 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10068
10069         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10070
10071 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10072
10073         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10074         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10075         (init_decl_processing): Handle TI types.
10076         * typeck.c (unsigned_type, signed_type): Handle TI types.
10077
10078 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10079
10080         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10081         New local added_libraries.  Increment count when add library to
10082         arglist.
10083
10084 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10085
10086         * cp-tree.h (type_as_string_real): New function.
10087         * pt.c (mangle_class_name_for_template): Use it.
10088         * error.c (dump_aggr_type): Change prototype.
10089         (dump_type_prefix): Likewise.
10090         (dump_type_suffix): Likewise.
10091         (dump_type_real): Convert from dump_type.  If desired, the
10092         "canonica" name of a typedef, i.e., the name of the underlying
10093         type, can be printed.
10094         (dump_type): Call dump_type_real.
10095
10096 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10097
10098         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10099
10100         * typeck.c (comp_target_types): Tweak pedantic case.
10101         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10102         Return -1 or 1 instead of 1 or 2.
10103         (compparms): Remove STRICT handling.
10104         (convert_for_assignment): Fix handling of pmfs.
10105
10106 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10107
10108         * typeck.c (comp_target_types): Handle references like pointers.
10109         (comp_target_parms): Note that return code from comp_target_types
10110         can be negative to indicate failure.
10111
10112 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10113
10114         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10115         which requires a working target compiler to build.
10116
10117 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10118
10119         * tree.c (avoid_overlap): Add prototype.
10120
10121         * spew.c (num_tokens): Add prototype.
10122         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10123
10124         * search.c (dfs_check_overlap): Add prototype.
10125         (dfs_no_overlap_yet): Likewise.
10126
10127         * pt.c (original_template): Add prototype.
10128         (inline_needs_template_parms): Likewise.
10129         (push_inline_template_parms_recursive): Likewise.
10130         (retrieve_specialization, register_specialization): Likewise.
10131         (print_candidates, reduce_template_parm_level): Likewise.
10132         (build_template_decl, mark_template_parm): Likewise.
10133         (tsubst_friend_function, get_bindings_real): Likewise.
10134
10135         * method.c (start_squangling): Add prototype.
10136         (end_squangling, check_ktype, issue_ktype): Likewise.
10137         (build_overloaded_scope_ref, check_btype): Likewise.
10138         (build_mangled_template_parm_index): Likewise.
10139
10140         * lex.c (init_cpp_parse): Add prototype.
10141         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10142         (reduce_cmp, token_cmp): Likewise.
10143
10144         * except.c (call_eh_info): Add prototype.
10145         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10146         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10147
10148         * decl2.c (is_namespace_ancestor): Add prototype.
10149         (namespace_ancestor, add_using_namespace): Likewise.
10150         (ambiguous_decl): Likewise.
10151
10152         * decl.c (indent): Add prototype.
10153
10154         * call.c (add_template_candidate_real): Add prototype.
10155
10156 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10157
10158         * decl2.c (build_expr_from_tree): Just return a PMF.
10159
10160 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10161
10162         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10163         when doing initializations.
10164
10165         * pt.c (unify): Use comptypes to compare type args.
10166
10167 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10168
10169         * decl.c (duplicate_decls): Fix check for when it's safe to free
10170         the new decl.
10171
10172         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10173         to type_as_string.
10174
10175 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10176
10177         * pt.c (build_template_parm_index): Add prototype.
10178
10179         * search.c (my_tree_cons): Don't clear words outside the
10180         newly allocated node.
10181
10182 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10183
10184         * lex.c (init_parse): Now returns char* containing the filename.
10185
10186 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10187                           Jeff Law   <law@cygnus.com>
10188
10189         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10190         than a pointer.
10191
10192 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10193
10194         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10195
10196 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10197
10198         * decl.c (duplicate_decls): Don't warn for redundant decls if
10199         friend: let add_friend take care of it.
10200
10201 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10202
10203         * sig.c (build_signature_pointer_constructor): Don't set
10204         TREE_HAS_CONSTRUCTOR for a signature pointer.
10205         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10206         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10207         here, too.
10208         * typeck.c (build_unary_op): Only allow taking the address of a
10209         real constructor.
10210         * typeck2.c (digest_init): Simplify.
10211         (store_init_value): Don't pedwarn about using { } for pmfs.
10212
10213 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10214
10215         * cp-tree.h (start_decl):  Update prototype.
10216         * decl.c (start_decl):  Like the C version, new parameters
10217         for the attributes.  Call cplus_decl_attributes here,
10218         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10219         (grokdeclarator):  Pass NULL for new start_decl arguments.
10220         * pt.c (tsubst_expr):  Likewise.
10221         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10222         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10223         * lex.c (build_lang_decl): Add lang_name_java.
10224         * class.c (push_lang_context): Add lang_name_java.
10225         * method.c (build_mangled_name): Check for is_java_type.
10226
10227 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10228
10229         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10230         * call.c (build_scoped_method_call): Check for TREE_CODE for
10231         VOID_TYPE instead of type ==  void_type_node.
10232         (build_method_call): Likewise.
10233         * decl.c (lookup_name_real): Likewise.
10234         (grokdeclarator): Likewise.
10235         (start_decl): Likewise.
10236         (grokparms): Likewise.
10237         (start_function): Likewise.
10238         (finish_function): Likewise.
10239         (start_method): Likewise.
10240
10241 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10242
10243         * lex.c (finput): New variable.
10244         (init_cpp_parse):  Renamed from init_parse.
10245         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10246         (finish_parse): New function.
10247         * cp-tree.h (init_lex, init_parse): Remove declarations.
10248
10249 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10250
10251         * call.c (build_call): Still evaluate the actual argument.
10252         * class.c (is_empty_class): Update for -fnew-abi.
10253
10254         * decl2.c: -fnew-abi implies -fsquangle.
10255
10256         * method.c (do_build_assign_ref): Don't do anything to copy
10257         an empty class.
10258         (do_build_copy_constructor): Likewise.
10259         * call.c (build_over_call): Likewise.
10260
10261 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10262
10263         * tree.c (avoid_overlap): Return a value.
10264
10265 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10266
10267         * method.c (check_btype): Add missing argument to xrealloc.
10268         (check_ktype): Likewise.
10269
10270 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10271
10272         Implement empty base optimization.
10273         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10274         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10275         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10276         (types_overlap_p): New fn.
10277         * tree.c (avoid_overlap): New fn.
10278         (build_base_fields): Use it to avoid overlapping empty bases.
10279         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10280
10281         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10282
10283         Re-implement allocation of base class subobjects.
10284         * tree.c (unshare_base_binfos): New fn.
10285         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10286         non-virtual bases, after layout_type.
10287         (layout_vbasetypes): Remove.
10288         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10289         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10290         * class.c (finish_base_struct): Lose offset handling code.
10291         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10292         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10293         * cp-tree.h: Adjust.
10294
10295 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10296
10297         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10298         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10299         * class.c (duplicate_tag_error): Likewise.
10300         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10301         * tree.c (layout_vbasetypes): Update from layout_record, remove
10302         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10303         (layout_basetypes): Likewise.
10304
10305 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10306
10307         * class.c, Make sure system.h is included just after config.h.
10308         Delete lingering stdio and errno references too.
10309         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10310
10311 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10312
10313         * friend.c (is_friend): Fix access control for local classes.
10314
10315         * class.c (is_empty_class): New fn.
10316         * call.c (build_call): Don't pass empty class objects to a function.
10317
10318 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10319
10320         * call.c (build_over_call): Do name resolution for default
10321         arguments of function templates in the scope of the templates.
10322
10323 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10324
10325         * call.c: Include system.h.  Remove includes, declarations and
10326         defines provided by system.h.
10327         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10328         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10329         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10330         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10331         * typeck2.c, xref.c: Likewise.
10332         * Makefile.in: Dependencies updated as appropriate.
10333         * Make-lang.in: Likewise.
10334
10335 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10336
10337         * pt.c (fn_type_unification): Allow incomplete unification without
10338         an immediate error message.
10339
10340 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10341
10342         * tree.c (member_p): New fn.
10343         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10344         initializing class members.
10345
10346         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10347         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10348
10349         * call.c (build_method_call): Handle non-scoped destructors, too.
10350         * pt.c (tsubst_copy): Likewise.
10351
10352         * pt.c (print_template_context): Split out...
10353         (push_tinst_level): ...from here.
10354
10355         * friend.c (is_friend): Don't pass a type to decl_function_context.
10356
10357         * typeck.c (convert_for_initialization): Always hand off
10358         conversions to class type.
10359
10360 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10361
10362         * friend.c (is_friend): Local classes have the same access as the
10363         enclosing function.
10364
10365 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
10366
10367         * typeck.c (expand_target_expr): Delete dead function.
10368
10369         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10370
10371         * repo.c (save_string): Delete dead function.
10372
10373         * method.c (thunk_printable_name): Delete dead function.
10374
10375         * lex.c (yynextch): Delete dead function.
10376
10377         * expr.c (tree_extract_aggr_init): #if 0 out.
10378
10379         * except.c (do_unwind): Delete dead function.
10380         (easy_expand_asm): Likewise.
10381
10382         * cvt.c (build_conversion_type_1): Delete dead function.
10383
10384         * cp-tree.h (push_expression_obstack): Declare.
10385
10386         * call.c (source_type): #if 0 out.
10387
10388         * class.c (alter_access): Remove unused label.  Add braces
10389         around empty else clause.
10390
10391         * lex.c (yyprint): Fix argument to printf.
10392
10393 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
10394
10395         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10396
10397         * pt.c (instantiate_class_template): Make sure template
10398         arguments are permanent.
10399         * init.c (resolve_offset_ref): Don't go looking around in
10400         template types.
10401
10402         * semantics.c: Add routines to handle expressions, and some
10403         declaration processing.
10404         * parse.y: Use them.
10405         (current_class_depth): Move declaration to cp-tree.h.
10406         * parse.c: Regenerated.
10407         * cp-tree.h: Use them.
10408         (current_class_depth): Declare.
10409         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10410
10411 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
10412
10413         * error.c (dump_decl): Be a bit more explicit with template
10414         type arguments, when verbose.
10415
10416 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10417
10418         * inc/exception: Reorder closing braces.
10419
10420 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
10421
10422         * pt.c (redeclare_class_template): New function.
10423         * cp_tree.h (redeclare_class_template): Declare it.
10424         * decl.c (xref_tag): Use it.
10425
10426 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
10427
10428         * call.c (build_over_call): Check IS_AGGR_TYPE, not
10429         TYPE_LANG_SPECIFIC.
10430         * typeck.c (convert_arguments): Likewise.
10431
10432         * decl.c (grokdeclarator): Remove const and volatile from type after
10433         setting constp and volatilep.
10434
10435         * class.c (finish_struct_1): Don't warn about bool bitfield larger
10436         than one bit.
10437
10438 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
10439
10440         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10441
10442 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
10443
10444         * call.c (build_object_call): Complain about ambiguous operator(),
10445         rather that crashing.
10446         (build_new_op): Likewise.
10447         (build_op_delete_call): Likewise.
10448
10449 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
10450
10451         * cvt.c (perform_qualification_conversions): Use comp_target_types
10452         instead of comp_ptr_ttypes.
10453
10454 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
10455
10456         * cp-tree.h (enforce_access): Declare.
10457         * call.c (enforce_access): Make it extern, not static.
10458         * class.c (alter_access): Use enforce_access; modify code for ISO
10459         compliance, rather than ARM rules.
10460
10461 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10462
10463         * cp-tree.h: Fix typo.
10464
10465 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10466
10467         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10468         if (aggregate_value_p (type)).
10469
10470         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10471
10472 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
10473
10474         * tree.c (mapcar): When dealing with a DECL, use it's constant
10475         value, if any.
10476         * pt.c (lookup_template_class): Don't mangle the names of template
10477         classes whose arguments are unknown.
10478
10479         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10480
10481 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10482
10483         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10484
10485 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
10486
10487         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10488         boolean_type_node to 1.
10489
10490 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
10491
10492         * error.c (dump_expr): Remove unused variable `l'.
10493
10494         * pt.c (for_each_template_parm): New function, created by
10495         converting uses_template_parms.
10496         (tree_fn_t): New typedef.
10497         (uses_template_parms): Use it.
10498         (mark_template_parm): New function.
10499         (push_template_decl): Check that the argument list of a partial
10500         specialization uses all the template parameters.
10501
10502         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10503         with it; we might want it for debugging.
10504         * cp-tree.h (type_unification): Change interface.
10505         * class.c (finish_struct_1): Skip nested template types, just like
10506         ordinary nested types.
10507         (instantiate_type): Use new interface to type_unification.
10508         * lex.c (init_lex): Add __sz as opname for sizeof.
10509         * method.c (build_overload_scope_ref): New function.
10510         (build_overload_int): Handle complex expressions.  Set
10511         numeric_output_need_bar if necessary.
10512         (build_overload_value): Handle non-PARM_DECL nodes; this
10513         routine is now used by build_overload_int.  Remove some
10514         assignments to numeric_output_need_bar.  Use
10515         build_overload_scope_ref.
10516         (build_qualified_name): Note that some template mangled names end
10517         with digits, and set numeric_output_need_bar appropriately.  Use
10518         build_underscore_int.
10519         * pt.c (unify): Change interface.
10520         (type_unification_real): Likewise.
10521         (determine_specialization): Use new interfaces.
10522         (tsubst): Deal gracefully with situations in which the argument
10523         vector is not fully filled.
10524         (fn_type_unification): Use new interfaces.
10525         (type_unification): Likewise.  Remove NOP_EXPR hack.
10526         (type_unification_real): Likewise.
10527         (unify): Likewise.  Deal with unification of complex expressions.
10528
10529 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10530
10531         * pt.c (complete_template_args): Initialize skip properly.
10532
10533         * decl.c (make_typename_type): Revert.
10534         (make_implicit_typename): Remove.
10535         (lookup_name_real): Don't call it.  Call lookup_field if we see a
10536         TYPE_DECL from a template base.
10537         * search.c (lookup_field): Do implicit typename stuff.
10538
10539 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
10540                           Geoff Noer    <noer@cygnus.com>
10541
10542         * Makefile.in: Various fixes for building cygwin32 native toolchains.
10543         * Make-lang.in: Likewise.
10544
10545 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10546
10547         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10548
10549 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
10550
10551         * decl.c (make_implicit_typename): Rewrite removed code.
10552         (make_typename_type): Call it if the type we look up comes from
10553         a base that uses template parms.
10554
10555         * pt.c (complete_template_args): Rewrite.
10556         (tsubst, FUNCTION_DECL): Use it.
10557
10558 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10559
10560         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10561         c_expand_asm_operands () if output_operands, input_operands or
10562         clobbers is not NULL_TREE.
10563
10564 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10565
10566         * pt.c (complete_template_args): New function.
10567         (get_bindings): Deal with specializations of function templates
10568         with return type containing parameters from outer class
10569         templates.
10570         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10571         substitute arguments and compose a new type.
10572
10573 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10574
10575         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10576         FUNCTION_DECLs.
10577
10578 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10579
10580         * decl.c (make_implicit_typename): Lose useless code.
10581
10582         * call.c (standard_conversion): Handle A* -> const A* properly.
10583
10584         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10585         check_rettype parm.
10586         (get_bindings): Pass 1.
10587         (get_bindings_overload): Pass 0.
10588
10589 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10590
10591         * pt.c (check_explicit_specialization): When reverting a static
10592         member function, also remove the `this' parameter from
10593         last_function_parms.
10594
10595 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10596
10597         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10598         a function context.
10599
10600         * decl.c (store_bindings): Use free_binding_vecs.
10601         (pop_from_top_level): Likewise.
10602
10603 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10604
10605         * decl.c (make_implicit_typename): Only change the type of a
10606         TYPENAME_TYPE.
10607
10608 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10609
10610         * semantics.c: New file, containing routines to perform the
10611         semantic phase of parsing.
10612         * parse.y: Use it.
10613         * pt.c (tsubst_expr): Likewise.
10614         * cp-tree.h: Declare the various functions in semantics.c.
10615         Provide macros to access _STMT tree nodes.
10616         * cp-tree.def: Add ASM_STMT tree node.
10617         * Makefile.in, Make-lang.in: Add dependencies on and for
10618         semantics.c.
10619
10620 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
10621
10622         * pt.c (push_template_decl): Only check primary templates.
10623
10624         * pt.c (check_explicit_specialization): Complain about default args
10625         in explicit specialization.
10626
10627         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10628         constructor_declarator.
10629
10630 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
10631
10632         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10633         has no overloaded operator ->.
10634
10635         * call.c (build_field_call): Don't crash when presented with a
10636         field that is actually a nested type.
10637
10638         * decl.c (pushtag): Deal with friend class injection in local
10639         classes.
10640
10641         * call.c (build_object_call): Don't crash if OBJ is a
10642         pointer-to-member-function.
10643
10644 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10645
10646         * pt.c (push_template_decl): Complain about template with C linkage,
10647         anonymous template class.
10648
10649 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10650
10651         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10652         * search.c: Likewise.
10653
10654         * lex.c (do_pending_defargs): Only call
10655         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10656
10657         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10658
10659 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
10660
10661         * parse.y: Deal with CONSTRUCTORS in new_initializers.
10662
10663 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
10664
10665         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10666         closely mimics the behavior in parse.y.
10667         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10668         into a compound statement.
10669
10670 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10671
10672         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10673         * pt.c (inline_needs_template_parms): New fn.
10674         (original_template): New fn.
10675         (push_inline_template_parms_recursive): New fn.
10676         (maybe_begin_member_template_processing): Use them.
10677         (maybe_end_member_template_processing): Likewise.
10678         (is_member_or_friend_template): Rename to is_member_template.
10679         Member functions of local classes are never member templates.
10680
10681 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10682
10683         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10684         added in the class scope to catch redefinition error.
10685
10686         * pt.c (reduce_template_parm_level): Also copy
10687         the DECL_TEMPLATE_PARMS field.
10688
10689 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
10690
10691         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10692         reduced-level template type parameter.
10693
10694 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10695
10696         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10697         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10698         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10699         * decl.c (duplicate_decls): Propagate it.
10700         * typeck2.c (abstract_virtuals_error): Use two loops to emit
10701         abstract virtual functions and virtual functions which need a
10702         final overrider separately.
10703
10704 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10705
10706         * lang-specs.h: Properly put brackets around array elements in
10707         initializer.
10708
10709         * typeck.c (build_binary_op_nodefault): Correctly place parens around
10710         && and || in expression.
10711
10712 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10713
10714         * call.c (default_parm_conversions): Remove prototype definition.
10715         (build_method_call): Remove unused variable result.
10716
10717         * cvt.c (ocp_convert): Remove unused variable conversion.
10718
10719         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10720
10721         * except.c (do_unwind): #if 0 definition of unused variables fcall
10722         and next_pc.
10723
10724         * expr.c (extract_scalar_init): #if 0 prototype and function
10725         definition.
10726
10727         * init.c (expand_aggr_init_1): Remove unused variable init_type.
10728         (build_new_1): Remove unused variable t.
10729
10730         * pt.c (instantiate_class_template): Remove unused variable newtag;
10731         cast called function return value to void.
10732         (do_decl_instantiation): Remove unused variables name and fn.
10733
10734         * tree.c (get_type_decl): Add default return to shut up compiler from
10735         complaining control reaches end of non-void function.
10736
10737         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10738
10739 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10740
10741         * call.c (default_parm_conversions): Remove prototype definition.
10742         (build_method_call): Remove unused variable result.
10743         (build_over_call): Add default case in enumeration switch.
10744
10745 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10746
10747         * decl2.c (lang_decode_option): Change j's type to size_t.
10748
10749         * tree.c (layout_vbasetypes): record_align and desired_align are of
10750         type unsigned int; const_size and nonvirtual_const_size likewise.
10751
10752 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
10753
10754         * parse.y (new_initializer): Make sure all initializers are
10755         lists.
10756
10757 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
10758
10759         * decl2.c (import_export_decl): Mark tinfo functions for
10760         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10761
10762 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
10763
10764         * method.c: Fix typo.
10765
10766 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10767
10768         * method.c: Include "system.h" to get stdlib.h, stdio.h,
10769         ctype.h, string.h, etc.
10770         (issue_nrepeats): Add default case in enumeration switch.
10771         (check_btype): Likewise.
10772         (process_overload_item): Likewise.
10773
10774         * Makefile.in (method.o): Depend on system.h.
10775
10776 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10777
10778         * lex.c (do_scoped_id): Fix parenthesizing.
10779
10780 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
10781
10782         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10783         FLAG_RTTI is unset, initialize type info machinery and continue
10784         with FLAG_RTTI enabled.
10785         (get_typeid): Likewise.
10786
10787 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10788
10789         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10790         from B.
10791
10792 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
10793
10794         * pt.c (finish_member_template_decl): Deal more gracefully with
10795         invalid declarations.
10796
10797 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
10798
10799         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10800         cp-tree.h: Clean up more old overloading code, old RTTI code, and
10801         some formatting quirks.
10802
10803         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10804         method.c, pt.c, ptree.c, typeck.c: Remove support for
10805         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10806         * class.h: Remove.
10807         * Makefile.in: Adjust.
10808
10809         * pt.c (unify): Don't allow reduced cv-quals when strict.
10810
10811         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10812         *type_unification* and unify.
10813
10814 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10815
10816         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10817         (nested_name_specifier): And add it before this use.
10818         (typename_sub0): And this use.  Also add use without the keyword.
10819         (typename_sub1): Likewise.
10820         * pt.c (instantiate_class_template): Don't actually instantiate
10821         anything if our type uses template parms.
10822
10823 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
10824
10825         * decl.c (start_function): Don't call temporary_allocation for a
10826         nested function.
10827
10828 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10829
10830         * pt.c (instantiate_class_template): Don't mess with friends if
10831         our type uses template parms.
10832
10833 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
10834
10835         * parse.y (nested_name_specifier): Use explicit_template_type.
10836         (typename_sub): Allow a template_type, an explicit_template_type,
10837         or an implicit template type at the end.
10838         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10839         * decl.c (make_typename_type): Handle template-id where the name
10840         is a TEMPLATE_DECL.
10841         * call.c (build_scoped_method_call): Handle member template
10842         destructor call.
10843         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10844         destructor is represented by the type.
10845
10846         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10847         * parse.y (nested_name_specifier): Add 'template' case.
10848         (explicit_template_type): New rule.
10849         (typename_sub): Use it.
10850         * decl.c (make_typename_type): Handle getting a template-id for NAME.
10851         * pt.c (tsubst): Likewise.
10852
10853 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10854
10855         * pt.c (add_to_template_args): Fix thinko.
10856         (instantiate_class_template): Call it later.
10857
10858         * pt.c (get_class_bindings): Add outer_args parm.
10859         (most_specialized_class): Likewise.
10860         (instantiate_class_template): Pass it.
10861         (more_specialized_class): Likewise.
10862         (lookup_template_class): Get context from template if none
10863         was specified.
10864         (finish_member_template_decl): Don't do anything with a
10865         partial specialization.
10866         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10867         AGGREGATE_TYPE_P.
10868         * class.c (finish_struct): Member class templates have already been
10869         checked for name clashes.
10870         * decl.c (pushdecl_with_scope): Handle pushing at class level.
10871
10872 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
10873
10874         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10875         (tsubst, *_PARM): Support multiple levels of template classes.
10876         (instantiate_class_template): Look up the pattern from the
10877         original template.
10878         (lookup_template_class): Handle getting a template for d1.
10879         (push_template_decl): Correct setting of 'primary'.
10880         (reduce_template_parm_level): Add 'levels' parm.
10881         (finish_member_template_decl): Support member class templates.
10882         (template_class_depth): Handle multiple levels.
10883         * parse.y (component_decl_1, fn.def2): Remove member template case.
10884         (component_decl): Add member template cases.
10885         * decl2.c (check_member_template): We now handle member template
10886         classes.
10887         * decl.c (pushtag): Handle member templates.
10888         * method.c (do_inline_function_hair): Don't touch
10889         IDENTIFIER_GLOBAL_VALUE.
10890         * init.c (build_offset_ref): If name isn't an identifier, just
10891         return it.
10892         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10893
10894         * typeck.c (get_delta_difference): Do adjust for conversions to
10895         and from virtual base.
10896
10897 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
10898
10899         * typeck.c (get_delta_difference): Give hard error for conversion
10900         from virtual base.
10901
10902         * cp-tree.h: Tweak formatting.
10903
10904 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
10905
10906         * decl.c (push_namespace): Handle redeclaration error.
10907
10908         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10909         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10910         (NAMESPACE_BINDING): New macro.
10911         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10912         * *.c: Use them.
10913
10914         * pt.c (push_template_decl): Use innermost_args.
10915
10916         * decl.c (get_unique_name): Tweak from earlier in the name.
10917
10918 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10919
10920         * cp-tree.def: Add CPLUS_BINDING node.
10921         * cp-tree.h (tree_binding): New struct.
10922         (BINDING_SCOPE, BINDING_VALUE): New macros.
10923         (current_namespace, global_namespace): Declare extern.
10924         (struct lang_decl_flags): New field in_namespace.
10925         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10926         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10927         (TREE_INDIRECT_USING): New macro.
10928         * decl2.c (current_namespace, global_namespace): Declare.  The
10929         value is a NAMESPACE_DECL now, not a TREE_LIST.
10930         (is_namespace_ancestor, namespace_ancestor): New static functions.
10931         (add_using_namespace, ambiguous_decl): Likewise.
10932         (lookup_using_namespace): New support function for lookup_name.
10933         (qualified_lookup_using_namespace): New support function for
10934         do_scoped_id and lookup_namespace_name.
10935         (get_namespace_id): Mark as obsolete.
10936         (current_namespace_id): Likewise.
10937         (do_namespace_alias): Implement.
10938         (do_using_directive): Implement as call to add_using_namespace.
10939         * decl.c (binding_for_name): New function.
10940         (push_namespace, pop_namespace): Implement.
10941         (push_decl): Don't install a FUNCTION_DECL in the global branch.
10942         (lookup_namespace_name): Implement using qualified lookup.
10943         (lookup_name_real): For global scoping, lookup in
10944         global_namespace.  For namespace scoping, lookup in given
10945         namespace.  For unscoped lookup, iterate over namespace,
10946         considering using directives.
10947         (init_decl_processing): Initialize global_namespace.
10948         (grokvardecl): Build assembler name as static name for globals.
10949         (grokdeclarator): Remove old namespace mangling.
10950         (xref_tag): When installing a global binding for the
10951         tag, make sure we have an identifier.
10952         * method.c (build_overload_nested_name): Mangle namespaces.
10953         (build_qualified_name): Likewise.
10954         (build_decl_overload_real): Likewise.
10955         * lex.c (build_lang_decl): Set namespace for new declaration to
10956         current_namespace.
10957         (do_scoped_id): Find global names in global or current
10958         namespace, or using qualified namespace lookup, depending on
10959         context.
10960         * init.c (build_member_call): When scope is namespace, use
10961         build_x_function_call instead.
10962         (build_offset_ref): When scope is namespace, collapse processing
10963         to lookup_namespace_name instead.
10964         * error.c (dump_decl): Support NAMESPACE_DECL.
10965         * decl.c (pushdecl): Bind globals to current namespace.
10966         (push_overloaded_decl): Likewise.
10967         (lookup_tag): Likewise.
10968         (lookup_name_current_level): Likewise.
10969         (xref_tag): Likewise.
10970         (start_function): Likewise.
10971         * lex.c (do_identifier): Likewise.
10972         (identifier_typedecl_value): Likewise.
10973         (real_yylex): Likewise.
10974         * method.c (do_inline_function_hair): Likewise.
10975         * parse.y (unscoped): Likewise.
10976         * pt.c (check_explicit_specialization): Likewise.
10977         (lookup_template_class): Likewise.
10978         * rtti.c (call_void_fn): Likewise.
10979         * sig.c (build_sigtable): Likewise.
10980         * ptree.c (lang_print_xnode): New function.
10981
10982 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
10983
10984         * pt.c (instantiate_class_template): Don't instantiate if pedantic
10985         and the args use template parms.
10986
10987         * pt.c (push_tinst_level): If the instantiation uses template parms,
10988         fail silently.
10989         * decl.c (xref_basetypes): Do call complete_type for basetypes
10990         that involve template parameters.
10991
10992 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10993
10994         * typeck2.c (process_init_constructor): Fix labeled init check.
10995
10996 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10997
10998         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10999         argument to tsubst and friends.
11000
11001         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11002
11003         * typeck.c (build_x_function_call): Handle static member function
11004         templates like non-templates.  Handle friend templates like normal
11005         function templates.
11006         * pt.c (tsubst, *_PARM): Don't use orig_level.
11007         (get_bindings): Don't call add_to_template_args.
11008         (instantiate_template): Likewise.
11009         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11010         * ptree.c (print_lang_type): Print index/level for template parms.
11011
11012 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11013
11014         * Make-lang.in (cc1plus): Note that cc1plus depends on
11015         cp/cp-tree.h and cp/cp-tree.def.
11016
11017         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11018         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11019         position in a template parameter list.
11020         * cp-tree.h (template_parm_index): New structure, used as the tree
11021         structure for a TEMPLATE_PARM_INDEX.
11022         (TEMPLATE_PARM_IDX): New macro.
11023         (TEMPLATE_PARM_LEVEL): Likewise.
11024         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11025         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11026         (TEMPLATE_PARM_DECL): Likewise.
11027         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11028         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11029         (TEMPLATE_TYPE_DECL): Likewise.
11030         (TEMPLATE_CONST_IDX): Remove.
11031         (TEMPLATE_CONST_LEVEL): Likewise.
11032         (TEMPLATE_CONST_SET_INFO): Likewise.
11033         (TEMPLATE_TYPE_SET_INFO): Likewise.
11034         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11035         node.
11036         (TEMPLATE_TYPE_LEVEL): Likewise.
11037         * decl.c (decls_match): Call comp_template_parms, rather than
11038         expanding it inline.
11039         (duplicate_decls): If two template declarations are being merged,
11040         then their TEMPLATE_INFOs should be merged as well.
11041         (grokfndecl): Save template-id information when declaring a friend
11042         with explicit template arguments.  Pass arguments to
11043         check_explicit_specialization via correct convention; at some
11044         point check_explicit_specialization changed, but these call-sites
11045         did not.
11046         (grokdeclarator): Tidy up slightly.
11047         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11048         two template functions with the same DECL_ASSEMBLER_NAME the same,
11049         since the names are not yet mangled.
11050         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11051         TEMPLATE_CONST_PARM.
11052         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11053         decl for a non-type parameter, rather than printing `<tparm ...>'.
11054         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11055         (do_friend): Deal with template friends.
11056         * lex.c (do_pending_inlines): Call
11057         maybe_begin_member_template_processing, rather than
11058         conditionally calling begin_member_template_processing.
11059         (process_next_inline): Likewise.  Call
11060         maybe_end_member_template_processing, rather than
11061         conditionally calling end_member_template_processing.
11062         (do_pending_defargs): Likewise.
11063         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11064         TEMPLATE_CONST_PARM.
11065         * method.c (build_mangled_template_parm_index): New function.
11066         (build_overload_value): Use it.
11067         (build_overload_name): Likewise.
11068         * pt.c (finish_member_template_decl): Allow friend declarations.
11069         (template_class_depth): New function.
11070         (is_member_template): Rename, and modify, to become...
11071         (is_member_or_friend_template): New function.
11072         (end_member_template_processing): Rename, and modify, to become...
11073         (maybe_end_member_template_processing).
11074         (build_template_parm_index): New function.
11075         (reduce_template_parm_level): New function.
11076         (process_template_parm): Modify to use build_template_parm_index.
11077         (push_template_decl): Deal with friend templates.
11078         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11079         TEMPLATE_CONST_PARM.
11080         (tsubst_friend_function): New function.
11081         (instantiate_class_template): Generate the DECL_FRIENDLIST
11082         for a new instantiation by using tsubst_friend_function rather
11083         than just tsubst.
11084         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11085         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11086         appropriate new macros.  Use reduce_template_parm_level to
11087         generate lower-level template parameters.  Handle tsubst'ing into
11088         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11089         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11090         templates.  Similarly for the template parameters for a new
11091         template.
11092         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11093         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11094         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11095         (get_bindings): Call add_to_template_args if necessary.
11096         (instantiate_decl): Handle instantiations of friend templates.
11097         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11098         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11099         * spew.c (yylex): Do a little manual constant propagation to
11100         clarify the code.
11101
11102 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11103
11104         * error.c: Include sys/types.h.
11105
11106 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11107
11108         * method.c (build_mangled_name): Start CPP directives in column zero.
11109
11110 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11111
11112         * typeck2.c (process_init_constructor): Sorry about non-trivial
11113         labeled initializers.
11114         * parse.y (initlist): Re-enable labeled initializers.
11115
11116 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11117
11118         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11119         all callers changed.  Rely on the new parameter instead of arg
11120         being a TREE_LIST when determine whether we are working inside
11121         template template parameter.  Clean up is_type test.
11122
11123 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11124
11125         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11126         * typeck2.c (initializer_constant_valid_p): Allow conversions
11127         between pointers and references.
11128
11129 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11130
11131         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11132         if pedantic || warn_pointer_arith.
11133
11134 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11135
11136         * pt.c (unify): Handle TEMPLATE_DECL.
11137
11138 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11139
11140         * cp-tree.h (strip_attrs): Remove decl.
11141
11142 1998-02-18  Doug Evans  <devans@cygnus.com>
11143
11144         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11145         Update olddecl's attributes too.
11146         (strip_attrs): Remove function.
11147         * typeck.c (common_type): Call merge_machine_type_attributes.
11148
11149 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11150
11151         * parse.y (initdcl0_innards): New grammar symbol.
11152         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11153         none, since the resulting value is never used.
11154         (parse_decl): New function.
11155         (datadef): Remove redundant actions.
11156         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11157         * parse.c: Regenerated.
11158
11159 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11160
11161         * parse.y (simple_stmt): Use getdecls() to check for decl.
11162
11163 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11164
11165         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11166         macros.
11167         (c++.install-common): Install c++filt properly as native or as cross
11168         variant.
11169         (c++.uninstall): Add c++filt.
11170
11171 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11172
11173         * call.c (standard_conversion): Fix multi-level ptr conversions.
11174
11175 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11176
11177         * init.c (build_new): Propagate error_mark_node up.
11178
11179 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11180
11181         * parse.y (simple_stmt): If the condition isn't a declaration,
11182         start the controlled block after the test.
11183
11184 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11185
11186         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11187         tree-codes.
11188         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11189         builtins.
11190
11191 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11192
11193         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11194
11195 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11196
11197         * cp-tree.h: Add access_protected_virtual_node.
11198         * class.c (init_class_processing): Initialize it.
11199         * decl.c (xref_basetypes): Use it.
11200         * parse.y (base_class_access_list): Likewise.
11201
11202         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11203         (c++.install-common): Install c++filt.
11204
11205 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11206
11207         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11208
11209 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11210
11211         * call.c (reference_binding): Use comptypes when comparing
11212         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11213
11214 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11215
11216         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11217         (really_overloaded_fn): Move check here from is_overloaded_fn.
11218         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11219
11220 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11221
11222         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11223         conversions.
11224
11225 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11226
11227         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11228         equivalent duplicate.
11229         * decl.c (pushtag): Use the return value from push_template_decl.
11230         (duplicate_decls): When duplicating a template declaration, merge
11231         the DECL_TEMPLATE_RESULTs as well.
11232         (make_implicit_typename): Don't try to dive into typename types to
11233         find a context for making a new implicit typename.
11234         (start_decl): Use the return value from push_template_decl.
11235         (grokdeclarator): Complain about declarations list `const operator
11236         int'.  Since we don't correctly handle in-class initializations of
11237         non-static data members, complain about this (now illegal)
11238         practice.  Issue an error for initializations of non-const statics
11239         since that is illegal as well, and since we don't handle that case
11240         correctly either.
11241         (start_function): Use the return value from push_template_decl.
11242         (start_method): Likewise.
11243         * decl2.c (grokfield): Likewise.  Since the change to
11244         grokdeclarator ensures that all initialized fields are in fact
11245         static, remove a redundant test for TREE_PUBLIC.
11246         * parse.y (initlist): Disable labeled initializers since they do
11247         not work as per the documentation, and since they do not use the
11248         same syntax as the C front end.
11249         * pt.c (push_template_decl): Return the decl passed in, or an
11250         equivalent duplicate.
11251         (lookup_template_class): When searching in a nested context,
11252         use the right arguments.
11253         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11254         * typeck.c (build_component_ref): Assign the correct type to the
11255         result of build_vfn_ref.
11256
11257 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11258
11259         * pt.c (convert_nontype_argument): Fix typo.
11260         (check_explicit_specialization): Allow old-style specialization
11261         of class template members.
11262
11263 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11264                           Manfred Hollstein  <manfred@s-direktnet.de>
11265
11266         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11267         when deciding to override DECL_ASSEMBLER_NAME.
11268
11269 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11270
11271         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11272         * cp-tree.h (flag_do_squangling): Add declaration.
11273         * lang-options.h: Add -fsquangle and -fno-squangle.
11274         * method.c: Add macros and static variables for squangling.
11275         (build_overload_name): Rename to build_mangled_name, add logic for B
11276         compression, and split into process_modifiers and
11277         process_overload_item.
11278         (process_modifiers): New function, to handle constant, reference,
11279         and pointer types.
11280         (process_overload_item): New function, handles issue of type codes.
11281         (build_overload_name): New function, start squangling and call
11282         build_mangled_name.
11283         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11284         (start_squangling): New function to initialize squangling structs.
11285         (end_squangling): New function to destroy squangling structs.
11286         (nrepeats): Rename variable to Nrepeats.
11287         (issue_nrepeats): New function for issuing 'n' type repeats.
11288         (check_ktype): New function to check for type K name compression.
11289         (build_overload_nested_name): Add a check for K name compression.
11290         (build_qualified_name): Add a check for K name compression and don't
11291         use DECL_ASSEMBLER_NAME when squangling is on.
11292         (check_btype): New function, checks for B type compression.
11293         (build_static_name, build_decl_overload_real): Initiate squangling.
11294         (build_typename_overload, build_overload_with_type): Initiate
11295         squangling
11296
11297 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11298
11299         * method.c (make_thunk): Avoid name buffer overflow.
11300
11301 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11302
11303         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11304         don't define them yet.
11305
11306         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11307
11308 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11309
11310         * config-lang.in (diff_excludes): Use basename only.
11311
11312 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11313
11314         * tinfo2.cc: Add tinfo for signed char.
11315
11316 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11317
11318         * search.c (compute_access): Handle protected constructors in derived
11319         classes as accessible.
11320
11321 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11322
11323         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11324         Call convert_from_reference sooner.
11325
11326 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11327
11328         * cvt.c (ocp_convert): Obtain the constant values from constant
11329         decls even if the destination type is the same as the type of the
11330         decl.
11331
11332         * decl2.c (finish_file): Make sure that static inlines with
11333         definitions are not marked DECL_EXTERNAL before returning.
11334
11335 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11336
11337         * decl.c: Lose arg_looking_for_template.
11338         (lookup_name_real): Likewise.
11339         * parse.y: Lose processing_template_arg, template_arg1.
11340         (primary): Likewise.
11341         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11342
11343 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11344
11345         * error.c (dump_decl): Fix type of default arguments for template
11346         template parameters and nontype template parameters.
11347         * parse.y (template_parm): Handle invalid default template
11348         template arguments here.
11349
11350         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11351         for default template template argument.
11352         * pt.c (coerce_template_parms): Merge default template argument
11353         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11354         created.  Fix argument index in error message.
11355         * typeck.c (comptypes): Merge template argument comparison codes in
11356         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11357
11358 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11359
11360         * lex.c (file_name_nondirectory): Also check for '/'.
11361
11362 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
11363
11364         * parse.y (primary): Deal with statement-expressions in
11365         templates.
11366         * pt.c (tsubst_copy): Handle BIND_EXPR.
11367         * tree.c (mapcar): Likewise.
11368
11369         * call.c (add_template_candidate_real): Pass extra parameter to
11370         fn_type_unification.
11371         * cp-tree.h (fn_type_unification): Add parameter.
11372         * pt.c (fn_type_unification): Add additional parameter to deal with
11373         static member functions.
11374         (get_bindings): Deal with static member functions.
11375
11376         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11377         (revert_static_member_fn): Declare.
11378         * decl.c (revert_static_member_fn): Remove declaration.  Change
11379         linkage from internal to external.
11380         (cp_finish_decl): Deal with virtual functions in classes local to
11381         template functions.
11382         * decl2.c (finish_file): Don't forget to emit increment/decrement
11383         expressions in initializers for file-scope variables.
11384         * parse.y (typename_sub2): If the typename doesn't names a
11385         template, rather than a type, issue an error message.
11386         * pt.c (check_explicit_specialization): Handle specializations of
11387         static member functions.
11388         (coerce_template_parms): Handle offset references to lists of
11389         member functions.
11390         * search.c (note_debug_info_needed): Don't crash when handed a
11391         type which is being defined.
11392         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11393         that can happen with some illegal code.
11394
11395 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11396
11397         * call.c (user_harshness): Initialize `code' to 0.
11398         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11399         (null_ptr_cst_p): Add parentheses around && within ||.
11400         (standard_conversion): Likewise.
11401         (z_candidate): Likewise.
11402         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11403         (build_object_call): Likewise for `mem_args'.
11404         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
11405         default case in enumeration switch.
11406
11407         * class.c (build_vtable_entry): Add explicit braces to avoid
11408         ambiguous `else'.
11409         (build_class_init_list): Likewise.
11410         (finish_struct_1): Initialize `width' to 0.
11411         (instantiate_type): Initialize `name' to NULL_TREE.  Add
11412         explicit braces to avoid ambiguous `else'.
11413
11414         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11415         `else'.
11416
11417         * decl.c (grok_reference_init): Eliminate unused parameter, all
11418         callers changed.
11419         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11420         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11421         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11422         (grokdeclarator): Add parentheses around && within ||.  Add
11423         explicit braces to avoid ambiguous `else'.
11424         (grokparms): Initialize `type' to NULL_TREE.
11425         (xref_tag): Remove unused label `just_return'.
11426         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11427         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11428         (hack_incomplete_structures): Add parentheses around assignment
11429         used as truth value.
11430
11431         * decl2.c (coerce_delete_type): Hide definition of `e3'.
11432
11433         * error.c: Include <stdlib.h>.
11434         (dump_expr): Change the type of `i' to size_t.  Remove unused
11435         label `error'.
11436
11437         * except.c (init_exception_processing): Remove unused variable `d'.
11438         (expand_throw): Likewise for `label'.
11439
11440         * friend.c (add_friends): Add explicit braces to avoid ambiguous
11441         `else'.
11442
11443         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11444         (sort_base_init): Likewise for `binfo'.
11445         (expand_member_init): Likewise for `rval'.
11446         (build_member_call): Add parentheses around assignment used as
11447         truth value.
11448         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11449         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
11450         `old_immediate_size_expand' to 0.
11451         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11452         (build_vec_delete_1): Remove unused variable `block'.
11453         (expand_vec_init): Initialize `itype' to NULL_TREE.
11454
11455         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
11456         declaration of `index' and `rindex' with autoconf macros.
11457         (reinit_parse_for_expr): Remove unused variables
11458         `look_for_semicolon' and `look_for_lbrac'.
11459         (cons_up_default_function): Initialize `args' to NULL_TREE.
11460         (readescape): Initialize `firstdig' to 0.
11461         (real_yylex): Add parentheses around assignment used as truth value.
11462
11463         * method.c: Include <strings.h> if we don't have <string.h>.
11464         Protect declaration of `index' with autoconf macro.
11465
11466         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11467         Initialize `type' to NULL_TREE.
11468         (structsp): Remove unused variable `id'.
11469
11470         * pt.c (coerce_template_parms): Add explicit braces to avoid
11471         ambiguous `else'.
11472         (lookup_template_class): Initialize `template' to NULL_TREE.
11473         (instantiate_class_template): Remove unused variable `name' and `e'.
11474         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
11475         (do_poplevel): Initialize `saved_warn_unused' to 0.
11476         (type_unification): Remove unused varable `parm'.
11477         (unify): Likewise for `j'.
11478
11479         * repo.c (init_repo): Add parentheses around assignment used as
11480         truth value.
11481         (finish_repo): Remove unused varable `p'.
11482
11483         * search.c (get_binfo): Initialize `type' to NULL_TREE.
11484         (get_base_distance): Likewise.
11485         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11486         and `new_v' to NULL_TREE.
11487         (lookup_fnfields): Likewise for `rval_binfo_h'.
11488         (breadth_first_search): Add parentheses around assignment used as
11489         truth value.
11490         (get_template_base): Initialize `type' to NULL_TREE.
11491
11492         * sig.c (append_signature_fields): Initialize `last_mfptr' to
11493         NULL_TREE.
11494         (build_signature_table_constructor): Likewise for
11495         `last_rhs_field', `pfn' and `vt_off'.
11496         (build_sigtable): Likewise for `init'.
11497
11498         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11499         (propagate_binfo_offsets): Likewise for `delta'.
11500         (hash_tree_cons): Initialize hashcode to 0.
11501         (can_free): Likewise for `size'.
11502         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11503
11504         * typeck.c (convert_sequence): Hide prototype.
11505         (common_type): Add explicit braces to avoid ambiguous `else'.
11506         (comp_target_types): Likewise.
11507         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11508         (build_function_call_real): Add explicit braces to avoid ambiguous
11509         `else'.
11510         (convert_arguments): Initialize `called_thing' to 0.
11511         (convert_for_initialization): Initialize `savew' and `savee' to 0.
11512
11513         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11514         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11515         (build_x_arrow): Likewise for `last_rval'.
11516
11517         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11518
11519 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
11520
11521         * decl.c (init_decl_processing): Use set_sizetype.
11522         * decl2.c (sizetype): Don't declare.
11523         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11524         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11525         (build_component_addr, unary_complex_lvalue): Likewise.
11526         * rtti.c (expand_class_desc): Likewise.
11527         * class.c (get_vfield_offset): Likewise.
11528
11529 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
11530
11531         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11532         early to avoid bogus error.  Handle overloaded function
11533         names provided as template arguments correctly.
11534         (coerce_template_parms): Don't mishandle overloaded functions when
11535         dealing with template template parameters.
11536         (lookup_template_class): Issue an error message, rather than
11537         crashing, when the TYPE_DECL provided is not a template type.
11538
11539 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11540
11541         * class.c (instantiate_type): Don't just return a known type if
11542         it's wrong.
11543
11544 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
11545
11546         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11547         since that code could never be reached.
11548
11549         * error.c (dump_decl): Avoid aborting in the midst of printing an
11550         error message about an illegal template declaration.
11551
11552         * parse.y (structsp): Print an error message, rather than crashing,
11553         when a class-head does not name a class.
11554
11555         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
11556         template arguments as a g++ extension.
11557
11558         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11559         * decl2.c (grok_alignof): If processing_template_decl, just store
11560         the expression.
11561         * typeck.c (c_alignof): Likewise.
11562         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11563         * error.c (dump_expr): Likewise.
11564         * pt.c (tsubst_copy): Likewise.
11565         * tree.c (cp_tree_equal): Likewise.
11566         * pt.c (uses_template_parms): Correctly determine whether or not a
11567         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11568         folding can be done.
11569
11570         * cp-tree.h (grok_enum_decls): Remove type parameter.
11571         * decl.c (grok_enum_decls): Likewise.
11572         * decl2.c (grok_x_components): Call grok_enum_decls
11573         unconditionally, since it will do nothing if there is no
11574         current_local_enum.  Use the new calling sequence.
11575         * pt.c (tsubst_enum): Use the new calling sequence for
11576         grok_enum_decls.
11577
11578         * decl.c (start_function): Make member functions of local classes
11579         in extern inline functions have comdat linkage here...
11580         (grokdeclarator): Rather than here.
11581
11582 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11583
11584         * pt.c (convert_nontype_argument): Use decl_constant_value.
11585
11586 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11587
11588         * call.c (add_template_candidate_real): New function.
11589         (add_template_candidate): Use it.
11590         (add_template_conv_candidate): Likewise.
11591         (joust): Pass extra argument to more_specialized.
11592         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11593         (is_local_class): Remove.
11594         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11595         * cp-tree.h (is_local_class): Remove.
11596         (perform_array_to_pointer_conversion): Likewise.
11597         (finish_member_template_decl): Add.
11598         (check_explicit_specialization): Return a tree, not an int.
11599         (more_specialized): Take additional argument.
11600         (get_bindings): Likewise.
11601         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11602         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11603         (perform_array_to_pointer_conversion): Remove.
11604         * decl.c (saved_scope): Add processing_specialization,
11605         processing_explicit_instantiation fields.
11606         (maybe_push_to_top_level): Save them.
11607         (pop_from_top_level): Restore them.
11608         (grokfndecl): Use new return value from
11609         check_explicit_specialization.
11610         (start_decl): Don't check flag_guiding_decls before pushing
11611         decls.
11612         (cp_finish_decl): Remove previous (bogus) change.
11613         (grok_declarator): Use decl_function_context rather than
11614         is_local_class.
11615         * decl2.c (finish_file): Pass extra argument to get_bindings.
11616         (build_expr_from_tree): Let build_x_component_ref check
11617         validity of arguments rather than doing it here.
11618         * lex.c (cons_up_default_function): Remove code fooling with
11619         processing_specialization, processing_explicit_instantiation
11620         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11621         * method.c (build_overload_identifier): Mangle local classes in
11622         template functions correctly.
11623         * parse.y (finish_member_template_decl): Move to pt.c.
11624         * pt.c (finish_member_template_decl): Moved here from parse.y.
11625         (print_candidates): New function.
11626         (determine_specialization): Change interface.  Properly look for
11627         most specialized versions of template candidates.
11628         (check_explicit_specialization): Fully process explicit
11629         instantiations.
11630         (push_template_decl): Avoid looking at CLASSTYPE fields in
11631         FUNCTION_DECLS.
11632         (determine_overloaded_function): Remove.
11633         (convert_nontype_argument): Change name from
11634         convert_nontype_parameter.  Use determine_overloaded_function
11635         instead of instantiate_type.
11636         (mangle_class_name_for_template): Handle type contexts as well as
11637         function contexts.
11638         (classtype_mangled_name): Likewise.
11639         (lookup_template_class): Likewise.
11640         (tsubst): Likewise.
11641         (more_specialized): Take explict template arguments as a
11642         parameter.
11643         (most_specialized): Likewise.
11644         (get_bindings): Likewise.  Check that return types match before
11645         proclaiming a function a match.
11646         (do_decl_instantiation): Remove code searching for function to
11647         instantiate; that is now done in check_explicit_specialization.
11648         (add_maybe_template): Pass extra argument to get_bindings.
11649         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11650         implementation.
11651         * typeck.c (build_component_ref): Check for invalid arguments.
11652
11653 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11654
11655         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11656         return_target and call_target are equivalent.
11657
11658         * pt.c (type_unification_real): Just accept function parms that
11659         don't use any template parms.
11660
11661 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11662
11663         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11664         unset DECL_NOT_REALLY_EXTERN.
11665
11666         * parse.y (typename_sub*): Fix std::.
11667
11668 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11669
11670         * error.c (dump_decl): Fix type default template args.
11671         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11672
11673 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11674
11675         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11676         (file_name_nondirectory): Use.
11677
11678 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11679
11680         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11681         that are not really present.  Substitute default arguments in
11682         template template arguments.  Correctly convert TEMPLATE_DECL to
11683         TEMPLATE_TEMPLATE_PARM.
11684         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11685         are no longer treated specially here.
11686         * parse.y (template_template_parm): Fix copy error.
11687         * decl.c (grokdeclarator): Warn about missing `typename' for nested
11688         type created from template template parameters.
11689         * parse.y (bad_parm): Likewise
11690
11691         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11692         (push_nested_class): Likewise.
11693         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11694         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11695         (copy_template_template_parm): Declare.
11696         * decl.c (arg_looking_for_template): New variable.
11697         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11698         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11699         node if arg_looking_for_template is nonzero.
11700         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11701         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11702         (grokdeclarator): Handle TEMPLATE_DECL.
11703         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11704         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11705         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11706         (dump_decl): Handle unnamed template type parameters.
11707         Handle template template parameters.
11708         (dump_function_name): Handle template template parameters.
11709         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11710         Handle TEMPLATE_TEMPLATE_PARM.
11711         * method.c (build_template_template_parm_names): New function.
11712         (build_template_parm_names): Handle TEMPLATE_DECL.
11713         (build_overload_nested_name, build_overload_name):
11714         Handle TEMPLATE_TEMPLATE_PARM.
11715         * parse.y (maybe_identifier): New nonterminal.
11716         (template_type_parm): Use it.
11717         (template_template_parm, template_arg1): New nonterminal.
11718         (template_parm): Add template_template_parm rules.
11719         (template_arg): Set processing_template_arg.
11720         (template_arg1): Rules moved from template_arg.
11721         (primary, nonnested_type): Set arg_looking_for_template if we are
11722         processing template arguments.
11723         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11724         (process_template_parm): Handle template template parameters.
11725         (coerce_template_parms, comp_template_args): Likewise.
11726         (mangle_class_name_for_template, lookup_template_class): Likewise.
11727         (uses_template_parms): Handle TEMPLATE_DECL and
11728         TEMPLATE_TEMPLATE_PARM.
11729         (current_template_args): Handle TEMPLATE_DECL.
11730         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11731         * search.c (dfs_walk, dfs_record_inheritance):
11732         Handle TEMPLATE_TEMPLATE_PARM.
11733         * tree.c (copy_template_template_parm): New function.
11734         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11735         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11736
11737 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
11738
11739         * decl.c (start_decl): Don't allow duplicate definitions of static
11740         data members.
11741
11742         * call.c (build_user_type_conversion_1): Handle user-defined
11743         template conversion operators correctly.
11744
11745         * decl2.c (build_expr_from_tree): Issue an error message if the
11746         object in a COMPONENT_REF is a TEMPLATE_DECL.
11747
11748         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11749
11750         * class.c (is_local_class): New function.
11751         * cp-tree.h (is_local_class): Declare it.
11752         (last_tree): Likewise.
11753         (begin_tree): Likewise.
11754         (end_tree): Likewise.
11755         (lookup_template_class): Change prototype.
11756         * decl.c (cp_finish_decl): Check for NULL where necessary.
11757         Consider FUNCTION_DECLS to declare objects with top-level binding,
11758         when calling make_decl_rtl.
11759         (grokdeclarator): Give members of local classes internal linkage.
11760         (start_function): Remove declaration of last_tree.
11761         (finish_function): Set flag_keep_inline_functions around call to
11762         rest_of_compilation if we are processing a member function in a
11763         local class.
11764         (start_method): Call push_template_decl for member functions of
11765         local classes in template functions.
11766         * decl2.c (import_export_decl): Don't give external linkage to
11767         instantiations of templates with internal linkage.
11768         * parse.y (last_tree): Remove declaration.
11769         (template_type): Pass extra parameter to lookup_template_class.
11770         (self_template_type): Likewise.
11771         (structsp): Move call to reset_specialization into left_curly.
11772         (left_curly): Call reset_specialization, and begin_tree.
11773         * pt.c (saved_trees): New variable.
11774         (mangle_class_name_for_template): Change prototype.  Use
11775         additional function context to name local classes in templates
11776         correctly.
11777         (classtype_mangled_name): Pass the context.
11778         (push_template_decl): Handle local classes and templates, and
11779         member functions for such classes.
11780         (convert_nontype_parameter): Fix handling of pointer-to-member
11781         constants.
11782         (lookup_template_class): Handle local classes in templates.
11783         (tsubst): Likewise.  Don't assume that template instantiations
11784         have external linkage; pay attention to the template declaration.
11785         (mark_decl_instantiated): Likewise.
11786         (begin_tree): New function.
11787         (end_tree): Likewise.
11788
11789         * decl.c (xref_basetypes): Don't call complete_type for basetypes
11790         that involve template parameters; that can lead to infinite
11791         recursion unnecessarily.
11792
11793         * pt.c (register_specialization): Do not register specializations
11794         that aren't ready to be registered yet.
11795         (check_explicit_specialization): Handle explicit specialization of
11796         constructors and destructors.
11797         (build_template_decl): New function.
11798         (push_template_delc): Handle out-of-class specializations of
11799         member templates.
11800
11801         * pt.c (check_explicit_specialization): Set up the template
11802         information before registering the specialization.
11803         (coerce_template_parms): Fix thinko.
11804         (tsubst): Handle specializations of member templates correctly.
11805
11806         * class.c (finish_struct_methods): Remove calls to
11807         check_explicit_specialization from here.
11808         (finish_struct): And insert them here.
11809         * cp-tree.h (perform_qualification_conversions): New function.
11810         (perform_array_to_pointer_conversion): Likewise.
11811         (begin_explicit_instantiation): Likewise.
11812         (end_explicit_instantiation): Likewise.
11813         (determine_specialization): Renamed from
11814         determine_explicit_specialization.
11815         (comp_template_parms): New function.
11816         (processing_explicit_instantiation): New variable.
11817         * cvt.c (perform_qualification_conversions): New function.
11818         (perform_array_to_pointer_conversion): Likewise.
11819         * decl.c (duplicate_decls): Don't consider template functions
11820         alike unless they have the same parameters.  Refine handling of
11821         instantiation/specialization mismatches.
11822         (start_decl): Don't call pushdecl for template specializations,
11823         since they don't affect overloading.
11824         (start_function): Likewise.
11825         (grokfndecl): Call check_explicit_specialization a little later.
11826         Don't call duplicate_decls for memberm template specializations.
11827         (grokdeclarator): Don't update template_count for classes that are
11828         themselves specializations.  Remove use of `2' as parameter to
11829         grokfndecl since that value isn't used.
11830         * lex.c (cons_up_default_function): Save and restore
11831         processing_explicit_instantiation around calls to grokfield.
11832         * parse.y (finish_member_template_decl): New function.
11833         (component_decl_1): Use it.
11834         (fn.def2): Likewise.
11835         (template_arg_list_opt): New nonterminal.
11836         (template_type): Use it.
11837         (self_template_type): Likewise.
11838         (template_id): Likewise.
11839         (object_template_id): Likewise.
11840         (notype_template_declarator): Likwise.
11841         (begin_explicit_instantiation): Likewise.
11842         (end_explicit_instantiation): Likewise.
11843         (explicit_instantiation): Use them.
11844         * pt.c (coerce_template_parms): Add parameters.
11845         (processing_explicit_instantiation): New variable.
11846         (convert_nontype_parameter): New function.
11847         (determine_overloaded_function): Likewise.
11848         (begin_explicit_instantiation): Likewise.
11849         (end_explicit_instantiation): Likewise.
11850         (retrieve_specialization): Likewise.
11851         (register_specialization): Likewise.
11852         (processing_explicit_specialization): Removed.
11853         (determine_specialization): Handle specializations of member
11854         functions of template class instantiations.
11855         (check_explicit_specialization): Refine to conform to standard.
11856         (comp_template_parms): New function.
11857         (coerce_template_parms): Call convert_nontype_parameter.
11858         (tsubst): Refine handling of member templates.  Use
11859         register_specialization.
11860         (instantiate_template): Use retrieve_specialization.
11861         (do_decl_instantiation): Likewise.
11862         (instantiate_decl): Likewise.
11863         (type_unification): Improve handling of explict template
11864         arguments.
11865         * tree.c (mapcar): Return error_mark_node, rather than aborting,
11866         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11867         * typeck.c (build_unary_op): Call determine_specialization, rather
11868         than determine_explicit_specialization.
11869
11870 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
11871
11872         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11873
11874 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11875
11876         * error.c (dump_decl): For enum tags, output the tag, not its value.
11877
11878 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
11879
11880         * decl.c (init_decl_processing): Only call init_rtti_processing
11881         FLAG_RTTI is set.
11882
11883 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
11884
11885         * init.c (build_new_1): Split out from build_new.
11886         (build_new): Just return a NEW_EXPR.
11887         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11888
11889         * decl2.c (get_temp_regvar): Tweak.
11890
11891         * cp-tree.h (TREE_CALLS_NEW): Comment out.
11892         * class.c (resolves_to_fixed_type_p): Remove use.
11893         * method.c (build_opfncall): Likewise.
11894         * call.c (build_new_op): Likewise.
11895
11896 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11897
11898         * exception.cc (__eh_alloc, __eh_free): New fns.
11899         (__cp_push_exception, __cp_pop_exception): Use them.
11900         (__uncatch_exception): Call terminate here if no exception.
11901         * except.c (build_terminate_handler): New fn.
11902         (expand_start_catch_block): Use it.
11903         (expand_exception_blocks): Likewise.
11904         (alloc_eh_object): New fn.
11905         (expand_throw): Use it.  Protect exception init with terminate.
11906         * typeck.c (build_modify_expr): Remove code that ignores trivial
11907         methods.
11908
11909 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11910
11911         * call.c (add_builtin_candidate): Add default case in enumeration
11912         switch.
11913         (build_new_op): Likewise.
11914         (convert_like): Likewise.
11915         * cvt.c (build_expr_type_conversion): Likewise.
11916         * tree.c (real_lvalue_p): Likewise.
11917         (lvalue_p): Likewise.
11918         (cp_tree_equal): Likewise.
11919         * typeck.c (comptypes): Likewise.
11920         (build_component_ref): Likewise.
11921         (build_function_call_real): Likewise.
11922         (build_binary_op_nodefault): Likewise.
11923         (build_unary_op): Likewise.
11924         (build_modify_expr): Likewise.
11925         * typeck2.c (initializer_constant_valid_p): Likewise.
11926
11927 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
11928
11929         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11930
11931 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
11932
11933         * pt.c (coerce_template_parms): Make sure to digest_init if
11934         possible.
11935
11936         * decl.c (duplicate_decls): Make the newdecl virtual if the
11937         olddecl was, just as is done with other attributes of olddecl.
11938
11939 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
11940
11941         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11942         address of an OFFSET_REF.
11943
11944         * cp-tree.def: Add AGGR_INIT_EXPR.
11945         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11946         AGGR_INIT_EXPR where appropriate.
11947         * expr.c (cplus_expand_expr): Likewise.  Simplify.
11948
11949         * decl2.c (finish_file): Remove call to register_exception_table.
11950
11951 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11952
11953         * pt.c (instantiate_class_template): Don't do injection when
11954         processing_template_decl is true, as pollutes current_binding_level
11955         for base classes.
11956
11957 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
11958
11959         * pt.c (maybe_fold_nontype_arg): Add prototype.
11960
11961 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11962
11963         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11964         * error.c (dump_expr): Likewise.
11965
11966 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
11967
11968         * typeck.c (build_function_call_real): Remove "inline called before
11969         definition" pedwarn.
11970
11971         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11972
11973 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11974
11975         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11976
11977         * pt.c (type_unification_real): Change __null to type void* with
11978         a warning.
11979
11980 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
11981
11982         * call.c (implicit_conversion): Don't call
11983         build_user_type_conversion_1 with a NULL expr, since it will
11984         crash.
11985
11986         * pt.c (unify): Don't try to unify array bounds if either array is
11987         unbounded.
11988
11989 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11990
11991         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11992         Replace extern decls with casts.
11993
11994         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11995         Update last_parm_cleanup_insn.
11996         (store_after_parms): Remove.
11997         * cp-tree.h: Adjust.
11998
11999 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12000
12001         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12002         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12003         (import_export_vtable): Use make_decl_one_only instead of
12004         comdat_linkage for win32 tweak.
12005         (import_export_decl): Likewise.
12006         * pt.c (mark_decl_instantiated): Likewise.
12007
12008         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12009
12010 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12011
12012         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12013         * except.c (expand_builtin_throw): Remove.
12014         * cp-tree.h: Remove ptr_ptr_type_node.
12015         * decl.c: Likewise.
12016
12017 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12018
12019         * decl.c (ptr_ptr_type_node): Define.
12020         (init_decl_processing): Initialize it.
12021         * cp-tree.h: Declare it.
12022         * exception.cc (__cp_exception_info): Use __get_eh_info.
12023         (__cp_push_exception): Likewise.
12024         (__cp_pop_exception): Likewise.
12025
12026         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12027         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12028         saved_pc.
12029         (init_exception_processing): Removed saved_pc initialization.
12030
12031 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12032
12033         * pt.c (instantiate_decl): Defer all templates but inline functions.
12034
12035 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12036
12037         * init.c (expand_vec_init): Don't fold a list of parameters.
12038
12039         * decl.c (copy_args_p): Handle copy elision for types with virtual
12040         bases.
12041         * call.c (build_over_call): Likewise.
12042
12043 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12044
12045         * pt.c (lookup_template_function): Copy the template arguments,
12046         not just the list containing them, to the permanent obstack.
12047
12048 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12049
12050         * except.c (expand_start_catch_block): suspend_momentary for the
12051         terminate handler.
12052
12053         * error.c (dump_decl): Handle LOOKUP_EXPR.
12054
12055 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12056
12057         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12058         permanent obstack if we are processing a template decl.
12059         * typeck.c (build_static_cast): Likewise.
12060         (build_const_cast): Likewise.
12061         (build_reinterpret_cast): Likewise.
12062
12063         * pt.c (coerce_template_parms): Coerce some expressions, even
12064         when processing_template_decl.
12065
12066 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12067
12068         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12069         handling of pointer difference expressions.
12070
12071         * typeck.c (comp_target_types): Comparison of function/method types
12072         is independent of nptrs.
12073
12074 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12075
12076         * pt.c (tsubst): Avoid creating pointer to reference and
12077         reference to reference types.
12078
12079 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12080
12081         * parse.y (do_id): New nonterminal.
12082         (template_id): Use it.
12083
12084 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12085
12086         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12087         * spew.c (yylex): Don't do_identifier here.
12088         * decl2.c (build_expr_from_tree): Revert last change.
12089
12090         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12091         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12092
12093 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12094
12095         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12096         alloc_expr.
12097         * call.c (build_op_delete_call): Adjust.
12098
12099         * except.c (expand_end_catch_block): Lose rethrow region.
12100         (expand_start_catch_block): Likewise.
12101         (expand_end_catch_block): Don't expand_leftover_cleanups.
12102
12103 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12104
12105         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12106         DECL_TEMPLATE_INSTANTIATION).
12107
12108 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12109
12110         * tree.c (is_overloaded_fn): Handle getting a fn template.
12111         (really_overloaded_fn): Likewise.
12112         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12113         * pt.c (check_explicit_specialization): Tweak.
12114         (determine_explicit_specialization): Tweak.
12115
12116         * tree.c, cp-tree.h (get_target_expr): New fn.
12117
12118 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12119
12120         * pt.c (check_explicit_specialization): Fix misspelling in
12121         diagnostic: `preceeded'.
12122         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12123         `conversiona'.
12124
12125 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12126
12127         * pt.c (determine_explicit_specialization): Avoid an internal
12128         error for bad specializations.
12129
12130         * method.c (build_overload_value): Handle SCOPE_REF.
12131
12132 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12133
12134         * class.c (prepare_fresh_vtable): Enable even more complex MI
12135         vtable names.
12136
12137 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12138
12139         * exception.cc (__check_eh_spec): Optimize a bit.
12140
12141         * exception.cc (__cp_pop_exception): Lose handler arg.
12142         * except.c (do_pop_exception): Likewise.
12143         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12144         (expand_end_catch_block): Likewise.
12145
12146 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12147
12148         * pt.c (check_explicit_specialization): Complain about using a
12149         template-id for a non-specialization.
12150
12151 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12152
12153         * repo.c: Prototype rindex only if needed.
12154         * xref.c: Likewise.
12155
12156 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12157
12158         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12159
12160 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12161
12162         * typeck.c (build_const_cast): Handle references here instead of
12163         handing off to convert_to_reference.
12164
12165         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12166         TerminateFunctionCall.
12167         (init_exception_processing): Likewise.  Terminate et al are now
12168         the fns, not ADDR_EXPRs.
12169         (various): Lose redundant assemble_external calls.
12170         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12171
12172         * cp-tree.h (struct lang_decl_flags): Add comdat.
12173         (DECL_COMDAT): New macro.
12174         * decl.c (duplicate_decls): Propagate it.
12175         (cp_finish_decl): Handle it.
12176         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12177
12178         * class.c: Remove static pending_hard_virtuals.
12179         (add_virtual_function): Take pointers to pending_virtuals
12180         and pending_hard_virtuals.
12181         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12182
12183 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12184
12185         * decl2.c (import_export_vtable): If we support one_only but not
12186         weak symbols, mark instantiated template vtables one_only.
12187         (import_export_decl): Likewise for tinfo functions.
12188         (finish_vtable_vardecl): Also write out vtables from explicitly
12189         instantiated template classes.
12190         * pt.c (mark_class_instantiated): Revert last change.
12191
12192         * except.c (expand_throw): Call mark_used on the destructor.
12193
12194 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12195
12196         * lex.c (lang_init): Enable flag_exceptions by default if no
12197         command line switch was specified.
12198
12199 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12200
12201         * pt.c (unify): Handle `void' template parameters in
12202         specializations.
12203
12204 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12205
12206         * rtti.c (build_dynamic_cast): Handle template case here.
12207         (build_dynamic_cast_1): Not here.
12208
12209         * typeck2.c (digest_init): Make copies where appropriate.
12210
12211         * decl2.c (delete_sanity): resolve_offset_ref.
12212
12213         * except.c: Call terminate without caching so many bits.
12214
12215         * except.c (expand_start_catch_block): Fix catching a reference
12216         to pointer.
12217
12218 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12219
12220         * init.c (build_new): Copy size to the saveable obstack.
12221
12222         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12223         TRY_CATCH_EXPR for now.
12224
12225 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12226
12227         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12228         has DECL_LANG_SPECIFIC.
12229
12230         * exception.cc (struct cp_eh_info): Add handlers field.
12231         (__cp_push_exception): Initialize it.
12232         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12233         (__throw_bad_exception): Remove.
12234         * except.c (call_eh_info): Add handlers field.
12235         (get_eh_handlers): New fn.
12236         (push_eh_cleanup): Increment handlers.
12237
12238 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12239
12240         * except.c (expand_start_eh_spec): Use the try/catch code.
12241         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12242         doing everything inline.
12243         (init_exception_processing): throw_type_match now takes
12244         const void pointers.
12245         * exception.cc (__check_eh_spec): New fn.
12246         * inc/exception: Neither terminate nor unexpected return.
12247         * decl.c: Make const_ptr_type_node public.
12248         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12249
12250         * except.c (expand_start_catch_block): We only need the rethrow
12251         region for non-sjlj exceptions.
12252         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12253
12254 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12255
12256         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12257         (various.o): Likewise.
12258         * inc/new: Add placement deletes.  Add throw specs for default new.
12259         * new.cc (set_new_handler): Move here from libgcc2.
12260         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12261         (new): Move from libgcc2.  Throw bad_alloc.
12262         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12263         * decl.c (init_decl_processing): Update exception specs on new and
12264         delete.
12265
12266         * method.c (build_decl_overload_real): Don't mess with global
12267         placement delete.
12268
12269         * init.c (build_new): Check for null throw spec, not nothrow_t.
12270
12271         * decl.c (duplicate_decls): Don't complain about different exceptions
12272         from an internal declaration.
12273
12274         * call.c (build_op_delete_call): Fix check for member fns again.
12275
12276         * decl2.c (import_export_decl): Interface hackery affects
12277         virtual synthesized methods.
12278
12279 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12280
12281         * decl.c (start_decl): Don't just complain about a mismatched
12282         scope, fix it.
12283
12284         * decl.c (make_implicit_typename): Handle case where t is not
12285         actually from context.
12286         * tree.c (get_type_decl): Lose identifier case.
12287         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12288         * parse.y (nonnested_type): Just use lookup_name.
12289         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12290
12291 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12292
12293         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12294         T was built in C language context (for example, by
12295         output_func_start_profiler).
12296
12297 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12298
12299         * decl.c (make_implicit_typename): New fn.
12300         (lookup_name_real): Use it.  Use current_class_type as the context.
12301
12302 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12303
12304         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12305
12306 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12307
12308         * friend.c (do_friend): Warn about non-template friends in templates.
12309
12310         * call.c (build_op_delete_call): Fix handling of inherited delete.
12311
12312         * search.c (dfs_record_inheritance): Ignore template type parms.
12313
12314 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12315
12316         * call.c (build_new_op): Fix copy error.
12317         (build_op_new_call): New fn.
12318         (build_op_delete_call): New fn.
12319         * cp-tree.h: Declare them.
12320         * init.c (build_new): Use them.  Support placement delete.
12321         (build_x_delete): Use build_op_delete_call.
12322         (build_delete): Likewise.
12323         * decl2.c (delete_sanity): Likewise.
12324         (coerce_delete_type): Don't complain about placement delete.
12325
12326 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12327
12328         * call.c (build_new_function_call): Remove unused 'obj' parm.
12329         * cp-tree.h, typeck.c: Adjust.
12330
12331         * init.c (build_new): Make the cleanup last longer.
12332         (expand_vec_init): Call do_pending_stack_adjust.
12333
12334 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12335
12336         * pt.c (do_type_instantiation): Fix typo.
12337         (mark_class_instantiated): If we support one_only but not weak
12338         symbols, don't mark this as known.
12339
12340         * init.c (build_new): Handle vec delete in EH cleanup.
12341
12342 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12343
12344         * call.c (build_method_call): Call complete_type before checking
12345         for destructor.
12346
12347 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12348
12349         * decl.c (add_block_current_level): Delete.
12350         * init.c (build_vec_delete_1): Delete build_block and
12351         add_block_current_level calls.
12352
12353 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12354
12355         * init.c (build_new): Handle freeing allocated memory when the
12356         constructor throws.
12357
12358         * call.c (build_new_method_call): Fix flags arg.
12359
12360         * pt.c (do_type_instantiation): Don't try to instantiate
12361         member templates.
12362         (mark_decl_instantiated): If we support one_only but not
12363         weak symbols, mark this one_only.
12364         * decl2.c (import_export_vtable): Don't defer handling of vtables
12365         if MULTIPLE_SYMBOL_SPACES.
12366
12367 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12368
12369         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12370
12371 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
12372
12373         * except.c (do_pop_exception): Return a value.
12374
12375 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12376
12377         * call.c (build_new_method_call): Handle getting a
12378         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
12379         if we got template parms.
12380         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12381         not just the args.
12382         * decl2.c (build_expr_from_tree): Tweak last change.
12383         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12384         (maybe_fold_nontype_arg): Split out from tsubst_copy.
12385         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12386
12387 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12388
12389         * pt.c (tsubst_copy): Handle explicit template arguments in
12390         function calls.
12391         * typeck.c (build_x_function_call): Likewise.
12392         * decl2.c (build_expr_from_tree): Lookup function name if it
12393         hasn't been done.
12394
12395         * pt.c (tsubst): Instantiate template functions properly when
12396         template parameter does not appear in function arguments and return
12397         type.
12398         (comp_template_args): Handle member templates required by tsubst.
12399
12400 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12401
12402         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12403         previous change.
12404
12405 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12406
12407         * pt.c (coerce_template_parms): Tweak error message.
12408
12409         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12410         return type defaults to `int', even if there are storage-class
12411         specifiers.
12412
12413 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12414
12415         Complete nested exception support.
12416         * except.c (do_pop_exception): Split out...
12417         (push_eh_cleanup): From here.  Handle the EH region by hand.
12418         (expand_start_catch_block): Add a new level for the catch parm.
12419         Move the rethrow region outside the two cleanup regions.
12420         Protect the initializer for the catch parm with terminate.
12421         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
12422         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
12423         popping off the middle of the stack.
12424         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12425         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12426         (build_cplus_new): Only wrap CALL_EXPRs.
12427         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12428         the constructor call.
12429
12430 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12431
12432         * Make-lang.in (c++.distdir): Make inc subdirectory.
12433
12434 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12435
12436         * decl2.c (finish_file): Put back some code.
12437
12438 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12439
12440         * decl2.c (finish_file): Remove redundant code.
12441         * method.c (emit_thunk): Don't let the backend defer generic thunks.
12442
12443 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12444
12445         * except.c (call_eh_info): Split out...
12446         (push_eh_info): From here.
12447         (expand_builtin_throw): Use it.
12448         (expand_start_catch_block): Move region start back.
12449
12450 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
12451
12452         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12453         (real_yylex): Record wide strings using target endianness, not host.
12454
12455 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
12456
12457         * repo.c (rindex): Add decl unconditionally.
12458         (get_base_filename, open_repo_file): Don't cast rindex.
12459         * xref.c (rindex): Add decl unconditionally.
12460         (index): Remove unused decl.
12461         (open_xref_file): Don't cast rindex.
12462
12463 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12464
12465         * class.c (build_vbase_path): Propagate the result type properly.
12466
12467 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
12468
12469         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12470         remaining use of saved_throw_type with a call to get_eh_type.
12471
12472 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
12473
12474         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12475         (file_name_nondirectory): New function, doing the same as the macro.
12476         (set_typedecl_interface_info): Use it instead of the macro.
12477         (check_newline): Likewise.
12478         (handle_cp_pragma): Likewise.
12479
12480         * repo.c (get_base_filename): Cast result of rindex to char*.
12481         (open_repo_file): Likewise.
12482         * xref.c (open_xref_file): Likewise.
12483         * error.c (dump_char): Make its arg int, not char.
12484
12485         * except.c (push_eh_info): Pass the number of fields - 1 down, not
12486         the exact number of fields.
12487
12488 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12489
12490         Support for nested exceptions.
12491         * tinfo2.cc (__is_pointer): New fn.
12492         * exception.cc (struct cp_eh_info): Define.
12493         (__cp_exception_info, __uncatch_exception): New fns.
12494         (__cp_push_exception, __cp_pop_exception): New fns.
12495         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12496         Lose empty_fndecl.
12497         (init_exception_processing): Likewise.  __eh_pc is now external.
12498         (push_eh_info): New fn.
12499         (get_eh_{info,value,type,caught}): New fns.
12500         (push_eh_cleanup): Just call __cp_pop_exception.
12501         (expand_start_catch_block): Use push_eh_info.  Start the eh region
12502         sooner.
12503         (expand_end_eh_spec): Use push_eh_info.
12504         (expand_throw): Call __cp_push_exception to set up the exception info.
12505         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
12506         when we rethrow.
12507         (expand_builtin_throw): Don't refer to empty_fndecl.
12508
12509 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12510
12511         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12512
12513 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
12514
12515         * method.c (build_template_parm_names, build_decl_overload_real):
12516         Add static to definitions.
12517         * pt.c (add_to_template_args, note_template_header,
12518         processing_explicit_specialization, type_unification_real): Likewise.
12519         ({determine,check}_explicit_specialization): Use a single string for
12520         error messages.
12521
12522 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12523
12524         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12525         (expand_end_catch_block): Likewise.
12526         (expand_end_eh_spec): Likewise.
12527
12528 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
12529
12530         * decl.c (duplicate_decls): Handle template specializations
12531         correctly.
12532         * error.c (dump_function_name): Fix printing of specializations of
12533         member functions that are not member templates.
12534         * cp-tree.h (processing_specialization): Make global.
12535         * pt.c (processing_specialization): Likewise.
12536         * lex.c (cons_up_default_function): Save and restore
12537         processing_specialization to avoid confusion.
12538
12539 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12540
12541         * decl.c (init_decl_processing): Give null_node unknown* type.
12542         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12543         (common_type): Likewise.
12544         * error.c (args_as_string): Recognize null_node.
12545
12546 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12547
12548         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12549         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12550
12551         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12552
12553         * Make-lang.in (g++): Include prefix.o.
12554
12555 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
12556
12557         * pt.c (determine_explicit_specialization): Initialize "dummy"
12558         to keep Purify quiet.
12559
12560 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12561
12562         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12563         (build_overload_int): Not here.
12564
12565 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12566
12567         * class.c (build_type_pathname): Remove.
12568         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12569
12570 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12571
12572         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12573         &&label GNU extension.
12574
12575 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12576
12577         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12578         so as to avoid incorrect manglings.
12579         * method.c (build_decl_overload_real): Don't mangle return types
12580         for constructors.
12581
12582 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12583
12584         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12585         scratch_tree_cons): Define as macros for now.
12586         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12587         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12588         typeck2.c: Use them and the expression_obstack variants.
12589
12590 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12591
12592         * decl.c (store_return_init): Allow classes with explicit ctors to
12593         be used with the named return values extension.
12594
12595 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12596
12597         * pt.c (instantiate_decl): Fix previous change.
12598
12599 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12600
12601         * pt.c (tsubst): Fix thinko.
12602         (instantiate_decl): Really use the original template.
12603
12604         * call.c (build_new_method_call): Use simple constructor_name for
12605         error messages.
12606
12607 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12608
12609         * method.c (build_underscore_int): Don't use ANSI specific
12610         features.
12611
12612 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12613
12614         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12615         for our key method; it might have been inlined by -O3.
12616
12617 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
12618
12619         * decl.c (make_typename_type): Do not try to call lookup_field for
12620         non-aggregate types.
12621
12622 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
12623
12624         * typeck.c (build_reinterpret_cast): Tweak.
12625
12626 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12627
12628         * typeck.c (build_reinterpret_cast): Converting a void pointer
12629         to function pointer with a reinterpret_cast produces a warning
12630         if -pedantic is issued.
12631
12632 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12633
12634         * typeck.c (c_expand_return): Don't warn about returning a
12635         reference-type variable as a reference.
12636
12637 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12638
12639         * method.c (build_static_name): Fix typo.
12640
12641 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
12642
12643         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12644         OLDDECL before we try to do DECL_USE_TEMPLATE.
12645
12646 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12647
12648         * decl.c (duplicate_decls): Don't warn about template instances.
12649
12650         * typeck.c (mark_addressable): Lose ancient code that unsets
12651         DECL_EXTERNAL.
12652
12653         * pt.c (do_decl_instantiation): Lose support for instantiating
12654         non-templates.
12655
12656         * call.c (build_new_function_call): Fix handling of null explicit
12657         template args.
12658         (build_new_method_call): Likewise.
12659
12660 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
12661
12662         * method.c (build_underscore_int): Fix typo.
12663
12664 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
12665
12666         * tree.c (print_lang_statistics): #if 0 call to
12667         print_inline_obstack_statistics until its definition is checked in.
12668
12669 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12670
12671         * decl2.c (finish_file): Move dump_tree_statistics to end.
12672
12673         * pt.c (instantiate_decl): Look for the original template.
12674         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12675         of member templates.
12676
12677 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12678
12679         * Makefile.in (g++FAQ.*): New rules.
12680         (CONFLICTS): Update.
12681         * g++FAQ.texi: Moved from libg++.
12682
12683         * parse.y (PFUNCNAME): Only specify the type once.
12684
12685 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
12686
12687         * lex.c (real_yylex): Clean up the code to fully behave the way
12688         the c-lex.c parser does for complex and real numbers.
12689
12690 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12691
12692         * method.c (build_decl_overload_real): Reformat.
12693
12694 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
12695
12696         * method.c (synthesize_method): If at_eof, determine our linkage.
12697
12698 1997-09-29  Paul Eggert  <eggert@twinsun.com>
12699
12700         * lex.c (real_yylex): Treat `$' just like `_', except issue a
12701         diagnostic if !dollars_in_ident or if pedantic.
12702
12703         * lang-specs.h (@c++): -ansi no longer implies -$.
12704
12705         * decl2.c (lang_decode_option):
12706         -traditional and -ansi now do not mess with
12707         dollars_in_ident.
12708
12709 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
12710
12711         * Makefile.in (parse.o, decl.o): Also depend on
12712         $(srcdir)/../except.h $(srcdir)/../output.h.
12713         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12714         $(srcdir)/../except.h $(srcdir)/../output.h.
12715         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12716         ../insn-codes.h.
12717
12718         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12719
12720         * expr.c (cplus_expand_expr): Make it static.
12721
12722         * decl2.c, init.c, typeck.c: Include "expr.h".
12723         (expand_expr): Use proper values when calling the function.
12724
12725 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12726
12727         * lang-options.h: New -Wold-style-cast flag.
12728         * cp-tree.h (warn_old_style_cast): New variable.
12729         * decl2.c (warn_old_style_cast): Likewise.
12730         (lang_decode_option): Support -Wold-style-cast.
12731         (reparse_absdcl_as_casts): Produce old-style-cast warning.
12732
12733 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12734
12735         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12736         TREE_USED, reset value based on already_used.
12737
12738         * init.c (expand_member_init): Revert change.
12739
12740 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12741
12742         * cp-tree.h, decl.c, decl2.c, pt.c:
12743         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
12744
12745         * decl2.c (lang_decode_option): Add missing ;.
12746
12747 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12748
12749         * friend.c (do_friend): Disable injection for all template-derived
12750         decls.
12751         * decl2.c (lang_decode_option): Handle -fguiding-decls.
12752         * parse.y (notype_template_declarator): New nonterminal.
12753         (direct_notype_declarator): Use it.
12754         (complex_direct_notype_declarator): Likewise.
12755         (object_template_id): Accept any kind of identifier after TEMPLATE.
12756         (notype_qualified_id): Don't add template declarators here.
12757
12758 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
12759
12760         * call.c (add_template_candidate): Add explicit_targs parameter.
12761         (build_scoped_method_call): Use it.
12762         (build_overload_call_real): Likewise.
12763         (build_user_type_conversion_1): Likewise.
12764         (build_new_function_call): Likewise.
12765         (build_object_call): Likewise.
12766         (build_new_op): Likewise.
12767         (build_new_method_call): Likewise.
12768         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12769         (build_new_method_call): Likewise.
12770
12771         * class.c (finish_struct_methods): Add specialization pass to
12772         determine which methods were specializing which other methods.
12773         (instantiate_type): Handle TEMPLATE_ID_EXPR.
12774
12775         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12776
12777         * cp-tree.h (name_mangling_version): New variable.
12778         (flag_guiding_decls): Likewise.
12779         (build_template_decl_overload): New function.
12780         (begin_specialization): Likewise.
12781         (reset_specialization): Likewise.
12782         (end_specialization): Likewise.
12783         (determine_explicit_specialization): Likewise.
12784         (check_explicit_specialization): Likewise.
12785         (lookup_template_function): Likewise.
12786         (fn_type_unification): Add explicit_targs parameter.
12787         (type_unification): Likewise.
12788
12789         * decl.c (duplicate_decls): Add smarts for explicit
12790         specializations.
12791         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12792         specializations.
12793         (grokfndecl): Call check_explicit_specialization.
12794
12795         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12796         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12797         (check_classfn): Handle specializations.
12798
12799         * error.c (dump_function_name): Print specialization arguments.
12800
12801         * friend.c (do_friend): Don't call pushdecl for template
12802         instantiations.
12803
12804         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12805
12806         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12807         and -fno-guiding-decls.
12808
12809         * lex.c (identifier_type): Return PFUNCNAME for template function
12810         names.
12811
12812         * method.c (build_decl_overload_real): New function.
12813         (build_template_parm_names): New function.
12814         (build_overload_identifier): Use it.
12815         (build_underscore_int): New function.
12816         (build_overload_int): Use it.  Add levels for template
12817         parameters.
12818         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
12819         (build_overload_nested_names): Handle template type parameters.
12820         (build_template_decl_overload): New function.
12821
12822         * parse.y (YYSTYPE): New ntype member.
12823         (nested_name_specifier): Use it.
12824         (nested_name_specifier_1): Likewise.
12825         (PFUNCNAME): New token.
12826         (template_id, object_template_id): New non-terminals.
12827         (template_parm_list): Note specializations.
12828         (template_def): Likewise.
12829         (structsp): Likewise.
12830         (fn.def2): Handle member template specializations.
12831         (component_decl_1): Likewise.
12832         (direct_notype_declarator): Handle template-ids.
12833         (component_decl_1): Likewise.
12834         (direct_notype_declarator): Handle template-ids.
12835         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12836
12837         * pt.c (processing_specializations): New variable.
12838         (template_header_count): Likewise.
12839         (type_unification_real): New function.
12840         (processing_explicit_specialization): Likewise.
12841         (note_template_header): Likewise.
12842         (is_member_template): Handle specializations.
12843         (end_template_decl): Call reset_specialization.
12844         (push_template_decl): Handle member template specializations.
12845         (tsubst): Likewise.
12846         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12847         (instantiate_template): Handle specializations.
12848         (instantiate_decl): Likewise.
12849         (fn_type_unification): Handle explicit_targs.
12850         (type_unification): Likewise.  Allow incomplete unification
12851         without an error message, if allow_incomplete.
12852         (get_bindings): Use new calling sequence for fn_type_unification.
12853
12854         * spew.c (yylex): Handle PFUNCNAME.
12855
12856         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12857         (really_overloaded_fn): Likewise.
12858         (get_first_fn): Handle function templates.
12859
12860         * typeck.c (build_x_function_call): Use really_overloaded_fn.
12861         Handle TEMPLATE_ID_EXPR.
12862         (build_x_unary_op): Likewise.
12863         (build_unary_op): Likewise.
12864         (mark_addressable): Templates whose address is taken are marked
12865         as used.
12866
12867 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12868
12869         * decl.c (init_decl_processing): Declare __builtin_constant_p as
12870         accepting any kind of type, not only int.
12871
12872 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12873
12874         * search.c (get_matching_virtual): Notice virtual bases when sorrying
12875         about covariant returns.
12876
12877         * parse.y (member_init): Also imply typename here.  Remove ancient
12878         extension for initializing base members.
12879
12880 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12881
12882         Handle multi-level typenames and implicit typename in base list.
12883         * parse.y (typename_sub{,[0-2]}): New rules.
12884         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12885         (nonnested_type): New rule.
12886         (complete_type_name): Use it.
12887         (base_class.1): Use typename_sub and nonnested_type.
12888         (nested_name_specifier): Don't elide std:: here.
12889         * decl.c (make_typename_type): Handle getting a type for NAME.
12890         (lookup_name_real): Turn std:: into :: here.
12891
12892         Rvalue conversions were removed in London.
12893         * call.c (is_subseq): Don't consider lvalue transformations.
12894         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12895         (joust): Re-enable ?: kludge.
12896
12897 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
12898
12899         * decl.c (start_function): Up warning of no return type to be a
12900         pedwarn.
12901
12902 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12903
12904         * init.c (expand_member_init): Don't set TREE_USED.
12905         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12906         set,don't clear TREE_USED wholesale.
12907
12908 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
12909
12910         * call.c (build_over_call): Do require_complete_type before
12911         build_cplus_new.
12912
12913 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12914
12915         * search.c (lookup_field): Call complete_type in all cases.
12916
12917         * decl.c (finish_function): Just warn about flowing off the end.
12918
12919 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12920
12921         * decl.c (grokparms): Don't bash a permanent list node if we're
12922         in a function.
12923
12924 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
12925
12926         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12927
12928 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12929
12930         * call.c (build_new_op): Give better error for syntactically
12931         correct, but semantically invalid, use of undeclared template.
12932
12933         * call.c (compare_qual): Handle pmfs.
12934
12935         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12936         after the exception spec.
12937
12938 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12939
12940         * call.c (null_ptr_cst_p): Integer type, not integral type.
12941
12942         * call.c (joust): Disable warnings until they can be moved to the
12943         right place.
12944
12945 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
12946
12947         * Makefile.in, config-lang.in:  Convert to autoconf.
12948
12949 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12950
12951         * decl.c (lookup_name_real): Add implicit 'typename' to types from
12952         base classes.
12953
12954         * pt.c (most_specialized_class): Fix typo.
12955         (tsubst): Move constant folding to TREE_VEC case.
12956
12957 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
12958
12959         * pt.c (do_poplevel): Don't warn about unused local variables
12960         while processing_template_decl since we don't always know whether
12961         or not they will need constructing/destructing.
12962
12963         * pt.c (uses_template_parms): Check the values of an enumeration
12964         type to make sure they don't depend on template parms.
12965
12966         * decl.c (make_typename_type): Don't lookup the field if the
12967         context uses template parms, even if we're not
12968         processing_template_decl at the moment.
12969
12970         * pt.c (coerce_template_parms): Avoid looking at the
12971         TYPE_LANG_DECL portion of a typename type, since there won't be
12972         one.
12973         (tsubst): Do constant folding as necessary to make sure that
12974         arguments passed to lookup_template_class really are constants.
12975
12976 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12977
12978         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12979         * decl2.c (finish_file): Only register exception tables if we
12980         need to.
12981
12982         * decl.c (init_decl_processing): Add __builtin_[fs]p.
12983
12984 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12985
12986         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12987
12988 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
12989
12990         * error.c (dump_decl): Avoid crashing when presented with a
12991         uninitialized constant, as can occur with a template parameter.
12992         (dump_expr): Make sure that there are enough levels of
12993         current_template_parms before we start diving through them.
12994
12995 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
12996
12997         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12998         c-typeck.c.
12999
13000 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13001
13002         * except.c (expand_throw): Call build_delete for all
13003         exception types, not just objects with destructors.
13004
13005 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13006
13007         * decl.c (current_local_enum): Remove static.
13008         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13009         in case template is expanded in enum decl.
13010         (instantiate_class_template): Use new tsubst_enum signature.
13011         (tsubst_expr): Likewise.
13012
13013 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13014
13015         * pt.c (begin_member_template_processing): Take a function as
13016         argument, not a set of template arguments.  Use the template
13017         parameters, rather than the arguments.  Handle non-type parameters
13018         correctly.  Push a binding level for the parameters so that multiple
13019         member templates using the same parameter names can be declared.
13020         (end_member_template_processing): Pop the binding level.
13021         (push_template_decl): Mark member templates as static when
13022         appropriate.
13023
13024         * lex.c (do_pending_inlines): Pass the function, not its template
13025         arguments, to begin_member_template_processing.
13026         (process_next_inline): Likewise.
13027         (do_pending_defargs): Likewise.
13028
13029         * error.c (dump_expr): Obtain the correct declaration for a
13030         TEMPLATE_CONST_PARM.
13031
13032         * call.c (add_template_conv_candidate): New function.
13033         (build_object_call): Handle member templates, as done in the other
13034         build_ functions.
13035
13036 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13037
13038         * decl.c (replace_defag): Undo previous change.
13039         * lex.c (do_pending_defargs): Deal with member templates.
13040
13041         * pt.c (is_member_template): Avoid crashing when passed a
13042         non-function argument.
13043
13044 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13045
13046         * class.c (grow_method): Remove check for redeclaration.
13047
13048 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13049
13050         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13051         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13052         (PRIMARY_TEMPLATE_P): Use it.
13053         * call.c (build_overload_call_real): Use it.
13054         * class.c (instantiate_type): Likewise.
13055         * decl.c (decls_match): Likewise.
13056         * method.c (build_overload_identifier): Likewise.
13057         * pt.c (push_template_decl): Likewise.
13058         (classtype_mangled_name): Likewise.
13059         (lookup_template_class): Likewise.
13060
13061         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13062         DECL_NTPARMS to conform to usage elsewhere.
13063         * call.c (add_template_candidate): Likewise.
13064         * class.c (instantiate_type): Likewise.
13065         * pt.c (instantiate_template): Likewise.
13066         (get_bindings): Likewise.
13067
13068         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13069         is_member_template.
13070
13071         * pt.c (unify): Undo changes to allow multiple levels of template
13072         parameters.
13073         (type_unification): Likewise.
13074         (fn_type_unification): Likewise.
13075         (get_class_bindings): Likewise.
13076         * cp-tree.h (Likewise).
13077
13078         * decl.c (replace_defarg): Check that the type of the default
13079         parameter does not invlove a template type before complaining
13080         about the initialization.
13081
13082         * error.c (dump_expr): Deal with template constant parameters in
13083         member templates correctly.
13084
13085         * pt.c (is_member_template): Deal with class specializations
13086         correctly.
13087         (tsubst): Handle "partial instantiation" of member templates
13088         correctly.
13089
13090 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13091
13092         * pt.c (type_unification): Change calling sequence to allow for
13093         multiple levels of template parameters.
13094         (tsubst_expr): Likewise.
13095         (tsubst): Likewise.
13096         (tsubst_copy): Likewise.
13097         (instantiate_template): Likewise.
13098         (unify): Likewise.
13099         * call.c (build_overload_call_real): Use it.
13100         (add_builtin_candidate): Use it.
13101         (build_new_method_call): Use it.
13102         * class.c (instantiate_type): Use it.
13103         * decl.c (grokdeclarator): Use it.
13104         * decl2.c (finish_file): Use it.
13105         * method.c (build_overload_identifier): Use it.
13106
13107         * call.c (add_template_candidate):  Add additional parameter for
13108         the function return type.  Call fn_type_unification istead of
13109         type_unification.
13110         (build_user_type_conversion_1): Handle member templates.
13111         (build_new_function_call): Likewise.
13112         (build_new_op): Likewise.
13113         (build_new_method_call): Likewise.
13114
13115         * class.c (grow_method): Don't give an error message indicating
13116         that two member templates with the same name are ambiguous.
13117         (finish_struct): Treat member template functions just like member
13118         functions.
13119
13120         * cp-tree.h (check_member_template): Add declaration.
13121         (begin_member_template_processing): Likewise.
13122         (end_member_template_processing): Likewise.
13123         (fn_type_unification): Likewise.
13124         (is_member_template): Likewise.
13125         (tsubst): Change prototype.
13126         (tsubst_expr): Likewise.
13127         (tsubst_copy): Likewise.
13128         (instantiate_template): Likewise.
13129         (get_bindings): Likewise.
13130
13131         * decl.c (decls_match): Handle multiple levels of template
13132         parameters.
13133         (pushdecl): Handle template type params just like other type
13134         declarations.
13135         (push_class_level_binding): Return immediately if the
13136         class_binding_level is NULL.
13137         (grokfndecl): If check_classfn() returns a member_template, use
13138         the result of the template, not the template itself.
13139
13140         * decl2.c (check_member_template): New function.  Check to see
13141         that the entity declared to be a member template can be one.
13142         (check_classfn): Allow redeclaration of member template functions
13143         with different types; the new functions can be specializations or
13144         explicit instantiations.
13145
13146         * error.c (dump_decl): Handle multiple levels of template
13147         parameters.
13148         (dump_function_decl): Update to handle function templates.
13149
13150         * lex.c (do_pending_inlines): Set up template parameter context
13151         for member templates.
13152         (process_next_inline): Likewise.
13153
13154         * method.c (build_overload_identifier): Adjust for multiple levels
13155         of template parameters.
13156
13157         * parse.y (fn.def2): Add member templates.
13158         (component_decl_1): Likewise.
13159
13160         * pt.c (begin_member_template_processing): New function.
13161         (end_member_template_processing): Likewise.
13162         (is_member_template): Likewise.
13163         (fn_type_unification): Likewise.
13164         (current_template_parms): Return a vector of all the template
13165         parms, not just the innermost level of parms.
13166         (push_template_decl): Deal with the possibility of member
13167         templates.
13168         (lookup_template_class): Likewise.
13169         (uses_template_parms): Likewise.
13170         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13171         TEMPLATE_CONST_PARM to deal with multiple levels of template
13172         arguments.   Add processing of TEMPLATE_DECL to produce new
13173         TEMPLATE_DECLs from old ones.
13174         (do_decl_instantiation): Handle member templates.
13175
13176         * search.c (lookup_fnfields_1): Handle member template conversion
13177         operators.
13178
13179         * tree.c (cp_tree_equal): Check the levels, as well as the
13180         indices, of TEMPLATE_CONST_PARMs.
13181
13182         * typeck.c (comptypes): Check the levels, as well as the indices,
13183         fo TEMPLATE_TYPE_PARMs.
13184         (build_x_function_call): Treat member templates like member
13185         functions.
13186
13187 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13188
13189         * typeck.c (c_expand_return): Always convert_for_initialization
13190         before checking for returning a pointer to local.
13191
13192         * pt.c (type_unification): If strict and the function parm doesn't
13193         use template parms, just compare types.
13194
13195 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13196
13197         * method.c (build_overloaded_value): Replace direct call
13198         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13199
13200 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13201
13202         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13203         of a set of overloaded functions.
13204
13205 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13206
13207         * lex.c (real_yylex): Don't elide __FUNCTION__.
13208
13209         * method.c (build_overload_value): Add in_template parm.
13210         (build_overload_int): Likewise.
13211         (build_overload_identifier): Pass it.
13212
13213         * decl.c (duplicate_decls): Don't bash a previous template
13214         definition with a redeclaration.
13215
13216         * pt.c (unify): float doesn't match double.
13217
13218         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13219         TYPE_DECL.  Handle getting non-template types.
13220         * parse.y (explicit_instantiation): Use typespec instead of
13221         aggr template_type.
13222
13223 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13224
13225         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13226
13227 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13228
13229         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13230         (compare_ics): Likewise.
13231
13232 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13233
13234         * call.c (joust): Warn about choosing one conversion op over
13235         another because of 'this' argument when the other return type is
13236         better.
13237         (source_type): New fn.
13238
13239         * call.c (build_new_op): Strip leading REF_BIND from first operand
13240         to builtin operator.
13241
13242         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13243         use its RTL.
13244
13245 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13246
13247         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13248
13249 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13250
13251         * typeck.c (expand_target_expr): Make definition match declaration.
13252
13253         * class.c (get_basefndecls): Make definition match declaration.
13254
13255 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13256
13257         * input.c (sub_getch): Eventually give up and release the input file.
13258
13259         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13260         right place.
13261
13262         * call.c (joust): Tweak message.
13263
13264 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13265
13266         * error.c (type_as_string): Put const/volatile on template type
13267         parameters where appropriate.
13268
13269 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13270
13271         * call.c (strictly_better): Make arguments unsigned ints.
13272
13273 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13274
13275         * lex.c (real_yylex): Refer to __complex instead of complex.
13276
13277 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13278
13279         * lex.c (real_yylex): Don't use getc directly.
13280
13281 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13282
13283         * call.c (is_subseq): Don't try to be clever.
13284
13285 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13286
13287         * parse.y, pt.c: Include "except.h".
13288         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13289         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13290         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13291         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13292         prototyping.
13293
13294 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13295
13296         * decl2.c (mark_vtable_entries): Instead of replacing pure
13297         virtuals with a reference to __pure_virtual, copy the decl and
13298         change the RTL.
13299
13300 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13301
13302         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13303
13304         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13305
13306         * pt.c (instantiate_class_template): Call repo_template_used
13307         before finish_prevtable_vardecl.
13308
13309         * call.c (is_subseq): New fn.
13310         (compare_ics): Use it.
13311
13312         * repo.c (finish_repo): Don't crash on no args.
13313
13314         * parse.y (named_complex_class_head_sans_basetype): Handle
13315         explicit global scope.
13316         * decl2.c (handle_class_head): New fn.
13317
13318         * pt.c (unify): Add CONST_DECL case.
13319
13320 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13321
13322         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13323
13324         * cp-tree.h (report_type_mismatch): Add prototype.
13325         * call.c (build_overload_call_real): Remove erroneous fourth
13326         argument to report_type_mismatch.
13327         (build_user_type_conversion_1): Remove erroneous second arg to
13328         tourney.
13329         (build_new_function_call): Likewise.
13330         (build_object_call): Likewise.
13331         (build_new_op): Likewise.
13332         (build_new_method_call): Likewise.
13333
13334 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13335
13336         * error.c (dump_decl): Don't bother processing a function with no
13337         DECL_LANG_SPECIFIC.
13338
13339         * method.c (emit_thunk): Call init_function_start in the macro case.
13340
13341 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13342
13343         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13344         defined and used to set flag_vtable_thunks.
13345
13346 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13347
13348         * parse.y: Don't clear the inlines from their obstack until they've
13349         all been processed.
13350
13351         * decl.c (duplicate_decls): Don't complain about exception
13352         specification mismatch if flag_exceptions is off.
13353
13354 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13355
13356         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13357
13358 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13359
13360         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13361         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13362         Include <stdio.h> before include files that formerly used STDIO_PROTO.
13363
13364         * decl.c, g++spec.c, lex.c, method.c, repo.c:
13365         Include "config.h" first, as per autoconf manual.
13366
13367 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13368
13369         * decl.c (duplicate_decls): Tweak wording.
13370         * lex.c (do_pending_defargs): Don't die if we see a default arg
13371         that isn't a DEFAULT_ARG.
13372         * error.c (dump_expr): Handle DEFAULT_ARG.
13373
13374         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13375         * lang-options.h: Add -fhandle-exceptions.
13376
13377         * class.c (build_vtable): Vtables are artificial.
13378         (prepare_fresh_vtable): Likewise.
13379
13380 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13381
13382         * cvt.c (ocp_convert): After converting to the target type, set
13383         LOOKUP_NO_CONVERSION.
13384
13385         * call.c (joust): Warn about potentially confusing promotion rules
13386         with -Wsign-promo.
13387         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13388
13389 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
13390
13391         * exception.cc: Declare __terminate_func with noreturn attribute.
13392
13393 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13394
13395         * parse.y: Break out eat_saved_input, handle errors.
13396         (function_try_block): Use compstmt instead of compstmt_or_error.
13397
13398 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13399
13400         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13401
13402 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13403
13404         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13405         existence of cc1plus check whether $(LANGUAGES) contains C++.
13406
13407 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13408
13409         * method.c (do_build_copy_constructor): When copying an anonymous
13410         union member loop around to handle nested anonymous unions.  Use
13411         the offset of the member relative to the outer structure, not the
13412         union.
13413
13414 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13415
13416         * call.c (resolve_args): New fn.
13417         (build_new_function_call): Use it.
13418         (build_object_call): Likewise.
13419         (build_new_method_call): Likewise.
13420
13421 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13422
13423         * call.c (build_over_call): tsubst all default parms from templates.
13424
13425 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13426
13427         * decl.c (struct cp_function): Add static_labelno.
13428         (push_cp_function_context): Save it.
13429         (pop_cp_function_context): Restore it.
13430
13431 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13432
13433         * typeck.c (build_component_ref_1): Convert from reference.
13434
13435 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13436
13437         * parse.y (current_declspecs, prefix_attributes): Initialize to
13438         NULL_TREE.
13439
13440         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13441         before we try to force it to be a TREE_LIST.
13442         (decl): Make sure $1.t is non-nil.
13443
13444 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13445
13446         * pt.c (uses_template_parms): Handle template first-parse codes.
13447
13448         * decl.c (cp_finish_decl): Only warn about user-defined statics.
13449
13450 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13451
13452         * pt.c (unify): Handle BOOLEAN_TYPE.
13453
13454         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13455         * pt.c (tsubst): Don't set it.
13456         * call.c (build_over_call): Use uses_template_parms.
13457
13458 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13459
13460         * method.c (build_overload_nested_name): Use static_labelno
13461         instead of var_labelno.
13462         (build_qualified_name): New fn.
13463         (build_overload_name): Split out from here.
13464         (build_static_name): Use build_qualified_name.
13465         * decl.c (cp_finish_decl): Statics in extern inline functions
13466         have comdat linkage.
13467         (start_function): Initialize static_labelno.
13468
13469 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13470
13471         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13472         before "all member functions in class [] are private".
13473
13474 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13475
13476         * lex.c (do_scoped_id): convert_from_reference.
13477         * init.c (build_offset_ref): Likewise.
13478
13479 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13480
13481         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13482
13483 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13484
13485         * typeck.c (get_member_function_from_ptrfunc): Promote index
13486         before saving it.
13487
13488 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13489
13490         * tree.c (layout_basetypes): Move non-virtual destructor warning.
13491         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13492
13493 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13494
13495         * decl.c (grokdeclarator): Call add_defarg_fn for the function
13496         type, too.
13497         * lex.c (add_defarg_fn): Adjust.
13498         (do_pending_defargs): Adjust.  Don't skip the first parm.
13499
13500 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13501
13502         * decl.c (build_enumerator): Global enumerators are also readonly.
13503
13504         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13505         (build_dynamic_cast): Call it and convert_from_reference.
13506
13507         * lex.c (add_defarg_fn): New fn.
13508         (snarf_defarg): Don't add to defarg_types.
13509         (do_pending_defargs): Lose defarg_types.  All fns we process now
13510         have defargs.
13511         * decl.c (grokfndecl): Call add_defarg_fn.
13512
13513         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13514         * cp-tree.def: Add DEFAULT_ARG.
13515         * spew.c (yylex): Call snarf_defarg as appropriate.
13516         * parse.y: New tokens DEFARG and DEFARG_MARKER.
13517         (defarg_again, pending_defargs, defarg, defarg1): New rules.
13518         (structsp): Use pending_defargs.
13519         (parms, full_parm): Use defarg.
13520         * lex.c (init_lex): Initialize inline_text_firstobj.
13521         (do_pending_inlines): Never pass the obstack to feed_input.
13522         (process_next_inline): Call end_input instead of restore_pending_input.
13523         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13524         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13525         * input.c (end_input): New fn.
13526         (sub_getch): At the end of some fed input, just keep returning EOF
13527         until someone calls end_input.
13528         Remove 'obstack' field from struct input_source.
13529         * decl.c (grokparms): Handle DEFAULT_ARG.
13530         (replace_defarg): New fn.
13531         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13532
13533 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13534
13535         * call.c (implicit_conversion): If nothing else works, try binding
13536         an rvalue to a reference.
13537
13538 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
13539
13540         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13541         ifndef for Cygwin32 to include SIGSEGV.
13542
13543 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13544
13545         * class.c (finish_struct_1): Only complain about pointers without
13546         copy stuff if there are any constructors.
13547
13548         * rtti.c (build_dynamic_cast): Call complete_type on the types.
13549
13550         * decl.c (grokfndecl): If the function we chose doesn't actually
13551         match, die.
13552
13553         * decl2.c (grokclassfn): Don't specify 'const int' for the
13554         artificial destructor parm.
13555
13556         * pt.c (type_unification): If we are called recursively, nothing
13557         decays.
13558
13559 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13560
13561         * decl.c (init_decl_processing): Stop trying to catch signals
13562         other than SIGABRT since the Cygwin32 library doesn't support
13563         them correctly yet.  This fixes a situation in which g++ causes
13564         a hang on SIGSEGVs and other such signals in our Win32-hosted
13565         tools.
13566
13567 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13568
13569         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13570
13571 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13572
13573         * typeck2.c (store_init_value): Always return the value if our
13574         type needs constructing.
13575
13576         * method.c (hack_identifier): Convert class statics from
13577         reference, too.
13578
13579 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13580
13581         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13582
13583 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13584
13585         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13586         the end of return x;
13587
13588 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13589
13590         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13591
13592 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13593
13594         * except.c (expand_builtin_throw): Add support
13595         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13596
13597 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13598
13599         * repo.c (extract_string): Null-terminate.
13600
13601         * cp-tree.h (TI_SPEC_INFO): New macro.
13602         (CLASSTYPE_TI_SPEC_INFO): New macro.
13603         * pt.c (push_template_decl): Correctly determine # of template parms
13604         for partial specs.
13605
13606         * call.c (compare_ics): Really fix 'this' conversions.
13607
13608         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13609         non-template fn.
13610
13611         * pt.c (push_template_decl): Complain about mismatch in # of
13612         template parms between a class template and a member template.
13613
13614 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13615
13616         * method.c (synthesize_method): You can't call
13617         function_cannot_inline_p after finish_function.
13618         * decl.c (finish_function): Turn on flag_inline_functions and turn
13619         off DECL_INLINE before handing a synthesized method to the
13620         backend.
13621
13622 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13623
13624         * method.c (synthesize_method): Remove July 30 change to never set
13625         DECL_INLINE if at_eof.
13626
13627 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
13628
13629         * xref.c (GNU_xref_member): Ensure that the node has a
13630         decl_lang_specific part before checking DECL_FRIEND_P.
13631
13632 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13633
13634         * pt.c (instantiate_class_template): Diagnose non-class types used
13635         as bases.
13636
13637 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13638
13639         * typeck.c (build_conditional_expr): Use convert_for_initialization
13640         instead of convert_and_check.
13641
13642 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13643
13644         * parse.y (typespec): Don't pedwarn for typeof.
13645
13646 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13647
13648         * repo.c (finish_repo): Only check changes if we would write a
13649         repo file.
13650
13651         * call.c (compare_ics): Fix handling of 'this' conversions.
13652
13653         * pt.c (do_decl_instantiation): Support static data too.  Rename
13654         from do_function_instantiation.
13655         * cp-tree.h: Adjust.
13656         * parse.y: Adjust.
13657
13658         * repo.c (extract_string): New fn.
13659         (get_base_filename): Use it.
13660         (init_repo): Compare old args with current args.
13661
13662 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
13663
13664         * Makefile.in, Make-lang.in: Protect C-ls with a comment
13665         character, idea from Paul Eggert <eggert@twinsun.com>.
13666
13667 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
13668
13669         * typeck.c (c_expand_return): Be more persistent in looking for
13670         returned temps.
13671
13672         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13673         pointer to reference.
13674
13675         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13676
13677 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13678
13679         * init.c (build_member_call, build_offset_ref):
13680         Use do_scoped_id instead of do_identifier.
13681
13682         * cvt.c (convert): Remove bogosity.
13683
13684 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13685
13686         * cvt.c (build_up_reference): Do checks of ARGTYPE and
13687         TARGET_TYPE before trying to use get_binfo.
13688
13689 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13690
13691         * cvt.c (build_up_reference): Call get_binfo to get access control.
13692
13693         * decl2.c (import_export_decl): If we don't support weaks, leave
13694         statics undefined.
13695
13696 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
13697
13698         * except.c (expand_builtin_throw): Add support for machines that
13699         cannot access globals after throw's epilogue when
13700         -fno-sjlj-exceptions is used.
13701
13702 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
13703
13704         * parse.y: 'std::' becomes '::'.
13705         * lex.c (real_yylex): Remove 'namespace' warning.
13706         * init.c (build_member_call): Ignore 'std::'.
13707         (build_offset_ref): Likewise.
13708         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13709         (do_toplevel_using_decl): Ignore 'using std::whatever'.
13710         * decl.c (push_namespace): Just sorry.
13711         (pop_namespace): Nop.
13712         (init_decl_processing): Declare std namespace.
13713
13714 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13715
13716         * search.c (push_class_decls): A name which ambiguously refers to
13717         several instantiations of the same template just refers to the
13718         template.
13719
13720 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
13721
13722         * decl.c (build_enumerator): Fix problem with unsigned long
13723         enumerated values being smashed to ints, causing overflow
13724         when computing next enumerated value (for enum values around
13725         MAX_VAL).
13726
13727 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13728
13729         * typeck.c (build_component_ref): Only call mark_used on a decl.
13730
13731 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13732
13733         * typeck.c (build_c_cast): Make the check for a ptr to function
13734         more specific before possible default_conversion call.
13735
13736 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
13737
13738         * except.c (expand_exception_blocks): Simplify and fix and make
13739         sure we don't end a region in a sequence, as expand_end_bindings
13740         doesn't like it.
13741
13742 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
13743
13744         * except.c (init_exception_processing): Mark terminate as not
13745         returning so that the optimizer can optimize better.
13746
13747 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
13748
13749         * cvt.c (convert): Don't do any extra work, if we can avoid it
13750         easily.
13751
13752 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
13753
13754         * *.[chy]: Change cp_convert to ocp_convert, change convert to
13755         cp_convert.  convert is now reserved for the backend, and doesn't
13756         have the semantics a frontend person should ever want.
13757
13758 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13759
13760         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13761         Lose -traditional support.
13762
13763 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13764
13765         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13766
13767         * parse.y (self_reference): Do it for templates, too.
13768         * class.c (pushclass): Don't overload_template_name; the alias
13769         generated by build_self_reference serves the same purpose.
13770
13771         * tree.c (list_hash): Make static, take more args.
13772         (list_hash_lookup): Likewise.
13773         (list_hash_add): Make static.
13774         (list_hash_canon): Lose.
13775         (hash_tree_cons): Only build a new node if one isn't already in the
13776         hashtable.
13777         (hash_tree_chain): Use hash_tree_cons.
13778         * cp-tree.h: Adjust.
13779         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13780         of calling lookup_name.
13781
13782 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13783
13784         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13785         doesn't refer to the CONST_DECLs.
13786
13787 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
13788
13789         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13790         is bigger.
13791         (expand_class_desc): Convert the last argument to a sizetype.
13792
13793 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13794
13795         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13796         __real__): Add reswords.
13797         * hash.h: Regenerate.
13798         * lex.h (rid): Add RID_COMPLEX.
13799         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13800         * lex.c (init_lex): Add building of RID_COMPLEX.
13801         (real_yylex): General cleanup in line with what c-lex.c also has,
13802         sans the cruft for traditional; add handling of SPEC_IMAG, complex
13803         types, and imaginary numeric constants.
13804         * parse.y (REALPART, IMAGPART): Add tokens.
13805         (unary_expr): Add REALPART and IMAGPART rules.
13806         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13807         * decl.c (complex_{integer,float,double,long}_type_node): Define
13808         types.
13809         (init_decl_processing): Set up the types.
13810         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
13811         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13812         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13813         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13814         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13815         COMPLEX_TYPE case.
13816         * method.c (build_overload_name): Add handling of the different
13817         COMPLEX_TYPEs, prefixing them with `J'.
13818         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13819         as a template parm.
13820         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13821         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13822         (mapcar): Handle COMPLEX_CST.
13823         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13824         (common_type): Add code for complex types.
13825         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13826         (convert_for_assignment): Likewise.
13827         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13828
13829 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13830
13831         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13832         tsubst_expr, as it might try to do overload resolution.
13833
13834 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13835
13836         * pt.c (instantiate_class_template): Oops.
13837
13838 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13839
13840         * cp-tree.def: Add TAG_DEFN.
13841         * pt.c (tsubst_enum): New fn.
13842         (instantiate_class_template): Use it.
13843         (tsubst_expr): Support TAG_DEFN.
13844         (tsubst): Support local enums.
13845         (tsubst_copy): Likewise.
13846         * decl.c (finish_enum): Likewise.
13847         (start_enum): If this is a local enum, switch to permanent_obstack.
13848
13849 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
13850
13851         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13852         (finish_function): Put the base init code for constructors just
13853         after the parm cleanup insns.
13854         (struct cp_function): Add last_parm_cleanup_insn.
13855         (push_cp_function_context): Likewise.
13856         (pop_cp_function_context): Likewise.
13857
13858 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13859
13860         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13861
13862 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13863
13864         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13865         for THUNK_FNDECL before we switch to temporary allocation.
13866
13867 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13868
13869         * call.c (build_new_op): Handle null arg2 for ?:.
13870
13871 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
13872
13873         * except.c (expand_exception_blocks): Ensure that we flow through
13874         the end of the exception region for the exception specification.
13875         Move exception region for the exception specification in, so that
13876         it doesn't protect the parm cleanup.  Remove some obsolete code.
13877         * decl.c (store_parm_decls): Likewise.
13878         (finish_function): Likewise.
13879
13880 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
13881
13882         * init.c (build_new): Fix nothrow handling.
13883
13884 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13885
13886         * init.c (emit_base_init): Don't warn about the initialization
13887         list for an artificial member.
13888
13889 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13890
13891         * expr.c (do_case): Handle !START case for the error msg.
13892
13893 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13894
13895         * decl2.c, lang-options.h: New option -Weffc++.
13896         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13897         to -Weffc++.
13898
13899         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13900         to MULTIPLE_SYMBOL_SPACES.
13901
13902 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13903
13904         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13905
13906         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13907
13908         * typeck.c (c_expand_return): Don't complain about returning void
13909         to void in an artificial function.
13910         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13911         don't set DECL_RESULT, set DECL_ARTIFICIAL.
13912         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13913
13914 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
13915
13916         * init.c (init_decl_processing): Add support for setjmp/longjmp based
13917         exception handling.
13918         * except.c (init_exception_processing): Likewise.
13919         (expand_end_catch_block): Likewise.
13920         (expand_exception_blocks): Likewise.
13921         (expand_throw): Likewise.
13922         * exception.cc (__default_terminate): Likewise.
13923
13924         * init.c (perform_member_init): Use new method of expr level
13925         cleanups, instead of cleanups_this_call and friends.
13926         (emit_base_init): Likewise.
13927         (expand_aggr_vbase_init_1): Likewise.
13928         (expand_vec_init): Likewise.
13929         * decl.c (cp_finish_decl): Likewise.
13930         (expand_static_init): Likewise.
13931         (store_parm_decls): Likewise.
13932         (cplus_expand_expr_stmt): Likewise.
13933         * decl2.c (finish_file): Likewise.
13934
13935         * Make-lang.in (exception.o): Ok to compile with -O now.
13936
13937         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13938         we know it will be done later by the backend.
13939
13940         * decl2.c (lang_f_options): Remove support for short temps.
13941         * lang-options.h: Likewise.
13942
13943 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13944
13945         * tree.c (varargs_function_p): New fn.
13946         * method.c (emit_thunk): Replace broken generic code with code to
13947         generate a heavyweight thunk function.
13948
13949 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
13950
13951         * pt.c (process_template_parm): pedwarn about floating-point parms.
13952
13953         * decl.c (grokdeclarator): inline no longer implies static.
13954
13955         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13956
13957 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13958
13959         * class.c (check_for_override): The signature of an overriding
13960         function is not changed.
13961
13962         * call.c (build_over_call): Move setting of conv into the loop.
13963         Note: this change, along with the related changes of the 18th thru
13964         the 20th of April, fix an infinite loop problem in conversions.
13965
13966 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13967
13968         * call.c (build_user_type_conversion_1): Really ignore rvalue
13969         conversions when looking for a REFERENCE_TYPE.
13970
13971         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13972         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13973         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13974         (build_unary_op): Likewise.
13975         * call.c (build_over_call): See through a CONVERT_EXPR around the
13976         ADDR_EXPR for on a temporary.
13977         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13978         the ADDR_EXPR for a local variable.
13979
13980 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13981
13982         * call.c (build_user_type_conversion_1): If we're trying to
13983         convert to a REFERENCE_TYPE, only consider lvalue conversions.
13984         (build_new_function_call): Print candidates.
13985         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13986         (reference_binding): Binding a temporary of a reference-related type
13987         is BAD.
13988
13989 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13990
13991         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13992         * tinfo2.cc (type_info::before): Likewise.
13993
13994 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13995
13996         * call.c (implicit_conversion): Oops.
13997
13998 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13999
14000         * call.c (implicit_conversion): Try to find a reference conversion
14001         before binding a const reference to a temporary.
14002
14003 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14004
14005         * exception.cc (__default_unexpected): Call terminate by default,
14006         so that if the user overrides terminate, the correct function will
14007         be called.
14008
14009 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14010
14011         * parse.y (left_curly): Avoid trying to use any fields of
14012         error_mark_node, as there aren't any.
14013
14014 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14015
14016         * lex.c (do_identifier): Avoid breaking on overloaded methods
14017         as default arguments.
14018
14019 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14020
14021         * call.c (add_template_candidate): Initialize the variable "dummy".
14022
14023 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14024
14025         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14026         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14027
14028 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14029
14030         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14031         (debug_binfo): Delete decl, not needed.
14032
14033         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14034         promotes_to_aggr_type): Delete fns.
14035         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14036         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14037         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14038
14039         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14040
14041         * friend.c (is_friend_type): Delete fn.
14042         * cp-tree.h (is_friend_type): Delete decl.
14043
14044         * decl.c (original_result_rtx, double_ftype_double,
14045         double_ftype_double_double, int_ftype_int, long_ftype_long,
14046         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14047         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14048
14049         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14050         fwd decls.
14051         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14052
14053         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14054         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14055
14056         * lex.c (reinit_lang_specific): #if 0, unused.
14057         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14058
14059         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14060         * cp-tree.h (revert_static_member_fn): Delete decl.
14061
14062         * class.c (root_lang_context_p): Delete fn.
14063         * cp-tree.h (root_lang_context_p): Delete decl.
14064
14065         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14066         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14067
14068         * lex.c (set_vardecl_interface_info): Make static.
14069         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14070
14071         * call.c (find_scoped_type): Make static.
14072         * cp-tree.h (find_scoped_type): Delete decl.
14073
14074         * search.c (convert_pointer_to_vbase): Make static.
14075         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14076
14077         * decl.c (const_ptr_type_node): Likewise.
14078         * cp-tree.h (const_ptr_type_node): Delete decl.
14079
14080         * typeck.c (common_base_type): Make static.
14081         * cp-tree.h (common_base_types): Delete erroneous decl.
14082
14083         * pt.c (classtype_mangled_name): Make static.
14084         * cp-tree.h (classtype_mangled_name): Delete decl.
14085
14086         * lex.c (check_newline): Make static.
14087         * cp-tree.h (check_newline): Delete decl.
14088
14089         * typeck.c (build_x_array_ref): Delete fn, same idea as
14090         grok_array_decl.
14091         * cp-tree.h (build_x_array_ref): Delete decl.
14092
14093         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14094         copy_lang_decl.
14095         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14096
14097         * class.c (build_vtable_entry): Make static.
14098         * cp-tree.h (build_vtable_entry): Delete decl.
14099
14100         * class.c (build_vbase_pointer): Make static.
14101         * cp-tree.h (build_vbase_pointer): Delete decl.
14102
14103         * sig.c (build_sptr_ref): Add forward decl and make static.
14104         * cp-tree.h (build_sptr_ref): Delete decl.
14105
14106         * call.c (build_new_method_call): Add forward decl and make static.
14107         * cp-tree.h (build_new_method_call): Delete decl.
14108
14109         * call.c (build_object_call): Make static.
14110         * class.c (check_for_override, complete_type_p, mark_overriders):
14111         Likewise.
14112         * decl.c (cp_function_chain): Likewise.
14113         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14114         Likewise.
14115         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14116         Likewise.
14117         * tree.c (build_cplus_array_type_1): Likewise.
14118         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14119         (comp_target_parms): Likewise.
14120
14121         * init.c (build_builtin_call): Make static.
14122         * cp-tree.h (build_builtin_call): Delete decl.
14123
14124         * typeck.c (binary_op_error): Delete decl.
14125         * cp-tree.h (binary_op_error): Likewise.
14126
14127 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14128
14129         * call.c (build_method_call): Compare against error_mark_node
14130         directly, rather than the ERROR_MARK tree code.
14131         * cvt.c (cp_convert): Likewise.
14132         * decl.c (print_binding_level): Likewise.
14133         (duplicate_decls): Likewise.
14134         (grokdeclarator): Likewise.
14135         (grokdeclarator): Likewise.
14136         * init.c (expand_aggr_init_1): Likewise.
14137         (decl_constant_value): Likewise.
14138         * method.c (build_opfncall): Likewise.
14139         (hack_identifier): Likewise.
14140         * typeck.c (build_modify_expr): Likewise.
14141
14142         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14143
14144 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14145
14146         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14147
14148         * pt.c (coerce_template_parms): Add new error message.
14149
14150         * method.c (build_overload_value): Implement name mangling for
14151         floating-point template arguments.
14152
14153         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14154         arguments whose absolute value doesn't fit in a signed word.
14155
14156 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14157
14158         * friend.c: New file; put all of the friend stuff in here.
14159         * init.c: Instead of here.
14160         * Makefile.in (CXX_OBJS): Add friend.o.
14161         (friend.o): Add dependencies.
14162         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14163
14164 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14165
14166         * call.c (build_scoped_method_call): Complain if the scope isn't a
14167         base.
14168
14169 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14170
14171         * parse.y (left_curly): Don't crash on erroneous type.
14172
14173         * init.c (build_delete): Fix type of ref.
14174
14175 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14176
14177         * search.c (get_vbase_1): Renamed from get_vbase.
14178         (get_vbase): Wrapper, now non-static.
14179         (convert_pointer_to_vbase): Now static.
14180
14181         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14182         * init.c (build_delete): Pass one.
14183         (build_partial_cleanup_for): Use build_scoped_method_call.
14184         * decl.c (finish_function): Pass a binfo.
14185
14186 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14187
14188         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14189
14190         * typeck.c (build_c_cast): Lose other reference to flag.
14191
14192         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14193         * decl2.c (delete_sanity): Remove meaningless use of
14194         LOOKUP_HAS_IN_CHARGE.
14195         * decl.c (finish_function): Use build_scoped_method_call instead
14196         of build_delete for running vbase dtors.
14197         * init.c (build_delete): Call overload resolution code instead of
14198         duplicating it badly.
14199
14200 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14201
14202         * call.c (build_over_call): Call mark_used before trying to elide
14203         the call.
14204
14205         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14206
14207 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14208
14209         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14210         non-reference used as an lvalue.
14211
14212 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14213
14214         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14215
14216 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14217
14218         * parse.y (handler): Fix template typo.
14219
14220 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14221
14222         * error.c (lang_decl_name): New fn.
14223         * tree.c (lang_printable_name): Use it.
14224
14225 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14226
14227         * g++spec.c: Include config.h so that we can catch bzero #defines
14228         from the config file.
14229
14230 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14231
14232         * new1.cc: Include a declaration for malloc, to avoid warning, and
14233         avoid lossing on systems that require one (ones that define malloc
14234         in xm.h).
14235
14236 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14237
14238         * decl2.c (max_tinst_depth): New variable.
14239         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14240         option.
14241         * pt.c (max_tinst_depth): Variable moved.
14242         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14243         as legal.
14244
14245 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14246
14247         * decl.c (xref_basetypes): Allow a base class that depends on
14248         template parms to be incomplete.
14249
14250         * decl2.c (build_expr_from_tree): Support typeid(type).
14251         * rtti.c (get_typeid): Support templates.
14252         (expand_si_desc, expand_class_desc): Fix string length.
14253         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14254
14255 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14256
14257         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14258
14259         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14260
14261 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14262
14263         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14264         smashes together template and non-template decls of the same
14265         signature.
14266
14267 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14268
14269         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14270
14271 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14272
14273         * decl.c (duplicate_decls): Next route, pedwarn about different
14274         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14275
14276 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14277
14278         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14279         (struct lang_type): Delete has_default_implementation member.
14280         Increase dummy to 21.
14281         * decl.c (start_method): Delete usage.
14282
14283         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14284         store_after_parms, start_decl_1, auto_function): Add decls.
14285         (get_arglist_len_in_bytes, declare_implicit_exception,
14286         have_exceptions_p, make_type_decl, typedecl_for_tag,
14287         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14288         build_component_type_expr, cplus_exception_name,
14289         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14290         * call.c (build_this): Make static.
14291         (is_complete): Likewise.
14292         (implicit_conversion): Likewise.
14293         (reference_binding): Likewise.
14294         (standard_conversion): Likewise.
14295         (strip_top_quals): Likewise.
14296         (non_reference): Likewise.
14297         (build_conv): Likewise.
14298         (user_harshness): Likewise.
14299         (rank_for_ideal): Likewise.
14300         * decl.c (start_decl_1): Delete forward decl.
14301         (push_decl_level): Make static.
14302         (resume_binding_level): Make static.
14303         (namespace_bindings_p): Make static.
14304         (declare_namespace_level): Make static.
14305         (lookup_name_real): Make static.
14306         (duplicate_decls): Make static.  Take register off NEWDECL and
14307         OLDDECL parm decls.
14308         * decl2.c (get_sentry): Make static.
14309         (temp_name_p): Delete fn.
14310         * except.c (auto_function): Delete decl.
14311         * lex.c (handle_{cp,sysv}_pragma): Make static.
14312         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14313         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14314         * pt.c (tsubst_expr_values): Make static.
14315         * rtti.c (combine_strings): Delete decl.
14316
14317 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14318
14319         * pt.c (push_template_decl): Handle getting a typedef.
14320
14321         * call.c (build_new_function_call): Complain about void arg.
14322
14323 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14324
14325         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14326         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14327
14328 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14329
14330         * except.c (expand_throw): Don't expand the cleanup tree here,
14331         since we are not going to write the rtl out.  Fixes problem with
14332         -g -O on SPARC.
14333
14334 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14335
14336         * Make-lang.in: Add $(exeext) as necessary.
14337
14338 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14339
14340         * parse.y (handler_seq): Must have at least one catch clause.
14341
14342 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14343
14344         * call.c (add_builtin_candidate): Restore ?: hack.
14345
14346         * decl.c (grok_op_properties): More warnings.
14347
14348 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14349
14350         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14351         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14352
14353         * decl.c (duplicate_decls): Scale back to a warning, and only do
14354         'em if -pedantic.
14355
14356 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14357
14358         * decl.c (duplicate_decls): pedwarn mismatched exception
14359         specifications.
14360
14361 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14362
14363         * call.c (build_new_method_call): Don't display the invisible
14364         argument for controlling virtual bases.
14365
14366 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
14367
14368         * new: Add nothrow new and delete, bad_alloc and throw specifications
14369         for delete.
14370         * decl.c (init_decl_processing): Add throw specification for delete.
14371         * new.cc (nothrow): Define.
14372         * lex.c (real_yylex): Removing warning that throw and friends are
14373         keywords.
14374         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14375         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14376         * Make-lang.in: Add new{1,2}.{cc,o}.
14377
14378 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14379
14380         * lex.c (cons_up_default_function): Fix return type of synth op=.
14381
14382         * init.c (emit_base_init): Add warnings for uninitialized members
14383         and bases.
14384
14385         * decl.c (xref_basetypes): Add warning for non-polymorphic type
14386         with destructor used as base type.
14387
14388         * decl.c (grok_op_properties): Add warning for op= returning void.
14389         * typeck.c (c_expand_return): Add warning for op= returning anything
14390         other than *this.
14391
14392         * class.c (finish_struct_1): Add warning for class with pointers
14393         but not copy ctor or copy op=.
14394
14395         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14396         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14397         (instantiate_template): If -fexternal-templates, add this
14398         instantiation to pending_templates.
14399
14400         * decl2.c (copy_assignment_arg_p): Disable old hack to support
14401         Booch components.
14402
14403 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
14404
14405         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14406
14407 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14408
14409         * call.c (standard_conversion): Handle getting references.  Tack
14410         on RVALUE_CONV here.  Do it for non-class types, too.
14411         (reference_binding): Pass references to standard_conversion.
14412         (implicit_conversion): Likewise.
14413         (add_builtin_candidate): Disable one ?: kludge.
14414         (convert_like): Handle RVALUE_CONVs for non-class types.
14415         (joust): Disable the other ?: kludge.
14416
14417 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14418
14419         * decl.c (init_decl_processing): Add code to build up common
14420         function types beforehand, to avoid creation then removal of
14421         things already in the hash table.
14422
14423 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14424
14425         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14426         the arguments.
14427
14428         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14429         current_template_parms.
14430
14431 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
14432
14433         * search.c (lookup_field): Don't return a function, check want_type.
14434
14435 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14436
14437         * init.c (build_new): Make sure PLACEMENT has a type.
14438
14439 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14440
14441         * init.c (build_new): Support new (nothrow).
14442
14443 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14444
14445         * pt.c (instantiate_decl): Also do push_to_top_level before setting
14446         up DECL_INITIAL.
14447
14448         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14449         * pt.c (tsubst): Defer instantiation of default args.
14450         * call.c (build_over_call): Until here.
14451
14452 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14453
14454         * search.c (lookup_field): Make sure we have an
14455         IDENTIFIER_CLASS_VALUE before we try to return it.
14456
14457 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14458
14459         * call.c (build_method_call): Delete unused var PARM.
14460         (build_overload_call_real): Likewise.
14461         (build_object_call): Delete unused var P.
14462         (build_new_op): Likewise.
14463         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14464         var definitions, which are never used.
14465         (shadow_tag): Delete unused var FN.
14466         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14467         * init.c (build_new): Delete unused var ALLOC_TEMP.
14468         * method.c (hack_identifier): Delete unused var CONTEXT.
14469         (do_build_copy_constructor): Delete unused var NAME.
14470         (synthesize_method): Delete unused var BASE.
14471         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14472         * rtti.c (build_headof): Delete unused var VPTR.
14473         (get_typeid): Delete unused var T.
14474         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14475         and ORIG_OP2.
14476         (build_ptrmemfunc): Delete unused vars U and NINDEX.
14477         * typeck2.c (build_functional_cast): Delete unused var BINFO.
14478
14479 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14480
14481         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14482         things in a type being defined.
14483         * decl.c (finish_enum): Reverse the values so that they are in
14484         the correct order.
14485
14486         * pt.c (instantiate_class_template): Don't initialize
14487         BINFO_BASETYPES until the vector is filled out.
14488         (unify): Don't abort on conflicting bindings, just fail.
14489         (instantiate_decl): Do push_tinst_level before any tsubsting.
14490
14491         * method.c (build_overload_value): Handle getting a
14492         TEMPLATE_CONST_PARM for a pointer.
14493
14494 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
14495
14496         * init.c (expand_member_init): Don't give 'not a base' error for
14497         templates.
14498
14499         * pt.c (instantiate_decl): Call import_export_decl later.
14500
14501         * pt.c (instantiate_class_template): Return a value.
14502
14503         * parse.y (extension): New rule for __extension__.
14504         (extdef, unary_expr, decl, component_decl): Use it.
14505
14506 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
14507
14508         * class.c (base_binfo): Remove unused base_has_virtual member.
14509         (finish_base_struct): Likewise.
14510         (finish_struct_1): Likewise.
14511
14512 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
14513
14514         * search.c (expand_upcast_fixups): Fix bogus code generation
14515         problem where the generated code uses the wrong index into the
14516         runtime built vtable on the stack.  Old code could clobber random
14517         stack values.
14518
14519 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
14520
14521         * init.c (perform_member_init): Make sure the partial EH cleanups
14522         live on the function_obstack.
14523
14524 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
14525
14526         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14527         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14528
14529 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
14530
14531         * decl.c (grokvardecl): Avoid ANSI style initialization.
14532
14533 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14534
14535         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14536
14537 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
14538
14539         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14540
14541 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14542
14543         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14544         arguments we compare against.  Start the count of I at 1, not 0,
14545         since argv[0] is still the command.
14546
14547 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
14548
14549         * lang-specs.h: Accept .cp as an C++ extension.
14550
14551 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14552
14553         * cp-tree.h (ptr_reasonably_similar): Add decl.
14554
14555 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14556
14557         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14558         pointer.  New local SPECBITS with the parm's value.
14559         (grokdeclarator): Pass &specbits down.
14560
14561         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14562         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14563
14564         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14565         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14566
14567         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14568         not an error_mark_node.
14569
14570 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14571
14572         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14573         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14574
14575 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14576
14577         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14578         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14579         not affected).
14580
14581         * typeck2.c (build_m_component_ref): If component is a pointer
14582         to data member, resolve the OFFSET_REF now.
14583
14584         * call.c (convert_like): Don't go into infinite recursion.
14585
14586         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14587
14588         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14589         * tree.c (layout_basetypes): And on the vbase ptr.
14590
14591 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14592
14593         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14594         CHAR_TYPE_SIZE so bool is always the same size as another type.
14595
14596         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14597
14598 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14599
14600         * decl2.c (grok_x_components): Remove synthesized methods from
14601         TYPE_METHODS of an anonymous union, complain about member
14602         functions.
14603         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14604         anonymous unions.
14605         (finish_function): Just clear the DECL_RTL of our arguments.
14606
14607 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14608
14609         * decl2.c (finish_file): Emit DWARF debugging info for static data
14610         members.
14611
14612         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14613
14614 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
14615
14616         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14617         IDENTIFIER_NODE.
14618
14619 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14620
14621         * Make-lang.in (g++-cross$(exeext)): Fix typo.
14622
14623 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14624
14625         Make the g++ driver now be a standalone program, rather than one
14626         that tries to run the gcc driver after munging up the options.
14627         * Make-lang.in (g++.c, g++spec.o): New rules.
14628         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14629         added.
14630         (g++$(exeext)): New rule, based on xgcc rule.
14631         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14632         * g++spec.c: New file.
14633         * g++.c: Removed file.
14634
14635 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
14636
14637         * cvt.c (build_up_reference): Arrange for any temporary values
14638         that have been keep in registers until now to be put into memory.
14639
14640 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14641
14642         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14643         that make -j3 bootstrap works better.
14644
14645 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
14646
14647         * decl.c (pushtag): Do pushdecl for anon tags.
14648
14649 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14650
14651         * typeck.c (c_expand_return): Fix logic.
14652         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14653
14654 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
14655
14656         * g++.c (main): Make sure arglist has a final NULL entry.  Add
14657         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14658         stdin/stdout of the invoked program are redirected to
14659         nowheresville.
14660
14661 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14662
14663         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14664
14665 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
14666
14667         * init.c (resolve_offset_ref): Handle obj.vfn better.
14668         * typeck.c (build_component_ref): Set TREE_TYPE on result from
14669         build_vfn_ref.
14670
14671 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
14672
14673         * typeck.c (convert_for_assignment): Also handle anachronistic
14674         implicit conversions from (::*)() to cv void*.
14675         * cvt.c (cp_convert_to_pointer): Likewise.
14676
14677 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14678
14679         * lex.c (handle_cp_pragma): Fix bogus warning.
14680
14681 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
14682
14683         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14684         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14685
14686 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14687
14688         * class.c (finish_struct_1): Support DWARF2_DEBUG.
14689         * search.c (dfs_debug_mark): Likewise.
14690         * decl2.c (finish_vtable_vardecl): Likewise.
14691         * decl.c (pushtag, finish_enum): Likewise.
14692         * lex.c (check_newline): Use debug_* instead of calling *out
14693         functions directly.
14694
14695 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14696
14697         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14698         on some picky hosts.
14699
14700 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14701
14702         * class.c (finish_struct_1): A class has a non-trivial copy
14703         constructor if it has virtual functions.
14704
14705         * cvt.c (cp_convert): Always call a constructor.
14706
14707         * call.c (reference_binding): Still tack on a REF_BIND
14708         for bad conversions.
14709         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14710
14711         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14712         (c_expand_return): Likewise.
14713         * typeck2.c (digest_init): Likewise for { }.
14714         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14715         * cvt.c (cp_convert): Handle failure better.
14716
14717 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14718
14719         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14720         of GCC be path-relative.
14721
14722 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14723
14724         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14725         it does need choose-temp.o and pexecute.o.
14726
14727 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14728
14729         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14730         that we still use it.
14731         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14732
14733 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14734
14735         * init.c (expand_default_init): Avoid calling constructors to
14736         initialize reference temps.
14737
14738         * cvt.c (convert_to_reference): Fix.
14739
14740 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14741
14742         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14743         (convert_to_reference): Likewise.
14744         * typeck.c (convert_for_initialization): Likewise.
14745         * init.c (expand_default_init): Likewise.
14746         (expand_aggr_init_1): Likewise.
14747         * cp-tree.h (CONV_NONCONVERTING): Lose.
14748         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14749         * *.c: Adjust.
14750         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14751
14752 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
14753
14754         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14755
14756 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14757
14758         * init.c (expand_aggr_init_1): Don't crash on non-constructor
14759         TARGET_EXPR.
14760
14761 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14762
14763         * g++.c: Include gansidecl.h.
14764         (VPROTO, PVPROTO, VA_START): Delete.
14765         (choose_temp_base_try, choose_temp_base, perror_exec,
14766         run_dos) [__MSDOS__]: Delete fns.
14767         (pfatal_with_name): Delete fn.
14768         (temp_filename): Declare like in gcc.c.
14769         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14770         (error_count, signal_count): Define.
14771         (error): Delete both definitions.
14772         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14773         (pfatal_pexecute): Add fn from gcc.c.
14774         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
14775         code to use the pexecute stuff also used by gcc.c.
14776         (MIN_FATAL_STATUS): Define.
14777         * Make-lang.in (g++): Add dependency on and linking with
14778         choose-temp.o and pexecute.o.
14779
14780         * cp-tree.h: Include gansidecl.h.
14781         (STDIO_PROTO): Delete #undef/#define.
14782         * cvt.c (NULL): Delete #undef/#define.
14783         * expr.c (NULL): Likewise.
14784         * init.c (NULL): Likewise.
14785         * rtti.c (NULL): Likewise.
14786         * xref.c (NULL): Likewise.
14787
14788         * cp-tree.h (build_user_type_conversion): Add prototype.
14789         * call.c (build_user_type_conversion): Delete prototype.  Correct
14790         decl of FLAGS arg to be an int.
14791         * cvt.c (build_user_type_conversion): Likewise.
14792
14793 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
14794
14795         * cp-tree.def: Add TRY_BLOCK and HANDLER.
14796         * except.c (expand_start_catch_block): Support templates.
14797         * parse.y (try_block, handler_seq): Likewise.
14798         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14799
14800 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14801
14802         * pt.c (current_template_args): New fn.
14803         (push_template_decl): Use it.
14804         * decl.c (grokdeclarator): Use it.
14805
14806         * decl2.c (build_expr_from_tree): Dereference ref vars.
14807
14808         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14809         the decl-specifier-seq.
14810
14811         * decl.c (grok_op_properties): Don't force the type of a conversion
14812         op to be complete.  Don't warn about converting to the same type
14813         for template instantiations.
14814
14815         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14816         methods.
14817
14818 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
14819
14820         * typeck.c (get_delta_difference): Remove previous bogusness.
14821         Don't give errors if force is set.
14822
14823 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14824
14825         * decl2.c (finish_file): Don't emit debug info.
14826         * decl.c (pushdecl): Lose obsolete code.
14827         (grokdeclarator): Still do the long long thing after complaining.
14828         * search.c (note_debug_info_needed): Don't do anything if we're in a
14829         template.
14830         * method.c (synthesize_method): For non-local classes,
14831         push_to_top_level first.
14832
14833 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
14834
14835         * typeck.c (get_delta_difference): Add no_error parameter.
14836         (build_ptrmemfunc): Call get_delta_difference with no_error set;
14837         we don't want error messages when converting unrelated
14838         pointer-to-member functions.
14839
14840 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
14841
14842         * error.c (dump_expr): Improve the wording on error messages that
14843         involve pointer to member functions.
14844
14845 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
14846
14847         * cvt.c (cp_convert_to_pointer): Move code for conversions from
14848         (::*)() to void* or (*)() up a bit, so that we can convert from
14849         METHOD_TYPEs as well.
14850
14851 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14852
14853         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14854         There are no 'member' types.
14855         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14856         (build_x_typeid): Handle errors.
14857
14858 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
14859
14860         * typeck.c (convert_for_assignment): Handle anachronistic implicit
14861         conversions from (::*)() to void* or (*)().
14862         * cvt.c (cp_convert_to_pointer): Likewise.
14863         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14864         conversions from here.
14865         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14866         * lang-options.h: Likewise.
14867         * decl2.c (warn_pmf2ptr): Define.
14868         * cp-tree.h: Declare it.
14869         * typeck2.c (digest_init): Allow pmfs down into
14870         convert_for_initialization.
14871
14872 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14873
14874         * typeck.c (c_expand_return): Fix for returning overloaded fn.
14875
14876 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14877
14878         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14879         * decl.c (grok_reference_init): Pass DIRECT_BIND.
14880         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
14881         DIRECT_BIND.
14882         * call.c (convert_like): Don't pass INDIRECT_BIND.
14883         * typeck.c (convert_arguments): Likewise.
14884         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14885
14886 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
14887
14888         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14889         similar code in build_up_ref.
14890         * cvt.c (build_up_reference): Drastically simplify.
14891
14892 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
14893
14894         * typeck.c (signed_or_unsigned_type): If the given type already
14895         as the correct signedness, then just return it.
14896
14897         * typeck.c ({un,}signed_type): If can't do anything, call
14898         signed_or_unsigned_type.
14899
14900 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
14901
14902         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14903         current_class_type is NULL.
14904
14905 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
14906
14907         * class.c (finish_struct_1): Avoid empty structs by adding a field
14908         so layout_type gets the mode right.
14909
14910         * typeck.c (c_expand_return): Drastically simplify.
14911
14912 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
14913
14914         * typeck.c (decay_conversion): Handle overloaded methods.
14915
14916 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
14917
14918         * call.c (build_over_call): A TARGET_EXPR has side-effects.
14919
14920 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
14921
14922         * cvt.c (convert_to_pointer_force): Add code to support pointer to
14923         member function to pointer to function conversions.
14924         * init.c (resolve_offset_ref): Add code to allow faked up objects,
14925         ignoring them if they are not used, and giving an error, if they
14926         are needed.
14927         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14928         code, and so that we can give an error, if we needed an object,
14929         and one was not provided.
14930         (build_c_cast): Don't call default_conversion when we want to
14931         convert to pointer to function from a METHOD_TYPE.
14932
14933 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
14934
14935         * Make-lang.in (cplib2.ready): Fix logic.
14936
14937         * decl.c (shadow_tag): Only complain about non-artificial function
14938         members.
14939
14940         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14941
14942 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
14943
14944         * expr.c (cplus_expand_expr): Pre-tweak call_target like
14945         expand_inline_function would.
14946
14947         * pt.c (mark_decl_instantiated): If extern_p, call
14948         mark_inline_for_output.
14949
14950 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
14951
14952         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14953         pmd conversions.
14954
14955         * typeck.c (get_delta_difference): Fix wording, as we can be used
14956         for pointer to data members.
14957
14958 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
14959
14960         * pt.c (tsubst): If the function decl isn't a member of this
14961         template, return a copy of the decl (including copying the
14962         lang-specific part) so we don't hose ourselves later.
14963
14964 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14965
14966         * class.c (finish_struct): Remove DWARF-specific tag handling.
14967         * decl.c (pushtag): Likewise.
14968         (finish_function): Always clear DECL_ARGUMENTS on function decls with
14969         no saved RTX.
14970         * decl2.c (finish_file): Emit DWARF debugging info for static data
14971         members.
14972
14973 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
14974
14975         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14976         isn't the same as the new one before we whack it.
14977
14978 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14979
14980         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14981         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14982         warn_traditional and warn_strict_prototypes; remove ancient
14983         'overload' code; remove references to flag_traditional.
14984
14985 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
14986
14987         * input.c (sub_getch): Handle 8-bit characters in string literals.
14988
14989 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
14990
14991         * tree.c (mapcar): Handle CONSTRUCTORs.
14992         (copy_to_permanent): Handle expression_obstack properly.
14993
14994         * Make-lang.in (cplib2.txt): Also depend on the headers.
14995
14996         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14997         INT_TYPE_SIZE.
14998         (expand_class_desc): Use USItype for offset field.
14999         * tinfo.h (struct __class_type_info): Likewise.
15000
15001         * method.c (build_overload_int): TYPE_PRECISION should be applied
15002         to types.
15003
15004 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15005
15006         * call.c (build_new_op): A COND_EXPR involving void must be a
15007         builtin.
15008
15009 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15010
15011         * typeck.c (build_x_component_ref): New fn.
15012         (build_object_ref): Use it.
15013         * parse.y (primary): Use it.
15014         * decl2.c (build_expr_from_tree): Use it.
15015         * cp-tree.h: Declare it.
15016
15017         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15018         * error.c (dump_type_suffix): Handle variable arrays.
15019
15020 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15021
15022         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15023
15024 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15025
15026         * decl.c (lookup_name_real): Don't try to look up anything in a
15027         TYPENAME_TYPE.
15028
15029         * tinfo2.cc (__throw_type_match_rtti): Oops.
15030
15031 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15032
15033         * Make-lang.in (exception.o): Use -fno-PIC for now.
15034
15035 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15036
15037         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15038         calling them.
15039         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15040         * tinfo2.cc (__dynamic_cast): Adjust.
15041
15042         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15043         (build_x_typeid): Likewise.
15044
15045         * parse.y: Call build_x_typeid instead of build_typeid.
15046         * cp-tree.def: Add TYPEID_EXPR.
15047         * pt.c (tsubst_copy): Handle typeid.
15048         * decl2.c (build_expr_from_tree): Likewise.
15049         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15050         (build_typeid): Not here.
15051         * cp-tree.h: Declare build_x_typeid.
15052
15053 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15054
15055         * call.c (convert_like): Pull out constant values.
15056
15057         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15058
15059 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15060
15061         * decl.c (init_decl_processing): Create short int types before
15062         creating size_t in case a machine description needs to use
15063         unsigned short for size_t.
15064
15065 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15066
15067         * Make-lang.in (exception.o): Turn off pic.
15068
15069         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15070         type, multi-level ptr conversions.
15071
15072         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15073         (throw_bad_cast): Use it.
15074         (throw_bad_typeid): New fn.
15075         (build_typeid): Throw bad_typeid as needed.
15076         Use build_call.
15077         (synthesize_tinfo_fn): Handle functions and arrays before checking
15078         for cv-quals.
15079
15080         * Remove .h from standard C++ headers, add new.h, move into inc
15081         subdirectory.
15082
15083         * exception*: Remove pointer from object, constructors.  Add
15084         default exception::what that uses type_info::name.  Add
15085         __throw_bad_typeid.
15086
15087         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15088
15089 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15090
15091         * Make-lang.in: Building C++ code depends on cc1plus.
15092
15093 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15094
15095         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15096         a HOST_WIDE_INT, not a tree.
15097
15098 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15099
15100         * exception.cc: Don't include <stdlib.h>.
15101
15102         * Make-lang.in (c++.clean): Remove cplib2.*.
15103
15104 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15105
15106         * parse.y (component_decl_1, component_costructor_declarator case):
15107         Pass attributes/prefix_attributes in tree list.
15108
15109 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15110
15111         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15112
15113 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15114
15115         * lex.c (do_identifier): Don't do deferred lookup in a template
15116         header.
15117
15118         * typeck2.c (store_init_value): Oops.
15119
15120         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15121         New files for C++ lang-support library.
15122         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15123         (CXX_LIB2FUNCS): Define.
15124         And rules for building the C++ lang-support code.
15125         * config-lang.in (headers): Define.
15126         (lib2funcs): Define.
15127
15128 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15129
15130         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15131         digest_init.
15132         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15133         * typeck2.c (store_init_value): Check for initializing pmf with { }
15134         here.
15135         (process_init_constructor): Not here.
15136
15137 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15138
15139         * pt.c (begin_template_parm_list): Increment
15140         processing_template_decl here.
15141         (end_template_parm_list): Not here.
15142         (process_template_parm): No need to add 1 to it now.
15143         * *.c: Use processing_template_decl instead of current_template_parms
15144         to check for being in a template.
15145
15146         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15147         (tsubst_copy): Handle CONSTRUCTOR.
15148         (instantiate_decl): Set up context properly for variables.
15149         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15150         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15151
15152 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15153
15154         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15155
15156 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15157
15158         * method.c (make_thunk): Call comdat_linkage before setting the
15159         TREE_CODE.
15160
15161         * decl2.c (comdat_linkage): Use make_decl_one_only.
15162         (import_export_decl): Likewise.
15163         * decl.c (init_decl_processing): Check supports_one_only instead of
15164         SUPPORTS_WEAK.
15165
15166 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15167
15168         * decl2.c (grokfield): Tighten checking for access decls.
15169
15170         * decl.c (make_typename_type): Resolve references to
15171         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15172         (lookup_name_real): Types that depend on a template parameter get
15173         an implicit 'typename' unless they're in the current scope.
15174         (start_decl_1): We don't care about incomplete types that depend
15175         on a template parm.
15176         (grokdeclarator): Resolve 'typename's in the type specifier that
15177         refer to members of the current scope.
15178
15179         * call.c (build_over_call): Remove 'inline called before
15180         definition' diagnostic.
15181         (build_method_call): Likewise.
15182         * decl.c (duplicate_decls): Downgrade 'used before declared
15183         inline' to a warning, only with -Winline.
15184
15185 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15186
15187         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15188
15189 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15190
15191         * call.c (build_method_call): When calling a signature
15192         default implementation, as in other cases, let instance_ptr simply
15193         be instance.
15194
15195 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15196
15197         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15198
15199 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15200
15201         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15202         works on hppa and SPARC.
15203
15204 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15205
15206         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15207
15208 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15209
15210         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15211         before testing whether it's a signature.
15212
15213 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15214
15215         * call.c (build_new_method_call): Don't complain about signature
15216         pointers and references not being an aggr type.
15217         (build_this): If a signature pointer or reference was passed in,
15218         just return it.
15219         (build_new_method_call): If instance is a signature pointer, set
15220         basetype to the signature type of instance.
15221         * sig.c (build_signature_method_call): Deleted basetype and
15222         instance parameters, they can be found as the DECL_CONTEXT of
15223         function and as the first argument passed in.
15224         * cp-tree.h: Changed declaration of build_signature_method_call.
15225         * call.c (build_method_call): Deleted first two arguments in call
15226         of build_signature_method_call.
15227         (build_over_call): Added call to build_signature_method_call.
15228
15229 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15230
15231         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15232         target_expr.
15233
15234 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15235
15236         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15237
15238 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15239
15240         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15241         (expand_end_try_stmts): Remove.
15242
15243         * init.c (perform_member_init): Use add_partial_entry () instead
15244         of directly manipulating lists.
15245         (emit_base_init): Likewise.
15246
15247 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15248
15249         * except.c (expand_exception_blocks): Always make sure USE and
15250         CLOBBER insns that came at the end still do, the backend relies
15251         upon this.
15252
15253 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15254
15255         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15256         right type.
15257
15258 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15259
15260         * cvt.c (convert_to_reference): Revert last change, don't complain
15261         about temp without target decl.
15262
15263 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15264
15265         * decl.c (grokdeclarator): Don't core dump when void() is given.
15266
15267 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15268
15269         * decl.c (copy_args_p): Don't crash.
15270
15271 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15272
15273         * pt.c (tsubst): And support template args inside the exception
15274         specification.
15275
15276         * pt.c (tsubst): Add support for exception specifications in
15277         template functions.
15278
15279 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15280
15281         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15282         fields now.
15283         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15284         (start_function): Likewise.
15285         (start_method): Likewise.
15286         (grokfield): Likewise.
15287         (make_call_declarator): Add throw spec parameter.
15288         (set_quals_and_spec): Add routine.
15289         * lex.c (set_quals_and_spec): Likewise.
15290         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15291         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15292         grokdeclarator.
15293         (groktypename): Likewise.
15294         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15295         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15296         field in DECL_STMT.
15297         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15298         (grokfndecl): Remove useless set of raises.
15299         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15300         the throw spec parameter to start_decl.  Pull the throw spec out
15301         of the call declarator.
15302         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15303         (start_function): Eliminate the throw spec parameter.  Eliminate
15304         the throw spec parameter to grokdeclarator.
15305         (start_method): Likewise.
15306         * decl2.c (grokfield): Likewise.
15307         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15308         (grokoptypename): Likewise.
15309         (finish_file): Eliminate the throw spec parameter to
15310         start_function.  Add throw spec to make_call_declarator.
15311         * except.c (init_exception_processing): Add throw spec to
15312         make_call_declarator.  Eliminate the throw spec parameter to
15313         start_decl.
15314         (expand_start_catch_block): Eliminate the throw spec parameter to
15315         grokdeclarator.
15316         (expand_builtin_throw): Add throw spec to make_call_declarator.
15317         Eliminate the throw spec parameter to start_function.
15318         (start_anon_func): Likewise.
15319         * lex.c (make_call_declarator): Add throw spec parameter.
15320         (set_quals_and_spec): New routine.
15321         (cons_up_default_function): Add throw spec to make_call_declarator.
15322         Eliminate the throw spec parameter to grokfield.
15323         * method.c (synthesize_method): Eliminate the throw spec parameter
15324         to start_function.
15325         * pt.c (process_template_parm): Eliminate the throw spec parameter
15326         to grokdeclarator.
15327         (tsubst): Add throw spec to make_call_declarator.
15328         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15329         (do_function_instantiation): Eliminate the throw spec parameter to
15330         grokdeclarator.  Eliminate the throw spec parameter to
15331         start_function.
15332         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15333         to start_function.
15334         * parse.y (datadef): Remove non-winning optimization.
15335         (decl): Likewise.
15336         (fndef): Remove ambiguous error productions uncovered by grammar
15337         fixing.
15338         (constructor_declarator): Add exception_specification_opt here.
15339         (component_constructor_declarator): Likewise.
15340         (direct_after_type_declarator): Likewise.
15341         (complex_direct_notype_declarator): Likewise.
15342         (direct_abstract_declarator): Likewise.
15343         (fn.def1): Remove exception_specification_opt.
15344         (fn.def2): Likewise.
15345         (condition): Likewise.
15346         (initdcl0): Likewise.
15347         (initdcl): Likewise.
15348         (notype_initdcl0): Likewise.
15349         (nomods_initdcl0): Likewise.
15350         (component_decl_1): Likewise.
15351         (component_declarator): Likewise.
15352         (after_type_component_declarator0): Likewise.
15353         (after_type_component_declarator): Likewise.
15354         (notype_component_declarator): Likewise.
15355
15356 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15357
15358         * call.c (build_over_call): Also use an INIT_EXPR when
15359         initializing anything from an rvalue.
15360
15361         * call.c (build_over_call): Call stabilize_reference when building
15362         an INIT_EXPR instead of calling the copy ctor.
15363
15364         * call.c (joust): Extend the previous change to all comparisons.
15365
15366         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15367         NO_LINKAGE_HEURISTICS.
15368
15369         * decl2.c (finish_file): Emit any statics that weren't already.
15370
15371         * typeck.c (build_static_cast): Implement.
15372         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15373         * decl.c (grokparms): Use can_convert_arg instead of
15374         implicit_conversion directly.
15375         (copy_args_p): New fn.
15376         * cvt.c (convert_to_reference): Don't complain about temp with
15377         static_cast.
15378         (build_up_reference): Handle TARGET_EXPRs.
15379         * call.c (build_over_call): Elide unnecessary temps.
15380         (can_convert*): Use new overloading code.
15381
15382 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15383
15384         * call.c: Move TYPE_PTR*_MACROS ...
15385         * cp-tree.h: To here.
15386         * typeck.c (build_reinterpret_cast): Implement.
15387
15388         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15389         ptr_complete_ob.
15390         (joust): If we're comparing a function to a builtin and the worst
15391         conversion for the builtin is worse than the worst conversion for the
15392         function, take the function.
15393
15394         * typeck.c (build_const_cast): Implement.
15395         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15396         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15397
15398 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
15399
15400         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15401         too early.  Make sure we explode if exprtype turns out to be a
15402         NULL_TREE when it shouldn't be.
15403
15404 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
15405
15406         * cp-tree.h: New routine make_call_declarator.
15407         * lex.c (make_call_declarator): Define it.
15408         * except.c (init_exception_processing): Use it.
15409         (expand_builtin_throw): Likewise.
15410         (start_anon_func): Likewise.
15411         * decl2.c (finish_file): Likewise.
15412         * lex.c (cons_up_default_function): Likewise.
15413         * parse.y: Likewise.
15414         * pt.c (tsubst): Likewise.
15415
15416 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
15417
15418         * decl2.c (groktypefield): Remove unused code.
15419
15420 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
15421
15422         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15423         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
15424         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
15425         nonempty_cv_qualifiers.
15426         * hash.h: Rebuild.
15427
15428         * lex.c (make_pointer_declarator): Change type_quals into
15429         cv_qualifiers.
15430         (make_reference_declarator): Likewise.
15431
15432 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15433
15434         * decl.c (start_function): Only check interface_* for templates
15435         with flag_alt_external_templates.
15436
15437         * call.c (build_new_op): Check for comparison of different enum types.
15438         (build_over_call): Fix arg # output.
15439
15440         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15441
15442 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15443
15444         * call.c (build_new_op): Check for erroneous args.
15445
15446         * call.c (build_new_method_call): Add missing args to cp_error.
15447
15448         * tree.c (error_type): Don't print reference-to-array.
15449
15450         * typeck.c (convert_for_assignment): Don't say contravariance for
15451         removing const.
15452
15453 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15454
15455         * call.c (build_over_call): Diagnose bad convs for `this'.
15456
15457         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15458         on _ctor_arg.
15459
15460         * call.c (convert_like): Handle bad convs.
15461         (build_over_call): Handle bad convs better.
15462
15463         * decl2.c: -fansi-overloading is now the default.
15464
15465         * call.c (build_new_method_call): Check for erroneous args.
15466
15467         * pt.c (instantiate_class_template): Propagate
15468         TYPE_USES_MULTIPLE_INHERITANCE.
15469
15470 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
15471
15472         * call.c (enforce_access): Add static to routine.
15473
15474 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15475
15476         * call.c (build_user_type_conversion_1): Fix bad handling.
15477         (compare_ics): Likewise.
15478
15479 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15480
15481         * call.c (standard_conversion): Oops.
15482
15483 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
15484
15485         * g++.c: Update test for win32 (&& ! cygwin32).
15486
15487 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15488
15489         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15490         (ptr_reasonably_similar): New fn.
15491         * call.c (BAD_RANK): New rank.
15492         (ICS_BAD_FLAG): New macro.
15493         (standard_conversion): Handle almost-right pointer conversions.
15494         (reference_binding): Handle bad rvalue bindings.
15495         (add_*_candidate): Stuff.
15496         (build_over_call): Pass bad conversions to convert_for_initialization.
15497         (compare_ics): Handle bad convs.
15498         (joust): Likewise.
15499
15500 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15501
15502         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15503         integer_type_node when computing pointer offsets.
15504
15505 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15506
15507         * tree.c (lvalue_type): New fn.
15508         (error_type): New fn.
15509         * call.c (op_error): Use error_type.
15510         (add_conv_candidate): Use lvalue_type.
15511         (add_builtin_candidates): Likewise.
15512         * error.c (args_as_string): Use error_type.
15513
15514 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15515
15516         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15517         (tsubst): Not here.
15518
15519         * decl.c (init_decl_processing): With -ansi, __null's type is the
15520         signed integral type with the same number of bits as a pointer.
15521         Introduce a new variable null_node for it.
15522         * cp-tree.h: Adjust.
15523         * call.c (null_ptr_cst_p): Adjust.
15524
15525 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
15526
15527         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15528         optimize.
15529
15530 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15531
15532         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15533         fns of classes without virtual functions.
15534
15535         * call.c (add_function_candidate): Handle `this' specially.
15536         (compare_ics): Likewise.
15537
15538 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
15539
15540         * typeck.c (build_conditional_expr): Fix handling of __null.
15541
15542         * decl2.c (comdat_linkage): New fn.
15543         (import_export_vtable): Use it.
15544         (import_export_decl): Use it.
15545         * method.c (make_thunk): Use it.
15546
15547 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15548
15549         * pt.c (end_template_decl): If we don't actually have parms, return.
15550         * parse.y (template_header): Accept 'template <>'.
15551
15552         * errfn.c: Allow 5 args.
15553
15554 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15555
15556         * tree.c (make_temp_vec): New fn.
15557         * pt.c (push_template_decl): Handle partial specs.
15558         (instantiate_class_template): Likewise.
15559         (more_specialized): Use get_bindings.
15560         (more_specialized_class): New fn.
15561         (get_class_bindings): New fn.
15562         (most_specialized_class): New fn.
15563         (do_function_instantiation): List candidates for ambiguous case.
15564         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15565         (shadow_tag): Call push_template_decl for partial specializations.
15566         * parse.y: Likewise.
15567         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15568         DECL_TEMPLATE_MEMBERS.
15569         * call.c (print_z_candidates): Reduce duplication.
15570
15571 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15572
15573         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15574
15575 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15576
15577         * pt.c (get_bindings): New fn.
15578         (most_specialized): Likewise.
15579         (do_function_instantiation): Use them.
15580         (add_maybe_template): New fn.
15581         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15582         * call.c (build_new_op): Handle guiding decls.
15583         (build_new_function_call): Likewise.
15584         * decl2.c (finish_file): Likewise.
15585
15586         * decl2.c (mark_used): Do synthesis here.
15587         * call.c (build_method_call): Not here.
15588         (build_over_call): Or here.
15589         * typeck.c (build_function_call_real): Or here.
15590         * tree.c (bot_manip): Call mark_used on functions used in default
15591         args.
15592
15593 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15594
15595         * decl2.c (import_export_vtable): Delete code that disabled vtable
15596         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15597
15598 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15599
15600         * typeck.c (build_x_function_call): Handle static call context
15601         better.
15602
15603         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15604         the function, not its outer block.
15605
15606         * call.c (build_field_call): Pass fields on to build_opfncall
15607         regardless of TYPE_OVERLOADS_CALL_EXPR.
15608         (build_method_call): Pass on to build_new_method_call sooner.
15609
15610         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15611         gives us.
15612         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15613         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15614         modifying it.
15615
15616 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15617
15618         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15619         (add_builtin_candidate): Don't take enums for ++.
15620         (build_new_method_call): Handle non-aggregates and field calls.
15621         Move new overloading code from...
15622         * cvt.c: Here.
15623
15624         * decl.c (grokparms): Don't check default args in templates.
15625
15626 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15627
15628         * cvt.c (build_new_op): Fix args to build_unary_op.
15629         (add_builtin_candidates): Don't call type_promotes_to on float.
15630
15631         * decl.c (grokparms): Check the type of the default arg.
15632
15633         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15634         returning NULL_TREE.
15635
15636         * typeck.c (build_x_binary_op): Avoid doing extra work.
15637         (build_x_unary_op): Likewise.
15638         (build_x_conditional_expr): Likewise.
15639         * cvt.c (build_over_call): Return.
15640         (add_builtin_candidate): Fix MEMBER_REF.
15641         (build_new_op): Likewise.
15642
15643 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
15644
15645         * method.c (build_overload_name): Put bug fix into code but leave
15646         disabled for now so we can be bug compatible with older releases
15647         that do repeats incorrectly.  In the future, we can enable it.
15648
15649 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15650
15651         * cvt.c (convert_like): Don't call build_cplus_new twice.
15652
15653         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15654         Control new overloading code with -fansi-overloading.
15655
15656 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15657
15658         * cvt.c (build_over_call): Call build_cplus_new.
15659         * call.c (build_method_call): Likewise.
15660         * typeck.c (build_function_call_real): Likewise.
15661         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15662         the COND_EXPR in a TARGET_EXPR so they use the same slot.
15663
15664         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15665         recursive calls.
15666         * typeck.c (complete_type): Propagate
15667         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15668
15669 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15670
15671         * cvt.c (joust): More ?: kludging.  Sigh.
15672         (build_over_call): Don't try to synthesize global fns.
15673
15674         * search.c (lookup_conversions): Use binfo marking.
15675
15676 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
15677
15678         * search.c (build_mi_matrix): Use the correct value of cid
15679         when determining the new mi_size.
15680
15681 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15682
15683         * cvt.c (add_builtin_candidates): Do consider type conversion ops
15684         for the first parms of += et al.
15685         (strip_top_quals): New fn.
15686         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15687         (implicit_conversion): Likewise.
15688         (add_builtin_candidates): Be careful about arrays.
15689         (build_new_method_call): Handle vtable optimization.
15690
15691 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
15692
15693         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15694         * cvt.c (reference_binding): Use it.
15695         (implicit_conversion): Use it.
15696         (add_builtin_candidate, COND_EXPR): Use it.
15697
15698         * cvt.c (build_new_function_call): Check for error args.
15699
15700         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15701
15702         * gxx.gperf: Add __null.
15703         * hash.h: Regenerate.
15704         * lex.h: Add RID_NULL.
15705         * lex.c (init_lex): Create null_pointer_node here, stick it in
15706         RID_NULL.
15707         * decl.c (init_decl_processing): Still set its type here.
15708         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15709         (convert_to_pointer_force): Likewise.
15710         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15711         if (! pedantic).
15712         * call.c (convert_harshness): Use null_ptr_cst_p.
15713         * typeck.c (convert_for_assignment): Likewise.  Don't produce
15714         null_pointer_node.
15715
15716         * error.c (args_as_string): Handle lists of actual args, too.
15717         * cvt.c (null_ptr_cst): Support (void*)0 for now.
15718         (build_user_type_conversion_1): Improve diagnostics.
15719         (build_new_function_call): Likewise.
15720         (build_object_call): Likewise.
15721         (build_new_method_call): Likewise.  Move call before def diagnostic...
15722         (build_over_call): Here.
15723
15724         * cvt.c (build_new_method_call): Don't complain about no match if
15725         LOOKUP_SPECULATIVELY.
15726         (build_over_call): Fix 'this' for virtual fn.
15727         (build_new_method_call): Add diagnostic.
15728
15729 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15730
15731         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15732         constructors to be passed in.
15733         (build_over_call): Likewise.
15734         (build_user_type_conversion_1): Pass them in.
15735         (convert_like): Likewise.
15736         (build_object_call): Handle overloaded conversions.
15737         (build_over_call): Pass the right args to build_vfn_ref.
15738         (standard_conversion): Fix pmf convs.
15739         (joust): Handle comparing statics and non-statics.
15740         (build_new_method_call): New fn.
15741         * call.c (build_method_call): Call it if NEW_OVER.
15742
15743 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
15744
15745         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15746         %D instead.
15747
15748 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
15749
15750         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15751         instead of just maybe_build_cleanup so that we deallocate the
15752         thrown object.
15753
15754 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15755
15756         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15757         * cp-tree.h (finish_prevtable_vardecl): Add decl.
15758
15759 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15760
15761         * pt.c (instantiate_class_template): Call complete_type.  Also, if
15762         we're at the end of the file and we just instantiated a template
15763         class with a vtable, call finish_prevtable_vardecl.
15764
15765         * error.c (dump_decl): Don't explode (or explode more gracefully
15766         as appropriate) if the object being dumped has a null type.
15767         (dump_expr): Likewise.
15768
15769         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15770         by counting the number of nodes that we'll need before allocating
15771         the array.
15772         (lookup_fnfields): Fix comment.
15773         (breadth_first_search): Fix comment.
15774
15775 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15776
15777         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15778         TYPE_ALIGN.
15779         * class.c (finish_struct): Call cplus_decl_attributes here.
15780         (finish_struct_1): Not here.
15781         * cp-tree.h: Adjust.
15782
15783         * pt.c (type_unification): New parameter STRICT.
15784         (unify): If STRICT, don't allow cv addition or base deduction.
15785         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15786
15787 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15788
15789         * search.c (get_template_base{_recursive}): New fns.
15790         * pt.c (more_specialized): New fn.
15791         (do_function_instantiation): Use it.
15792         (unify): Handle base deduction.
15793         * cvt.c (joust): Use more_specialized.
15794         Don't arbitrarily choose between non-builtin candidates.
15795         (build_over_call): Call require_complete_type.
15796
15797         * decl.c (start_function): Statics are static even in a #pragma
15798         interface file.
15799
15800         * decl2.c (import_export_vtable): Disable vtable heuristic on
15801         systems with ASM_OUTPUT_EXTERNAL.
15802
15803         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15804         (standard_conversion): No std conv to enum type.
15805
15806         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15807         for ptm's.
15808
15809         * cvt.c (reference_binding): Bind directly to a base subobject of
15810         a class rvalue.
15811
15812         * cvt.c (build_new_op): Enforce access control.
15813
15814 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
15815
15816         * typeck2.c (process_init_constructor): When scanning the
15817         union for a named field, skip things that aren't FIELD_DECLs.
15818
15819         * method.c (synthesize_method): Don't scan fndecl's rtl if
15820         we're at the end of the file; just assume the function can't
15821         be inlined.
15822
15823 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15824
15825         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15826         it failed.
15827
15828         * cvt.c (build_user_type_conversion_1): Handle overloaded
15829         conversion ops.
15830
15831         * cvt.c (add_builtin_candidates): Don't consider type conversion
15832         operators for the first parameter of operator=.
15833
15834 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15835
15836         * typeck.c (complete_type): Only call layout_type if we're not
15837         expanding a template.
15838
15839 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
15840
15841         * cvt.c (compare_ics): Oops.
15842
15843         * cvt.c (op_error): Oops.
15844
15845         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15846         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
15847         (build_conv): Use them.
15848         (implicit_conversion): Use them.
15849         (convert_like): Handle them.
15850         (build_new_op): Handle builtin COND_EXPR again.
15851         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
15852         in lists of types for COND_EXPR.
15853         (add_builtin_candidate): Add enum candidates for COND_EXPR.
15854
15855 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
15856
15857         * typeck.c (build_modify_expr): Always attempt to build a call to
15858         the assignment operator, even if we're using a default one.
15859         (convert_for_initialization): Call complete_type.
15860
15861 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15862
15863         * cvt.c (reference_binding): A REF_BIND gets the reference type.
15864         (implicit_conversion): Likewise.
15865         (convert_like): Likewise.
15866         (compare_ics): Likewise.
15867         (compare_qual): Likewise.
15868         (print_z_candidates): Handle no candidates.
15869         (build_new_op): Don't handle builtin COND_EXPR for now.
15870
15871 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
15872
15873         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15874
15875 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15876
15877         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15878
15879         * cvt.c (build_builtin_candidate): Oops.
15880         (build_new_op): Oops.
15881
15882         * method.c (build_opfncall): Pass COND_EXPR on.
15883         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15884         (add_builtin_candidate{,s}): Likewise.
15885         (add_builtin_candidates): Likewise.
15886         (print_z_candidates, op_error, build_new_op): Likewise.
15887         (type_decays_to): New fn.
15888         * lex.c (init_lex): Just say ?: for COND_EXPR.
15889
15890 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15891
15892         * typeck.c (complete_type): Call layout_type rather than building
15893         a new array type.
15894
15895         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15896         only use ptrdiff_t.
15897
15898 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15899
15900         * cvt.c: Always compile the new overloading code (but don't use it).
15901         (implicit_conversion): Add a BASE_CONV when converting to
15902         the same class type.
15903         (convert_like): Handle BASE_CONV.
15904
15905 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15906
15907         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15908         (add_builtin_candidate): Likewise.
15909
15910         NEW_OVER changes:
15911         * typeck.c (build_x_function_call): Try an operator function
15912         whenever we call an object of class type.
15913         * method.c (build_opfncall): Pass CALL_EXPRs through.
15914         * cvt.c (implicit_conversion): Do const-ref case first.
15915         (add_conv_candidate, build_object_call, op_error): New fns.
15916         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15917         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15918         builtin candidates.
15919         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
15920         Fall back on preincrement handling.  Use op_error.
15921         Handle warn_synth.
15922         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
15923         an error_mark_node.
15924         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15925         properly.
15926
15927 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15928
15929         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15930
15931 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
15932
15933         * typeck.c (build_component_ref_1): Use build_component_ref
15934         instead of open coding it here.
15935
15936 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15937
15938         * g++.c (main): Don't link with -lg++.
15939
15940         NEW_OVER changes:
15941         * cvt.c (convert_to_reference): Don't use convert_from_reference on
15942         result of build_type_conversion.
15943         (cp_convert): Only call build_method_call for ctors if
15944         build_type_conversion failed.
15945         (ptr_complete_ob): New function.
15946         (TYPE_PTR{,OB,MEM}_P): New macros.
15947         ({add,build}_builtin_candidate{,s}): New functions.
15948         (print_z_candidates): Handle builtins.
15949         (build_user_type_conversion_1): Don't use conversion fns for
15950         converting to a base type.
15951         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15952         (build_user_type_conversion): Use convert_from_reference.
15953         (build_new_op): New function.
15954         (build_over_call): Fix handling of methods.
15955         (compare_ics): Handle AMBIG_CONV properly.
15956         * typeck2.c: Increment abort count.
15957         * method.c (build_opfncall): Forward most requests to build_new_op.
15958         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15959
15960 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15961
15962         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15963         invalid second argument to dump_expr_list.
15964
15965 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
15966
15967         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15968
15969 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
15970
15971         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15972         ASSEMBLE_EXTERNAL.
15973
15974 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
15975
15976         * typeck2.c (process_init_constructor): New pedwarn for using { }
15977         to initialize a pointer to member function.
15978         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15979         we can avoid the new error.
15980
15981 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
15982
15983         * typeck.c (build_ptrmemfunc1): New function to hide details of
15984         pointer to member functions better.
15985
15986 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
15987
15988         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15989         methods into the actual method, as we know the implied object is
15990         not used.
15991
15992 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15993
15994         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15995         inside a system header.
15996
15997 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
15998
15999         * call.c (build_method_call): Call complete_type on the
16000         instance type.
16001
16002 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16003
16004         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16005         for obj_ptr->func so that we can know which object to use in a
16006         method call.
16007
16008 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16009
16010         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16011         around things.  Also improve maintainability.
16012
16013 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16014
16015         * decl.c (grokdeclarator): Check for overflow when evaluating an
16016         array dimension.
16017
16018 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16019
16020         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16021         if NEW_OVER.
16022
16023         * typeck.c (build_x_function_call): Pass function overload
16024         questions to new overloading code if NEW_OVER.
16025         * init.c (expand_aggr_init_1): Only check for type conversion ops
16026         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16027         Don't check for ambiguity with constructor if NEW_OVER.
16028         * cvt.c (convert_to_reference): Dereference the result of a type
16029         conversion operator.
16030         (build_conv): Propagate ICS_USER_FLAG.
16031         (implicit_conversion): Call instantiate_type.
16032         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16033         (add_function_candidate): Fix cv-quals on argtype.
16034         (print_z_candidates): New function.
16035         (build_new_function_call): Call it.
16036         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16037         consider non-converting constructors.
16038         Call print_z_candidates.
16039         Return an AMBIG_CONV for an ambiguous conversion.
16040         (build_user_type_conversion): Handle AMBIG_CONV.
16041         (convert_like): Fix test for building TARGET_EXPR.
16042         Call instantiate_type.
16043         Handle AMBIG_CONV and LVALUE_CONV.
16044         (build_over_call): Handle 0 args and ellipsis.
16045         * cp-tree.def: Add AMBIG_CONV.
16046
16047 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16048
16049         * decl.c (lookup_name_real): If we find mem in obj when parsing
16050         `obj->mem', make sure we return the right value.
16051
16052 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16053
16054         * search.c (get_base_distance): Call complete_type.
16055
16056 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16057
16058         * decl.c (store_bindings): Make static.
16059
16060 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16061
16062         * init.c (expand_aggr_init_1): Don't check type conversions if
16063         NEW_OVER.
16064
16065         * cvt.c (z_candidate): Put back template field.
16066         (add_function_candidate): Set it.
16067         (add_template_candidate): Likewise.
16068         (joust): Use it.
16069         (compare_qual): Handle references and pointers to members.
16070         (compare_ics): Handle reference bindings.
16071
16072         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16073
16074 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16075
16076         * call.c (compute_conversion_costs): Call complete_type.
16077
16078         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16079         pointers, so we can handle template parameters.
16080
16081 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16082
16083         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16084         here; let's make it explicit instead of a side effect of an
16085         error check.
16086
16087 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16088
16089         * cvt.c (z_candidate): Remove template field.
16090         (reference_binding): Handle binding to temporary.
16091         (implicit_conversion): Likewise.
16092         (add_function_candidate): Handle artificial constructor parms.
16093         Handle functions with too few parms.
16094         (add_template_candidate): New function.
16095         (build_user_type_conversion_1): Handle constructors.
16096         (convert_like): Likewise.
16097         (build_over_call): Likewise.
16098         (build_new_function_call): Support templates.
16099         (compare_ics): Fix reference, inheritance handling.
16100
16101 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16102
16103         * decl.c: Add signed_size_zero_node.
16104         (init_decl_processing): Build it.
16105         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16106         when we're trying to make a negative delta.
16107
16108 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16109
16110         Stop doing this damn index==strchr variable name confusion.
16111         * class.c (add_virtual_function): Change local var INDEX to be
16112         named IDX.
16113         (add_method): Likewise.
16114         * lex.c (print_parse_statistics): Likewise.
16115         * search.c (make_memoized_table_entry): Likewise.
16116         (lookup_fnfields_here): Likewise.
16117         (lookup_field): Likewise.
16118         (lookup_fnfields): Likewise.
16119         (get_baselinks): Likewise.
16120         * sig.c (build_signature_table_constructor): Likewise.
16121         (build_signature_method_call): Likewise.
16122         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16123         (get_member_function_from_ptrfunc): Likewise.
16124         (build_ptrmemfunc): Change local var INDEX to be IDX.
16125         (c_expand_start_case): Likewise.
16126
16127 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16128
16129         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16130         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16131         (convert_to_reference): Use build_type_conversion to convert to
16132         the reference type directly.
16133         (standard_conversion): Fix void* case, non-conversions.
16134         (reference_binding): Fix expr == 0 case, non-conversions.
16135         (convert_like): Support REF_BIND.
16136         (compare_qual): Split out from compare_ics.
16137         (compare_ics): Use it, handle icses with only a qual_conv.
16138
16139         * init.c (expand_vec_init): Don't crash if decl is NULL.
16140
16141 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16142
16143         * mpw-config.in: New file, configury for Mac MPW.
16144         * mpw-make.sed: New file, makefile editing for MPW.
16145
16146 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16147
16148         * pt.c (instantiate_class_template): Call repo_template_used.
16149
16150         * search.c (lookup_conversions): Only lookup conversions in
16151         complete types.
16152
16153 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16154
16155         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16156         gcc's tree.def.
16157         * cp-tree.h, lex.c: Include cp-tree.def.
16158         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16159
16160 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16161
16162         * init.c (build_vec_delete_1): Call complete_type.
16163
16164 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16165
16166         * except.c (start_anon_func): Make sure anonymous functions are
16167         never external.
16168
16169 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16170
16171         * decl.c (finish_function): If function_depth > 1, set nested.
16172
16173         * decl2.c (grokbitfield): Revert Bob's change.
16174         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16175
16176 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16177
16178         * pt.c (add_pending_template): Handle types.
16179         (lookup_template_class): With -fexternal-templates, just add the class
16180         to pending_templates instead of instantiating it now.
16181         * decl2.c (finish_file): Handle types in pending_templates.
16182
16183 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16184
16185         * decl2.c (grokbitfield): Handle constant decls appropriately.
16186         Give an appropriate error message now instead of spewing core
16187         later.
16188
16189 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16190
16191         * decl2.c: Don't turn on thunks by default for now.
16192
16193 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16194
16195         * typeck.c (complete_type): Handle error_mark_node.
16196         (common_type, OFFSET_TYPE): Handle template_type_parms.
16197
16198 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16199
16200         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16201         regardless of DECL_INLINE.
16202
16203         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16204
16205         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16206
16207         * rtti.c (build_dynamic_cast): Support templates.
16208         * tree.def: Support DYNAMIC_CAST_EXPR.
16209         * pt.c (tsubst_copy): Likewise.
16210         * decl2.c (build_expr_from_tree): Likewise.
16211
16212 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16213
16214         * typeck.c (build_static_cast): Support templates.
16215         (build_const_cast): Likewise.
16216         * tree.def: Support CONST/STATIC_CAST_EXPR.
16217         * pt.c (tsubst_copy): Likewise.
16218         * decl2.c (build_expr_from_tree): Likewise.
16219
16220 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16221
16222         * decl2.c (finish_vtable_vardecl): Don't trust
16223         TREE_SYMBOL_REFERENCED for vtables of local classes.
16224
16225 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16226
16227         * pt.c (tsubst_copy): Handle operator T.
16228
16229 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16230
16231         * init.c (build_delete): Move creation of PARMS inside test of
16232         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16233
16234 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16235
16236         * typeck.c (build_conditional_expr): Don't assume that
16237         the arguments to ?: are always pointers or records.
16238
16239 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16240
16241         * decl2.c (import_export_decl): Still emit static/weak/comdat
16242         copies of inline template functions with -fno-implicit-templates.
16243
16244 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16245
16246         * init.c (build_delete): Determine the complete basetype
16247         path to the destructor we're calling.
16248
16249 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16250
16251         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16252         initialize the enum, because we really and truly don't know where
16253         it came from.
16254         (start_enum): Don't copy integer_zero_node because
16255         build_enumerator will do it.
16256
16257 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16258
16259         * decl.c (finish_function): Do access control on base destructors.
16260
16261         * pt.c (tsubst, case FUNCTION_DECL): Set up
16262         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16263         hose us.
16264
16265 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16266
16267         * cvt.c (build_up_reference): If we have already extended the
16268         lifetime of the temporary, don't try it again.
16269         * typeck.c (c_expand_return): Don't try and convert the return
16270         value twice when we want a reference, once is enough.
16271
16272 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16273
16274         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16275         LOOKUP_ONLYCONVERTING at all for now.
16276
16277         * search.c (add_conversions): Put the conversion function in
16278         TREE_VALUE, the basetype in TREE_PURPOSE.
16279         * cvt.c (build_type_conversion): Adjust.
16280         * cvt.c (build_expr_type_conversion): Adjust.
16281         * call.c (user_harshness): Adjust.
16282
16283 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16284
16285         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16286         backend's benefit.
16287
16288 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16289
16290         * except.c (expand_start_catch_block): Add a dummy region, if we
16291         get an error, so that we can avoid core dumping later.
16292
16293 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16294
16295         * cp-tree.h (OFFSET_REF): Remove.
16296         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16297         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16298         * init.c (expand_aggr_init_1): Likewise.
16299         (build_new): Likewise.
16300         * typeck.c (expand_target_expr): Likewise.
16301
16302 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16303
16304         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16305         TARGET_EXPR.
16306
16307 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16308
16309         * cvt.c (build_up_reference): Redo how and when temporaries are
16310         created.
16311         * decl.c (grok_reference_init): Don't try and be smart about
16312         running cleanups.
16313
16314 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16315
16316         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16317         (TARGET_EXPR...), now that it has 4 arguments.
16318         * tree.c (build_cplus_new): Likewise.
16319
16320 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16321
16322         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16323
16324         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16325         * decl.c (struct saved_scope): Remove named_labels,
16326         {base,member}_init_list.
16327         (maybe_push_to_top_level): Don't set them.  Call
16328         push_cp_function_context if appropriate.
16329         (pop_from_top_level): Likewise.
16330
16331         * method.c (do_build_assign_ref): Remove obsolete check of
16332         TYPE_HAS_ASSIGN_REF (basetype).
16333
16334         * decl.c (grokfndecl): Diagnose user definition of
16335         implicitly-declared methods.
16336
16337 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16338
16339         * method.c (do_build_copy_constructor): Add code to give
16340         meaningful error messages instead of crashing.
16341         (do_build_assign_ref): Don't synthesize assignment operators for
16342         classes containing reference or const members.
16343
16344         * class.c (struct base_info): Remove cant_synth_copy_ctor
16345         and cant_synth_asn_ref.
16346         (finish_base_struct): Remove the code that tries to conditionalize
16347         synthesis of copy constructors & assignment operators based on
16348         access permissions.  Instead, let it fail when it tries to
16349         synthesize the copy constructor.  This will give meaningful error
16350         messages instead of silently generating code to perform a bitcopy.
16351
16352 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16353
16354         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16355         determining types for constant values.
16356
16357         * decl.c (struct named_label_list): Use instead of stuffing
16358         random items into a TREE_LIST node.
16359         (named_label_uses): Use the new struct.
16360         (poplevel): Likewise.
16361         (lookup_label): Likewise.
16362         (define_label): Add an error message to tell the user the line
16363         where the goto is located in addition to the destination of the
16364         goto.
16365         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16366         named_label_uses.
16367         (finish_function): Likewise.
16368
16369         (start_decl): Complain about defining a static data member
16370         in a different type from which it was declared.
16371
16372 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16373
16374         * cvt.c (build_expr_type_conversion): Adjust.
16375
16376 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16377
16378         * call.c (build_method_call): Always convert 'this' to the
16379         appropriate type.
16380
16381         * search.c (add_conversions): Put the conversion function in
16382         TREE_VALUE, the type in TREE_PURPOSE.
16383         * cvt.c (build_type_conversion): Adjust.
16384         * call.c (user_harshness): Adjust.
16385
16386         * method.c (emit_thunk): Call temporary_allocation and
16387         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16388
16389         * tree.c (build_cplus_array_type): Handle tweaking of
16390         TYPE_MAIN_VARIANT here.
16391         * typeck.c (common_type): Not here.
16392
16393         * typeck.c (complete_type): Only try to complete an array type if
16394         it has a domain.
16395
16396 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16397
16398         * decl.c (grokvardecl): Call complete_type.
16399         (grokdeclarator): Call complete_type for PARM_DECLs.
16400
16401 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16402
16403         * pt.c (instantiate_class_template): Re-set
16404         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16405
16406 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
16407
16408         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16409         smart enough to do it right.
16410         * tree.c (cp_expand_decl_cleanup): Likewise.
16411         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16412         cp_expand_decl_cleanup.
16413         (store_parm_decls): Likewise.
16414         (hack_incomplete_structures): Likewise.
16415         * except.c (push_eh_cleanup): Likewise.
16416
16417 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
16418
16419         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16420         frontend to the backend where it belongs.
16421         * tree.c (unsave_expr): Likewise.
16422         (unsave_expr_now): Likewise.
16423         * tree.def (UNSAVE_EXPR): Likewise.
16424         * cp-tree.h (unsave_expr): Likewise.
16425         (unsave_expr_now): Likewise.
16426
16427 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
16428
16429         * init.c (emit_base_init): Make sure the partial EH cleanups live
16430         on the function_obstack.
16431
16432 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
16433
16434         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16435         when checking for pointer types.
16436
16437 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16438
16439         * pt.c (instantiate_class_template): Remove obsolete check for
16440         access declarations.
16441
16442 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
16443
16444         * call.c (build_overload_call): Simplify calls to
16445         build_overload_call by removing last parameter.
16446         (build_method_call): Likewise.
16447         * cp-tree.h: Likewise.
16448         * method.c (build_opfncall): Likewise.
16449         * typeck.c (build_x_function_call): Likewise.
16450
16451 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
16452
16453         * call.c (default_parm_conversions): Factor out common code.
16454         (build_method_call): Use it.
16455         (build_overload_call_real): Use it.
16456
16457 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
16458
16459         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16460         but pedwarn as the code is bogus.
16461         * typeck.c (decay_conversion): Likewise.
16462         (build_function_call_real): Use build_addr_func instead of
16463         default_conversion.  Don't allow pointer-to-method functions down
16464         here.
16465         (build_unary_op): Use real pointer-to-member functions instead of
16466         fake ones.
16467         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16468         (convert_for_assignment): Removed some obsolete code.
16469         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16470         build_x_function_call instead of current_class_ptr.  Only call
16471         digest_init once on an initializer, we do this just checking
16472         TREE_TYPE.
16473         (build_expr_from_tree): Pass current_class_ref to
16474         build_x_function_call instead of current_class_ptr.
16475         * init.c (build_member_call): Likewise.
16476         * pase.y: Likewise.
16477         * error.c (dump_expr): Handle OFFSET_REFs better.
16478         * pt.c (unify): Handle pointer-to-member functions better.
16479         * decl.c (finish_function): Clear out current_class_ref just like
16480         we do for current_class_ptr.
16481
16482         * typeck.c (get_delta_difference): Handle virtual bases better.
16483
16484 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16485
16486         * sig.c (build_signature_table_constructor): Use the delta for
16487         the original basetype for this virtual function with thunks.
16488         (build_signature_method_call): We still need to adjust 'this'
16489         with thunks.
16490
16491 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
16492
16493         * call.c (build_addr_func): New routine.  Used to get the `real'
16494         address of a function or a method.  Needed to avoid getting a
16495         pointer-to-member function.
16496         (build_call): New routine to build CALL_EXPRs.
16497         (build_method_call): Use it.
16498         * cvt.c (convert_to_aggr): Likewise.
16499         * typeck.c (build_function_call_real): Likewise.
16500         * sig.c (build_signature_table_constructor): Use build_addr_func.
16501         * cp-tree.h (build_call, build_addr_func): Declare them.
16502
16503 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
16504
16505         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16506         * parse.y: Remove uses of LOOKUP_AGGR.
16507
16508 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
16509
16510         * *.[chy]: Rename current_class_decl to current_class_ptr, and
16511         C_C_D to current_class_ref.
16512
16513 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16514
16515         * call.c (convert_harshness): Tighten up pointer conversions.
16516
16517 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
16518
16519         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16520         (finish_file): Likewise.
16521
16522 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16523
16524         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16525
16526         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16527         code.
16528
16529 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16530
16531         * decl2.c: Turn on thunks by default where supported.
16532
16533 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
16534
16535         * cp-tree.h (build_overload_call_maybe): Removed.
16536         * call.c (build_overload_call_real): Invert meaning of last arg to
16537         be require_complete.
16538         (build_overload_call): Likewise.
16539         * typeck.c (build_x_function_call): Use build_overload_call_real
16540         instead of build_overload_call_maybe.
16541
16542 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16543
16544         * decl2.c (finish_file): Don't try to emit functions that haven't
16545         been compiled.
16546
16547 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16548
16549         * decl2.c (finish_vtable_vardecl): Oops.
16550
16551         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16552         Also store the bindings from previous_class_values.
16553         (pop_from_top_level): Restore them.
16554
16555 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16556
16557         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16558         symbol has been referenced.
16559         (finish_file): Re-join synthesis/vtable loop with inline emission
16560         loop, disable inlining when an inline is output.
16561
16562 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16563
16564         * except.c (init_exception_processing): Setup saved_in_catch.
16565         (push_eh_cleanup): Reset __eh_in_catch.
16566         (expand_start_catch_block): Set __eh_in_catch.
16567
16568 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16569
16570         * except.c (push_eh_cleanup): Add tracking for whether or not we
16571         have an active exception object.
16572         (expand_builtin_throw): Use it to make sure a rethrow without an
16573         exception object is caught.
16574
16575 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16576
16577         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16578         cache.
16579
16580 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16581
16582         * decl2.c (finish_file): Also use sentries for vars with
16583         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16584         created).
16585
16586         * lex.c (handle_cp_pragma): Disable #pragma
16587         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16588
16589 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16590
16591         * method.c (emit_thunk): Wrap default case in
16592         temporary/permanent_allocation.
16593
16594         * method.c (make_thunk): Use DECL_ONE_ONLY.
16595         (emit_thunk): Call assemble_end_function.
16596
16597 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16598
16599         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16600         (import_export_decl): Likewise.
16601         (finish_prevtable_vardecl): Disable vtable hack if
16602         SUPPORTS_ONE_ONLY > 1.
16603
16604 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16605
16606         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16607         PREDECREMENT_EXPRs take two arguments, not one.
16608
16609 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16610
16611         * class.c (build_vtable_entry): Don't build thunks for abstract
16612         virtuals.
16613
16614         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16615         frontend.
16616
16617 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16618
16619         * class.c (set_rtti_entry): Use size_zero_node.
16620         (build_vtable): Likewise.
16621
16622 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
16623
16624         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16625         (prepare_fresh_vtable): Likewise.
16626
16627 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16628
16629         * method.c (emit_thunk): Call mark_used on the target function.
16630
16631         * call.c (build_method_call): Don't warn about pending templates.
16632
16633 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16634
16635         * decl2.c (finish_file): Fix list walking logic.
16636
16637         * typeck2.c (check_for_new_type): Only warn if -pedantic.
16638
16639 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
16640
16641         * class.c (finish_struct_1): Remove old code for
16642         dont_allow_type_definitions.
16643         * cp-tree.h: Likewise.
16644         * spew.c: Make sure cp-tree.h is included before parse.h, so the
16645         definition of flagged_type_tree is found before it is used.
16646         * lex.c: Likewise.
16647         * parse.y: Added the ftype member to the type union, and changed a
16648         number of rules to use it instead of ttype.  Added calls to
16649         check_for_new_type() as appropriate.
16650         * typeck2.c (check_for_new_type): New function for checking
16651         if a newly defined type appears in the specified tree.
16652         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
16653         for check_for_new_type().
16654
16655 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16656
16657         * decl2.c (finish_file): Only use a sentry if the decl is public.
16658
16659         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16660         don't pass LOOKUP_ONLYCONVERTING.
16661
16662 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16663
16664         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16665         properly keeps track of const and volatile type modifiers.
16666
16667 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16668
16669         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16670         * pt.c (comp_template_args): Use it.
16671
16672         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16673         assemble_external for artificial function decls.
16674
16675         * decl.c (cp_finish_decl): Oops.
16676
16677 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16678
16679         * decl2.c (import_export_decl): Put static data member templates
16680         into common storage, or make them weak, depending on whether they
16681         are dynamically or statically initialized.
16682         (get_sentry): New function.
16683         (finish_file): Do import_export_decl for static data members before
16684         building the init/fini functions.  Don't init/fini a variable that's
16685         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
16686         push/pop_temp_slots.
16687         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16688         expand_static_init thang.
16689         * method.c (get_id_2): New function.
16690
16691 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
16692
16693         * parse.y (empty_parms): Make sure we use C++-style prototypes
16694         when we're declaring member functions.
16695
16696 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16697
16698         * Makefile.in (CONFLICTS): 16 s/r conflicts.
16699         * parse.y (self_template_type): New nonterminal.
16700
16701 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16702
16703         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16704         name.
16705         * parse.y (base_class.1): Allow 'typename foo::bar'.
16706
16707         * lex.c (check_newline): Remove #pragma code that plays with the
16708         input stream, since we now deal with tokens.  Clear nextchar when
16709         we're done.
16710         (handle_cp_pragma): Use real_yylex.
16711         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
16712         in one place.
16713
16714         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16715
16716         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16717
16718 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16719
16720         * parse.y: New token SELFNAME for potential constructor.
16721         * spew.c (yylex): Handle it.
16722         * lex.c (identifier_type): Produce it.
16723
16724         * parse.y (complete_type_name): In :: case, don't push class binding.
16725         (complex_type_name): Likewise.
16726
16727 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
16728
16729         * typeck.c (build_reinterpret_cast): Handle pointer to member
16730         functions.
16731
16732 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16733
16734         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16735         pragmas.
16736         (check_newline): Put the vtable/unit/implementation/interface pragma
16737         code into handle_cp_pragma, replacing it with a call.
16738         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16739         args.  Get the next token after handling the pragma token.
16740
16741 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
16742
16743         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16744         (convert_to_pointer_force): Likewise.
16745
16746         * init.c (build_new): Fix array new without -fcheck-new.
16747
16748 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16749
16750         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16751         tree.c: Lose TYPE_NESTED_NAME.
16752
16753         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16754         as identifiers.
16755
16756         * tree.def: Add VEC_INIT_EXPR.
16757         * expr.c (cplus_expand_expr): Handle it.
16758         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16759         the extra file-scope symbol nastiness.
16760
16761 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16762
16763         * method.c (make_thunk): Thunks are static.
16764         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16765
16766         * decl2.c (mark_vtable_entries): Emit thunks as needed.
16767         (finish_file): Don't emit them here.
16768
16769 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16770
16771         * rtti.c (build_dynamic_cast): Handle null pointers.
16772         (ifnonnull): New function.
16773
16774 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
16775
16776         * call.c (build_method_call): Remember the original basetype we
16777         were called with.  Give an error message instead of trying
16778         (incorrectly) to call a non-static member function through a
16779         non-inherited class.
16780
16781         * search.c (expand_upcast_fixups): Mark the new fixup as
16782         DECL_ARTIFICIAL.
16783
16784 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16785
16786         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16787
16788         * class.c (set_rtti_entry): Fix for thunks.
16789
16790         * decl2.c (import_export_decl): Still emit typeinfo fns for
16791         cv-variants of builtin types.
16792
16793         * rtti.c (expand_class_desc): Set up base_info_type_node here.
16794         (init_rtti_processing): Instead of here.
16795
16796 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16797
16798         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16799         (build_typeid): Only complain about taking dynamic typeid without
16800         -frtti.
16801
16802         * decl2.c: flag_rtti defaults to 1.
16803
16804         * rtti.c (get_tinfo_var): The general class case is now smaller.
16805         (init_rtti_processing): Pack the latter three fields of base_info
16806         into 32 bits.
16807
16808 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
16809
16810         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16811
16812 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
16813
16814         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16815         (push_memoized_context): Split out code to undefer pop_type_level to
16816         (clear_memoized_cache): here.
16817         (pop_memoized_context): We can only handle one layer of deferral of
16818         pop_type_level so clear the cache, if there was a previous level.
16819
16820 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16821
16822         * rtti.c (init_rtti_processing): Build up base_info_type_node.
16823         (expand_class_desc): Use one pointer to an array of base_info
16824         structs, passed using a CONSTRUCTOR.
16825
16826 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
16827
16828         * class.c (build_vbase_path): Remove block extern for
16829         flag_assume_nonnull_objects here.
16830         (build_vfn_ref): Split out functionality into build_vtbl_ref.
16831         (build_vtbl_ref): New routine.
16832         (build_vtable): Set up rtti info here.
16833         (add_virtual_function): Note in CLASSTYPE_RTTI the best
16834         place where we can get the rtti pointers from to avoid having to
16835         search around for a place.
16836         (finish_base_struct): Likewise.
16837         (finish_struct_1): Likewise.  Never create totally new vtables
16838         with totally new vtable pointers for rtti.  Disable code to layout
16839         vtable pointers better until we want to break binary
16840         compatibility.
16841         * rtti.c (build_headof_sub): New routine to convert down to a
16842         sub-object that has an rtti pointer in the vtable.
16843         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
16844         maintainable.
16845         (build_dynamic_cast): Make sure we have saved it, if we need to.
16846         * search.c (dfs_init_vbase_pointers): Disable code that deals with
16847         a more efficient vtable layout, enable later.
16848         * call.c (flag_assume_nonnull_objects): Moved declaration to
16849         * cp-tree.h: here.  Declare build_vtbl_ref.
16850         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16851         function calls that want a tree.
16852
16853 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16854
16855         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16856         other X subobjects in the most derived type.  Ack.
16857
16858         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16859         get_typeid will do it for us.
16860         (get_typeid_1): Break out call-building for expand_*_desc to use.
16861         (get_typeid): Call it.
16862         (expand_*_desc): Likewise.
16863         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16864         and void *.
16865         (init_decl_processing): Lose builtin_type_tdescs lossage.
16866         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16867
16868 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16869
16870         * pt.c (tsubst): When calling set_nested_typename, use
16871         TYPE_NESTED_NAME (current_class_type) instead of
16872         current_class_name.
16873
16874         * decl.c (pushdecl): Likewise.
16875         (pushdecl_class_level): Likewise.
16876         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16877         set_nested_typename.
16878
16879 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16880
16881         * rtti.c (synthesize_tinfo_fn): Handle arrays.
16882
16883         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16884
16885 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16886
16887         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16888         (init_rtti_processing): Lose bad_cast_type.
16889         (build_dynamic_cast): Use throw_bad_cast.
16890
16891         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16892
16893         * decl2.c (finish_file): Don't synthesize artificial functions
16894         that are external and not inline.
16895
16896         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16897
16898         * decl2.c (finish_file): Handle having new inlines added to
16899         saved_inlines by synthesis.
16900
16901         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16902
16903 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16904
16905         RTTI rewrite to initialize nodes as needed, not require that
16906         users #include <typeinfo>, complete functionality and reduce wasted
16907         space.
16908         * rtti.c (init_rtti_processing): New fn.
16909         (build_typeid): The vtable entry is now a function.
16910         (get_tinfo_var): New fn.
16911         (get_tinfo_fn): Likewise.
16912         (get_typeid): Use it.
16913         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16914         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16915         points __rtti_*.
16916         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16917         (synthesize_tinfo_fn): New fn.
16918         * method.c (build_t_desc_overload): Lose.
16919         (build_overload_with_type): More generic.
16920         * decl.c (init_decl_processing): Call init_rtti_processing.
16921         * class.c (set_rtti_entry): Use get_tinfo_fn.
16922         * decl2.c (mark_vtable_entries): Mark the rtti function.
16923         (finish_prevtable_vardecl): Don't build_t_desc.
16924         (import_export_decl): Handle tinfo functions.
16925         (finish_file): Likewise.
16926         * typeck.c (inline_conversion): New fn.
16927         (build_function_call_real): Use it.
16928         * cp-tree.h: Add decls.
16929
16930         * method.c (hack_identifier): Also convert component_refs from
16931         references.
16932
16933         * lex.c (cons_up_default_function): Use the type, not the name, in
16934         declspecs.
16935
16936         * decl2.c (import_export_vtable): Fix weak vtables.
16937
16938 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
16939
16940         * search.c (get_base_distance_recursive): Fix access checks for
16941         protected bases.
16942
16943 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16944
16945         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16946         cp-tree.h.
16947         (convert_harshness): Add prototypes wrapped by PROTO.
16948         * decl2.c (grok_function_init): Likewise.
16949         (do_toplevel_using_decl): Change to void return type.
16950         * class.c (build_vtable_entry): Remove decl of make_thunk.
16951         (merge_overrides): Fix order of arg definitions.
16952         (finish_vtbls): Likewise.
16953         (fixup_vtable_deltas): Likewise.
16954         (modify_all_direct_vtables): Likewise.
16955         (modify_all_indirect_vtables): Likewise.
16956         * search.c (get_base_distance_recursive): Likewise.
16957         (get_abstract_virtuals_1): Likewise.
16958         (fixup_virtual_upcast_offsets): Likewise.
16959         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16960         * init.c (perform_member_init): Fix order of arg definitions.
16961         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16962         * cp-tree.h (make_thunk): Add decl.
16963         (overload_template_name, push_template_decl): Add decls.
16964         (do_toplevel_using_decl): Change to void return type.
16965         (vec_binfo_member): Add decl.
16966
16967 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16968
16969         * typeck.c (mark_addressable, convert_for_assignment,
16970         convert_for_initialization, pointer_int_sum, pointer_diff,
16971         unary_complex_lvalue): Add prototypes wrapped by PROTO.
16972         (convert_sequence): #if 0 fn decl, since definition also is.
16973
16974 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
16975
16976         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16977         cast to pointer types for type searching.
16978
16979 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16980
16981         * typeck.c (get_delta_difference): Use cp_error, not error, in the
16982         case where BINFO == 0.
16983
16984 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
16985
16986         * call.c (build_method_call): Fix wording of error messages so
16987         constructors come out right.
16988
16989 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
16990
16991         * decl.c (push_overloaded_decl): Don't warn about hidden
16992         constructors when both the type and the function are declared
16993         in a system header file.
16994
16995 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16996
16997         * class.c (finish_struct_1): Propagate the TYPE_PACKED
16998         flag for the type to the type's fields.
16999
17000 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17001
17002         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17003
17004 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17005
17006         * class.c (base_info, finish_base_struct): Replace
17007         needs_virtual_dtor with base_has_virtual.
17008
17009         (finish_struct_1): Remove the old code that tried to make default
17010         destructors virtual.  Use base_has_virtual when checking if we need
17011         to add a vtable entry for the rtti code.
17012
17013 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17014
17015         * pt.c (push_template_decl): Complain about template decl with
17016         inappropriate declaration.
17017
17018 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17019
17020         * typeck.c (build_x_unary_op): Remove bogus check for taking
17021         the address of a member function.
17022
17023 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17024
17025         * parse.y (constructor_declarator): Only push the class if
17026         we are not already in the class.
17027
17028 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17029
17030         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17031         Add additional argument to INIT_CUMULATIVE_ARGS.
17032
17033 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17034
17035         * decl.c (shadow_tag): Fix error about anon union with methods.
17036
17037         * parse.y (self_reference): Only generate a self-reference if this
17038         is a non-template class.
17039         (opt.component_decl_list): Only use it if it was generated.
17040
17041         * parse.y (component_decl_1): Use constructor_declarator.
17042         (fn.def2): Likewise.
17043         (notype_component_declarator0): Likewise.
17044
17045 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17046
17047         * typeck.c (build_x_unary_op): Add checks for taking the address
17048         of a TARGET_EXPR or of a member function, and give appropriate
17049         warnings.
17050
17051 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17052
17053         * pt.c (process_template_parm): Allow template type parms to be
17054         used as types for template const parms.
17055
17056 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17057
17058         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17059         function_obstack.
17060
17061 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17062
17063         * decl.c (lookup_name_real): Be even more picky about the
17064         ambiguous lookup warning.
17065         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17066         * parse.y (constructor_declarator): Rather than here.
17067
17068         * parse.y (constructor_declarator): New nonterminal.
17069         (fn.def1): Use it.
17070         (explicit_instantiation): Likewise.
17071
17072 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17073
17074         Add implicit declaration of class name at class scope.
17075         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17076         * parse.y (self_reference): New nonterminal.
17077         (opt.component_decl_list): Use it.
17078         (fn.def1): Add nested_name_specifier type_name cases.
17079         * class.c (build_self_reference): New function.
17080         (finish_struct): Handle access_default later, move self-reference
17081         decl to the end.
17082         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17083         * cp-tree.h: Adjust.
17084
17085         * pt.c (do_function_instantiation): Separate handling of member
17086         functions and non-member functions properly.
17087
17088 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17089
17090         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17091
17092         * class.c (finish_struct_1): Check the right slot for destructors.
17093
17094         * decl.c (start_enum): Complain about enum templates.
17095
17096 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17097
17098         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17099         * typeck.c (unary_complex_lvalue): Likewise.
17100
17101 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17102
17103         * typeck.c (c_expand_return): Check for a returned local
17104         array name, similar to the check for an ADDR_EXPR.
17105
17106 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17107
17108         * decl.c (cp_finish_decl): Don't build cleanups for static
17109         variables here.
17110
17111 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17112
17113         * typeck.c (build_modify_expr): Fix error messages to be more
17114         accurate.
17115         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17116         assignment operators.
17117         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17118         assignment operators.
17119
17120 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17121
17122         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17123         give an error if initialized.  pedwarn about nested type with the
17124         same name as its enclosing class.
17125
17126         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17127
17128         * typeck.c (require_complete_type): Be sure to instantiate the
17129         MAIN_VARIANT of the type.
17130
17131         * decl2.c (finish_file): Instantiate pending templates before
17132         processing static constructors and destructors.
17133
17134         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17135         unless at_eof.
17136
17137 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17138
17139         * decl2.c (delete_sanity): If error_mark_node is passed
17140         in as an expression, quit while we're ahead.
17141
17142         * decl.c (grokdeclarator): Give an error message if `friend'
17143         is combined with any storage class specifiers.
17144
17145 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17146
17147         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17148         definition of nonexistent nested type.
17149
17150         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17151         not to say 'typedef'.
17152
17153 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17154
17155         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17156         * search.c (dfs_walk, dfs_init_vbase_pointers,
17157         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17158         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17159
17160 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17161
17162         * except.c (build_throw): Support minimal parse.
17163         * pt.c (tsubst_copy): Support THROW_EXPR.
17164         * decl2.c (build_expr_from_tree): Likewise.
17165
17166         * pt.c (mangle_class_name_for_template): Always allocate
17167         scratch_firstobj.
17168
17169 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17170
17171         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17172         when trying to cast from an incomplete type.
17173
17174 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17175
17176         * pt.c (instantiate_class_template): Don't bother setting up
17177         CLASSTYPE_TAGS explicitly, as the nested types will add
17178         themselves.
17179
17180 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17181
17182         * decl.c (shadow_tag): Remove old error check for usage of
17183         an enum without a previous declaration.
17184         (xref_tag): Add error message about usage of enums without a
17185         previous declaration.
17186
17187 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17188
17189         * lex.c (do_identifier): Only do name consistency check if we're
17190         parsing.
17191
17192         * pt.c (push_template_decl): Don't crash if we get a member defn
17193         that doesn't match.
17194
17195         * decl.c (xref_tag_from_type): New function to do an xref without
17196         always having to figure out code_type_node.
17197         * cp-tree.h: Declare it.
17198         * pt.c (instantiate_class_template): Use it for friend classes.
17199         (lookup_template_class): Use it.
17200
17201         * typeck2.c (build_functional_cast): Pull out a single parm before
17202         passing it to build_c_cast.
17203
17204 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17205
17206         * expr.c (do_case): Give an error message if a pointer is
17207         given as a case value.
17208
17209 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17210
17211         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17212         an overload list.
17213
17214         * lex.c (cons_up_default_function): Really, now, interface hackery
17215         does not apply to synthesized methods.
17216
17217 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17218
17219         * call.c (build_method_call): Ctors and dtors now have special names
17220         with respect to lookups.
17221         * class.c (add_method): Likewise.
17222         (grow_method): Likewise.
17223         (finish_struct_methods): Likewise.
17224         (warn_hidden): Likewise.
17225         (finish_struct_1): Likewise.
17226         * cvt.c (convert_to_reference): Likewise.
17227         (convert_to_aggr): Likewise.
17228         (cp_convert): Likewise.
17229         * decl2.c (check_classfn): Likewise.
17230         * init.c (expand_member_init): Likewise.
17231         (expand_default_init): Likewise.
17232         (expand_aggr_init_1): Likewise.
17233         (build_offset_ref): Likewise.
17234         (build_new): Likewise.
17235         (build_delete): Likewise.
17236         * lex.c (do_inline_function_hair): Likewise.
17237         * search.c (lookup_field_1): Likewise.
17238         (lookup_fnfields_here): Likewise.
17239         (lookup_field): Likewise.
17240         (lookup_fnfields): Likewise.
17241         (get_virtual_destructor): Likewise.
17242         (dfs_debug_mark): Likewise.
17243         (dfs_pushdecls): Likewise.
17244         (dfs_compress_decls): Likewise.
17245         * tree.c (layout_basetypes): Likewise.
17246         * typeck.c (build_component_ref): Likewise.
17247         (build_x_function_call): Likewise.
17248         (build_modify_expr): Likewise.
17249         (convert_for_initialization): Likewise.
17250         (build_functional_cast): Likewise.
17251         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17252         (CTOR_NAME): New.
17253         (DTOR_NAME): New.
17254         * decl.c (ctor_identifier): New.
17255         (dtor_identifier): New.
17256         (init_decl_processing): Set them.
17257
17258 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17259
17260         * typeck.c (build_component_ref): Don't get confused by fields whose
17261         context has no type name, like pointer to member functions.
17262
17263 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17264
17265         * decl.c (grokdeclarator): Handle typedef without declarator.
17266
17267         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17268
17269         * parse.y (bad_parm): Catch another case of missing `typename'.
17270
17271         * lex.c (yyprint): Handle TYPE_DECLs.
17272
17273         * decl.c (start_function): Don't try to be clever.
17274
17275         * lex.c: Lose compiler_error_with_decl.
17276         * typeck2.c: Lose error_with_aggr_type.
17277         (incomplete_type_error): Use cp_* instead of old functions.
17278         (readonly_error): Likewise.
17279         * typeck.c (convert_arguments): Likewise.
17280         * search.c (lookup_nested_field): Likewise.
17281         * method.c (make_thunk): Likewise.
17282         * decl.c (grokparms): Likewise.
17283         * cp-tree.h: Update.
17284
17285         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17286         and value.
17287
17288 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17289
17290         * method.c (build_opfncall): When deleting a pointer to an
17291         array, build a new pointer to the tree past any ARRAY_TYPE
17292         nodes.
17293
17294 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17295
17296         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17297
17298 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17299
17300         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17301         and ! DECL_INLINE.
17302
17303         * decl.c (finish_function): Don't set nested based on
17304         hack_decl_function_context.
17305         * parse.y (function_try_block): Check for nested function.
17306         (pending_inlines): Likewise.
17307
17308         * decl2.c (build_expr_from_tree): If a unary op already has a
17309         type, just return it.
17310
17311         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17312
17313         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17314         (finish_file): Check the return value of walk_vtables.
17315         (finish_prevtable_vardecl): Return int.
17316         (finish_vtable_vardecl): Likewise.
17317         (prune_vtable_vardecl): Likewise.
17318         * lex.c (set_vardecl_interface_info): Likewise.
17319         * cp-tree.h: Adjust return types.
17320
17321         * class.c (delete_duplicate_fields_1): Don't complain about
17322         duplicate nested types if they're the same type.
17323         (finish_struct): Remove check for duplicate.
17324         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17325
17326 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17327
17328         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17329
17330         * decl.c (grokdeclarator): Lose special handling of class-level
17331         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17332         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17333
17334         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17335
17336         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17337
17338         * search.c (compute_access): Fix handling of anonymous union
17339         members.
17340         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17341         from anonymous unions to their members.
17342
17343         * typeck.c (build_x_function_call): For static member functions,
17344         hand off to build_member_call.
17345
17346 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17347
17348         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17349
17350         * init.c (expand_vec_init): Fix init == 0 case.
17351
17352 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17353
17354         * init.c (build_new): pedwarn about init and array new.
17355         (expand_vec_init): Handle lists, use convert_for_initialization.
17356
17357         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17358         when converting to an aggregate type.
17359         * cvt.c (cp_convert): Pass it through.
17360
17361         * typeck.c (build_conditional_expr): Handle user-defined
17362         conversions to slightly different types.
17363
17364         * decl.c (grokdeclarator): Force an array type in a parm to be
17365         permanent.
17366
17367         * decl2.c (do_using_directive): Sorry.
17368         (do_namespace_alias): Likewise.
17369         * lex.c (real_yylex): Warn about using the `namespace' keyword.
17370
17371 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17372
17373         * parse.y (datadef): Move call to note_list_got_semicolon up.
17374
17375 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
17376
17377         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17378
17379 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
17380
17381         * decl.c (cp_finish_decl): The exception regions have to be
17382         nested, not overlapping.  We start the exception region for a
17383         decl, after it has been fully built, and all temporaries for it
17384         have been cleaned up.
17385
17386 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
17387
17388         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17389
17390 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17391
17392         * tree.def: Add RETURN_INIT.
17393         * pt.c (instantiate_decl): Handle RETURN_INIT.
17394         * decl.c (store_return_init): Handle minimal_parse_mode.
17395
17396         * tree.c (cp_build_type_variant): Just return an error_mark_node.
17397         * decl.c (make_typename_type): Don't try to get the file and line
17398         of an identifier.
17399         * typeck.c (comptypes): Handle TYPENAME_TYPE.
17400
17401 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17402
17403         * decl.c (poplevel): Make sure we clear out and restore old local
17404         non-VAR_DECL values by default when they go out of scope.
17405
17406 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17407
17408         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17409         referring to addresses of variables and functions.
17410
17411         * error.c (dump_expr): Support SIZEOF_EXPR.
17412
17413         * init.c (do_friend): Use the return value of check_classfn.
17414
17415         * typeck.c (convert_arguments): Call complete_type.
17416
17417         * method.c (hack_identifier): After giving an error, set value to
17418         error_mark_node.
17419
17420 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17421
17422         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17423         lossage for local classes.
17424         * cp-tree.h: Declare it.
17425         * decl.c (lookup_name_real): Evil, painful hack for local classes.
17426         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17427         Use hack_decl_function_context.
17428         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17429         (start_function): Use hack_decl_function_context.
17430         (finish_function): Likewise.
17431         * method.c (synthesize_method): Likewise.
17432         * lex.c (process_next_inline): Likewise.
17433         (do_pending_inlines): Likewise.
17434         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17435         done with it.
17436
17437 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
17438
17439         * sig.c (build_signature_pointer_or_reference_type): Align
17440         signature pointers/references on 8-byte boundaries so they can be
17441         grabbed 2 words at a time on a Sparc.
17442
17443 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
17444
17445         * method.c (hack_identifier): Requiring a static chain is now a
17446         hard error.
17447         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17448         functions.
17449
17450 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17451
17452         * init.c (build_offset_ref): Call complete_type.
17453
17454         * decl.c (pop_from_top_level): Always pop previous_class_type.
17455
17456         * parse.y: Handle multiple decls in a for-init-statement.
17457         * pt.c (tsubst_expr): Likewise.
17458
17459         * pt.c (tsubst): Use tsubst_expr for the second operand of an
17460         ARRAY_REF.
17461
17462         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17463         (poplevel_class): Set it here.
17464         (pop_from_top_level): Pop it here if we're returning to class scope.
17465         * class.c (pushclass): Don't set it here.
17466
17467         * decl.c (maybe_push_to_top_level): Save current_template_parms,
17468         and clear it if !pseudo.
17469         (pop_from_top_level): Restore it.
17470
17471         * decl2.c (finish_file): Push the dummy each time we walk the list
17472         of vtables.
17473
17474         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17475         something for CAST_EXPR.
17476
17477 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17478
17479         * cvt.c (cp_convert): Warn about implicit conversion of the
17480         address of a function to bool, as it is always true.
17481
17482 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17483
17484         * typeck.c (c_expand_return): Fix warning for local externs returned.
17485
17486 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17487
17488         * tree.c (mapcar): Propagate const and volatile properly.
17489
17490         * typeck.c (complete_type): Be sure to instantiate the
17491         MAIN_VARIANT of the type.
17492
17493         * method.c (synthesize_method): Class interface hackery does not
17494         apply to synthesized methods.
17495
17496 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17497
17498         * pt.c (comp_template_args): Use comptypes rather than just
17499         checking for TEMPLATE_TYPE_PARM equivalence.
17500
17501         * typeck.c (build_x_function_call): Call complete_type before
17502         checking TYPE_OVERLOADS_CALL_EXPR.
17503
17504 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
17505
17506         * g++.c (main): Check also for new define ALT_LIBM.
17507
17508 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17509
17510         * pt.c (instantiate_class_template): If we don't have a pattern
17511         yet, that's OK.
17512         (coerce_template_parms): If we see a local class, bail.
17513
17514         * decl.c (grok_reference_init): Make sure there's a type before
17515         checking its code.
17516
17517         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17518         (push_template_decl): Likewise.
17519
17520         * parse.y (named_class_head): Set
17521         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17522
17523         * decl.c (xref_tag): Diagnose redeclaration of template
17524         type-parameter name.
17525
17526         * error.c (dump_type): Handle anonymous template type parms.
17527
17528         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17529         TYPE_STUB_DECL.
17530         (coerce_template_parms): Likewise.
17531
17532 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
17533
17534         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17535         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17536
17537 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17538
17539         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17540         before trying to get its STUB_DECL.
17541         (coerce_template_parms): Likewise.
17542
17543         * parse.y (template_type_parm): If they didn't use 'class',
17544         pretend they did after giving an error.
17545
17546         * pt.c (coerce_template_parms): Diagnose use of local class.
17547
17548         * decl.c (grok_reference_init): Use instantiate_type.
17549
17550         * error.c (dump_expr): Handle TEMPLATE_DECLs.
17551
17552         * parse.y (named_class_head): Diagnose mismatching types and tags.
17553
17554         * decl.c (pushdecl): Type decls and class templates clash with
17555         artificial type decls, not hide them.
17556
17557         * decl.c (redeclaration_error_message): Diagnose redefinition of
17558         templates properly.
17559         (duplicate_decls): Diagnose disallowed overloads for template
17560         functions, too.
17561
17562         * decl.c (start_decl): Call complete_type before checking for a
17563         destructor.
17564
17565         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17566
17567         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17568
17569 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17570
17571         * decl.c (grok_op_properties): Don't check for operator++(int) in
17572         a template.
17573
17574         * tree.c (perm_manip): Return a copy of variable and function
17575         decls with external linkage.
17576
17577         * tree.def: Change some of the min tree codes to type "1".
17578         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17579         * method.c (build_overload_int): Emit something arbitrary for
17580         anything but an INTEGER_CST if we're in a template.
17581
17582         * decl.c (cp_finish_decl): Call complete_type before deciding
17583         whether or not to lay out the decl.
17584
17585         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17586
17587 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17588
17589         * typeck2.c (build_x_arrow): Call complete_type.
17590
17591         * pt.c (add_pending_template): Broken out.
17592         (lookup_template_class): If -fexternal-templates, call it for all
17593         the methods of implemented types.
17594         (instantiate_class_template): Instead of instantiating them here.
17595         (instantiate_decl): Handle -fexternal-templates earlier.
17596
17597 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17598
17599         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17600         memoized lookup stuff inside GATHER_STATISTICS.
17601
17602 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17603
17604         * decl.c (start_decl): Complain about array of incomplete type
17605         here.
17606         (grokdeclarator): Not here.
17607
17608         * parse.y (template_parm): Expand full_parm inline so we can set
17609         the rule's precedence.
17610
17611         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17612         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17613         * decl2.c (grokbitfield): Don't check for integer constant here.
17614         * class.c (finish_struct_1): Check here.
17615
17616         * decl.c (define_label): Make the min decl go on permanent_obstack.
17617
17618         * pt.c (unify): Don't handle CONST_DECLs.
17619         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17620         (tsubst_copy): Likewise.
17621
17622         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17623         CONST_DECL for a template parm.
17624
17625 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17626
17627         * decl.c (grokdeclarator): Complain about array of incomplete type
17628         here.
17629         (start_decl_1): Not here.
17630
17631         * pt.c (tsubst): Handle pointer-to-function declarators.
17632
17633         * method.c (hack_identifier): If pedantic, diagnose local class
17634         methods that require a static chain.
17635
17636         * decl.c (grok_op_properties): No longer static.
17637         * cp-tree.h: Declare it.
17638         * pt.c (tsubst): Call it for operators.
17639         Use tsubst_copy for TREE_VECs.
17640
17641         * parse.y (template_arg): The expr has precedence like '>'.
17642
17643 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17644
17645         * pt.c (coerce_template_parms): Don't coerce an expression using
17646         template parms.
17647         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17648         (tsubst): Don't use build_index_2_type if the max_value uses template
17649         parms.
17650         * method.c (build_overload_int): Emit something arbitrary for an
17651         expression using template parms.
17652
17653         * parse.y (template_close_bracket): New non-terminal to catch use
17654         of '>>' instead of '> >' in template class names.
17655         (template_type): Use it.
17656         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17657
17658         * tree.def: Add CAST_EXPR.
17659         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17660         CONVERT_EXPR for minimal_parse_mode.
17661         * typeck.c (build_c_cast): Likewise.
17662         * pt.c (tsubst_copy): Likewise.
17663         * decl2.c (build_expr_from_tree): Likewise.
17664         * error.c (dump_expr): Likewise.
17665
17666 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17667
17668         * except.c (SetTerminate, SetUnexpected): Put back global vars.
17669         (init_exception_processing): Put back decl/init of
17670         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17671         fns from libstdc++.
17672
17673         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17674         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17675         Delete unused fns.
17676         * cp-tree.h (declare_uninstantiated_type_level,
17677         uninstantiated_type_level_p): Delete prototypes.
17678
17679 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17680
17681         * pt.c (tsubst_expr): Add default return.
17682
17683 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17684
17685         * error.c (fndecl_as_string): Delete unused arg CNAME.
17686         * sig.c (build_signature_table_constructor,
17687         build_signature_method_call): Fix calls.
17688
17689         * class.c (the_null_vtable_entry): Delete var definition.
17690         (init_class_processing): Delete tree the_null_vtable_entry init.
17691         * decl.c (no_print_{functions, builtins}): Declare as static.
17692         (__tp_desc_type_node): #if 0 var definition.
17693         (init_type_desc): #if 0 init of __tp_desc_type_node.
17694         (vb_off_identifier): Move var decl into init_decl_processing.
17695         (current_function_assigns_this): Declare as static.
17696         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17697         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17698         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17699         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17700         * init.c (BI_header_type, BI_header_size): Declare as static.
17701         * pt.c (template_classes): Delete unused var.
17702         (add_pending_template): Delete decl for non-existent fn.
17703         (lookup_template_class): Delete vars CODE and TAG_CODE.
17704         (instantiate_template): Delete unused var TARGS.
17705         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17706         Delete decls.
17707         (__tp_desc_type_node): #if 0 var decl.
17708         (fndecl_as_string): Fix prototype.
17709
17710 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17711
17712         * tree.def: Add GOTO_STMT.
17713         * pt.c (tsubst_expr): Support goto and labels.
17714         * decl.c (define_label): Support minimal parsing.
17715         * parse.y (simple_stmt): Likewise.
17716
17717 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17718
17719         * xref.c (GNU_xref_member): Only define/set var I if
17720         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17721         used.
17722         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17723         (GNU_xref_end): Fix call.
17724         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17725         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17726
17727         * tree.c (build_exception_variant): Delete unused vars I, A, T,
17728         T2, and CNAME.
17729         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17730         (mapcar): Delete unused var CODE.
17731         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17732         (break_out_cleanups): Fix call.
17733         (bot_manip): Likewise.
17734         * call.c (build_method_call): Likewise.
17735         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17736         Likewise.
17737         * typeck.c (unary_complex_lvalue, build_modify_expr,
17738         convert_for_initialization): Likewise.
17739         * typeck2.c (build_functional_cast): Likewise.
17740         * cp-tree.h (build_cplus_new): Fix prototype.
17741
17742         * repo.c (open_repo_file): Delete unused var Q.
17743         (repo_compile_flags, repo_template_declared,
17744         repo_template_defined, repo_class_defined, repo_inline_used,
17745         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17746         (repo_get_id, repo_vtable_used): Declare as static.
17747         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17748         prototypes.
17749
17750 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17751
17752         * parse.y (pending_inlines): Add function_try_block case.
17753
17754         * pt.c (unify): Fix for template const parms.
17755
17756 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17757
17758         * lex.c (extract_interface_info): Delete forward decl.
17759         (default_copy_constructor_body, default_assign_ref_body): Delete
17760         decls for non-existent functions.
17761         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17762         (init_lex): Delete setting them.
17763         (cons_up_default_function): Delete unused vars FUNC_BUF,
17764         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
17765         #if 0'd synth code.
17766         (toplevel, expression_obstack): Delete unused extern decls.
17767         (tree_node_kind): Delete unused enum.
17768         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17769         GATHER_STATISTICS.
17770         (tree_node_kind_names): Delete unused extern decl.
17771         (synth_obstack): Delete unused var.
17772         (init_lex): Don't set it.
17773         (init_parse): Add decl before use.
17774         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17775         (current_unit_{name, language}): Delete unused vars.
17776         (check_newline): Don't bother setting them, just accept the #pragma.
17777         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17778         (current_unit_{name, language}): Delete decls.
17779
17780         * search.c: Wrap all of the memoized functions, macros, and
17781         variables inside #ifdef GATHER_STATISTICS.
17782         (lookup_field, lookup_fnfields): Likewise.
17783         (init_search_processing): Likewise.
17784         (reinit_search_statistics): Wrap whole function.
17785         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17786
17787         * decl.c (finish_function): Only call pop_memoized_context if
17788         GATHER_STATISTICS is defined.
17789         (start_function): Likewise for push_memoized_context.
17790         * class.c (pushclass, popclass): Likewise.
17791
17792         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17793         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17794
17795         * cvt.c (cp_convert): Delete unused local var FORM.
17796         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17797         prototypes.
17798
17799 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17800
17801         * pt.c (do_poplevel): Oops; really return what we get from
17802         poplevel this time.
17803
17804 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17805
17806         * cp-tree.h (is_aggr_type): Add prototype.
17807
17808         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17809         * method.c ({push,pop}_cp_function_context): Delete decls.
17810         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17811         (SetUnexpected, SetTerminate): Delete unused vars.
17812         (init_exception_processing): Don't set SetUnexpected or
17813         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17814         (output_exception_table_entry): Delete unused array LABEL.
17815         (expand_internal_throw): Delete unused var PARAMS.
17816         (expand_start_catch_block): Delete unused var CLEANUP.
17817         (emit_exception_table): Delete unused var EH_NODE_DECL.
17818         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17819         GOTO_UNWIND_AND_THROW.  Don't set them.
17820         (end_eh_unwinder): Add top decl.
17821         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17822         (exception_section, push_rtl_perm, do_function_call,
17823         lang_interim_eh, push_eh_cleanup, eh_outer_context,
17824         expand_end_eh_spec, end_eh_unwinder): Declare as static.
17825         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17826         throw_used): Likewise.
17827         * cp-tree.h (expand_end_eh_spec): Delete prototype.
17828
17829         * search.c (dfs_mark, dfs_mark_vtable_path,
17830         dfs_unmark_vtable_path, dfs_mark_new_vtable,
17831         dfs_unmark_new_vtable, dfs_clear_search_slot,
17832         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17833         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17834         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17835         functions.
17836         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17837         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17838         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17839         Only define #ifdef GATHER_STATISTICS.
17840         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17841         is defined.
17842         (vbase_decl): Delete var definition.
17843         (init_search): Delete old decl.
17844         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17845         never actually used.
17846         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17847         (get_base_distance_recursive): Delete unused fourth arg
17848         BASETYPE_PATH.  Fix call .
17849         (get_base_distance): Fix call.
17850         (push_class_decls): Delete unused var ID.
17851         (make_memoized_table_entry): Declare as static.
17852         (breadth_first_search): Declare as static.
17853         (tree_has_any_destructor_p): Declare as static.
17854         (pop_class_decls): Delete unused arg pop_class_decls.
17855         * class.c (popclass): Fix call to pop_class_decls.
17856         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17857         tree_has_any_destructor_p): Delete prototypes.
17858
17859         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17860         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
17861         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17862         (build_user_desc): Delete unused var T.
17863         (build_class_desc): Delete unused vars T and OFF.
17864         (build_t_desc): Delete unused var NAME_STRING.
17865         (build_headof): Make static.
17866         (get_bad_cast_node): Likewise.
17867         (get_def_to_follow): Likewise.
17868         * cp-tree.h (init_type_desc): Add prototype.
17869         (build_headof): Remove prototype.
17870
17871 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17872
17873         * pt.c (tsubst): Only look for matching decls at file scope for
17874         non-member functions.
17875
17876         * call.c (build_scoped_method_call): Handle scoped destructor
17877         calls in templates.
17878
17879         * decl.c (*_top_level): Also save previous_class_values.
17880
17881         * pt.c (tsubst_expr): Support do {} while loops.
17882         * parse.y (simple_stmt): Likewise.
17883         * tree.def: Likewise.
17884
17885         * method.c (build_overload_identifier): For a class nested in a
17886         template class, don't mangle in the template parms from our
17887         context.
17888
17889         * lex.c, cp-tree.h: Remove support for template instantiations in
17890         the pending_inlines code.
17891         * pt.c: Remove dead functions and unused arguments.
17892         (uses_template_parms): TYPENAME_TYPEs always use template parms.
17893         * parse.y: Stop passing anything to end_template_decl.
17894         * tree.c (print_lang_statistics): Only print tinst info #ifdef
17895         GATHER_STATISTICS.
17896
17897 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17898
17899         * init.c (expand_recursive_init{,_1}): Delete decls.
17900         (sort_member_init): Delete unused var INIT.
17901         (emit_base_init): Delete unused var X.
17902         (build_offset_ref): Delete unused var CNAME.
17903         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17904         (emit_base_init): Delete unused local var BASE.  Delete extern
17905         decl of IN_CHARGE_IDENTIFIER.
17906         (build_delete): Delete unused local var VIRTUAL_SIZE.
17907
17908         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17909         (build_delete): Fix call.
17910         * decl2.c (delete_sanity): Likewise.
17911         * cp-tree.h (build_vec_delete): Update prototype.
17912
17913         * typeck.c (common_base_type): Delete unused var TMP.
17914         (build_binary_op): Delete local var ARGS_SAVE.
17915         (build_array_ref): Delete unused var ITYPE.
17916         (c_expand_return): Delete unused var USE_TEMP.
17917
17918         * typeck.c (compexcepttypes): Delete unused arg STRICT.
17919         (comptypes): Fix calls.
17920         * decl.c (duplicate_decls): Likewise.
17921         * cp-tree.h (compexcepttypes): Delete extra arg.
17922
17923         * decl2.c (check_classfn): Delete unused second arg CNAME.
17924         * decl.c (start_decl, grokfndecl): Fix calls.
17925         * init.c (do_friend): Likewise.
17926         * cp-tree.h (check_classfn): Update prototype.
17927
17928         * cp-tree.h (signature_error, import_export_vtable,
17929         append_signature_fields, id_in_current_class, mark_used,
17930         copy_assignment_arg_p): Add decls.
17931         * decl2.c (mark_used): Delete decl.
17932
17933         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17934
17935         * class.c (get_vtable_entry): Disable unused function.
17936         (doing_hard_virtuals): Delete unused static global var.
17937         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17938         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17939         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17940         (modify_one_vtable): Delete unused var OLD_RTTI.
17941         (finish_struct_anon): Delete unused vars OFFSET and X.
17942         (finish_struct_bits): Delete unused var METHOD_VEC.
17943         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
17944         for-scope local variable METHODS.
17945
17946         * call.c (user_harshness): Delete unused/unneeded arg PARM.
17947         (ideal_candidate): Delete unused args BASETYPE and PARMS.
17948         (build_method_call): Delete unused args passed into ideal_candidate.
17949         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
17950         * cp-tree.h (synthesize_method): Add decl.
17951
17952         * decl.c (note_level_for_for): Give void return type.
17953         (pushdecl_nonclass_level): Likewise.
17954         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17955         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17956         (suspend_binding_level): Delete unused var LEVEL.
17957         (duplicate_decls): Delete unused var CTYPE.
17958         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17959         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17960         PTR_ENDLINK.
17961         (grokdeclarator): Delete unused var C.
17962         (grokdeclarator): Delete unused var SIZE_VARIES.
17963         (grokparms): Delete unused var SAW_VOID.
17964         (start_function): Delete unused var OLDDECL.
17965         (cplus_expand_expr_stmt): Delete unused var
17966         REMOVE_IMPLICIT_IMMEDIATELY.
17967
17968         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17969
17970         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17971
17972 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17973
17974         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17975         (build_min_nt): Likewise.
17976         * pt.c (do_pushlevel): Emit line note.
17977         (do_poplevel): Return what we get from poplevel.
17978         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17979         * parse.y: Use do_pushlevel and do_poplevel.
17980         * cp-tree.h: Declare do_poplevel.
17981
17982         * cp-tree.h: Declare at_eof.
17983         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17984         * decl2.c (import_export_decl): Renamed from import_export_inline.
17985         (finish_file): Call it to do interface handling for statics.
17986         * pt.c (tsubst_copy): Call mark_used on variables and functions
17987         used here.
17988
17989         * decl2.c (finish_file): Don't emit statics we can't generate.
17990         * pt.c (instantiate_decl): Don't set interface on instantiations
17991         we can't generate.
17992
17993         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17994         * tree.c (print_lang_statistics): Print max template depth.
17995         * pt.c (push_tinst_level): Dump entire instantiation context.
17996         (instantiate_class_template): Use it and pop_tinst_level.
17997         (instantiate_decl): Likewise.
17998
17999         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18000         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18001
18002 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18003
18004         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18005         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18006         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18007         the new template implementation.
18008
18009 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18010
18011         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18012
18013 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18014
18015         * decl.c (cp_finish_decl): Delay emitting the debug information for
18016         a typedef that has been installed as the canonical typedef, if the
18017         type has not yet been defined.
18018
18019 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18020
18021         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18022
18023 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18024
18025         * decl.c (lookup_label): Call label_rtx.
18026
18027         * decl.c (make_binding_level): New function.
18028         (pushlevel, pushlevel_class): Call it instead of explicit
18029         duplicate calls to xmalloc.
18030
18031         * decl.c (init_decl_processing): Delete useless build_pointer_type
18032         call.
18033
18034         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18035         (sizet_ftype_string): Delete variable.
18036         (init_decl_processing): Add built-in functions fabsf, fabsl,
18037         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18038         variable strlen_ftype, used for strlen.
18039
18040 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18041
18042         * decl.c (push_to_top_level): Start from current_binding_level
18043         again for now; the stl hacks depend on g++ being broken in this
18044         way, and it'll be fixed in the template rewrite.
18045
18046         * tree.def: Add USING_DECL.
18047         * decl2.c (do_class_using_decl): Implement.
18048         (grokfield): Pass access decls off to do_class_using_decl instead of
18049         grokdeclarator.
18050         * error.c (dump_decl): Handle USING_DECLs.
18051         * decl.c (grokdeclarator): Remove code for handling access decls.
18052         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18053         as access decls for now.
18054         (finish_struct): Don't check USING_DECLs for other uses of the name.
18055
18056         * search.c (get_matching_virtual): Use cp_error_at.
18057
18058 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18059
18060         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18061         match c-typeck.c.
18062         (self_promoting_args_p): Move the check that TYPE is non-nil
18063         before trying to look at its main variant.
18064         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18065
18066         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18067         Delete macros.
18068         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18069         (do_friend): Delete call to xref_friend.
18070         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18071
18072         * typeck.c (convert_sequence): #if 0 unused function.
18073
18074         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18075         be in decl_in_memory_p.
18076         (decl_in_memory_p): Delete decl.
18077         * expr.c (decl_in_memory_p): Delete fn.
18078         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18079
18080         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18081
18082 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18083
18084         * class.c (finish_struct_1): Check for a pure-specifier on a
18085         non-virtual function here.
18086
18087         * decl2.c (grok_function_init): Don't check whether the function
18088         is virtual here.
18089         (grokfield): Don't call check_for_override here.
18090
18091         * decl.c (push_to_top_level): Start from inner_binding_level,
18092         check class_shadowed in class levels.
18093
18094 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18095
18096         * decl.c (resume_level): Ignore things that don't have names, instead
18097         of core dumping.
18098
18099 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18100
18101         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18102
18103 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18104
18105         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18106         synthesized dtor.
18107
18108         * parse.y (complete_type_name): Bind global_scope earlier.
18109         (complex_type_name): Likewise.
18110         (qualified_type_name): Remove.
18111
18112 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18113
18114         * decl.c (grokfndecl): Move code that looks for virtuals in base
18115         classes...
18116         * class.c (check_for_override): ... to a new function.
18117         (finish_struct_1): Call it.
18118
18119         * cp-tree.h: Declare warn_sign_compare.
18120
18121         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18122         rather than extra_warnings to decide whether to warn about
18123         comparison of signed and unsigned.
18124
18125         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18126         implies -Wsign-compare.  -Wall doesn't imply -W.
18127
18128 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18129
18130         * typeck.c (build_component_ref): Fix to handle anon unions in base
18131         classes as well.
18132
18133 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18134
18135         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18136         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18137         * cvt.c (build_up_reference): Likewise.
18138         * decl.c (grok_reference_init): Likewise.
18139         (cp_finish_decl): Likewise.
18140         * error.c (dump_expr): Likewise.
18141         * tree.c (real_lvalue_p): Likewise.
18142         (lvalue_p): Likewise.
18143         (build_cplus_new): Likewise.
18144         (unsave_expr_now): Likewise.
18145         * typeck.c (unary_complex_lvalue, build_modify_expr,
18146         c_expand_return): Likewise.
18147
18148 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18149
18150         Make the C++ front-end pay attention to attributes for structures.
18151         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18152         finish_struct_1.
18153         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18154         Take out old round_up_size use and setting the DECL_ALIGN possibly
18155         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18156         can override what the attribute set.
18157         * cp-tree.h (finish_struct): Update prototype.
18158         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18159         attributes to finish_struct.
18160         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18161         value down into finish_struct.
18162         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18163
18164 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18165
18166         * decl.c (poplevel):  Re-word dead for local handling.
18167         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18168         (cp_finish_decl):  If is_for_scope, check for duplicates so
18169         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18170
18171         * lex.c (do_identifier):  Use global binding in preference of
18172         dead for local variable.
18173
18174 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18175
18176         * init.c (initializing_context): Handle anon union changes, the
18177         context where fields of anon unions can be initialized now has to be
18178         found by walking up the TYPE_CONTEXT chain.
18179
18180 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18181
18182         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18183         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18184         (obscure_complex_init): If bss is supported, always set
18185         DECL_INITIAL to error_mark_node.
18186
18187 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18188
18189         * init.c (is_friend): Make sure there's a context before we see if
18190         it's an aggr type.
18191
18192 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18193
18194         * init.c (is_friend): Classes are not friendly with nested classes.
18195
18196 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18197
18198         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18199         and record its result.
18200
18201 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18202
18203         * class.c (finish_struct_anon): Switch around code to not move anon
18204         union elements around, nor mess up their contexts, nor offsets,
18205         instead we now build up the right number of COMPONENT_REFs for all
18206         the anon unions that may be present at build_component_ref time.
18207         * typeck.c (lookup_anon_field): New routine to handle field lookup
18208         on fields without names.  We find them, based upon their unique type
18209         instead.
18210         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18211         Handle finding components in anonymous unions, and ensure that a
18212         COMPONENT_REF is built for each level as necessary.
18213
18214 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18215
18216         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18217         code that ensures that copy ctors are used if appropriate.
18218
18219 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18220
18221         * init.c (build_vec_delete): Only give an error if base isn't an
18222         error_mark_node.
18223
18224 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18225
18226         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18227         (yylex): If we see `new', keep slurping.
18228
18229 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18230
18231         * class.c (finish_struct_1): Move code for handling anon unions...
18232         (finish_struct_anon): to here.  Fixup so that we do the offset
18233         calculations right, and so that the fields are physically moved to
18234         the containers's chain.
18235
18236 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18237
18238         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18239         identifier node.
18240
18241 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18242
18243         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18244         POINTER_SIZE to agree with expr.c.
18245
18246 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18247
18248         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18249         instead return NULL_TREE.
18250
18251 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18252
18253         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18254         about overloaded virtual functions.
18255         (warn_hidden): New routine to warn of virtual functions that are
18256         hidden by other virtual functions, that are not overridden.
18257         (get_basefndecls): New routine, used by warn_hidden.
18258         (mark_overriders): New routine, used by warn_hidden.
18259         * search.c (get_matching_virtual): Remove old warning that just
18260         isn't very useful.
18261
18262 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18263
18264         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18265
18266         * typeck.c (null_ptr_cst_p): Delete unused fn.
18267         (build_function_call_maybe): Delete unused fn.
18268
18269         * expr.c (extract_init): #if 0 the code after unconditional return 0
18270         for now.
18271
18272         Delete old cadillac code.
18273         * edsel.c: Remove file.
18274         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18275         * Makefile.in (CXX_OBJS): Delete edsel.o.
18276         (edsel.o): Delete rule.
18277         * cp-tree.h (flag_cadillac): Delete var decl.
18278         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18279         * decl2.c (flag_cadillac): Delete var definition.
18280         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18281         (grokfield): Delete code depending on flag_cadillac.
18282         (finish_anon_union): Likewise.
18283         * class.c (finish_struct_1): Likewise.
18284         (pushclass): Likewise.
18285         (popclass): Likewise.
18286         (push_lang_context): Likewise.
18287         (pop_lang_context): Likewise.
18288         * decl.c (init_decl_processing): Likewise.
18289         (start_decl): Likewise.
18290         (cp_finish_decl): Likewise.
18291         (xref_tag): Likewise.
18292         (finish_enum): Likewise.
18293         (start_function): Likewise.
18294         (finish_function): Likewise.
18295         (finish_stmt): Likewise.
18296         * lex.c (lang_init): Likewise.
18297         (check_newline): Likewise.
18298
18299         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18300
18301         Delete defunct, ancient garbage collection implementation.
18302         * rtti.c: New file with the RTTI stuff from gc.c.
18303         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18304         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18305         (rtti.o): New rule, replacing gc.o.
18306         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18307         * cp-tree.h: Delete gc-related fn decls.
18308         (DECL_GC_OFFSET): Delete macro.
18309         (flag_gc): Delete extern decl.
18310         * decl.c (current_function_obstack_index): Delete var decl.
18311         (current_function_obstack_usage): Delete var decl.
18312         (start_function): Delete clearing of current_function_obstack_index
18313         and current_function_obstack_usage.
18314         (init_decl_processing): Delete code relying on -fgc.
18315         Delete call to init_gc_processing.
18316         (cp_finish_decl): Delete calls to build_static_gc_entry and
18317         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18318         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18319         and to expand_expr of a __gc_main call.
18320         (maybe_gc_cleanup): Delete var decl.
18321         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18322         * decl2.c (flag_gc): Delete var decl.
18323         (lang_f_options): Delete offering of -fgc.
18324         (lang_decode_option): Delete -fgc and -fno-gc handling.
18325         (get_temp_regvar): Delete gc code.
18326         * init.c (build_new): Delete gc code.
18327         * lex.c (init_lex): Delete checking of flag_gc.
18328
18329         * typeck.c (convert_arguments): Delete gc code.
18330         (build_component_addr): Delete -fgc warning.
18331         (build_modify_expr): Delete gc code.
18332
18333         * decl2.c (build_push_scope): Delete fn.
18334         * cp-tree.h (build_push_scope): Delete decl.
18335
18336         * search.c (clear_search_slots): Delete fn.
18337         * cp-tree.h (clear_search_slots): Delete decl.
18338
18339         * search.c (tree_needs_constructor_p): Delete fn.
18340         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18341
18342         * tree.c (id_cmp): Delete fn.
18343
18344         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18345         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18346
18347         * tree.c (decl_value_member): Delete fn.
18348         * cp-tree.h (decl_value_member): Delete decl.
18349
18350         * tree.c (list_hash_lookup_or_cons): Delete fn.
18351         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18352
18353         * method.c (cplus_exception_name): Delete fn.
18354         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18355
18356         * spew.c (shift_tokens): Delete fn.
18357
18358 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18359
18360         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18361         to cp_finish_decl.
18362         * parse.y: Likewise.
18363
18364 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18365
18366         * tree.c (build_cplus_staticfn_type): Delete function definition;
18367         never used.
18368         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18369
18370         * tree.c (virtual_member): Delete function definition; never used.
18371         * cp-tree.h (virtual_member): Delete decl.
18372
18373 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
18374
18375         * typeck.c (build_component_ref): Handle getting vbase pointers
18376         out of complex multiple inheritance better.
18377
18378 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
18379
18380         * typeck.c (build_object_ref): Make sure we use the real type, not
18381         any reference type.
18382
18383 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
18384
18385         * tree.c (build_exception_variant): Don't create new types if we
18386         don't have to, also build new types on the right obstack.
18387
18388 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18389
18390         * decl.c (store_bindings): Split out from push_to_top_level.
18391         (push_to_top_level): Call it for b->type_shadowed on class binding
18392         levels.
18393
18394 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
18395
18396         * search.c (expand_upcast_fixups): Fix so that offsets stored in
18397         vbase_offsets are always right.  Fixes a problem where virtual base
18398         upcasting and downcasting could be wrong during conversions on this
18399         during virtual function dispatch at ctor/dtor time when dynamic
18400         vtable fixups for deltas are needed.  This only sounds easier than
18401         it is.  :-)
18402         (fixup_virtual_upcast_offsets): Change to reflect new calling
18403         convention for expand_upcast_fixups.
18404
18405 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18406
18407         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18408         check that it's usable as the bitfield width.
18409
18410 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18411
18412         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18413         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18414         only ever used for functions in it.
18415
18416 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18417
18418         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18419         (nested_type): Likewise.
18420         (nested_name_specifier): Use lastiddecl.
18421
18422         * decl.c (grokdeclarator): Adjust accordingly.
18423         * init.c (expand_member_init): Likewise.
18424         * parse.y (base_class): Likewise.
18425         * typeck2.c (build_functional_cast): Likewise.
18426
18427         * typeck2.c (build_functional_cast): Fill in name after we've
18428         checked for non-aggr type.
18429
18430 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
18431
18432         * decl2.c (warn_pointer_arith): Default to on.
18433
18434 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18435
18436         * lex.c (is_rid): New function.
18437         * decl.c (grokdeclarator): Diagnose reserved words used as
18438         declarator-ids.
18439
18440 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18441
18442         * tree.c (get_decl_list): Don't lose cv-quals.
18443
18444         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18445         typespecs used as declarator-ids.
18446
18447 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
18448
18449         * decl.c (poplevel): When poping a level, don't give a warning for
18450         any subblocks that already exist.
18451
18452 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18453
18454         * typeck.c (build_object_ref): Finish what I started.
18455
18456         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18457
18458         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18459
18460         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18461         scope.
18462
18463 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18464
18465         * decl.c (xref_tag): Handle passing a type in directly.
18466
18467         * parse.y (qualified_type_name): Pull out the type.
18468         (nested_type): Likewise.
18469         Take types directly instead of as identifiers.
18470         * call.c (build_scoped_method_call): Take types directly instead of
18471         as identifiers.
18472         * decl.c (xref_basetypes): Likewise.
18473         * init.c (expand_member_init): Likewise.
18474         (build_member_call): Likewise.
18475         (build_offset_ref): Likewise.
18476         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18477         * method.c (do_build_assign_ref): Likewise.
18478         * decl.c (grokdeclarator): Handle a type appearing as the
18479         declarator-id for constructors.
18480         * method.c (do_build_copy_constructor): current_base_init_list now
18481         uses the types directly, not their names.
18482         * init.c (sort_base_init): Likewise.
18483         (expand_member_init): Likewise.
18484         * init.c (is_aggr_type): New function, like is_aggr_typedef.
18485
18486 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
18487
18488         * tree.c (layout_basetypes): Call build_lang_field_decl instead
18489         of build_lang_decl if first arg is a FIELD_DECL.
18490
18491 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18492
18493         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18494         non-empty.
18495         * except.c (expand_start_catch_block): Set TREE_USED to avoid
18496         warnings about the catch handler.
18497
18498 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
18499
18500         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18501         expand_target_expr.
18502
18503 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18504
18505         Fix access control to use trees rather than integers.
18506         * class.c (access_{default, public, protected, private,
18507         default_virtual, public_virtual, private_virtual}_node): Add
18508         definitions.
18509         (init_class_processing): Do creation of those nodes.
18510         * cp-tree.h (access_type): Delete enum decl.
18511         (access_{default, public, protected, private, default_virtual,
18512         public_virtual, private_virtual}_node): Add decls.
18513         (compute_access): Change return type.
18514         * search.c (compute_access): Have tree return type, instead of enum.
18515         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18516         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18517         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18518         * parse.y (VISSPEC): Make ttype rather than itype.
18519         (base_class_access_list): Likewise.
18520         * *.[cy]: Change all refs of `access_public' to `access_public_node',
18521         etc.
18522         * call.c (build_method_call): Make ACCESS be a tree.
18523         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18524         * cvt.c (convert_to_aggr): Likewise.
18525         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18526         Likewise.
18527         * method.c (hack_identifier): Likewise.
18528         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18529
18530 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
18531
18532         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18533         frontend, and make it more consistent with respect to
18534         warn_pointer_arith.
18535
18536 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18537
18538         * decl.c (pushdecl): Check for duplicate parameter names.
18539
18540 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
18541
18542         * decl.c (expand_static_init): Call assemble_external for atexit.
18543
18544 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
18545
18546         * except.c (do_unwind): Remove some generated dead code.
18547         (eh_outer_context): New routine, factor out some common code from
18548         expand_builtin_throw and end_eh_unwinder.  Add code to do return
18549         address masking for the PA.
18550         (expand_builtin_throw): Use eh_outer_context instead of open coding
18551         it here.
18552         (end_eh_unwinder): Likewise.
18553
18554 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
18555
18556         * except.c (expand_throw): Call assemble_external for __empty, if we
18557         use it.
18558
18559 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18560
18561         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18562         NORMAL_RETURN_ADDR_OFFSET.
18563         (end_eh_unwinder): Likewise.
18564
18565 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18566
18567         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18568         when dealing with references, and make sure we handle dynamic
18569         casting to a cv qualified reference.
18570
18571 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18572
18573         * except.c (struct eh_context): New structure top hold eh context
18574         information.
18575         (push_eh_context): New routine.
18576         (pop_eh_context): Likewise.
18577         * decl.c (push_cp_function_context): Use them.
18578         (pop_cp_function_context): Likewise.
18579
18580 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18581
18582         * decl2.c (finish_file): Also prune uninteresting functions in the
18583         inline emission loop.
18584
18585 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18586
18587         * sig.c (build_signature_table_constructor): Mark functions
18588         in the signature as referenced.
18589
18590 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18591
18592         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18593         the inline emission stuff.
18594
18595 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18596
18597         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18598         weak symbols.
18599         * lang-options.h: Add -f{no-,}weak.
18600         * decl.c (init_decl_processing): If the target does not support weak
18601         symbols, don't use them.
18602         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18603
18604 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18605
18606         * init.c (expand_member_init): warning for base init after members.
18607
18608 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18609
18610         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18611         type.
18612
18613 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
18614
18615         * method.c (report_type_mismatch): Improve wording for volatile
18616         mismatches.
18617
18618 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
18619
18620         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18621         expand_assignment, as the later doesn't handle things that have
18622         copy constructors well.  The compiler would do bitwise copying,
18623         instead of ctor calling in some cases.
18624
18625 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
18626
18627         * g++.c (my_strerror): Return "cannot access" if errno is 0.
18628         (pfatal_with_name, perror_exec): Don't assume that
18629         the returned value from my_strerror contains no '%'s.
18630         (concat): Remove.
18631         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18632
18633 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
18634
18635         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18636         TYPE_METHODS/TREE_CHAIN mean what they used to.
18637         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18638         instead of TYPE_METHODS.
18639         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18640         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18641         * cp-tree.h (CLASSTYPE_METHODS): Lose.
18642         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18643         TYPE_METHODS.
18644         (struct lang_decl): Lose next_method field.
18645         (DECL_NEXT_METHOD): Lose.
18646         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18647         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18648         anymore.
18649         (finish_struct_methods): Don't mess with the TREE_CHAINs in
18650         fn_fields.
18651
18652         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18653         vector.
18654
18655         * call.c (build_method_call): Synthesize here even when not inlining.
18656         * typeck.c (build_function_call_real): Likewise.
18657
18658 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
18659
18660         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18661         == DBX_DEBUG, call dbxout_start_new_source_file and
18662         dbxout_resume_previous_source_file when appropriate.
18663
18664 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
18665
18666         * except.c (start_anon_func): Push to the top level.
18667         (end_anon_func): Pop from the top level.
18668
18669 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
18670
18671         * cp-tree.h (build_cleanup): New routine to build cleanups.
18672         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18673         call at ctor time and use atexit to run it later.
18674         * decl2.c (build_cleanup): New routine, taken from finish_file.
18675         (finish_file): Use build_cleanup instead, and don't put function
18676         local statics in global dtor list.
18677
18678 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
18679
18680         * except.c (expand_throw): Ensure that we have cleanups, if we try
18681         and expand cleanups.
18682
18683 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
18684
18685         * except.c (expand_throw): Add logic to manage dynamic cleanups for
18686         the EH object.
18687         (expand_end_catch_block): Use the magic of expand_goto, instead of
18688         emit_jump so that we get the cleanup for any catch clause parameter
18689         and the cleanup for the exception object.  Update to reflect label
18690         changes.
18691         (push_eh_cleanup): New routine to register a cleanup for an
18692         exception object.
18693         (empty_fndecl): Used to default cleanup actions to
18694         nothing.
18695         (init_exception_processing): Setup empty_fndecl.  Setup
18696         saved_cleanup.
18697         (expand_start_catch_block): Update to reflect label changes.  Call
18698         push_eh_object to register the cleanup for the EH object.
18699         (start_anon_func): New routine to start building lambda expressions
18700         from trees.
18701         (end_anon_func): New routine to end them.
18702         (struct labelNode): Change so that we can use tree labels, or rtx
18703         labels.
18704         (saved_cleanup): Object to check for dynamic cleanups for the
18705         exception handling object.
18706         (push_label_entry): Change so that we can use tree labels, or rtx
18707         labels.
18708         (pop_label_entry): Likewise.
18709         (top_label_entry): Likewise.
18710         (expand_start_all_catch): Use tree label instead of rtx label, so
18711         that we can get the magic of expand_goto.
18712         (expand_end_all_catch): Update to reflect label changes.
18713
18714         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18715         use UNSAVE_EXPRs.
18716         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18717         building_cleanup logic, as we now use UNSAVE_EXPRs.
18718         * cp-tree.h (unsave_expr): Declare it.
18719         * decl.c (building_cleanup): Remove.
18720         (maybe_build_cleanup): Remove building_cleanup logic, and use
18721         UNSAVE_EXPR instead.
18722
18723 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
18724
18725         * gc.c (build_t_desc): Update error message to say <typeinfo>.
18726
18727 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18728
18729         * decl.c (pushdecl): Only warn about shadowing a local variable if
18730         warn_shadow is true.
18731
18732 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18733
18734         * typeck.c (build_binary_op_nodefault): Added warning about
18735         comparisons between different enum types with -Wall, unless
18736         -fenum-int-equiv set.
18737
18738 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
18739
18740         * class.c (finish_struct_1): Skip down to the inner type in
18741         multidimensional arrays.  Ensures ctors will be made for types that
18742         need constructing.
18743
18744 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
18745
18746         * decl.c (last_dtor_insn): New to track the last compiler generated
18747         insn in a dtor.
18748         (store_parm_decls): Set it.
18749         (finish_function): Use it to see if the dtor is empty.  Avoid doing
18750         vtable setup all the time, if we can.
18751         (struct cp_function): Add last_dtor_insn.
18752         (push_cp_function_context): Save it.
18753         (pop_cp_function_context): Restore it.
18754
18755 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
18756
18757         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18758         warnings.
18759
18760 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
18761
18762         * typeck.c (expand_target_expr): Make sure targets get put into the
18763         current temp_slot_level, so that the free_temp_slots call will reuse
18764         them.
18765
18766 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
18767
18768         * class.c (finish_struct_1): Delay delta fixups for virtual bases
18769         until after we have done the hard virtuals, to avoid a bogus `every
18770         virtual function must have a unique final overrider' for virtual
18771         functions that are only overridden by hard virtuals.
18772
18773 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18774
18775         * pt.c (do_function_instantiation): Don't try to find a file-scope
18776         template for a member function.
18777
18778 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
18779
18780         * g++.c (main): Add handling of -nodefaultlibs.
18781
18782 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
18783
18784         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18785         distinguish between direct bindings of reference variables, and
18786         indirect bindings of reference variables.
18787         * cvt.c (build_up_reference): Use it.
18788         * typeck.c (convert_arguments): Use it to indicate this is an
18789         indirect binding.
18790         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18791         as they are unused.
18792         (expand_static_init): Likewise.
18793         (cplus_expand_expr_stmt): Likewise.
18794         * decl2.c (finish_file): Likewise.
18795         * init.c (perform_member_init): Likewise.
18796         (emit_base_init): Likewise.
18797         (expand_aggr_vbase_init_1): Likewise.
18798
18799 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18800
18801         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18802         get a DECL_LANG_SPECIFIC node.
18803         * cp-tree.h (lang_decl_flags): Add new member `level'.
18804         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18805         decl_flags level member.
18806
18807 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18808
18809         * call.c (build_method_call): Make sure instance has a
18810         TYPE_LANG_SPECIFIC node before we dive into it.
18811
18812 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
18813
18814         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18815
18816 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
18817
18818         * decl.c (duplicate_decls): When smashing decls, smash staticness in
18819         the usual way.
18820
18821 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
18822
18823         * decl.c (poplevel): Handle the merging of subblocks of cleanups
18824         when finishing blocks that have already been created (usually due to
18825         the fixup goto code).  Fixes bad debugging information.
18826
18827 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
18828
18829         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18830         that's not a list of overloaded functions.
18831
18832 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18833
18834         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18835         before trying to use DECL_ABSTRACT_VIRTUAL_P.
18836
18837 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
18838
18839         * decl2.c (mark_used): New function for hooking into setting of
18840         TREE_USED on decls.
18841         * call.c (build_method_call): Use it.
18842         * class.c (instantiate_type): Likewise.
18843         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
18844         for all like-named functions.
18845         * method.c (hack_identifier): Likewise.
18846         (emit_thunk): Don't call assemble_external.
18847         (make_thunk): Create thunk as a FUNCTION_DECL so that it
18848         gets the right mode and ENCODE_SECTION_INFO works.
18849
18850         * parse.y: Use mark_used.  Pass operator names to do_identifier.
18851         * lex.c (do_identifier): Handle operator names.
18852
18853         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18854
18855 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18856
18857         * errfn.c: Include stdio.h.
18858         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18859
18860 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
18861
18862         * typeck2.c (digest_init): Always convert initializers to the
18863         right type.
18864
18865 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
18866
18867         * init.c (member_init_ok_or_else): Don't allow member initializers
18868         for indirect members, as it is invalid.
18869
18870 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18871
18872         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18873
18874 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
18875
18876         * parse.y (for.init.statement): Catch compound statements inside for
18877         initializations, if we're being pedantic.
18878
18879 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
18880
18881         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18882         looking for.
18883
18884 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
18885
18886         * error.c (dump_expr): Don't core dump when a boolean expression is
18887         used as a default argument.
18888
18889 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18890
18891         * class.c (finish_struct_bits): Check aggregate_value_p instead of
18892         RETURN_IN_MEMORY.
18893
18894 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
18895
18896         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18897         BLKmode type that would otherwise be returned in registers.
18898
18899 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18900
18901         * g++.c (WITHLIBC): New macro.
18902         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
18903         saw_libc and pass it at the end if it was set.
18904
18905 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18906
18907         * parse.y (fn.def1): Call split_specs_attrs in
18908         declmods notype_declarator case.