OSDN Git Service

* cp-tree.h (finish_stmt_expr): Change prototype.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
2
3         * cp-tree.h (finish_stmt_expr): Change prototype.
4         * expr.c (cplus_expand_expr): Adjust call accordingly.
5         * init.c (finish_init_stmts): Likewise.
6         * parse.y (primary): Likewise.
7         * pt.c (tsubst_copy): Likewise.
8         * semantics.c (finish_stmt_expr): Don't take two parameters.
9         Don't remove generated BLOCKs from the block-tree.
10
11         Remove support for assigning to `this'.
12         * NEWS: Note that fact.
13         * class.c (build_vbase_path): Don't check flag_this_is_variable.
14         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
15         (language_function): Remove assigns_this, just_assigned_this, and
16         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
17         (base_init_expr): Remove.
18         (current_vcalls_possible_p): New macro.
19         (vtbls_set_up_p): Likewise.
20         (emit_base_init): Change prototype.
21         * decl.c (finish_destructor_body): New function, split out from
22         finish_function.
23         (current_function_assigns_this): Remove.
24         (current_function_just_assigned_this): Likewise.
25         (start_function): Don't set them.
26         (finish_function): Don't check them.  Don't emit
27         base-initialization code here.  Generate code for destructors when
28         doing semantic analysis.
29         (finish_stmt): Don't check current_function_just_assigned_this.
30         * decl2.c (lang_f_options): Remove this-is-variable.
31         (lang_decode_option): Likewise.
32         (grokclassfn): Don't check flag_this_is_variable.
33         * init.c (emit_base_init): Return the expression generated.
34         (construct_virtual_bases): Don't push/pop obstacks.  Fix
35         typo.
36         (build_new_1): Don't check flag_this_is_variable.
37         (get_temp_regvar): Don't set DECL_REGISTER.
38         (build_vec_init): Don't call use_variable.
39         * lang-options.h: Remove "-fthis-is-variable" and
40         "-fno-this-is-variable".
41         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
42         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
43         expand_expr_stmt.
44         * semantics.c (finish_expr_stmt_real): Rename to ...
45         (finish_expr_stmt): This.  Remove assigned_this parameter.
46         (begin_if_stmt): Call do_pushlevel before starting the statement.
47         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
48         blocks.
49         (setup_vtbl_ptr): Emit initialization code for bases and members
50         at semantic-analysis time.  Emit code to initialize vtables in
51         destructors here.
52         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
53         Don't handle CTOR_INITIALIZER any more.
54         * typeck.c (build_modify_expr): Don't check for assignments to
55         this.
56         (c_expand_return): Don't suggest assigning to `this'.
57         
58         * Makefile.in (decl.o): Depend on RTL_H.
59         (decl2.o): Likewise.
60         (class.o): Likewise.
61         (call.o): Likewise.
62         (method.o): Likewise.
63         (search.o): Likewise.
64         (tree.o): Likewise.
65         (pt.o): Likewise.
66
67         * decl.c (duplicate_decls): When a builtin function is redeclared
68         as static, make sure it is mangled correctly.
69
70         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
71         detail about the statement-tree.
72         
73 1999-09-20  Nathan Sidwell  <nathan@acm.org>
74
75         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
76
77 1999-09-20  Nick Clifton  <nickc@cygnus.com>
78
79         * decl2.c (lang_decode_option): Extend comment.
80
81 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
82
83         * typeck.c: Include "tm_p.h".
84
85 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
86
87         * ir.texi: New file.
88
89 1999-09-19  Paul Burchard <burchard@pobox.com>
90
91         * semantics.c (expand_stmt): Initialize return value.
92
93 1999-09-18  Paul Burchard <burchard@pobox.com>
94
95         * gxxint.texi: G++ now implements namespaces.
96         
97 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
98
99         * decl.c (pop_label): Don't warn about unused labels more than
100         once.
101         * semantics.c (finish_goto_stmt): Always marked used labels as
102         used.
103
104         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
105         even when the declaration is external.
106         (cp_finish_decl): Adjust call to layout_var_decl.
107         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
108
109 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
110
111         * typeck.c (get_member_function_from_ptrfunc): Always consider
112         virtuality inside member pointer.
113
114 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
115
116         Turn on function-at-a-time processing.  
117         * cp-tree.h (doing_semantic_analysis_p): New macro.
118         (SF_DEFAULT): Define to zero, not SF_EXPAND.
119         (start_handler_parms): Change prototype.
120         (expand_start_catch_block): Likewise.
121         (expand_end_catch_block): Likewise.
122         (expand_start_eh_spec): Likewise.
123         (expand_end_eh_spec): Declare.
124         (finish_handler_parms): Change prototype.
125         (begin_catch_block): Declare.
126         (finish_handler): Change prototype.
127         (do_pushlevel): Declare.
128         (do_poplevel): Likewise.  
129         * decl.c (pushlevel): Don't create
130         binding levels when not doing semantic analysis.
131         (poplevel): Don't pop them.
132         (pushdecl): Assert that we are never called when not doing
133         semantic analysis.
134         (pushdecl_top_level): Use push_to_top_level.
135         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
136         label when expanding.
137         (cp_finish_decl): Only inject for-scope variables when doing
138         semantic analysis.  Add comments.
139         (start_handler_parms): Return the handler parm.
140         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
141         already set.  Reinitialize from saved function data if available.
142         Don't pushlevel when not doing semantic analysis.
143         (store_parm_decls): Only generate RTL when expanding.  Only
144         pushdecl when doing semantic analysis.  Set
145         current_eh_spec_try_block if appropriate.
146         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
147         Combine common code.  Don't poplevel when not doing semantic
148         analysis.
149         (push_cp_function_context): Don't expand functions without an
150         explicit call to expand_body.
151         (mark_lang_function): Make eh_spec_try_block and
152         x_scope_stmt_stack.  
153         * except.c (expand_end_eh_spec): Don't
154         declare.
155         (process_start_catch_block): Likewise.
156         (push_eh_cleanup): Use finish_decl_cleanup.
157         (initialize_handler_parm): New function.
158         (expand_start_catch_block): Use it.
159         (expand_end_catch_block): Use tree-generation functions, not
160         RTL-generation functions.
161         (expand_start_eh_spec): Likewise.
162         (expand_end_eh_spec): Likewise.
163         (expand_exception_blocks): Simplify.
164         (start_anon_func): Use do_pushlevel.
165         (end_anon_func): Use do_poplvel.  Call expand_body for the
166         function.  
167         * expr.c (do_case): Don't call define_case_label.  
168         * init.c (create_temporary_var): Set DECL_CONTEXT for local
169         variables.  
170         * method.c (emit_thunk): Call expand_body for the
171         thunk.
172         (sythesize_method): Likewise.  
173         * parse.y (handler_args): Give it ttype.
174         (eat_saved_input): Call expand_body.
175         (base_init): Use do_pushlevel.
176         (pending_inline): Call expand_body.
177         (handler): Adjust calls to finish_handler_parms and
178         finish_handler.
179         (handler_args): Don't call expand_start_catch_block.  Return the
180         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
181         * parse.c: Regenerated.
182         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
183         * semantics.c (do_pushlevel): Give it external linkage.  Build
184         SCOPE_STMTs.
185         (do_poplevel): Likewise.
186         (finish_case_label): Call define_case_label when doing semantic
187         analysis.
188         (finish_goto_stmt): Create RTL for labels.
189         (finish_function_try_block): Set in_function_try_handler
190         unconditionally.
191         (finish_function_handler_sequence): Unset it.
192         (finish_handler_parms): Use expand_start_catch_block even when
193         building a statement-tree.
194         (begin_catch_block): New function.
195         (finish_handler): Move a little RTL-generation logic here.
196         (finish_decl_cleanup): Allow cleanups for empty declarations.
197         (finish_named_return_value): Don't pushdecl when not doing
198         semantic analysis.
199         (expand_stmt): Don't do semantic analysis for variable
200         declarations.  Handle START_CATCH_STMT.  Call expand_label
201         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
202         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
203         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
204         RETURN_INIT and function try blocks.
205         
206         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
207         x_scope_stmt_stack.  Add x_in_charge_parm.
208         (current_eh_spec_try_block): New macro.
209         (current_scope_stmt_stack): Likewise.
210         (current_in_charge_parm): Likewise.
211         * decl.c (start_function): Initialize current_in_charge_parm.
212         (finish_function): Use current_in_charge_parm rather than looking
213         up __in_chrg.
214         * search.c (expand_indirect_vtbls_init): Likewise.
215
216         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
217         (TRY_BLOCK): Likewise.
218         (HANDLER): Likewise.
219         (START_CATCH_STMT): New tree node.
220         (SCOPE_STMT): Likewise.
221         * cp-tree.h (SCOPE_BEGIN_P): New macro.
222         (SCOPE_NULLIFIED_P): Likewise.
223         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
224         (struct lang_decl): Add saved_language_function.
225         (DECL_PENDING_INLINE_INFO): Adjust documentation.
226         (DECL_PENDING_INLINE_P): New macro.
227         (TYPE_TI_ARGS): Fix typo in comment.
228         (DECL_SAVED_TREE): Add to documentation.
229         (DECL_SAVED_FUNCTION_DATA): New macro.
230         (START_CATCH_TYPE): Likewise.
231         (SCOPE_END_P): New macro.
232         (declare_parm_level): Don't declare.
233         * decl.c (mark_lang_function): New function, split out from
234         mark_cp_function_context.
235         (save_function_data): New function.
236         (declare_parm_level): Remove.
237         (finish_function): Use save_function_data to squirrel away
238         important stuff for later use.
239         (mark_cp_function_context): Use mark_function_data.
240         (lang_mark_tree): Likewise.
241         * lex.c (begin_definition_of_inclass_inline): Set
242         DECL_PENDING_INLINE_P.
243         (store_pending_inline): Clear it.
244         * pt.c (tsubst_decl): Likewise.
245
246 1999-09-17  Nathan Sidwell  <nathan@acm.org>
247
248         * call.c (perform_implicit_conversion): Deal with error_mark_node.
249
250 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
251
252         * decl.c (warn_extern_redeclared_static): Don't get confused by
253         static member functions.
254         (duplicate_decls): Merge DECL_THIS_STATIC.
255
256         * decl.c (expand_static_init): Make sure assignments to local
257         statics actually occur.
258
259 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
260
261         * cp-tree.h (poplevel_class): Declare.
262         * class.c (popclass): Use poplevel_class, not poplevel.
263         * decl.c (poplevel_class): Don't make it static.  Don't return a
264         value.
265         (poplevel): Don't call poplevel_class; abort in a class
266         binding level is seen.
267         * semantics.c (finish_translation_unit): Use pop_everything.
268         * parse.y (member_init): Allow errors.
269         (pending_inline): Call finish_function.
270         * parse.c: Regenerated.
271         * Makefile.in (CONFLICTS): Adjust.
272
273 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
274         
275         * error.c: Reduce code duplication.
276         (dump_template_value): New function.
277         (dump_type_real): Use it.
278         (dump_decl): Likewise.
279         (dump_function_name): Likewise.
280         (dump_function_decl): Don't be too talkative about function return
281         type variety.
282
283 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
284
285         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
286
287         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
288
289 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
290
291         * decl2.c (finish_file): Also call check_global_declarations for
292         the pending_statics list.
293
294 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
295
296         * lex.c (cp_pragma_implementation): Allow #pragma implementation
297         in header files.
298
299 1999-09-15  Richard Henderson  <rth@cygnus.com>
300
301         * lex.c (mark_impl_file_chain): Follow the next chain.
302
303 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
304
305         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
306         problems with extern "C" functions redeclared as static.
307         (duplicate_decls): When a builtin is redeclared static, make the
308         new function have internal linkage.
309         
310 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
311
312         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
313         * pt.c (tsubst_copy): Likewise.
314         * tree.c (search_tree): Likewise.
315         (mapcar): Likewise.
316
317 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
318
319         * typeck2.c (ack): Don't declare progname.
320
321 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
322
323         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
324         filenames with ggc_alloc_string.
325
326 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
327
328         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
329         TARGET_EXPR.
330         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
331         the TARGET_EXPR.
332         * cvt.c (build_up_reference): Likewise.
333         * tree.c (build_cplus_new): Likewise.
334         (get_target_expr): Likewise.
335         
336 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
337
338         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
339
340 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
341
342         * cp-tree.h (build_target_expr): New function.
343         * call.c (build_conditional_expr): Use build_target_expr.
344         (convert_like): Likewise.
345         (build_over_call): Likewise.
346         * cvt.c (build_up_reference): Likewise.
347         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
348         (destroy_local_var): Here.
349         (build_target_expr): New function.
350         * tree.c (build_cplus_new): Use it.
351         (get_target_expr): Likewise.
352
353 1999-09-13  Nathan Sidwell  <nathan@acm.org>
354
355         * typeck.c (expr_sizeof): Don't decay arrays and functions.
356         Remove misleading comment.
357         (build_compound_expr): Don't decay arrays.
358
359 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
360
361         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
362         class rvalues again.
363
364 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
365
366         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
367
368         * g++spec.c: Include gcc.h.
369         (lang_specific_driver): Constify a char*.  Call xcalloc, not
370         xmalloc/bzero.  All calls to the function pointer parameter now
371         explicitly call `fatal'.
372
373 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
374
375         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
376         * cvt.c (ocp_convert): Complete the from and destination types.
377         Adjust warning about functions always being `true' in conditionals.
378         * decl.c (duplicate_decls): Don't play funny games with abort.
379         * error.c (dump_expr): Handle OVERLOADs.
380         * spew.c (probe_obstack): Remove.
381         * typeck.c (condition_conversion): Use perform_implicit_conversion.
382         
383 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
384
385         * cp-tree.h (auto_function, define_function): Adjust prototypes.
386         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
387         changed.
388         (auto_function): Likewise, for CODE arg.
389         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
390         (builtin_function): ... here.
391
392 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
393
394         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
395         (init_decl_processing): Don't set TREE_PERMANENT for the
396         error_mark_node.
397         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
398         (grokdeclarator): Likewise.
399         (grokparms): Don't check TREE_PERMANENT when building up lists.
400         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
401         (mark_inline_for_output): Likewise.
402         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
403         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
404         * lex.c (check_newline): Don't check ggc_p; it is always one.
405         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
406         * spew.c (yylex): Don't copy_node or probe_obstacks for
407         non-permanent CONSTANTs and STRINGs.
408         * tree.c (build_cplus_array_type_1): Don't fuss with
409         TREE_PERMANENT on ARRAY_TYPEs.
410         
411         * cp-tree.def (CLEANUP_STMT): New node.
412         * cp-tree.h (language_function): Add name_declared.
413         (current_function_name_declared): New macro.
414         (CLEANUP_DECL): New macro.
415         (CLEANUP_EXPR): Likewise.
416         (emit_local_var): Likewise.
417         (finish_decl_cleanup): New function.
418         * cvt.c (build_up_reference): Simplify.
419         (ocp_convert): Remove dead code.
420         * decl.c (start_decl): Remove call to add_decl_stmt.
421         (grok_reference_init): Adjust, to handle bindings temporaries to
422         references.  Remove dead code.
423         (initialize_local_var): Don't generate RTL for
424         declarations here, or build cleanups here.  Don't fuss with
425         obstacks.  Replace expand_start_target_temps calls with explicit
426         setting of stms_are_full_exprs_p.
427         (destroy_local_var): New function.
428         (emit_local_var): Likewise.
429         (cp_finish_decl): Use them, as appropriate.
430         (start_function): Announce template functions.
431         (store_parm_decls): Don't call declare_function_name here.
432         (finish_stmt): Don't start emit base-initialization code when just
433         building the statement-tree.
434         * init.c (create_temporary_var): Move add_decl_stmt call ...
435         (get_temp_regvar): Here.
436         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
437         cp_finish_decl would expect.  Don't call add_decl_stmt.
438         * semantics.c (begin_compound_stmt): Call declare_function_name,
439         if appropriate.
440         (finish_decl_cleanup): New function.
441         (expand_stmt): Use emit_local_var to output variables.          
442         (expand_body): Set current_funtion_name_declared.
443         
444 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
445
446         * cp-tree.h (finish_cleanup_try_block): New function.
447         * semantics.c (finish_cleanup_try_block): Add comment.
448
449 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
450
451         * cp-tree.h: Delete declarations for all tree nodes now moved to
452         global_trees.
453         * decl.c: Delete their definitions.
454         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
455         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
456         provide defaults.
457         (init_decl_processing): Call build_common_tree_nodes and
458         build_common_tree_nodes_2 instead of building their nodes here.
459         Don't add gc roots for them.
460
461 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
462
463         * cp-tree.h (language_function): Rename expanding_p to
464         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
465         (expanding_p): Adjust accordingly.
466         (TREE_VIA_PRIVATE): Fix typo in comment.
467         (DECL_REFERENCE_SLOT): Remove.
468         (SET_DECL_REFERENCE_SLOT): Likewise.
469         * decl.c (named_label_uses): Adjust. Remove chicken comment.
470         (push_overloaded_decl): Don't truncate the chain of bindings when
471         adding an overloaded function.
472         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
473         (initialize_local_var): Fix typo in comment.
474         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
475         * decl2.c (start_objects): Make the fact that we are expanding
476         the generated function right away explicit.
477         (start_static_storage_duration_function): Likewise.
478         (finish_file): Fix typo in comment.
479         * init.c (build_vec_init): Correct bugs in handling cleanups.
480         * semantics.c (maybe_convert_cond): New function.
481         (FINISH_COND): Always store the condition, even if there's
482         a declaration.
483         (finish_if_stmt_cond): Use maybe_convert_cond.
484         (finish_while_stmt_cond): Likewise.
485         (finish_do_stmt): Likewise.
486         (finish_for_cond): Likewise.
487         (expand_cond): Adjust.
488         
489         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
490         * init.c (perform_member_init): Remove obstack machinations.
491         (expand_cleanup_for_base): Likewise.
492         (finish_init_stmts): Mark the statement-expression as used.
493         * method.c (emit_thunk): Use tree-generating functions, not
494         RTL.
495         (do_build_copy_constructor): Likewise.
496         (do_build_assign_ref): Likewise.
497         (synthesize_method): Likewise.  Keep track of line numbers.
498         * pt.c (tsubst_expr): Handle various kinds of try blocks.
499         * semantics.c (expand_stmts): Remove.
500         (begin_function_try_block): Set FN_TRY_BLOCK_P.
501         (finish_function_try_block): Be careful rechaining 
502         function try blocks.
503         (expand_stmt): Loop through all the statements at a given level.
504         (exapnd_body): Be careful with line-numbers here too.  Prepare for
505         being called directly from the parser.
506
507         * cp-tree.h (finish_function): Adjust prototype.
508         * decl.c (finish_function): Return the function compiled.
509         * pt.c (instantiate_decl): Don't play games with obstacks.
510         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
511         (search_tree): Likewise.
512         * typeck.c: Fix typo in comment.
513         * typeck2.c (store_init_value): Add comment.
514
515         * cp-tree.h (CPTI_ATEXIT): New macro.
516         (atexit_node): Likewise.
517         * decl.c (destroy_local_static): New function, broken out from ...
518         (expand_static_init): Here.
519
520         * rtti.c (get_tinfo_var): These should always be global
521         (expand_si_desc): Use tree, not RTL, functions to generate code.
522         (expand_class_desc): Likewise.
523         (expand_ptr_desc): Likewise.
524         (expand_attr_desc): Likewise.
525         (expand_generic_desc): Likewise.
526         (synthesize_tinfo_fn): Likewise.
527
528 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
529
530         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
531         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
532         RECHAIN_STMTS. 
533         (RECHAIN_STMST_FROM_CHAIN): Likewise.
534
535         * parse.y (simple_stmt): Fix typo in last change.
536
537         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
538         (STMT_IS_FULL_EXPR_P): Likewise.
539         (STMT_LINENO_FOR_FN_P): Likewise.
540         (prep_stmt): New function.
541         (building_stmt_tree): Tweak for safety.
542         * pt.c (tsubst_expr): Use prep_stmt throughout.
543         (add_tree): Move it to semantics.c
544         * semantics.c (add_tree): Move it here.
545         (finish_expr_stmt_real): New function.
546         (finish_expr_stmt): Use it.
547         (finish_if_stmt_cond): Use FINISH_COND.
548         (finish_while_stmt_cond): Likewise.
549         (finish_for_cond): Likewise.
550         (finish_stmt_tree): Tweak line-number handling.
551         (prep_stmt): New function.
552         (expand_stmt): Use it.
553         
554         * cp-tree.h (begin_switch_stmt): Adjust prototype.
555         (finish_switch_cond): Likewise.
556         * parse.y (simple_stmt): Adjust accordingly.
557         * parse.c: Regenerated.
558         * pt.c (tsubst_expr): Adjust accordingly.
559         * semantics.c (expand_cond): New function.
560         (FINISH_COND): New macro.
561         (begin_switch_stmt): Build the SWITCH_STMT here.
562         (finish_switch_stmt_cond): Not here.
563         (expand_stmt): Adjust calls to begin_switch_stmt and
564         finish_switch_cond.  Use expand_cond throughout.
565
566         * dump.c (dequeue_and_dump): Dump types for constants.
567         Describe DECL_ARG_TYPE more intuitively.
568         Handle ARRAY_REF.
569
570         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
571         (lang_cleanup_tree): Remove.
572         * lex.c (make_lang_type): Use ggc_alloc to allocate
573         TYPE_LANG_SPECIFIC.
574
575         Reorganize per-function data.
576         * cp-tree.h (saved_scope): Add function_decl, bindings.
577         (language_function): Rename binding_level to bindings.
578         (cp_function_chain): Use the current_function, not the
579         outer_function_chain.
580         (current_class_ptr): Make it work, even when there's no 
581         current function.
582         (current_class_ref): Likewise.
583         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
584         macros.
585         (clear_temp_name): Remove.
586         * decl.c (check_function_type): New function, broken out from
587         start_function.
588         (current_binding_level): Adjust definition.
589         (pushlevel): Simplify.
590         (poplevel): Don't use named_label_uses when we're outside
591         a function scope.
592         (mark_saved_scope): Mark function_decl and bindings.
593         (maybe_push_to_top_level): Don't unconditionally push a new
594         function context.  Save bindings and the current_function_decl.
595         Don't clear named_labels.
596         (pop_from_top_level): Pop function context if appropriate.
597         (init_decl_processing): Set init_lang_status and free_lang_status,
598         rather than save_lang_status and restore_lang_status.
599         (start_function): Take SF_* flags.  Don't clear per-function data.
600         Reorder and simplify to use new per-function data code.  Add
601         asserts.
602         (store_parm_decls): Don't call init_function_start here.
603         (finish_function): Adjust for new handling of per-function data.
604         (push_cp_function_context): Simplify.
605         (mark_cp_function_context): Change binding_level to bindings.
606         * decl2.c (clear_temp_name): Remove.
607         (start_objects): Use SF flags to start_function.
608         (start_static_storage_duration_function): Likewise.
609         * except.c (start_anon_func): Remove redundant calls to 
610         push_function_context_to.  Use SF flags to start function.
611         (end_anon_func): Remove redundant call to pop_function_context
612         from.
613         * lex.c (reinit_parse_for_function): Don't initialize per-function 
614         data.
615         * method.c (emit_thunk): Clear current_function after calling
616         assemble_end_function.  Use SF flags for start_function.
617         (synthesize_method): Use SF flags for start_function.
618         * parse.c: Regenerated.
619         * parse.y (fn.defpen): Likewise.
620         (pending_inline): Clear current_function, even if something goes
621         wrong.
622         * pt.c (instantiate_decl): Use SF flags to start_function.
623         Don't save and restore expanding_p.
624         (add_tree): Handle the case where we are outside any function.
625         (end_tree): Likewise.
626         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
627         * semantics.c (begin_function_definition): Likewise.
628         (expand_body): Likewise.
629         
630 1999-09-09  Nathan Sidwell  <nathan@acm.org>
631
632         * cp-tree.h (convert_to_void): Prototype new function.
633         (require_complete_type_in_void): Remove prototype.
634         * cvt.c (convert_to_void): New function.
635         (ocp_convert): Use convert_to_void.
636         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
637         expressions.
638         * typeck.c (require_complete_type_in_void): Remove function.
639         (build_compound_expr): Use convert_to_void.
640         (build_static_cast): Likewise.
641         (build_c_cast): Likewise.
642         * semantics.c (finish_expr_stmt): Do not decay full expressions.
643         
644         * typeck.c (build_x_compound_expr): Add FIXME.
645
646 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
647
648         * cp-tree.h (scratch_tree_cons): Remove.
649         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
650         and perm_tree_cons with plain tree_cons.
651         * class.c: Likewise.
652         * decl.c: Likewise.
653         * decl2.c: Likewise.
654         * except.c: Likewise.
655         * expr.c: Likewise.
656         * init.c: Likewise.
657         * lex.c: Likewise.
658         * method.c: Likewise.
659         * parse.y: Likewise.
660         * pt.c: Likewise.
661         * repo.c: Likewise.
662         * rtti.c: Likewise.
663         * search.c: Likewise.
664         * typeck.c: Likewise.
665         * parse.c: Regenerated.
666         * tree.c (build_srcloc): Simplify.
667         
668 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
669
670         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
671         Remove next.
672         (LANG_DECL_PERMANENT): Remove.
673         * decl.c (duplicate_decls): Don't mess about with obstacks trying
674         to free memory.
675         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
676         * lex.c (free_lang_decl_chain): Remove.
677         (build_lang_decl): Don't use obstacks.
678         (retrofit_lang_decl): Likewise.
679         (copy_lang_decl): Likewise.
680
681         * cp-tree.h (saved_scope): Remove old_binding_level and 
682         function_decl.  Tidy up.
683         * decl.c (mark_saved_scope): Don't set them.
684         (maybe_push_to_top_level): Clear memory.
685
686         * decl.c (layout_var_decl): Change prototype.  Don't complete
687         types for external objects.
688         (check_initializer): Likewise.  Tidy.
689         (initialize_local_var): Complete types here.
690         (cp_finish_decl): Not here.  Reorganize a little.
691         (grokvardecl): Don't complete types here.
692
693         * decl.c (start_function): Clear last_dtor_insn and
694         last_parm_cleanup_insn. 
695         (push_cp_function_context): Just copy over a little of
696         the old context, not all of it.
697
698         * cp-tree.h (copy_to_permanent): Remove.
699         (permanent_p): Likewise.
700         * decl.c (building_typename_type): Don't use copy_to_permanent.
701         (start_decl): Likewise.
702         (grok_reference_init): Likewise.
703         (cp_finish_decl): Likewise.
704         * init.c (build_new_1): Don't use mapcar.
705         (build_vec_delete_1): Don't use copy_to_permanent.
706         (build_vec_init): Likewise.
707         * parse.y (primary): Likewise.
708         * parse.c: Regenerated.
709         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
710         (lookup_template_class): Likewise.
711         (tsubst_friend_function): Likewise.
712         (instantiate_class_template): Likewise.
713         (tsubst_decl): Likewise.
714         (tsubst): Likewise.
715         (instantiate_template): Likewise.
716         (unify): Likewise.
717         * rtti.c (get_tinfo_fn): Likewise.
718         (build_dynamic_cast): Likewise.
719         * semantics.c (finish_if_stmt_cond): Likewise.
720         (finish_while_stmt_cond): Likewise.
721         (finish_do_stmt): Likewise.
722         (finish_for_cond): Likewise.
723         (finish_for_expr): Likewise.
724         (finish_cleanup): Likewise.
725         (add_decl_stmt): Likewise.
726         (finish_named_return_value): Likewise.
727         (finish_qualified_call_expr): Likewise.
728         * tree.c (perm_manip): Remove.
729         (build_exception_variant): Don't use copy_to_permanent.
730         (permanent_p): Remove.
731         (copy_to_permament): Remove.
732         (build_min_nt): Don't use copy_to_permanent.
733         (build_min): Likewise.
734         (min_tree_cons): Likewise.
735         * typeckc.c (build_static_cast): Likewise.
736         (build_reinterpret_cast): Likewise.
737         (build_const_cast): Likewise.
738         
739 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
740
741         * decl.c (ggc_p): Set it to 1.
742         (mark_saved_scope): Add prototype.
743
744 1999-09-07  Richard Henderson  <rth@cygnus.com>
745
746         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
747         * typeck.c (self_promoting_args_p): Delete.
748
749 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
750
751         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
752         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
753
754 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
755
756         * Makefile.in (tree.o): Depend on ggc.h.
757         * class.c (make_method_vec): Remove.
758         (free_method_vec): Likewise.
759         (free_method_vecs): Remove.
760         (add_method): Don't use them.
761         * cp-tree.def (PTRMEM_CST): Make it longer.
762         (TEMPLATE_PARM_INDEX): Make it shorter.
763         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
764         (template_parm_index): Remove RTL field.
765         (ptrmem_cst): Add RTL field.
766         (finish_function): Removed parameter.
767         (process_next_inline): Change prototype.
768         (init_cplus_unsave): Rename to init_tree.
769         (binding_init): Remove.
770         * decl.c (free_binding_nodes): Remove.
771         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
772         (pop_binding): Don't use free_binding_nodes.
773         (free_binding_vecs): Remove.
774         (store_bindings): Don't use them.
775         (pop_from_top_level): Likewise.
776         (lookup_namespace_name): Simplify.
777         (build_typename_type): Don't use obstack_free.
778         (unqualified_namespace_lookup): Simplify.
779         (lookup_name_real): Simplify.
780         (start_function): Remove comment about leaks.
781         (finish_function): Removed nested parameter.  Call
782         expand_end_bindings even when building_stmt_tree.
783         Call ggc_push_context and ggc_pop_context around
784         rest_of_compilation, if necessary.
785         (mark_cp_function_context): Handle a NULL language-context.
786         (lang_mark_false_label_stack): Fix typo.
787         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
788         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
789         pointer to method types.
790         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
791         * decl2.c (finish_objects): Adjust call to finish_function.
792         (finish_static_store_duration_function): Likewise.
793         (do_nonmember_using_decl): Remove call to binding_init.
794         * except.c (end_anon_func): Adjust call to finish_function.
795         * lex.c (mark_impl_file_chain): New function.
796         (init_parse): Call init_tree, not init_cplus_unsave.
797         Add GC roots.
798         (cp_pramga_interface): Use xmalloc, not permalloc.
799         (cp_pragma_implementation): Likewise.
800         (begin_definition_of_inclass_inline): Simplify.
801         (process_next_inline): Adjust prototype.
802         (do_scoped_id): Don't call binding_init.
803         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
804         * method.c (emit_thunk): Adjust call to finish_function.
805         (synthesize_method): Likewise.
806         * parse.y (%union): Add a new `pi' variant.
807         (PRE_PARSED_FUNCTION_DECL): Use it.
808         (fn.defpen): Likewise.
809         (fndef): Adjust call to finish_function.
810         * pt.c (instantiate_decl): Likewise.
811         * rtti.c (syntheisze_tinfo_fn): Likewise.
812         * semantics.c (expand_body): Likewise.
813         * tree.c: Include ggc.h.
814         (mark_list_hash): New function.
815         (binding_init): Remove.
816         (init_cplus_unsave): Rename to ...
817         (init_tree): This.  Add GC roots.
818         
819 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
820
821         Get ready for garbage collection.
822         * Makefile.in (CXX_TREE_H): Add varray.h
823         (lex.o): Depend on ggc.h.
824         (decl.o): Likewise.
825         (decl2.o): Likewise.
826         (method.o): Likewise.
827         (search.o): Likewise.
828         (pt.o): Likewise.
829         (repo.o): Likewise.
830         * class.c: Include ggc.h.
831         (current_class_name): Remove.
832         (current_class_type): Likewise.
833         (current_access_specifier): Likewise.
834         (previous_class_type): Likewise.
835         (previous_class_values): Likewise.
836         (class_cache_firstobj): Likewise.
837         (current_lang_base): Likewise.
838         (current_lang_stack): Likewise.
839         (current_lang_stacksize): Likewise.
840         (lang_name_c): Likewise.
841         (lang_name_cplusplus): Likewise.
842         (lang_name_java): Likewise.
843         (current_lang_name): Likewise.
844         (base_layout_decl): Likewise.
845         (access_default_node): Likewise.
846         (access_public_node): Likewise.
847         (access_protected_node): Likewise.
848         (access_private_node): Likewise.
849         (access_default_virtual_node): Likewise.
850         (access_public_virtual_node): Likewise.
851         (access_protected_virtual_node): Likewise.
852         (access_private_virtual_node): Likewise.
853         (signed_zero_node): Likewise.
854         (init_class_processing): Don't build base_layout_decl.
855         (push_lang_context): Adjust now that current_lang_base is a varray.
856         (pop_lang_context): Likewise.
857         * cp-tree.h: Include varray.h.
858         (cp_global_trees): Add access_default, access_public,
859         access_protected, access_private, access_default_virtual,
860         access_public_virtual, access_protected_virtual,
861         access_private_virtual, ctor_identifier, delta2_identifier, 
862         delta_identifier, dtor_identifier, in_charge_identifier,
863         index_identifier, nelts_identifier, this_identifier,
864         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
865         lang_name_c, lang_name_cplusplus, lang_name_java,
866         empty_except_spec, null, jclass, minus_one, terminate.
867         (saved_scope): Move here from decl.c.  Define globals in terms of
868         saved_scope: current_namespace, current_class_name,
869         current_class_type, current_access_specifier, current_lang_stack,
870         current_lang_base, current_lang_name, current_function_parms,
871         current_template_parms, processing_template_decl,
872         processing_specialization, processing_explicit_instantiation,
873         previous_class_type, previous_class_values, class_cache_firstobj.
874         (scope_chain): New variable.
875         (init_pt): New function.
876         * decl.c (current_namespace): Remove.
877         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
878         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
879         (delta_identifier, delta2_identifier): Likewise.
880         (pfn_or_delta2_identifier, tag_identifier): Likewise
881         (vt_off_identifier, empty_except_spec, null_node): Likewise.
882         (current_function_parms, current_lang_base): Remove.
883         (current_lang_stack, previous_class_values): Remove.
884         (class_binding_level): Macroize.
885         (saved_scope): Remove.
886         (current_saved_scope): Rename to scope_chain.
887         (mark_saved_scope): Adjust for new scope structure.
888         (maybe_push_to_top_level): Likewise.
889         (pop_from_top_level): Likewise.
890         (duplicate_decls): Adjust now that current_lang_base is a varray.
891         (build_typename_type): Call ggc_add_tree_hash_table_root.
892         (init_decl_processing): Call init_pt.  Call push_to_top_level to
893         set up globals.  Add GC roots.
894         (xref_basetypes): Adjust now that current_lang_base is a varray.
895         * decl.h (this_identifier): Remove.
896         (in_charge_identifier): Likewise.
897         * decl2.c: Don't include varray.h.
898         (current_namespace): Remove.
899         (init_decl2): Add GC roots.
900         * except.c (Terminate): Remove. 
901         (init_exception_processing): Use terminate_node instead.
902         (build_terminate_handler): Likewise.
903         * init.c (nc_nelts_field_id): Remove.
904         (minus_one): Likewise.
905         (init_init_processing): Use minus_one_node and nelts_identifier
906         instead.  Add GC roots.
907         (jclass_node): Remove.
908         (build_new_1): Use nelts_identifier.
909         (build_vec_init): Likewise.
910         (build_vec_delete): Likewise.
911         * lex.c: Include ggc.h.
912         (defarg_fn): Move declaration early.
913         (defarg_parms): Likewise.
914         (init_parse): Add GC roots.
915         (handle_cp_pragma): Remove redundant declaration of
916         pending_vtables.
917         * method.c: Include ggc.h.
918         (btypelist): Make it a varray.  All uses changed.
919         (ktypelist): Likewise.
920         (init_method): Add GC roots.
921         * pt.c: Don't include varray.h.  Include ggc.h.
922         (current_template_parms): Remove.
923         (processing_template_decl): Likewise.
924         (processing_specialization): Likewise.
925         (processing_explicit_instantiation): Likewise.
926         (init_pt): New function.
927         * repo.c: Include ggc.h.
928         (init_repo): Add GC roots.
929         * search.c: Don't include varray.h.
930         (_vptr_name): Remove.
931         (lookup_field_1): Use vtpr_identifier instead.
932         (expand_indirect_vtbls_init): Remove redundant declaration of
933         in_charge_identifier.
934         (init_search_processing): Use vptr_identifier.
935         
936 1999-09-05  Richard Henderson  <rth@cygnus.com>
937             Bernd Schmidt <bernds@cygnus.co.uk>
938             Mark Mitchell  <mark@codesourcery.com>
939
940         * Makefile.in (parse.o): Depend on ggc.h.
941         (decl2.o): Depend on ggc.h.
942         (init.o): Depend on ggc.h.
943         * cp-tree.h (init_decl2): Declare.
944         (cp_parse_init): Likewise.
945         * decl.c (ggc_p): Define to zero.
946         (mark_saved_scope): New function.
947         (init_decl_processing): Call cp_parse_init, and cp_decl2.
948         Register GC roots.
949         (expand_static_init): Add GC roots.
950         * decl2.c: Include ggc.h.
951         (init_decl2): New function.
952         * init.c: Include ggc.h.
953         (init_init_processing): Add GC roots.
954         * parse.y: Include ggc.h.
955         (cp_parse_init): New function.
956         
957 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
958
959         * decl.c (init_decl_processing): Set mark_lang_status.
960         (lang_mark_false_label_stack): Adjust prototype.
961         * decl2.c (grok_function_init): Remove extraneous declaration of
962         abort_fndecl.
963
964         * Make-lang.in (cc1plus): Remove dependency on GGC.
965         * Makefile.in (OBJS): Don't mention ggc-simple.o.
966         (OBJDEPS): Don't mention ggc-simple.o.
967
968         * Make-lang.in (cc1plus): Depend on $(GGC).
969         * Makefile.in (OBJS): Add ggc-simple.o.
970         (OBJDEPS): Likewise.
971         * cp-tree.h (language_function): Rename members to `x_' versions;
972         we now have x_named_labels, x_ctor_label, x_dtor_label,
973         x_base_init_list, x_member_init_list, x_base_init_expr,
974         x_current_class_ptr, x_current_class_ref, x_last_tree,
975         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
976         x_result_rtx. 
977         (dtor_label, ctor_label, current_base_init_list,
978         current_member_init_list, base_init_expr, current_class_ptr,
979         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
980         * decl.c: Include ggc.h.
981         (last_dtor_insn): Adjust to use x_ names.
982         (last_parm_cleanup_insn): Likewise.
983         (original_result_rtx): Likewise.
984         (named_labels): Likewise.
985         (mark_binding_level): New function.
986         (mark_cp_function_context): Likewise.
987         (mark_false_label_stack): Likewise.
988         (lang_mark_tree): Likewise.
989         (lang_cleanup_tree): Likewise.
990         
991 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
992
993         * Makefile.in (CXX_TREE_H): Include function.h.
994         (decl.o): Don't depend on function.h.
995         (decl2.o): Likewise.
996         (typeck.o): Likewise.
997         (init.o): Likewise.
998         (method.o): Likewise.
999         * cp-tree.h: Include function.h.
1000         (cp_function): Rename to language_function.  Remove next.
1001         (cp_function_chain): Make it a macro, not a variable.
1002         (push_cp_function_context): Don't declare.
1003         (pop_cp_function_context): Likewise.
1004         * decl.c: Don't include function.h.
1005         (push_cp_function_context): Make it static.  Make it suitable for
1006         a save_lang_status callback.
1007         (pop_cp_function_context): Likewise.
1008         (maybe_push_to_top_level): Call push_function_context_to, not
1009         push_cp_function_context.
1010         (pop_from_top_level): Call pop_function_context_from, not
1011         pop_cp_function_context.
1012         (init_decl_processing):  Set save_lang_status and
1013         restore_lang_status.  Call push_function_context_to, not
1014         push_cp_function_context.
1015         (cp_function_chain): Remove.
1016         * decl2.c: Don't include function.h.
1017         * except.c: Don't include function.h.
1018         (start_anon_func): Call push_function_context_to, not
1019         push_cp_function_context.
1020         (end_anon_func):  Call pop_function_context_from, not
1021         pop_cp_function_context.
1022         * init.c: Don't include function.h.
1023         * lex.c (begin_definition_of_inclass_inline): Call
1024         push_function_context_to, not push_cp_function_context. 
1025         (process_next_inline):  Call pop_function_context_from, not
1026         pop_cp_function_context.
1027         * method.c: Don't include function.h.
1028         (synthesize_method): Call push_function_context_to, not
1029         push_cp_function_context.  Call pop_function_context_from, not
1030         pop_cp_function_context.
1031         * typeck.c: Don't include function.h.
1032         
1033         * decl.c (expand_static_init): Tweak handling of static
1034         initializations for objects without constructors.
1035
1036 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1037
1038         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1039         void.
1040
1041 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1042
1043         * cp-tree.h (cp_function): Move here, from decl.c.
1044         (cp_function_chain): Declare.
1045         (dtor_label): New macro, instead of variable.
1046         (ctor_label): Likewise.
1047         (current_base_init_list): Likewise.
1048         (current_member_init_list): Likewise.
1049         (base_init_expr): Likewise.
1050         (current_class_ptr): Likewise.
1051         (current_class_ref): Likewise.
1052         (last_tree): Likewise.
1053         (last_expr_type): Likewise.
1054         (current_function_returns_value): Likewise.
1055         (current_function_returns_null): Likewise.
1056         (current_function_just_assigned_this): Likewise.
1057         (current_function_parms_stored): Likewise.
1058         (temp_name_counter): Likewise.
1059         (static_labelno): Likewise.
1060         (expanding_p): Likewise.
1061         (stmts_are_full_exprs_p): Likewise.
1062         (in_function_try_handler): Likewise.
1063         (lang_type): Remove nested type_flags.  All uses changed.
1064         * call.c (ctor_label): Remove.
1065         (dtor_label): Likewise.
1066         * class.c (current_class_ptr): Remove.
1067         (current_class_ref): Likewise.
1068         * decl.c (static_labelno): Remove.
1069         (dtor_label): Likewise.
1070         (last_dtor_insn): New macro, instead of variable.
1071         (last_parm_cleanup_insn): Likewise.
1072         (original_result_rtx): Likewise.
1073         (in_function_try_handler): Remove.
1074         (named_label_uses): New macro, instead of variable.
1075         (named_labels): Likewise.
1076         (current_function_returns_value): Remove.
1077         (current_function_returns_null): Likewise.
1078         (current_function_assigns_this): New macro, instead of variable.
1079         (current_function_just_assigned_this): Likewise.
1080         (current_binding_level): Likewise.
1081         (init_decl_processing): Call push_cp_function_context.
1082         (cp_function): Move to cp-tree.h
1083         (cp_function_chain): Make it global.
1084         (temp_name_counter): Remove.
1085         (push_cp_function_context): Simplify.
1086         (pop_cp_function_context): Likewise.
1087         * decl2.c (temp_name_counter): Remove.
1088         * init_c (current_base_init_list): Likewise.
1089         (current_member_init_list): Likewise.
1090         (base_init_expr): Likewise.
1091         * method.c (static_labelno): Likewise.
1092         * pt.c (last_tree): Likewise.
1093         * semantics.c (expanding_p): Likewise.
1094         (stmts_are_full_exprs_p): Likewise.
1095         (last_expr_type): Likewise.
1096         * typeck.c (dtor_label): Likewise.
1097         (ctor_label): Likewise.
1098         
1099 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1100
1101         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1102         (arg_assoc_class): Use arg_assoc_template_arg for template
1103         arguments. 
1104         (arg_assoc): Likewise.
1105         * pt.c (mangle_class_name_for_template): Allow member template
1106         template arguments.
1107
1108 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1109
1110         * call.c (build_conditional_expr): Warn on enum mismatches.
1111         (convert_arg_to_ellipsis): Move non-pod check to after
1112         conversion.
1113
1114 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1115
1116         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1117
1118         * init.c (build_vec_init): Initialize variable `try_block'.
1119
1120         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1121         Likewise for bzero/memset.
1122         (token_getch, token_put_back): Add static prototypes.  Remove
1123         `inline' from the definitions.
1124         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1125
1126 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1127
1128         * cp-tree.h (lang_type): Move align into type_flags.
1129         (CLASSTYPE_ALIGN): Adjust accordingly.
1130         * call.c (direct_reference_binding): Remove misleading comment.
1131
1132 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1133
1134         * parse.y (language_string): Constify.
1135
1136 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1137
1138         * repo.c (getpwd): Don't prototype.
1139         * xref.c (getpwd): Likewise
1140
1141 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1142
1143         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1144         Remove hacks for stuff which now comes from libiberty.
1145
1146 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1147
1148         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1149
1150 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1151
1152         * cp-tree.h (begin_init_stmts): Declare.
1153         (finish_init_stmts): Likewise.
1154         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1155         in a statement-expression so that we will see it when expanding
1156         tree structure later.
1157         * init.c (begin_init_stmts): Don't make it static.
1158         (finish_init_stmts): Likewise.
1159
1160         * cp-tree.h (start_handler_parms): New function.
1161         (expand_start_catch_block): Take only one parameter.
1162         (start_handler_parms): New function.
1163         * decl.c (start_handler_parms): Define it.
1164         * except.c (process_start_catch_block): Take only one parameter.
1165         Don't call grokdeclarator here.
1166         (expand_start_catch_block): Don't call grokdeclarator here,
1167         either.
1168         * parse.y (handler_args): Adjust call to
1169         expand_start_catch_block.  Use start_handler_parms.
1170         * pt.c (push_template_decl_real): Make permanent lists have
1171         permanent elements.
1172         (tsubst_expr): Adjust calls to expand_start_catch_block
1173         appropriately.
1174         * semantics.c (expand_stmt): Likewise.
1175         
1176 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1177
1178         * pt.c (push_template_decl_real): Use template declaration from
1179         class type if it exists.
1180
1181 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1182
1183         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1184         (maybe_inject_for_scope_var): Declare it.
1185         (initialize_local_var): Likewise.
1186         * decl.c (maybe_inject_for_scope_var): Make it global.
1187         (initialize_local_var): Likewise.  Move cleanup handling here,
1188         from cp_finish_decl.
1189         (make_rtl_for_nonlocal_decl): Use
1190         push_obstacks_nochange/pop_obstacks, rather than
1191         end_temporary_allocation/resume_temporary_allocation.
1192         (cp_finish_decl): Try to complete the type of a variable when it
1193         is declared.  Move cleanup-handling to initialize_local_var.
1194         (expand_static_init): Use tree-building code, rather than
1195         RTL-building code.
1196         * decl2.c (get_temp_name): Assert non-initializedness of
1197         temporaries.
1198         * init.c (create_temporary_var): Move RTL-assigning code to ...
1199         (get_temp_regvar): Here.
1200         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1201         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1202         call initialize_local_var to generate initialization code.
1203         
1204 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1205
1206         * cp-tree.h (fndecl_as_string, type_as_string,
1207         type_as_string_real, args_as_string, decl_as_string,
1208         expr_as_string, code_as_string, language_as_string,
1209         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1210         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1211
1212         * errfn.c (cp_printer): Likewise.
1213
1214         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1215         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1216         cp_file_of, code_as_string, language_as_string, parm_as_string,
1217         op_as_string, assop_as_string, args_as_string, cv_as_string):
1218         Likewise.
1219
1220         * tree.c (lang_printable_name): Likewise.
1221
1222 1999-08-28  Richard Henderson  <rth@cygnus.com>
1223
1224         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1225
1226 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1227
1228         * cp-tree.h (strip_array_types): New function.
1229         * decl.c (maybe_deduce_size_from_array_init): New function, split
1230         out from cp_finish_decl.
1231         (layout_var_decl): Likewise.
1232         (maybe_commonize_var): Likewise.
1233         (maybe_inject_for_scope_var): Likewise.
1234         (initialize_local_var): Likewise.
1235         (build_cleanup_on_safe_obstack): Likewise.
1236         (check_initializer): Likewise.
1237         (make_rtl_for_nonlocal_decl): Likewise.
1238         (cp_finish_decl): Use them.
1239         * typeck.c (strip_array_types): New function.
1240         
1241         * cp-tree.def (LABEL_STMT): New tree node.
1242         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1243         (shadow_label): Remove.
1244         (declare_local_label): New function.
1245         (finish_label_decl): Likewise.
1246         * decl.c (make_label_decl): New function, split out from
1247         lookup_label.
1248         (shadowed_labels): Remove.
1249         (binding_level): Add shadowed_labels.
1250         (clear_binding_level): Remove.
1251         (push_binding_level): Just bzero the new binding level.
1252         (pushlevel): Fix indentation.
1253         (pop_label): New function.
1254         (pop_labels): Likewise, split out from poplevel.
1255         (poplevel): Pop local labels.  Use pop_labels.
1256         (maybe_push_to_top_level): Don't clear shadowed_labels.
1257         (lookup_label): Use make_label_decl.
1258         (shadow_label): Remove.
1259         (declare_local_label): New function.
1260         (define_label): Simplify.
1261         (start_function): Don't clear shadowed_labels.
1262         (cp_function): Remove shadowed_labels.
1263         (push_cp_function_context): Don't save shadowed_labels.
1264         (pop_cp_function_context): Don't restore it.
1265         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1266         * parse.y (label_decl): Use finish_label_decl.
1267         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1268         declarations.
1269         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1270         building_stmt_tree.
1271         (finish_label_decl): New function.
1272         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1273         
1274 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1275
1276         * decl.c (lookup_label): Build labels on the permanent obstack
1277         when building statement trees.  Don't build RTL for labels when
1278         building statement trees.
1279         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1280         building statement trees.
1281         (finish_label_stmt): Likewise.
1282         (expand_stmt): Adjust accordingly.
1283         * pt.c (tsubst_expr); Likewise.
1284         (do_decl_instantiation): Robustify.
1285         
1286         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1287         * tree.c (build_cplus_new): Set it.
1288         * expr.c (cplus_expand_expr): Use it.
1289         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1290         
1291         * decl.c (store_parm_decls): Reset immediate_size_expand.
1292         (finish_function): Likewise.
1293         
1294         * tree.c (cplus_unsave_expr_now): Don't return a value.
1295
1296         * semantics.c (do_poplevel): Always initialize the return value.
1297
1298 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1299
1300         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1301         * tree.h (cplus_unsave_expr_now) : Same.
1302
1303 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1304
1305         * decl.c (grokdeclarator): Amend comment.
1306         * except.c (expand_start_catch_block): Call push_template_decl for
1307         catch-block parameters.
1308         * method.c (synthesize_method): Build an empty compound statement
1309         for the body of a constructor.
1310
1311 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
1312
1313         * tree.c (cp_build_qualified_type_real): If we're asking for the
1314         same quals we already have, just return.
1315
1316 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1317
1318         * cp-tree.def (SUBOBJECT): New tree node.
1319         * cp-tree.h (CLEANUP_P): New macro.
1320         (SUBOBJECT_CLEANUP): Likewise.
1321         (keep_next_level): Add parameter.
1322         (get_temp_regvar): Don't declare.
1323         (emit_base_init): Remove parameter.
1324         (expand_aggr_init): Rename to build_aggr_init.
1325         (expand_vec_init): Rename to build_vec_init.
1326         (do_pushlevel): Remove.
1327         (do_poplevel): Likewise.
1328         (finish_cleanup): New function.
1329         (finish_subobject): Likewise.
1330         (stmts_are_full_exprs_p): New variable.
1331         * decl.c (keep_next_level): Add parameter.
1332         (cp_finish_decl): Use build_aggr_init, not
1333         expand_aggr_init.  Use finish_expr_stmt to expand the code.
1334         (expand_static_init): Use tree-generating, not RTL-generating,
1335         functions to handle the initialization.
1336         (start_function): Remove dead code.  Always have a momentary
1337         obstack inside the function, even before hitting the first curly
1338         brace.
1339         (cplus_expand_expr_stmt): Move calls to
1340         expand_{start,end}_target_temps into semantics.c.
1341         (cp_function): Add stmts_are_full_exprs_p.
1342         (push_cp_function_context): Save it.
1343         (pop_cp_function_context): Restore it.
1344         * decl2.c (get_temp_regvar): Move to init.c.
1345         (do_static_initialization): Use build_{aggr,vec}_init.
1346         (do_static_destruction): Fix typo in comment.
1347         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1348         * except.c (expand_throw): Use create_temporary_var.
1349         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1350         * init.c (expand_vec_init_try_block): Remove.
1351         (expand_vec_init_catch_clause): Likewise.
1352         (get_temp_regvar): New function.
1353         (begin_init_stmts): Likewise.
1354         (finish_init_stmts): Likewise.
1355         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
1356         structure here.
1357         (emit_base_init): Likewise.  Remove unused parameter.
1358         (expand_virtual_init): Likewise.
1359         (expand_cleanup_for_base): Use finish_subobject.
1360         (expand_aggr_vbase_init_1): Simplify.
1361         (construct_virtual_bases): Use tree-generating functions to build
1362         up initialization.
1363         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
1364         (expand_default_init): Likewise.
1365         (expand_aggr_init_1): Likewise.
1366         (expand_vec_init): Rename to build_vec_init.
1367         * method.c (do_build_copy_constructor): Use tree-generating
1368         functions.  Don't call clear_last_expr.
1369         (do_build_assign_ref): Likewise.
1370         (synthesize_method): Call clear_last_expr here.
1371         * parse.y (base_init): Don't call clear_last_expr here.
1372         (nodecls): Likewise.
1373         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1374         * semantics.c (do_pushlevel): Move to here.
1375         (do_poplevel): Likewise.
1376         (stmts_are_full_exprs_p): New variable.
1377         (finish_expr_stmt): Handle logic for temoprary cleanup here.
1378         (finish_for_stmt): Use finish_expr_stmt.
1379         (finish_cleanup): New function.
1380         (finish_function_try_block): Fix indentation.
1381         (finish_subobject): New function.
1382         (setup_vtbl_ptr): Call keep_next_level here.
1383         (finish_stmt_expr): Handle a block with no scope inside the
1384         statement-expression.
1385         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
1386         SUBOBJECT.
1387         * tree.c (search_tree): Handle INIT_EXPR.
1388         (mapcar): Likewise.
1389         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1390         * typeck2.c (store_init_value): Change expand_aggr_init to
1391         build_aggr_init in comment.
1392         
1393 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1394
1395         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1396
1397 1999-08-25  Nathan Sidwell  <nathan@acm.org>
1398
1399         * decl2.c (handle_class_head): Be graceful about additional
1400         scope qualifiers. Adjust comments to reflect reality.
1401
1402 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
1403
1404         * call.c (build_conditional_expr): Fix typo.
1405         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1406         lvalue before trying to mess with the sides.
1407
1408         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1409
1410 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
1411
1412         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1413
1414 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
1415
1416         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1417         Return arbitrary pointer or NULL.
1418         (check_eh_spec): Call __throw_type_match_rtti_2.
1419         * tinfo.h (*::dcast): Return int.  Add valp parm.
1420         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
1421         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1422         (__throw_type_match_rtti): Now just a wrapper.
1423
1424         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1425         (init_exception_processing): Don't initialize them.
1426
1427 1999-08-23  Paul Burchard <burchard@pobox.com>
1428
1429         * decl.c (check_default_argument): Fix typo.
1430
1431 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
1432
1433         * cp-tree.def (STMT_EXPR): Fix typo in node name.
1434
1435         * dump.c (dump_next_stmt): New function.
1436         (dequeue_and_dump): Use it.
1437         
1438         * pt.c (tsubst_copy): Make sure to initialize return value for a
1439         STMT_EXPR, even when processing_template_decl.
1440         * semantics.c (finish_stmt_expr): A statement-expression whose
1441         last statement is not an expression-statement has type `void'.  
1442         
1443 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
1444
1445         * semantics.c (finish_stmt_expr): Fix typo in comment.
1446         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1447         (mapcar): Likewise.
1448         * init.c (build_vec_delete_1): Make the children of a permanent
1449         BIND_EXPR permanent.
1450         * pt.c (register_specialization): Don't register a specialization
1451         more than once.
1452         
1453 1999-08-18  Andrew Haley  <aph@cygnus.com>
1454
1455         * method.c (process_overload_item): Call build_mangled_C9x_name ()
1456         for all integer parameter types larger than long long.
1457
1458 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1459
1460         * pt.c (redeclare_class_template): Merge default template
1461         arguments in both directions.
1462
1463         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
1464         compiler_error message.
1465
1466 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
1467
1468         * cp-tree.h: Declare flag_use_repository.
1469         * pt.c (do_decl_instantiation): Don't complain about duplicate
1470         instantiation with -frepo.
1471         (do_type_instantiation): Likewise.
1472
1473         * pt.c (push_template_decl_real): Complain about everything
1474         that isn't a valid template.
1475
1476         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1477         affect inlines.
1478
1479 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
1480
1481         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1482         * decl2.c (build_expr_from_tree): Handle it.
1483         * error.c (dump_expr): Likewise.
1484         * pt.c (for_each_template_parm): Likewise.
1485         (tsubst_copy): Likewise.
1486         * tree.c (search_tree): Likewise.
1487         * semantics.c (finish_pseudo_destructor_call): Create it.
1488         
1489 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
1490
1491         * search.c (setup_class_bindings): Robustify.
1492         * typeck.c (common_type): Use same_type_p, not pointer equality,
1493         to compare types.
1494
1495         * cp-tree.h (build_lang_field_decl): Remove.
1496         * class.c (build_vtable): Replace calls to build_lang_field_decl
1497         with build_lang_decl.
1498         (prepare_fresh_vtable): Likewise.
1499         (finish_struct_1): Likewise.
1500         (init_class_processing): Likewise.
1501         * decl.c (push_using_decl): Likewise.
1502         (init_decl_processsing): Likewise.
1503         (grokvardecl): Likewise.
1504         (build_ptrmemfunc_type): Likewise.
1505         (grokdeclarator): Likewise.
1506         (build_enumerator): Likewise.
1507         * decl2.c (grok_x_components): Likewise.
1508         (do_class_using_decl): Likewise.
1509         * except.c (call_eh_info): Likewise.
1510         * init.c (init_init_processing): Likewise.
1511         * rtti.c (expand_class_decl): Likewise.
1512         * tree.c (build_base_fields): Likewise.
1513         (build_vbase_pointer_fields): Likewise.
1514         * lex.c (build_lang_decl): Build declarations on the permanent
1515         obstack if we're building statmeent trees.
1516         (retrofit_lang_decl): Handle both the full lang_decl and also the
1517         smaller lang_decl_flags here.
1518         (build_lang_field_decl): Remove.
1519         * pt.c (push_template_decl_real): Issue errors for variable
1520         declarations that are not static members.
1521
1522 1999-08-18  Richard Henderson  <rth@cygnus.com>
1523
1524         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1525         (mapcar): Likewise.
1526
1527 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1528
1529         * cp-tree.h (back_end_hook): New variable.
1530         * decl2.c (back_end_hook): Define it.
1531         (finish_file): If it's non-NULL, call it.
1532
1533         * decl.c (add_decl_to_level): New function.
1534         (push_local_binding): Use it.
1535         (find_binding): Fix typo in comment.
1536         (pushdecl): Use add_decl_to_level.  Put templates on the
1537         corresponding namespace-scope binding levels.
1538         * dump.c (dequeue_and_dump): Print the specializations of a
1539         template.
1540         * pt.c (push_template_decl_real): Don't push a template multiple
1541         times.
1542
1543 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
1544
1545         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1546         (CALL_DECLARATOR_QUALS): Likewise.
1547         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1548         * decl.c (grokdeclarator): Adjust to use them.
1549         * decl2.c (grokfield): Likewise.
1550         (reparse_absdcl_as_casts): Likewise.
1551         * lex.c (make_call_declarator): Likewise.
1552         (set_quals_and_spec): Likewise.
1553         * pt.c (tsubst): Likewise.
1554         * tree.c (mapcar): Remove special hack to handle third operand of
1555         a CALL_EXPR.
1556
1557 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
1558
1559         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1560         * class.c (build_vtable): Use build_lang_field_decl to build the
1561         VAR_DECLs for vtables.
1562         (prepare_fresh_vtable): Likewise.
1563         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1564         CAN_HAVE_FULL_LANG_DECL_P.
1565         (push_using_decl): Use build_lang_decl to build USING_DECLs.
1566         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1567         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1568         (build_lang_field_decl): Likewise.
1569         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1570         to copy.
1571         
1572         * cp-tree.def (STMT_EXPR): New tree node.
1573         * cp-tree.h (STMT_EXPR_STMT): New macro.
1574         (store_return_init): Change prototype.
1575         (finish_named_return_value): New function.
1576         (expand_stmt): Likewise.
1577         (expand_body): Likewise.
1578         (begin_stmt_tree): Likewise.
1579         (finish_stmt_tree): Likewise.
1580         (expanding_p): New variable.
1581         (last_expr_type): Likewise.
1582         (building_stmt_tree): New macro.
1583         * decl.c (start_function): Use building_stmt_tree, not
1584         processing_template_decl, where appropriate.
1585         (store_parm_decls): Likewise.
1586         (store_return_init): Move most of the body to semantics.c.
1587         (finish_function): Use building_stmt_tree.
1588         (finish_stmt): Clear last_expr_type here.
1589         (cp_function): Add expanding_p, last_tree, last_expr_type.
1590         (push_cp_function_context): Save them.
1591         (pop_cp_function_context): Restore them.
1592         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1593         * error.c (dump_expr): Handle STMT_EXPR.
1594         * except.c (expand_start_catch_block): Use building_stmt_tree.
1595         Use add_decl_stmt.
1596         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1597         (do_case): Move add_tree call to semantics.c.
1598         * parse.y (return_init): Use finish_named_return_value.
1599         (for.init.statement): Use finish_expr_stmt.
1600         * parse.c: Regenerated.
1601         * pt.c (do_pushlevel): Move to semantics.c.
1602         (do_poplevel): Likewise.
1603         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1604         (tsubst_expr): Don't expand all the way to RTL here.  Handle
1605         RETURN_INIT and CTOR_INITIALIZER.
1606         (instantiate_decl): Call expand_body after tsubst'ing into
1607         DECL_SAVED_TREE.
1608         * semantics.c (expand_stmts): New function.
1609         (expanding_p): New variable.
1610         (last_expr_type): Likewise.
1611         (finish_expr_stmt): Use building_stmt_tree.
1612         (begin_if_stmt): Likewise.
1613         (finish_if_stmt_cond): Likewise.
1614         (finish_then_clause): Likewise.
1615         (begin_else_clause): Likewise.
1616         (finish_else_clause): Likewise.
1617         (begin_while_stmt): Likewise.
1618         (finish_while_stmt_cond): Likewise.
1619         (finish_while_stmt): Likewise.
1620         (finish_do_body): Likewise.
1621         (finish_do_stmt): Likewise.
1622         (finish_return_stmt): Likewise.
1623         (begin_for_stmt): Likewise.
1624         (fnish_for_init_stmt): Likewise.
1625         (finish_for_cond): Likewise.
1626         (finish_for_expr): Likewise.
1627         (finish_for_stmt): Likewise.
1628         (finish_break_stmt): Likewise.
1629         (finish_continue_stmt): Likewise.
1630         (finish_switch_cond): Likewise.
1631         (finish_switch_stmt): Likewise.
1632         (finish_case_label): Call add_tree here if necessary.
1633         (finish_goto_statement): Use building_stmt_tree.
1634         (begin_try_block): Likewise.
1635         (begin_function_try_block): Likewise.
1636         (finish_try_block): Likewise.
1637         (finish_function_try_block): Likewise.
1638         (finish_handler_sequence): Likewise.
1639         (finish_function_handler_sequence): Likewise.
1640         (begin_handler): Likewise.
1641         (finish_handler_parms): Likewise.
1642         (finish_handler): Likewise.
1643         (begin_compound_stmt): Likewise.
1644         (finish_compound_stmt): Likewise.
1645         (finish_asm_stmt): Likewise.
1646         (finish_label_stmt): Likewise.
1647         (finish_named_return_value): New function.
1648         (setup_vtbl_ptr): Moved here from decl2.c.
1649         (do_pushlevel): Moved here from pt.c.
1650         (do_poplevel): Likewise.
1651         (begin_stmt_expr): Use building_stmt_tree.
1652         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
1653         when building_stmt_tree.
1654         (begin_stmt_tree): New function.
1655         (finish_stmt_tree): Likewise.
1656         (expand_stmt): Likewise.
1657         (expand_body): Likewise.
1658         * tree.c (build_cplus_method_type): Make sure the argument types
1659         end up on the same obstack as the METHOD_TYPE.
1660         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1661         THROW_EXPR, STMT_EXPR.
1662         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
1663         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
1664         sorry, if an unsupported node is encountered.
1665         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1666         (c_expand_return): Don't call add_tree here.
1667         
1668 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
1669
1670         * pt.c (check_default_tmpl_args): Don't check in local scopes.
1671         (tsubst_decl): Make sure the declaration is on a saveable
1672         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1673         variable.
1674         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1675         
1676 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
1677
1678         Speed up Koenig lookup.
1679         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
1680         to return namespaces we've looked at.
1681         * decl2.c (lookup_using_namespace): Likewise.
1682         (add_function): Don't call ovl_member.
1683         (lookup_arg_dependent): Initialize k.namespaces to the list of 
1684         namespaces seen in unqualified lookup.
1685         * call.c (equal_functions): Move here from tree.c.
1686         (joust): Use it to handle duplicate candidates.
1687         * tree.c (ovl_member): Use ==.
1688
1689 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1690
1691         * cp-tree.def (DECL_STMT): Make it smaller.
1692         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1693         (lang_decl): ... here.  Add next.
1694         (DECL_SAVED_TREE): Adjust accordingly.
1695         (DECL_IMPLICIT_TYPEDEF_P): New macro.
1696         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1697         (DECL_STMT_DECL): Likewise.
1698         (create_implicit_typedef): New function.
1699         (maybe_push_decl): Likewise.
1700         (tsubst_default_argument): New function.
1701         (at_function_scope_p): Likewise.
1702         (add_decl_stmt): Likewise.
1703         (push_permanent_obstack): Likewise.
1704         * call.c (convert_default_arg): Use tsubst_default_argument.
1705         * class.c (add_method): Use push_permanent_obstack.
1706         (build_self_reference): Create a TEMPLATE_DECL for the
1707         self-reference, if necessary.
1708         * decl.c (pseudo_global_level_p): Only look at the current binding
1709         level.
1710         (push_binding): Use push_permanent_obstack.
1711         (create_implicit_typedef): New function.
1712         (pushtag): Use it.
1713         (duplicate_decls): Use push_permanent_obstack.
1714         (maybe_push_decl): New function.
1715         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
1716         (start_decl_1): Remove dead code.
1717         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
1718         pseudo_global_level_p.
1719         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1720         template.
1721         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
1722         pseudo_global_level_p.
1723         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1724         a template.
1725         (get_sentry): Use push_permanent_obstack.
1726         * dump.c (dequeue_and_dump): Enable DECL_STMT.
1727         * except.c (call_eh_info): Use push_permanent_obstack.
1728         (build_eh_type_ref): Likewise.
1729         (do_pop_exception): Likewise.
1730         (expand_eh_spec): Likewise.
1731         (alloc_eh_object): Likewise.
1732         (expand_throw): Likewise.
1733         * init.c (build_java_class_ref): Likewise.
1734         * lex.c (get_time_identifier): Likewise.
1735         (free_lang_decl_chain): Correct type.
1736         (retrofit_lang_decl): Adjust accordingly.
1737         (build_lang_field_decl): Likewise.
1738         * lex.h (free_lang_decl_chain): Likewise.
1739         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1740         * parse.c: Regenerated.
1741         * pt.c (tsubst_default_arguments): New function.
1742         (retrieve_local_specialization): Likewise.
1743         (register_local_specialization): Likewise.
1744         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
1745         pseudo_global_level_p to determine whether or not a template is
1746         primary.
1747         (lookup_template_class): Likewise.  Use create_implicit_typedef.
1748         (instantiate_class_template): Call tsubst_default_arguments for
1749         member functions, if appropriate.
1750         (tsubst_default_argument): New function.
1751         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
1752         * search.c (at_function_scope_p): New function.
1753         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1754         (finish_label_stmt): Likewise.
1755         (add_decl_stmt): New function.
1756         (begin_class_definition): Likewise.
1757         (finish_typeof): Likewise.
1758         * tree.c (copy_template_template_parm): Likewise.
1759         (copy_to_permanent): Likewise.
1760         (push_permanent_obstack): Define.
1761         (mark_addressable): Use it.
1762         * typeck.c (mark_addressable): Likewise.
1763         
1764 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
1765
1766         * cp-tree.h (init_cplus_unsave): New.
1767         (cplus_unsave_expr_now): New.
1768         * lex.c (init_parse): Call init_cplus_unsave.
1769         * tree.c (init_cplus_unsave): New.
1770         (cplus_unsave_expr_now): New.
1771
1772 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
1773
1774         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
1775         decl_constant_value to simplify array bounds.
1776
1777 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
1778
1779         * lang-options.h: Add -fms-extensions.
1780         * cp-tree.h: Declare flag_ms_extensions.
1781         * decl2.c: Define it.
1782         * class.c (instantiate_type): Don't complain about taking the address
1783         of a bound member function if -fms-extensions.
1784         * typeck.c (build_unary_op): Likewise.
1785         * decl.c (grokdeclarator): Or about implicit int.
1786         * init.c (resolve_offset_ref): Or about implicit '&'.
1787
1788 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
1789
1790         * cp-tree.h (minimal_parse_mode): Remove.
1791         (finish_label_stmt): New function.
1792         * decl.c (saved_scope): Remove minimal parse mode.
1793         (maybe_push_to_top_level): Don't save it.
1794         (pop_from_top_level): Don't restore it.
1795         (define_label): Split out template-handling code to semantics.c.
1796         (start_decl): Don't use minimal_parse_mode.
1797         (cp_finish_decl): Likewise.
1798         (start_function): Don't increment it.
1799         (store_return_init): Don't use it.
1800         (finish_function): Don't decrement it.
1801         * parse.y (label_colon): Use finish_label_stmt throughout.
1802         * parse.c: Regenerated.
1803         * pt.c (minimal_parse_mode): Don't define it.
1804         (tsubst_expr): Use finish_label_stmt.
1805         * semantics.c (finish_label_stmt): New function.
1806
1807         * dump.c (queue): Be careful when computing bitmasks.
1808         (dequeue_and_dump): Describe binfos as binfos, not as
1809         vectors.
1810         
1811         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
1812         throughout.     
1813         * parse.c: Regenerated.
1814         
1815         * Make-lang.in (CXX_SRCS): Remove sig.c.
1816         * Makefile.in (CXX_OBJS): Remove sig.o.
1817         (sig.o): Remove.
1818         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1819         (CPTI_SIGNATURE_TYPE): Likewise.
1820         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1821         (opaque_type_node): Likewise.
1822         (signature_type_node): Likewise.
1823         (sigtable_entry_type): Likewise.
1824         (flag_handle_signatures): Likewise.
1825         (lang_type): Remove is_signature, is_signature_pointer,
1826         is_signature_reference, has_opaque_typedecls,
1827         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
1828         signature_pointer_to, signature_reference_to.
1829         (IS_SIGNATURE): Remove.
1830         (SET_SIGNATURE): Remove.
1831         (CLEAR_SIGNATURE): Remove.
1832         (IS_SIGNATURE_POINTER): Remove.
1833         (IS_SIGNATURE_REFERENCE): Remove.
1834         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1835         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1836         (CLASSTYPE_SIGNATURE): Remove.
1837         (SIGNATURE_TYPE): Remove.
1838         (SIGNATURE_METHOD_VEC): Remove.
1839         (SIGNATURE_POINTER_TO): Remove.
1840         (SIGNATURE_REFERENCE_TO): Remove.
1841         (lang_decl_flags): Remove is_default_implementation.  Rename
1842         memfunc_pointer_to to saved_tree.
1843         (IS_DEFAULT_IMPLEMENTATION): Remove.
1844         (DECL_MEMFUNC_POINTER_TO): Remove.
1845         (DECL_MEMFUNC_POINTING_TO): Remove.
1846         (DECL_SAVED_TREE): Adjust definition.
1847         (tag_types): Remove signature_type_node.
1848         (SIGNATURE_FIELD_NAME): Remove.
1849         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1850         (SIGNATURE_OPTR_NAME): Likewise.
1851         (SIGNATURE_SPTR_NAME): Likewise.
1852         (SIGNATURE_POINTER_NAME): Likewise.
1853         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1854         (SIGNATURE_REFERENCE_NAME): Likewise.
1855         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1856         (SIGTABLE_PTR_TYPE): Likewise.
1857         (SIGTABLE_NAME_FORMAT): Likewise.
1858         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1859         (SIGTABLE_TAG_NAME): Likewise.
1860         (SIGTABLE_VB_OFF_NAME): Likewise.
1861         (SIGTABLE_VT_OFF_NAME): Likewise.
1862         (finish_base_specifiers): Change prototype.
1863         (build_signature_pointer_type): Remove.
1864         (build_signature_reference_type): Remove.
1865         (build_signature_pointer_constructor): Remove.
1866         (build_signature_method_call): Remove.
1867         (build_optr_ref): Likewise.
1868         (append_signature_fields): Likewise.
1869         (signature_error): Likewise.
1870         * call.c (build_this): Remove signature support.
1871         (build_over_call): Likewise.
1872         (build_new_method_call): Likewise.
1873         * class.c (add_implicitly_declared_members): Likewise.
1874         (finish_struct_1): Likewise.
1875         (finish_struct): Likewise.
1876         * cvt.c (cp_convert_to_pointer): Likewise.
1877         (convert_to_pointer_force): Likewise.
1878         (ocp_convert): Likewise.
1879         * decl.c (sigtable_decl_p): Remove.
1880         (init_decl_processing): Remove support for signatures.
1881         (cp_finish_decl): Likewise.
1882         (grokdeclarator): Likewise.
1883         (grokparms): Likewise.
1884         (xref_tag): Likewise.
1885         (start_function): Likewise.
1886         (start_method): Likewise.
1887         * decl2.c (finish_sigtable_vardecl): Remove.
1888         (flag_handle_signatures): Remove.
1889         (lang_f_options): Remove handle-signatures.
1890         (grokfield): Remove support for signatures.
1891         (grokbitfield): Likewise.
1892         (finish_file): Likewise.
1893         (reparse_absdcl_as_casts): Likewise.
1894         * error.c (dump_type_real): Likewise.
1895         (dump_function_decl): Likewise.
1896         * friend.c (make_friend_class): Likewise.
1897         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1898         * hash.h: Regenerated.
1899         * init.c (build_new_1): Remove support for signatures.
1900         * lang-options.h: Remove -fhandle-signatures,
1901         -fno-handle-signatures. 
1902         * lex.c (init_parse): Remove support for signatures.
1903         (yyprint): Likewise.
1904         * lex.h (rid): Remove RID_SIGNATURE.
1905         * method.c (build_decl_overload_real): Remove support for
1906         signatures. 
1907         (hack_identifier): Likewise.
1908         * parse.y (base_class): Likewise.
1909         (base_class.1): Likewise.
1910         (access_specifier): Likewise.
1911         * search.c (lookup_member): Likewise.
1912         * semantics.c (finish_qualified_object_call_expr): Likewise.
1913         (finish_template_type_parm): Likewise.
1914         (begin_class_definition): Likewise.
1915         (finish_base_specifier): Likewise.
1916         * sig.c: Remove.
1917         * tree.c (build_cplus_method_type): Remove support for signatures.
1918         * typeck.c (require_complete_type): Likewise.
1919         (c_sizeof): Likewise.
1920         (c_alignof): Likewise.
1921         (build_object_ref): Likewise.
1922         (build_component_ref): Likewise.
1923         (build_indirect_ref): Likewise.
1924         (build_c_cast): Likewise.
1925         (build_modify_expr): Likewise.
1926         (convert_for_initialization): Likewise.
1927         * typeck2.c (signature_error): Remove.
1928         (store_init_value): Remove support for signatures.
1929         (digest_init): Likewise.
1930         (build_x_arrow): Likewise.
1931         (build_functional_cast): Likewise.
1932         * xref.c (GNU_xref_decl): Likewise.
1933         
1934 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1935
1936         * lex.c (do_identifier): Remove unnecessary lookup of class field.
1937
1938 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
1939
1940         * decl2.c (set_decl_namespace): Do not complain about non-matching
1941         decls if processing a template.
1942
1943 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
1944
1945         * decl.c (build_ptrmemfunc_type): Handle qualified
1946         pointer-to-member types here.
1947         * tree.c (cp_build_qualified_type_real): Simplify handling here.
1948
1949 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1950
1951         * lex.c (lang_identify): Likewise.
1952
1953 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
1954
1955         * Makefile.in: Update dependencies.
1956         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
1957         NULL_RTX.
1958         * decl.c: Include "function.h"
1959         (cleanup_label, return_label): Delete declarations.
1960         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
1961         (finish_function): Rename last_parm_insn variable to
1962         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
1963         * decl2.c: Include "function.h".
1964         (rtl_expr_chain): Delete declaration.
1965         * method.c: Include "function.h"
1966         * tree.c (build_vbase_pointer_fields): Don't initialize
1967         DECL_SAVED_INSNS with NULL_RTX.
1968         * typeck.c: Include "function.h"
1969
1970 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
1971
1972         * semantics.c (begin_function_try_block, finish_function_try_block,
1973         finish_function_handler_sequence): New fns.
1974         * parse.y (function_try_block): Use them.
1975         * pt.c (instantiate_decl): Likewise.
1976
1977         * cp-tree.h: Declare in_function_try_handler.
1978         * decl.c: Define it.
1979         (start_function): Clear it.
1980         (struct cp_function, push_cp_function_context): Save it.
1981         (pop_cp_function_context): Restore it.
1982         * parse.y (function_try_block): Set and clear it.
1983         * except.c (expand_end_catch_block): Rethrow if we reach the end
1984         of a function-try-block handler in a ctor or dtor.
1985         * typeck.c (c_expand_return): Complain about returning from a
1986         function-try-block handler of a ctor.
1987
1988         * parse.y (function_try_block): Call end_protect_partials
1989         before expand_start_all_catch.
1990
1991 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
1992
1993         * decl.c (struct binding_level): Add eh_region field.
1994         (push_binding_level): Set it.
1995         (define_label): Complain about jumping into an EH block.
1996
1997         * ptree.c (print_lang_type): Print the real type of a PMF.
1998         Print what exceptions a fn type throws.
1999
2000 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2001
2002         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2003
2004         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2005         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2006         char*.
2007
2008         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2009         Constify a char*.
2010
2011         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2012         char*.
2013
2014         * dump.c (queue_and_dump_index, dump_int, dump_string,
2015         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2016         a char*.
2017         (dump_stmt): Add static prototype.
2018
2019         * errfn.c (cp_thing): Constify a char*.
2020
2021         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2022         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2023         dump_expr): Constify a char*.
2024
2025         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2026         read_line_number): Add static prototype.
2027         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2028         (real_yylex): Move label `letter' into the scope where it is used.
2029
2030         * method.c (build_mangled_template_parm_index, build_overload_int,
2031         build_decl_overload_real, get_id_2): Constify a char*.
2032
2033         * search.c (check_final_overrider): Make static.
2034
2035         * typeck.c (composite_pointer_type): Constify a char*.
2036
2037 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2038
2039         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2040         we're looking at a class.
2041
2042         * decl.c (lookup_name_real): Set the complain flag if we're
2043         looking for a namespace member.
2044
2045         * lex.c (real_yylex): We can have a number with no digits.
2046
2047         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2048
2049         * search.c (binfo_from_vbase): New fn.
2050         * cp-tree.h: Declare it.
2051         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2052         from pointer to member of virtual base.  
2053         * typeck.c (get_delta_difference): Likewise.
2054
2055 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2056
2057         * pt.c (tsubst): Use build_index_type to build in-template array
2058         index type.  Fixes g++.oliva/dwarf1.C.
2059         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2060         doesn't seem to trigger the bug without it.
2061
2062 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2063
2064         * typeck2.c (add_exception_specifier): Use complete_type.
2065
2066 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2067
2068         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2069         (dump_binary_op): Bulletproof.
2070         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2071         * tree.c (search_tree): Don't enumerate all the nodes of classes
2072         `1', `2', and `<'; handle them generically.  Don't be sorry about
2073         "unrecognized tree codes"; just abort.
2074         (no_linkage_check): Don't do linkage checks for templates.
2075         
2076         * tree.c (cp_build_qualified_type_real): Handle
2077         pointer-to-member-function types correctly.
2078
2079 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2080
2081         * decl.c (pushdecl): Only give an error for shadowing a parm 
2082         from *this* function.
2083
2084 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2085
2086         * typeck2.c: Update URLs and mail addresses.
2087
2088 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2089
2090         * cp-tree.h (empty_except_spec): New global var.
2091         (compexcepttypes): Remove prototype.
2092         (comp_except_specs): Prototype new global function.
2093         (add_exception_specifier): Prototype new global function.
2094         * decl.c (empty_except_spec): Define new global var.
2095         (duplicate_decls): Use comp_except_specs, reword error message.
2096         (init_decl_processing): Initialize empty_except_spec.
2097         Adjust build_exception_variant calls.
2098         * parse.y (exception_specification_opt): Use empty_except_spec.
2099         (ansi_raise_identifier): Call check_for_new_type.
2100         (ansi_raise_identifiers): Use add_exception_specifier.
2101         * pt.c (tsubst): Use add_exception_specifier to build exception
2102         specifier.
2103         * search.c (check_final_overrider): New static function, broken
2104         out of get_matching_virtual. Check throw specifiers, reword
2105         diagnostics.
2106         (get_matching_virtual): Use check_final_overrider.
2107         * tree.c (build_exception_variant): Use comp_except_specs.
2108         * typeck.c (compexcepttypes): Remove.
2109         (comp_except_types): New static function, helper for
2110         comp_except_specs. Compare two types as exception specifiers.
2111         (comp_except_specs): New global function, compare two exception
2112         specifiers.
2113         (comptypes): Adjust for comp_except_specs.
2114         * typeck2.c (add_exception_specifier): New global function.
2115         
2116         * class.c (check_for_override): Reword error message.
2117
2118 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2119
2120         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2121         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2122         (CLASSTYPE_NON_POD_P): New macro to access it.
2123         * class.c (finish_struct_1): Determine non-PODness.
2124         Check for arrays of pointers (-Weffc++).
2125         Remove array inspection duplicated code.
2126         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2127         Use CLASSTYPE_NON_POD_P.
2128
2129 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2130
2131         * class.c (duplicate_tag_error): Preserve template information.
2132
2133 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2134
2135         * decl.c (start_enum): Show location of previous definition.
2136         * parse.y (enumlist_opt): New reduction.
2137         (structsp): Simplify enum rules to use enumlist_opt.
2138
2139 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2140
2141         * lex.c (yyprint): Handle PFUNCNAME.
2142
2143         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2144         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2145
2146 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2147
2148         * decl.c (start_decl): Set attributes before duplicate_decls call.
2149
2150 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2151
2152         * Make-lang.in (CXX_SRCS): Add dump.c.
2153         * Makefile.in (CXX_OBJS): Add dump.o.
2154         (dump.o): New target.
2155         * cp-tree.h (DECL_CONV_FN_P): Document.
2156         (DECL_OVERLOADED_OPERATOR_P): New function.
2157         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2158         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2159         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2160         (ASM_VOLATILE_P): New macro.
2161         (STMT_LINENO): Likewise.
2162         (cp_namespace_decls): New function.
2163         (dump_node_to_file): New function.
2164         * decl.c (cp_namespace_decls): New function.
2165         (walk_namespaces_r): Use it.
2166         (wrapup_globals_for_namespace): Likewise.
2167         * decl2.c (flag_dump_translation_unit): New variable.
2168         (lang_decode_option): Handle -fdump-translation-unit.
2169         (finish_file): If flag_dump_translation_unit is set, dump the
2170         translation unit.
2171         * dump.c: New file.
2172         * lang-options.h: Add -fdump-translation-unit.
2173         * pt.c (tsubst_template_parms): Robustify.
2174         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2175         (tsubst_expr): Use STMT_LINENO.
2176         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2177         for invalid cv-qualifiers even while building templates.
2178         
2179 1999-08-02  Richard Henderson  <rth@cygnus.com>
2180
2181         * call.c: Include defaults.h instead of expr.h.
2182         * decl.c: Likewise.
2183         * pt.c: Likewise.
2184         * typeck.c: Include defaults.h.
2185
2186 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2187
2188         * lex.c (errorcount, sorrycount): Don't declare.
2189         * repo.c (errorcount, sorrycount): Likewise.
2190         * typeck2.c (errorcount, sorrycount): Likewise.
2191
2192 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2193
2194         * call.c (convert_default_arg, build_over_call): Change all uses of
2195         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2196         Ensure expr.h is included.
2197         * decl.c (grokparams): Ditto.
2198         * pt.c (tsubst_decl): Ditto.
2199         * typeck.c (convert_arguments): Ditto.
2200
2201 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2202
2203         * class.c (mark_overriders): Fix order of args to overrides.
2204         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2205         functions with the same name.
2206
2207 1999-08-02  Richard Henderson  <rth@cygnus.com>
2208
2209         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2210
2211 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2212
2213         * call.c (build_conditional_expr): Fix typo in comment.
2214
2215 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2216
2217         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2218         case_stack; use in_control_zone_p.
2219         * typeck.c (c_expand_return): Likewise.
2220
2221 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2222
2223         * except.c (catch_clauses): Delete declaration.
2224
2225 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2226
2227         * call.c (build_conditional_expr): Call convert_from_reference to
2228         avoid reference/non-reference type confusion.  Fix typo.
2229
2230 1999-07-30  Richard Henderson  <rth@cygnus.com>
2231
2232         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2233         * cp-tree.h (initializer_constant_valid_p): Remove.
2234
2235 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2236
2237         * call.c (conditional_conversion): Don't build BASE_CONVs for
2238         conversions between things that have the same type.
2239         (build_conditional_expr): Tweak.
2240         (convert_like): Some BASE_CONVs really do require the generation
2241         of code.
2242         
2243         * init.c (perform_member_init): Don't go through build_modify_expr
2244         for simple initializations.
2245
2246 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2247
2248         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2249         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2250         virtual functions and MI.  Simplify.
2251
2252         * method.c: Remove prototype for largest_union_member.
2253         * pt.c (determine_specialization): Fix uninitialized warning.
2254         * lex.c (real_yylex): Likewise.
2255
2256 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2257
2258         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2259         here too.
2260
2261         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2262         * class.c (modify_one_vtable): Change prototype accordingly.
2263         (modify_all_vtables): Likewise.
2264         (modify_all_direct_vtables): Likewise.
2265         (modify_all_indirect_vtables): Likewise.
2266         (build_vtable_entry_for_fn): New function.
2267         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2268         (modify_vtable_entry): Likewise.
2269         (add_virtual_function): Likewise.
2270         (build_vtbl_initializer): New function.
2271         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2272         (fixup_vtable_deltas1): Likewise.
2273         (fixup_vtable_deltas): Likewise.
2274         (override_one_vtable): Likewise.
2275         (finish_struct_1): Likewise.
2276
2277         * error.c (dump_expr): Likewise.
2278         * search.c (get_abstract_virtuals_1): Likewise.
2279         (get_abstract_virtuals): Likewise.
2280         (expand_upcast_fixups): Likewise.
2281         * tree.c (debug_binfo): Likewise.
2282         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2283         __pure_virtual here.
2284         
2285 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2286
2287         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2288         as per 1999-07-26 change.
2289
2290         * typeck.c (c_sizeof): Don't allow non-static data members.
2291         (expr_sizeof): Likewise.
2292
2293 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2294
2295         * input.c (feed_input): Only touch lineno and input_filename
2296         if !USE_CPPLIB.  Save the old values before setting the new ones.
2297
2298         * input.c (feed_input): Add file, line parms.
2299         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2300         (real_yylex): Check linemode before input_redirected().
2301
2302         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2303         from op new to warning.
2304
2305 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2306
2307         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2308         * call.c: All uses changed.
2309         * typeck.c: Likewise.
2310
2311 1999-07-26  Nathan Sidwell  <nathan@acm.org>
2312
2313         * exception.cc (__cplus_type_matcher): Match __eh_matcher
2314         prototype.
2315
2316 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2317
2318         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2319         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2320         (strip_top_quals): Declare.
2321         (ncp_convert): Likewise.
2322         (type_after_usual_arithmetic_converions): Likewise.
2323         (composite_pointer_type): Likewise.
2324         * call.c (strip_top_quals): Don't make it static.
2325         (promoted_arithmetic_type_p): New function.
2326         (conditional_conversion): Likewise.
2327         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2328         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
2329         for converting a type to itself.
2330         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2331         (implicit_conversion): Make sure the from and to types are
2332         complete.
2333         (add_builtin_candidate): Correct handling of ?: operator.
2334         (add_builtin_candidates): Improve documentation.
2335         (build_conditional_expr): New function.
2336         (can_convert): Implement in terms of can_convert_arg.
2337         (ncp_convert): New function.
2338         * typeck.c (type_after_usual_arithmetic_conversions): New
2339         function, split out from common_type.
2340         (composite_pointer_type): New function, split out from
2341         build_conditional_expr.
2342         (common_type): Use type_after_usual_arithmetic_conversions.
2343         Remove redundant attribute merging.
2344         (comptypes): Tidy.  Handle COMPLEX_TYPE.
2345         (build_binary_op_nodefault): Use null_ptr_cst_p.
2346         (build_conditional_expr): Remove.
2347         (convert_for_assignment): Use new conversion functions.
2348         
2349         * cp-tree.h (abstract_virtuals_error): Change declaration.
2350         * typeck2.c (abstract_virtuals_error): Check to see if an error
2351         ocurred, and return a boolean value accordingly.
2352         (build_functional_cast): Adjust accordingly.
2353         * class.c (finish_struct_1): Likewise.
2354         * cvt.c (ocp_convert): Likewise.
2355         * decl.c (cp_finish_decl): Likewise.
2356         (grokparams): Likewise.
2357         (grok_op_properties): Likewise.
2358         (start_function): Likewise.
2359         * init.c (build_new_1): Likewise.
2360
2361         * pt.c (unify): Don't get confused by pointers-to-member functions.
2362
2363         * search.c (build_cplus_new): Robustify.
2364         
2365 1999-07-24  Richard Henderson  <rth@cygnus.com>
2366
2367         * gxx.gperf (__builtin_va_arg): New.
2368         * parse.y (VA_ARG): New token.
2369         (unary_expr): Recognize it.
2370
2371 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
2372
2373         * g++FAQ.texi: Deleted per Joe Buck's request.
2374         * Makefile.in: Corresponding changes.
2375
2376 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2377
2378         * lex.c: Sync with C frontend.
2379         (whitespace_cr): New fn.
2380         (skip_white_space): Use it.
2381         (init_parse): Reorder.
2382         (yyprint): Support CONSTANT.
2383         (pragma_getc, pragma_ungetc): Bring back.
2384         (read_line_number): Change in_system_header directly.
2385         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2386         (parse_float): Update to C version.
2387         (yylex): Handle '$' under the letter case.
2388         Remove looking_for_typename handling.
2389         Support hex floating point constants.
2390         Follow C's lead for choosing type of integer constants.
2391         Rearrange stuff to match C frontend.
2392         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2393         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2394
2395 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
2396
2397         * call.c (reference_binding): Tweak.
2398         (mayble_handle_implicit_object): Use direct_reference_binding to
2399         create the right implicit conversion sequence.
2400
2401 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
2402
2403         * pt.c (convert_nontype_argument): Don't call decl_constant_value
2404         if we're converting to a reference type.
2405
2406         * call.c (NEED_TEMPORARY_P): New macro.
2407         (standard_conversion): Set it, for derived-to-base conversions.
2408         (reference_related_p): New function.
2409         (reference_compatible_p): Likewise.
2410         (convert_class_to_reference): Likewise.
2411         (direct_reference_binding): Likewise.
2412         (reference_binding): Rework for standards-compliance.
2413         (convert_like): Adjust accordingly.
2414         (maybe_handle_ref_bind): Simplify; the right conversion sequences
2415         are now built up in reference_binding.
2416         (initialize_reference): New function.
2417         * cp-tree.h (ICS_USER_FLAG): Document.
2418         (ICS_THIS_FLAG): Likewise.
2419         (ICS_BAD_FLAG): Likewise.
2420         (NEED_TEMPORARY_P): Likewise.
2421         (cp_lvalue_kind): New type.
2422         (real_lvalue_p): Return it.
2423         * error.c (dump_expr): Provide more accurate representation for
2424         AGGR_INIT_EXPRs.
2425         * init.c (expand_default_init): Do not try to perform implicit
2426         conversions for a brace-enclosed initializer.
2427         * search.c (lookup_conversions): Document.
2428         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
2429         appropriately.
2430         (real_lvalue_p): Adjust accordingly.
2431         (lvalue_p): Likewise.
2432         (build_cplus_new): Don't allow the creation of an abstract class.
2433         * typeck.c (convert_for_initialization): Use initialize_reference.
2434         
2435 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
2436
2437         * lex.c (real_yylex) : Correct the test for overflow when lexing
2438         integer literals.
2439
2440 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
2441
2442         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2443         not DECL_BUILT_IN, to determine if a function is internally declared.
2444         (duplicate_decls): Likewise.  Improve handling of builtins.
2445         (push_overloaded_decl): Remove special handling of builtins.
2446
2447         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2448
2449         * decl.c (grokdeclarator): Pull out decl_constant_value in
2450         templates, too.
2451
2452         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2453         * cp-tree.h, pt.c, semantics.c: Adjust.
2454         * method.c (largest_union_member): Remove.
2455
2456         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2457
2458         * lex.c (token_getch, token_put_back): New fns.
2459         (real_yylex): Use them.
2460
2461         * lex.c (lang_init): Generalize.
2462         (lang_init_options): Tell cpplib this is C++.
2463         (nextchar): Remove.  Replace uses with put_back.
2464         (skip_white_space): Handle linemode here.  Optimize for cpplib.
2465         (extend_token_buffer_to): New fn.
2466         (extend_token_buffer): Use it.
2467         (read_line_number, check_newline): Just deal with tokens.
2468         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
2469         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2470         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2471         * parse.y (PAREN_STAR_PAREN): Remove.
2472         * input.c: Don't use the putback machinery with cpplib.
2473         (sub_getch): Fold back into getch.
2474         (getch): Don't handle linemode here.
2475         (feed_input): Unget any text in the token buffer.
2476
2477         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2478         nextyychar, nextyylval): Remove.
2479
2480 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
2481             Jason Merrill  <jason@yorick.cygnus.com>
2482
2483         * lex.c (indent_level): New variable.
2484         (init_parse): Set cpp_token to CPP_DIRECTIVE.
2485         (consume_string): Make this smart about USE_CPPLIB.
2486         (yyungetc): Use put_back function.
2487         (pragma_getc, pragma_ungetc): Functions deleted.
2488         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2489         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2490         pragma_ungetc.
2491         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2492         Also, clean up cases where we redundantly set token_buffer[0].
2493         (read_line_number): New fn.
2494         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2495         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2496         (sub_getch): Conditionalize out code that's not appropriate if
2497         USE_CPPLIB.
2498         (put_back): Rewrite in case USE_CPPLIB is defined.
2499         (input_redirected): Ditto.
2500
2501 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2502
2503         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2504         c_global_trees and accessor macros defined in c-common.h.
2505         (cp_tree_index): New enumeration.
2506         (cp_global_trees): Declare new array.  Add accessor macros for it, and
2507         delete declarations of tree nodes replaced by it.
2508         (builtin_function): Delete macro, add declaration for new function.
2509         Include c-common.h.
2510         * decl.c: Delete definitions for tree nodes that were replaced by
2511         cp_global_trees and c_global_trees.
2512         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2513         to generate the common builtins here.
2514         (builtin_function): New function.
2515         * decl2.c (abort_fndecl): Delete declaration.
2516         * except.c (expand_builtin_return_address): Delete declaration.
2517         (builtin_return_address_fndecl): Delete variable.
2518         (const_ptr_type_node): Delete declaration.
2519         * lex.c (cons_up_default_function): Delete declaration of
2520         void_list_node.
2521         * parse.y (void_list_node): Delete declaration.
2522         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2523         Delete variables.
2524         (const_string_type_node): Delete declaration.
2525         * search.c (abort_fndecl): Delete declaration.
2526         * Makefile.in: Update dependencies.
2527
2528 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
2529
2530         * pt.c (check_default_tmpl_args): Move test for missing default
2531         arguments here, from ...
2532         (end_template_parm_list): Here.
2533
2534 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
2535
2536         * decl.c (lookup_nested_type): Remove.
2537         (pushtag): Don't call it.
2538
2539 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
2540
2541         * Makefile.in (INTERFACE): Bump to 2.
2542
2543 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
2544         
2545         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2546         instructions to gcc.gnu.org.  Removed e-mail address.
2547
2548 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
2549
2550         * pt.c (determine_specialization): Tighten error-checking.
2551         (end_template_parm_list): Likewise.
2552
2553 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
2554
2555         * pt.c (check_default_tmpl_args): Handle friends defined in the
2556         class just like member functions defined in the class.
2557
2558 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2559             Jason Merrill  <jason@yorick.cygnus.com>
2560
2561         * cp-tree.h (struct lang_decl): Added field for storing sorted
2562         FIELD_DECLs (used in TYPE_DECLs).
2563         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2564         (DECL_SORTED_FIELDS): New macro.
2565         * class.c (method_name_cmp): New function.
2566         (finish_struct_methods): Modified to support sorting and searching
2567         methods.
2568         (finish_struct_anon): Changed code in inner loop to use ELT rather 
2569         than UELT (which required an extra indirection for every reference).
2570         (field_decl_cmp): New function to support sorting FIELD_DECLs.
2571         (finish_struct_1): Sort fields.
2572         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2573         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2574         Also, switch to using array indexing rather than a changing pointer.
2575         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2576         DECL_SORTED_FIELDS.
2577
2578 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
2579
2580         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2581         casts in system headers or extern "C" blocks.
2582
2583         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2584         errors to pedwarn.
2585
2586 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
2587
2588         * decl2.c (write_virtuals): Deleted declaration.
2589         * cp-tree.h (write_virtuals): Deleted extern declaration.
2590         * class.c (finish_struct_1): Removed #if 0'd code that mentions
2591         write_virtuals.
2592         * semantics.c (begin_class_definition): Rewrite code to not depend
2593         on write_virtuals.
2594
2595         * lex.c (cp_pragma_interface): New function.
2596         (cp_pragma_implementation): Likewise.
2597         (handle_cp_pragma): Call them.
2598
2599         * typeck.c (comptypes): Simplify C code in look_hard.
2600
2601         * xref.c (PALLOC): Use xcalloc, not calloc.
2602         (SALLOC): Use xmalloc, not malloc.
2603
2604         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2605
2606         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2607         is NO_DEBUG.
2608
2609         * decl.c (duplicate_decls): If a redeclaration doesn't match the
2610         initial declaration, then don't save the inline info and by all
2611         means don't mark the function as a builtin function.
2612
2613         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
2614         CURRENT_CLASS_TYPE is 0.
2615
2616         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2617         NULL_TREE.
2618
2619         * ptree.c (print_lang_type): Added vtable-needs-writing.
2620
2621 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
2622
2623         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2624
2625 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
2626
2627         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2628         Merged into c-common.
2629
2630 1999-07-05  Dave Brolley  <brolley@cygnus.com>
2631
2632         * lex.c (errorcount): Declare it.
2633         (finish_parse): Update errorcount for when using CPPLIB.
2634
2635 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
2636
2637         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2638         parameters.
2639         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2640         * decl.c (push_class_binding): Use it.
2641         (lookup_name_real): Likewise.
2642
2643 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
2644
2645         * cp-tree.h (widest_integer_literal_type_node,
2646         widest_unsigned_literal_type) : New.
2647         * decl.c (widest_integer_literal_type_node,
2648         widest_unsigned_literal_type) : New.
2649         (init_decl_processing): Handle/use the two new types.
2650         * lex.c (real_yylex): Same.
2651         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2652         Same. 
2653
2654 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
2655
2656         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2657         to anonymous cv-qualified types.
2658
2659 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
2660
2661         * lex.c (real_yylex) : Change integer literal overflow handling to
2662         be like c-lex.c.
2663
2664         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2665
2666 1999-06-28  Richard Henderson  <rth@cygnus.com>
2667
2668         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2669
2670 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
2671
2672         * error.c (dump_type_real): Handle TREE_LIST again.
2673
2674         * typeck.c (comp_target_parms): Don't complain about 
2675         converting from () to (...) if !flag_strict_prototype.
2676
2677         * decl.c (grokdeclarator): Update the names of all variants when
2678         de-anonymizing.
2679
2680 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
2681
2682         * init.c (expand_aggr_vbase_init): Rename to
2683         construct_virtual_bases.  Conditionalize construction here, 
2684         rather than ...
2685         (emit_base_init): Here.
2686
2687 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
2688
2689         * semantics.c (finish_asm_statement): Apply decay conversions to
2690         input operands.
2691
2692         * decl.c (expand_static_init): When building an anonymous function
2693         for use with atexit, compute its body before and after entering
2694         the function.
2695
2696         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2697         EXIT_EXPR.
2698         
2699 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
2700
2701         * init.c (expand_aggr_vbase_init): Add flag parameter.
2702         (build_partial_cleanup_for): Remove, inlining into ..
2703         (expand_cleanup_for_base): ... here.  Take flag parameter.
2704         (emit_base_init): Pass the in_chrg parameter to
2705         emit_aggr_vbase_init. 
2706         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2707         
2708 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
2709
2710         * decl2.c (import_export_decl): Use same_type_p, rather than
2711         relying on pointer-equality for types.
2712
2713         * method.c (do_build_copy_constructor): Simplify.
2714
2715         * call.c (build_method_call): Remove bogus code for two-argument
2716         delete.
2717         * init.c (build_new_1): Expand on comment, and remove dead code.
2718
2719         * init.c (expand_cleanup_for_base): New function, split out
2720         from ...
2721         (emit_base_init): Here.
2722         (expand_aggr_vbase_init): Use it.
2723
2724 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
2725
2726         * cp-tree.h (class_cache_firstobj): Declare.
2727         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2728         * class.c (permanent_obstack): Remove declaration.
2729         (class_cache_firstobj): Make it global.
2730         (add_method): Don't use permanent_obstack directly.
2731         (pushclass): Only free the class_cache_obstack if we know how far
2732         back to free it.
2733         (maybe_push_cache_obstack): Rename to push_cache_obstack.
2734         * decl.c: Remove dead comment.
2735         (saved_scope): Add class_cache_firstobj.
2736         (push_to_top_level): Save it.
2737         (pop_from_top_level): Restore it.
2738         (push_class_level_binding): Use push_cache_obstack, not
2739         maybe_push_cache_obstack.
2740         * search.c (push_class_decls): Likewise.
2741         
2742 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2743
2744         * pt.c (tsubst_friend_function): Push into namespace of friend
2745         function before pushdecl'ing it.
2746
2747 1999-06-14  Nathan Sidwell  <nathan@acm.org>
2748
2749         * call.c (build_new_op): Remove REF_BIND from all operands.
2750
2751 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
2752
2753         * init.c (build_new_1): Look up operator delete even if there was
2754         no explicit new placement.
2755
2756 1999-06-08  Nathan Sidwell  <nathan@acm.org>
2757
2758         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2759         of ...
2760         (build_throw): ... here. Call it.
2761         (process_start_catch_block): Call it.
2762
2763 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
2764
2765         * search.c (convert_pointer_to_single_level): Reimplement without
2766         using get_binfo.
2767
2768 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
2769
2770         * method.c (is_back_referenceable_type): Back-reference bools when
2771         not squangling.
2772
2773 1999-06-07  Dave Brolley  <brolley@cygnus.com>
2774
2775         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2776         * input.c (putback_buffer): New structure type.
2777         (putback): Replaces putback_char member.
2778         (putback): Replaces putback_char static variable.
2779         (feed_input): Use putback.
2780         (end_input): Use putback.
2781         (sub_getch): Use putback.
2782         (put_back): Use putback.
2783
2784 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
2785
2786         * decl.c (grokdeclarator): Fix typo in last change.
2787
2788 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
2789
2790         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2791         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2792
2793 1999-06-04  Nathan Sidwell  <nathan@acm.org>
2794
2795         * except.c (build_throw): Check throw expression validity.
2796
2797 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
2798
2799         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2800         just because flag_signed_bitfields is false.
2801
2802 1999-06-03  Nathan Sidwell  <nathan@acm.org>
2803
2804         * semantics.c (begin_class_definition): Update the struct's
2805         location here ...
2806         * class.c (finish_struct): ... rather than here.
2807
2808         * decl.c (make_typename_type): Don't rely on uninitialized
2809         variable.
2810
2811 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2812
2813         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2814
2815 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
2816
2817         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2818         and friends rather than messing with current_obstack directly.
2819         (cp_build_qualified_type_real): Rework ARRAY_TYPE
2820         allocation to match practice throughout the rest of the 
2821         compiler.
2822
2823 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
2824
2825         * lex.c (make_lang_type): Create TYPE_BINFO for
2826         TEMPLATE_TYPE_PARMs just like for non-template types.
2827
2828         * decl.c (start_decl): Move checks on initialization to ...
2829         (cp_finish_decl): Here.  Tidy formatting slightly.
2830
2831 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2832
2833         * decl.c (add_binding): Don't complain about a redeclaration of a
2834         semantically identical typedef in a local scope.
2835
2836 1999-05-28  Nathan Sidwell  <nathan@acm.org>
2837
2838         * decl.c (complete_array_type): Allocate off same obstack. Fix
2839         DO_DEFAULT comment to match reality.
2840
2841         * friend.c (make_friend_class): Fix diagnostic typo.
2842
2843 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
2844
2845         * decl.c (lookup_namespace_name): Handle getting a
2846         TEMPLATE_ID_EXPR.
2847         (expand_static_init): Don't call pushdecl for implicitly declared
2848         `atexit' used to register destructors.
2849
2850 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
2851
2852         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2853         intialize a vtable.
2854
2855         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2856         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
2857         by combining TEMPLATE_INFO and LEVEL into a single union.
2858         (DECL_TEMPLATE_INFO): Reformat.
2859         (DECL_SAVED_TREE): Document.
2860         (DECL_TEMPLATE_INJECT): Remove.
2861         * class.c (finish_struct): Remove code to deal with
2862         DECL_TEMPLATE_INJECT. 
2863
2864         * decl.c (maybe_process_template_type_declaration): Handle all new
2865         types in templates uniformly.
2866         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2867         DECL_CONTEXT.
2868         * pt.c (lookup_template_class): Inject template instantiations of
2869         forward-declarations.
2870         (instantiate_class_template): Remove code processing
2871         DECL_TEMPLATE_INJECT.
2872         
2873         * pt.c (lookup_template_class): Tweak lookup to find member
2874         templates.
2875
2876         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2877         ASM_CV_QUAL.
2878         * semantics.c (finish_asm_stmt): Make strings permanent if they're
2879         used in a template.
2880         
2881 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
2882
2883         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2884         parts of pointer to data member types.
2885
2886 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
2887
2888         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2889         and then make it look like `abort'.  Just use `abort' instead.
2890         
2891         * typeck.c (build_static_cast): Don't allow static_casts that cast
2892         away constness.
2893         (casts_away_constness_r): New function.
2894         (casts_away_constness): Likewise.
2895
2896         * decl.c (lookup_tag): Remove code no longer needed after
2897         name-lookup improvements.
2898         * decl2.c (handle_class_head): Make error-recovery more robust.
2899         * friend.c (make_friend_class): Reject templated typename types.
2900         * lex.c (is_global): A template parameter isn't global.
2901         * parse.y (class_head): Robustify.
2902         * parse.c: Regenerated.
2903         
2904 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
2905
2906         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2907         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
2908         
2909         * cp-tree.h (push_nested_namespace): Declare.
2910         (pop_nested_namespace): Likewise.
2911         * decl.c (push_nested_namespace): New function.
2912         (pop_nested_namespace): Likewise.
2913         * pt.c (instantiate_class_template): Use them.
2914
2915         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2916
2917         * cp-tree.h (cplus_expand_constant): Declare.
2918         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2919         converted from one pointer-to-object type to another.
2920         * expr.c (cplus_expand_constant): Don't make it static.
2921         * typeck.c (build_component_ref): Don't crash when presented with
2922         a component which is a TEMPLATE_DECL.
2923         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
2924         cast from a pointer-to-member constant to its own type does not
2925         result in a valid non-type template argument.
2926
2927 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
2928             Nathan Sidwell  <nathan@acm.org>
2929         
2930         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2931         * cp-tree.h: Fix typo in documentation on pointers-to-members.
2932         (cp_build_qualified_type): Make it a macro.
2933         (cp_build_qualified_type_real): Declare.
2934         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
2935         problem with template parameters and restrict-qualification.
2936         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2937         * hash.h: Regenerated.
2938         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2939         the enumeration.
2940         (NORID): Remove definition.
2941         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2942         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
2943         (fn_type_unification): Check that the function type resulting from
2944         the deduction is legal.
2945         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2946         (unify): Use cp_build_qualified_type_real.
2947         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
2948         (cp_build_qualified_type): Rename to ...
2949         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
2950         and modify appropriately.
2951         
2952         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
2953         reveal optimization opportunities.
2954
2955         * pt.c (tsubst): Don't issue error messages when we're not
2956         complaining, even if we see a qualified function type.
2957         (check_cv_quals_for_unify): Don't allow a qualified function
2958         type.
2959
2960 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
2961
2962         * class.c (instantiate_type): Downgrade errors for object-dependent
2963         memfn refs to pedwarn.
2964
2965 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
2966
2967         * decl.c (grokdeclarator): Don't treat [] as indicating a
2968         zero-sized array in a typedef.
2969
2970         * call.c (build_object_call): Don't look at DECL_NAME for a type.
2971         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
2972         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
2973
2974         * pt.c (for_each_template_parm): Rework to match documentation.
2975         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
2976
2977 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
2978
2979         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
2980
2981         * class.c (finish_base_struct): Allow non-COM bases for COM classes
2982         except at the leftmost position.
2983         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
2984         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
2985         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
2986
2987         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
2988         (build_cplus_new): Make sure that what we return is of the right type.
2989
2990 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
2991
2992         * cp-tree.h (make_ptrmem_cst): New function.
2993         * expr.c (cplus_expand_constant): Split out from ...
2994         (cplus_expand_expr): Here.  Use cplus_expand_constant.
2995         (init_cplus_expand): Set lang_expand_constant.
2996         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
2997
2998         * tree.c (make_ptrmem_cst): Define.
2999         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3000         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3001
3002 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3003
3004         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3005
3006         * decl2.c (start_static_storage_duration_function): Fix comment.
3007         (finish_file): Create static storage duration functions lazily.
3008
3009 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3010
3011         Implement anonymous structs.
3012         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3013         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3014         * class.c (finish_struct_1): Remove redundant check for anon struct.
3015         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3016         (check_tag_decl): Check for anonymous struct here.
3017         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3018         * init.c (sort_member_init, emit_base_init): Handle getting fields
3019         as well as names in current_member_init_list.
3020         (perform_member_init): Handle getting an anon aggr.
3021         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3022         (do_build_copy_constructor): Likewise.
3023
3024 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3025
3026         * tree.c (cp_build_qualified_type): Don't allow qualified function
3027         types.
3028
3029 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3030
3031         * gxxint.texi: Fix typo.
3032
3033 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3034
3035         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3036         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3037         * ptree.c (print_lang_type): Likewise.
3038         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3039         IS_AGGR_TYPE_CODE.
3040         * typeck2.c (digest_init): Likewise.
3041
3042 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3043
3044         * call.c (joust): Compare the types of the conv ops, not the
3045         target types of the conversions.
3046
3047 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3048
3049         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3050         was not given.
3051
3052 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3053
3054         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3055         * decl.c (grokfndecl): Don't allow inline declarations of friend
3056         template specializations, or friend template specializations with
3057         default arguments.
3058         * pt.c (tsubst): Handle substitution into array types that does
3059         not yield a fixed upper bound, even when not processing a
3060         template.
3061         (tsubst_copy): Deal with the fact that the second operand to a
3062         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3063         * search.c (marked_pushdecls_p): Don't descend into
3064         TEMPLATE_TYPE_PARMs and the like.
3065         (unmarked_pushdecls_p): Likewise.
3066         
3067         * call.c (build_over_call): Don't throw away
3068         initializations/copies of empty classes; use MODIFY_EXPR and
3069         INIT_EXPR as for non-empty classes.
3070         * class.c (finish_struct_1): Put the padding byte for an empty
3071         class on the TYPE_NONCOPIED_PARTS list for the class.
3072
3073 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3074
3075         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3076         indicate a reference to a field that is a qualified name.
3077
3078 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3079
3080         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3081         ASM_OUTPUT_CONSTRUCTOR.
3082
3083         * friend.c (do_friend): Add attrlist arg.  Remove support for
3084         getting a non-decl as 'decl'.
3085         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3086         rtl.
3087         (grokdeclarator): Adjust.
3088         * cp-tree.h: Adjust.
3089
3090 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3091
3092         * cp-tree.h (permanent_p): New function.
3093         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3094         possibly complex tree node.
3095         * tree.c (mapcar): Adjust comments, and follow coding standards in
3096         conditional.
3097         (permanent_p): New function.
3098
3099 1999-05-13  Per Bothner  <bothner@cygnus.com>
3100
3101         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3102         primitive Java types, if we actually see `extern "Java"'.
3103
3104 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3105
3106         * lang-specs.h: Pass -$ to the preprocessor.
3107
3108 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3109
3110         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3111         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3112         (resolve_offset_ref): Don't handle a raw baselink.
3113         * cvt.c (build_expr_type_conversion): Likewise.
3114         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3115         convert_for_initialization): Likewise.
3116         * class.c (instantiate_type): Handle seeing a baselink under an
3117         OFFSET_REF.
3118         * error.c (dump_expr): Likewise.        
3119         * pt.c (for_each_template_parm): Likewise.
3120         (resolve_overloaded_unification): Likewise.
3121         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3122         * typeck.c (expr_sizeof): Also complain about other permutations
3123         of overloaded functions.
3124
3125 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3126
3127         * init.c (resolve_offset_ref): Don't return a raw method.
3128         Use BASELINK_P.
3129         * typeck.c (decay_conversion): Don't handle a raw method.
3130         Resolve all OFFSET_REFs.
3131         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3132         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3133         same_type_p for pmf bits.  Don't use build_binary_op to compare
3134         raw pointers to methods.
3135         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3136         to decide when to call resolve_offset_ref.
3137         (build_c_cast, convert_for_initialization): Likewise.
3138         * cvt.c (build_expr_type_conversion): Likewise.
3139
3140 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3141
3142         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3143
3144 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3145
3146         * decl2.c (start_objects): Don't let static constructors and
3147         destructors get inlined.
3148
3149         * parse.y (nested_name_specifier): Make sure ordinary types are
3150         complete, just like template types.
3151         * parse.c: Regenerated.
3152
3153         * pt.c (check_explicit_specialization): Improve error messages.
3154
3155 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3156
3157         * typeck.c (string_conv_p): Use same_type_p to check whether we
3158         try to convert between char and wchar_t.
3159
3160 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3161
3162         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3163         lookup to error_mark_node here.
3164         (lookup_member): Revise documentation.  Add comments.  Don't set
3165         the TREE_TYPE to error_mark_node here, and don't build up an extra
3166         TREE_LIST for ambiguous lookups.
3167         (setup_class_bindings): Adjust accordingly.
3168         (push_class_decls): Revise out-of-date comments.
3169         
3170         * typeck.c (build_const_cast): Tighten checks for legality.
3171
3172 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3173
3174         * init.c (build_member_call): Lookup names coming from
3175         namespace-scoped LOOKUP_EXPR.
3176
3177 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3178
3179         * gxxint.texi: Add documentation for 'I'.
3180
3181 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3182
3183         * tinfo.cc (operator==): Qualify type_info with std::.
3184
3185 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3186
3187         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3188         (DECL_COMDAT): Remove definition.
3189
3190 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3191
3192         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3193         change.
3194
3195 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3196
3197         * class.c (build_vtable): Use build_lang_decl when building
3198         vtables, not just build_decl.
3199         (prepare_fresh_vtable): Likewise.
3200         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3201         DECL_EXTERNAL when calling wrapup_global_declarations.
3202         * decl2.c (priority_info_s): Add initializations_p and
3203         destructions_p members.
3204         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3205         when deciding what vtables to write out.
3206         (ssdf_decls): New variable.
3207         (ssdf_decls_used): Likewise.
3208         (start_static_storage_duration_function): Deal with being called
3209         multiple times.  Avoid inlining this function.
3210         (generate_inits_for_priority): Deal with reuse of priority map.
3211         (get_priority_info): Clear initializations_p and destructions_p.
3212         (do_static_initialization): Tweak comment.
3213         (do_static_destruction): Likewise.  Fix condition on sentries for
3214         destruction.
3215         (generate_ctor_or_dtor_function): Call all of the static storage
3216         duration functions.
3217         (generate_ctor_or_dtor_function_for_priority): Check
3218         initializations_p and destructions_p to see what priorities need
3219         initialization functions.
3220         (finish_file): Rework to generate multiple static storage duration
3221         functions, rather than just one.
3222
3223         * typeck.c (build_const_cast): Tweak last change to handle
3224         templates correctly.
3225
3226         * typeck.c (build_const_cast): Disallow use of const_cast to
3227         anything but a pointer or reference type.
3228
3229 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3230
3231         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3232         signature type.
3233
3234 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3235
3236         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3237         (finish_file): Indent comments properly.
3238
3239 1999-04-29  Richard Henderson  <rth@cygnus.com>
3240
3241         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3242         (do_static_destruction): Likewise.
3243
3244 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3245
3246         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3247         * decl2.c (delete_sanity): Warn on deleting void *.
3248         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3249         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3250         throwing operator new.
3251
3252 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3253
3254         * cp-tree.h (build_component_addr): Remove prototype.
3255         * typeck.c (build_component_addr): Make static. Remove MSG
3256         argument.
3257         (build_component_addr): Remove MSG parameter, clean up
3258         comment.
3259         (build_x_function_call): Use cp_error.
3260         (build_unary_op): Adjust call of build_component_addr.
3261
3262 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3263
3264         * pt.c (tsubst_friend_class): Check for NULL.
3265
3266 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3267
3268         * search.c (binfo_for_vtable): Initialize bfvi.var.
3269
3270 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3271
3272         * rtti.c (build_x_typeid): Check rtti is enabled.
3273
3274 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3275
3276         * search.c (is_subobject_of_p): Make sure we're looking at the
3277         right baseclasses.
3278
3279 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3280
3281         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3282
3283 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3284
3285         * decl2.c (finish_file): Tweak handling of extern inlines so that
3286         they are not unnecessarily put out.
3287
3288         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3289         such as base classes.
3290
3291 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3292
3293         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3294         not trying V, while cycling through U.
3295
3296 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3297
3298         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3299         preserves_first_arg.  Enlarge dummy accordingly.
3300         (DECL_TINFO_FN_P): New macro.
3301         (SET_DECL_TINFO_FN_P): Likeiwse.
3302         (DECL_RETURNS_FIRST_ARG): Remove.
3303         (DECL_PRESERVES_THIS): Likewise.
3304         (DECL_INIT_PRIORITY): New macro.
3305         (finish_struct_1): Change prototype.
3306         (cat_namespace_levels): Remove prototype.
3307         (vtable_decl_p): New prototype.
3308         (vtype_decl_p): Likewise.
3309         (sigtable_decl_p): Likewise.
3310         (walk_globals_pred): New typedef.
3311         (walk_globals_fn): Likewise.
3312         (walk_globals): New prototype.
3313         (walk_namespaces_fn): New typedef.
3314         (walk_namespaces): New prototype.
3315         (wrapup_globals_for_namespace): Likewise.
3316         (walk_vtables): Remove prototype.
3317         (walk_sigtables): Likewise.
3318         (instantiate_pending_templates): New prototype.
3319         * class.c (finish_struct_1): Don't return a value.
3320         * decl.h (pending_statics): Remove declaration.
3321         * decl.c (walk_namespaces_r): New function.
3322         (walk_globals_r): Likewise.
3323         (vtable_decl_p): Likewise.
3324         (vtype_decl_p): Likewise.
3325         (sigtable_decl_p): Likewise.
3326         (walk_namespaces): Likewise.
3327         (walk_globals_data): New type.
3328         (walk_globals): New function.
3329         (wrapup_globals_for_namespace): Likewise.
3330         (expand_static_init): Remove assertion.  Remove redundancy in
3331         conditional.  Don't put static data members in static_aggregates
3332         Tidy.
3333         (finish_function): Remove redundancy in conditional.  Don't set
3334         DECL_RETURNS_FIRST_ARG.
3335         (cat_namespace_levels): Remove.
3336         * decl2.c: Include splay-tree.h and varray.h.
3337         (priority_info_s): New structure.
3338         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
3339         conventions.
3340         (prune_vtable_vardecl): Likewise.
3341         (finish_sigtable_vardecl): Likewise.
3342         (setup_initp): Remove.
3343         (do_dtors): Remove.
3344         (do_ctors): Remove.
3345         (start_static_storage_duration_function): New function.
3346         (generate_inits_for_priority): Likewise.
3347         (finish_static_storage_duration_function): Likewise.
3348         (get_priority_info): Likewise.
3349         (do_static_initialization): Likewise.
3350         (do_static_destruction): Likewise.
3351         (do_static_initialization_and_destruction): Likewise.
3352         (generate_ctor_or_dtor_function): Likewise.
3353         (generate_ctor_and_dtor_functions_for_priority): Likewise.
3354         (pending_statics): Make it a varray.
3355         (pending_statics_used): New variable.
3356         (saved_inlines): Make it a varray.
3357         (saved_inlines_used): New variable.
3358         (finish_static_data_member): Change method of updating
3359         pending_statics.
3360         (mark_inline_for_output): Remove #if 0'd code.  Change method of
3361         updating saved_inlines.
3362         (walk_vtables): Remove.
3363         (walk_sigtables): Likewise.
3364         (import_export_decl): Use DECL_TINFO_FN_P.
3365         (pending_templates): Remove declaration.
3366         (maybe_templates): Likewise.
3367         (static_aggregates_initp): Likewise.
3368         (setup_initp): Likewise.
3369         (finish_objects): Simplify.
3370         (INITIALIZE_P_IDENTIFIER): New macro.
3371         (PRIORITY_IDENTIFIER): New macro.
3372         (SSDF_IDENTIFIER): New macro.
3373         (initialize_p_decl): New variable.
3374         (priority_decl): Likewise.
3375         (ssdf_decl): Likewise.
3376         (priority_info_map): Likewise.
3377         (finish_file): Recode output of static intializers and other
3378         file-scope finalization tasks.
3379         * error.c (OB_END_TEMPLATE_ID): New macro.
3380         (dump_type_real): Use it.
3381         (dump_decl): Likewise.
3382         (dump_function_name): Likewise.
3383         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3384         interface.
3385         (check_newline): Use walk_globals, not walk_vtables.
3386         * pt.c (pending_tempalte_expansions): Remove.
3387         (set_vardecl_interface_info): Likewise.
3388         (pending_templates): Make static.
3389         (maybe_templates): Likewise.
3390         (instantiate_class_template): Adjust call to finish_struct_1.
3391         (instantiate_pending_templates): New function.
3392         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3393         * tree.c (static_aggregates_initp): Remove.
3394         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3395         instead.
3396         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3397
3398         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3399         with the RTL code RETURN.
3400         * hash.h: Regenerated.
3401         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3402         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3403         * parse.c: Regenerated.
3404         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
3405         it.
3406         (inline_parm_levels): New variable.
3407         (inline_parm_levels_used): Likewise.
3408         (maybe_begin_member_template_processing): Update them.
3409         (maybe_end_member_template_processing): Use them, rather than
3410         guessing how many levels to pop.
3411
3412         * decl.c (make_typename_type): Tighten error-checking.
3413
3414 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
3415
3416         * cp-tree.h (build_binary_op): Remove unneeded parameter.
3417         * class.c (build_vrable_entry_ref): Adjust call to
3418         build_binary_op.
3419         * decl.c (expand_static_init): Likewise.
3420         (grokdeclarator): Likewise.
3421         (finish_function): Likewise.
3422         * decl2.c (delete_sanity): Likewise.
3423         (do_dtors): Likewise.
3424         (do_ctors): Likewise.
3425         * error.c (dump_type_suffix): Likewise.
3426         * expr.c (cplus_expand_expr): Likewise.
3427         * init.c (resolve_offset_ref): Likewise.
3428         (build_new): Likewise.
3429         (build_new_1): Likewise.
3430         (build_vec_delete_1): Likewise.
3431         (expand_vec_init_catch_clause): Likewise.
3432         (build_delete): Likewise.
3433         * pt.c (tsubst): Likewise.
3434         * rtti.c (synthesize_tinfo_fn): Likewise.
3435         * search.c (expand_upcast_fixups): Likewise.
3436         (expand_direct_vtbls_init): Likewise.
3437         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3438         (build_binary_op_nodefault): Likewise.
3439         (point_int_sum): Likewise.
3440         (pointer_diff): Likewise.
3441         (build_unary_op): Likewise.
3442         (build_modify_expr): Likewise.
3443         (get_delta_difference): Likewise.
3444         (build_ptrmemfunc): Likewise.
3445         (expand_ptrmemfunc_cst): Likewise.
3446
3447 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
3448
3449         * decl.c (grokfndecl): Always call cplus_decl_attributes.
3450         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3451
3452 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
3453
3454         * cp-tree.h (finish_static_data_member_decl): New function.
3455         * decl2.c (finish_static_data_member_decl): Split out from ...
3456         (grokfield): Here.
3457         * pt.c (instantiate_class_template): Use it here instead of
3458         trying to fake it.
3459         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3460         finish_static_data_member_decl will do that.  Explicit set
3461         DECL_EXTERNAL to match non-template processing.
3462
3463 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
3464
3465         * cp-tree.h (finish_class_definition): Add parameter.
3466         * parse.y (structsp): Use it.  Don't call pop_scope here.
3467         * parse.c: Regenerated.
3468         * semantics.c (finish_class_definition): Pop it here.
3469
3470 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
3471
3472         * decl.c (xref_tag): Revise handling of nested template
3473         declarations.
3474         * pt.c (check_explicit_specialization): Tweak handling of friend
3475         templates in template classes.
3476         (tsubst_friend_class): Handle friend declarations for nested
3477         member template classes.
3478
3479 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
3480
3481         * class.c (finish_struct): Remove unused variable.
3482         (pushclass): Likewise.
3483         (invalidate_class_lookup_cache): Likewise.
3484         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3485         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3486         doesn't get obliterated.
3487         (make_typename_type): Handle template classes correctly.
3488
3489         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3490         (storetags): Declare.
3491         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3492         (pushclass): Likewise.  Use storetags to install tag declarations,
3493         not pushtag.
3494         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3495         * decl.c (storetags): Make it global.
3496         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3497         implicit typename declaration.
3498         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
3499         * method.c (hack_identifier): Likewise.
3500         * search.c (lookup_member): Likewise.
3501
3502         * decl.c (warn_about_implicit_typename_lookup): New function.
3503         (lookup_name_real): Use it.  Rework handling of implicit typename
3504         extension.
3505
3506 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
3507
3508         * cp-tree.h (lookup_nested_field): Remove.
3509         * class.c (push_nested_class): Handle UNION_TYPEs.
3510         (pop_nested_class): Likewise.
3511         * decl.c (lookup_name_real): Don't call lookup_nested_field.
3512         (start_decl): Use push_nested_class, not just pushclass.
3513         (cp_finish_decl): Use pop_nested_class, not just popclass.
3514         * search.c (lookup_nested_field): Remove.
3515
3516         * cp-tree.h (lang_type): Add documentation.
3517         * decl2.c (handle_class_head): Create template declarations here,
3518         as appropriate.
3519         * parse.y (class_head): Return whether or not we entered a new
3520         scope, as well as the type named.
3521         (named_class_head): Likewise.
3522         (named_complex_class_head_sans_basetype): Likewise.
3523         (structsp): Adjust accordingly.  Pop scope when required.
3524         * parse.c: Regenerated.
3525         * pt.c (check_default_tmpl_args): Robustify.
3526         (redeclare_class_template): Likewise.
3527         (instantiate_class_template): An instantiation of an
3528         anonymous union is itself an anonymous union.
3529         * semantics.c (begin_class_definition): Don't create template
3530         declarations here.
3531
3532 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
3533
3534         * parse.y (after_type_declarator_intern): New nonterminal.
3535         (after_type_declarator): Use it.
3536         (direct_after_type_declarator): Likewise.  Move above
3537         nonnested_type to fix reduce/reduce conflict resolution.
3538         (declmods): Reducing from just 'attributes' has EMPTY precedence.
3539         * Makefile.in (CONFLICTS): Update.
3540
3541         * decl.c (define_label): Downgrade error for jumping over a
3542         non-POD decl to pedwarn.
3543
3544 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
3545
3546         * cp-tree.h (popclass): Change declaration.
3547         (pop_nested_class): Likewise.
3548         (poplevel_class): Remove declaration.
3549         * call.c (convert_default_argument): Pass no arguments to
3550         popclass.
3551         * class.c (finish_struct_1): Likewise.
3552         (finish_struct): Likewise.
3553         (popclass): Remove argument.  Simplify code accordingly.
3554         (pop_nested_class): Likewise.
3555         * decl.c (poplevel_class): Declare it here, and make it static.
3556         (poplevel): Handle class scopes.
3557         (poplevel_class): Don't take an rgument.  Simplify.
3558         (pop_everything): Pass no arguments to pop_nested_class.
3559         (cp_finish_decl): Pass no arguments to popclass.
3560         (grokdeclarator): Pass no arguments to pop_nested_class.
3561         (finish_function): Likewise.
3562         * decl2.c (grokfield): Likewise.
3563         (pop_scope): Pass no arguments to popclass.
3564         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3565         * pt.c (instantiate_class_template): Move call to pushclass, and
3566         document.  Pass no arguments to popclass.
3567         (regenerate_decl_from_template): Likewise.
3568
3569 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
3570
3571         * typeck.c (build_unary_op): Handle taking the address of a unique
3572         bound non-static member function.
3573
3574 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3575
3576         * lang-options.h (-Wdeprecated): New flag.
3577         * decl2.c (warn_deprecated): New flag.
3578         (lang_decode_option): Deprecated this-is-variable,
3579         external-templates, alt-external-templates.
3580         Support -Wdeprecated.
3581         * errfn.c (cp_deprecated): New function.
3582
3583 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
3584
3585         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3586         of the decls themselves.
3587
3588         * pt.c (tsubst_function_type): Copy attributes over.
3589
3590         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
3591         and com_interface.
3592         * cp-tree.h: Add prototype.
3593         * decl.c (init_decl_processing): Set valid_lang_attribute.
3594
3595 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
3596
3597         * class.c (finish_struct_1): Look at the const-ness of the field's
3598         type, not the TREE_READONLY-ness of the declaration.
3599         * method.c (synthesize_method): Likewise.
3600         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3601         creating new declarations.
3602
3603 1999-04-13  Mike Stump  <mrs@wrs.com>
3604
3605         * decl2.c (import_export_decl): Because vtables always reference
3606         virtual functions, even if they are inlined, don't allow
3607         -fno-implement-inlines to not emit them, instead, emit them with
3608         the vtable.
3609         * decl.c (start_function): Likewise.
3610
3611 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
3612
3613         * cp-tree.h (struct lang_type): Add com_interface.
3614         (CLASSTYPE_COM_INTERFACE): New macro.
3615         * class.c (set_rtti_entry): COM interface classes have no RTTI
3616         entries in their vtables; adjust.
3617         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3618         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3619         finish_struct_1): Likewise.
3620         * decl2.c (mark_vtable_entries): Likewise.
3621         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3622         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3623         expand_upcast_fixups): Likewise.
3624         * tree.c (debug_binfo): Likewise.
3625
3626         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3627         * typeck.c (comptypes): If we get it, ignore attributes.
3628         * class.c (instantiate_type): Use BASELINK_P.  Change complain
3629         parameter to flags; 2 means ignore attributes.
3630         * call.c (build_op_delete_call): Pass it.
3631
3632         * decl.c (xref_tag): Only complain once about using a typedef-name
3633         with 'struct'.  Downgrade to pedwarn.
3634
3635         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3636
3637         * parse.y (absdcl_intern): New nonterminal.
3638         (absdcl, direct_abstract_declarator): Use it.
3639
3640         * pt.c (lookup_template_class): Look through implict typename.
3641
3642 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
3643
3644         * friend.c (add_friend): Deal gracefully with error_mark_node.
3645         * method.c (build_overload_value): Handle pointers-to-members as
3646         template parameters.
3647
3648         * decl.c (push_binding): Fix typo in comment.
3649
3650 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
3651
3652         * error.c (dump_type_real): If a typename is a template-id, put
3653         out the template arguments.
3654         (dump_expr): Handle TEMPLATE_ID_EXPR.
3655         * pt.c (lookup_template_class): Now that full arguments are
3656         available everywhere, remove code that tried to guess them.
3657
3658 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
3659
3660         * decl.c (make_typename_type): Complain if we don't find a type
3661         when trying to make a typename type for a non-template type.
3662
3663 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
3664
3665         * decl.c (start_decl): Pass attributes to grokdeclarator.
3666         (grokdeclarator): Handle attributes on constructor-syntax
3667         initializers.
3668
3669 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
3670
3671         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3672         don't have types.
3673
3674         * search.c (template_self_reference_p): Tweak.
3675
3676 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
3677
3678         * init.c (build_offset_ref): Don't build yet another weird data
3679         structure to describe overloaded functions.
3680
3681 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
3682
3683         * cp-tree.h (BASELINK_P): New macro.
3684         (SET_BASELINK_P): Likewise.
3685         * init.c (build_member_call): Remove needless assignment in if
3686         statement.
3687         * search.c (lookup_field_r): Fix handling when we are looking
3688         specifically for a type; these are not hidden by functions and
3689         variables.
3690         (lookup_member): Use SET_BASELINK_P.
3691         * tree.c (is_overloaded_fn): Use BASELINK_P.
3692         (really_overloaed_fn): Likewise.
3693         (get_first_fn): Likewise.
3694
3695 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * decl.c (lookup_name_current_level): Tweak, and improve
3698         documentation.
3699
3700         * class.c (maybe_fixup_vptrs): Remove declaration.
3701         (build_class_init_list): Likewise.
3702         * decl.c (pushdecl_class_level): Call check_template_shadow here
3703         ...
3704         (push_class_level_binding): ... not here.
3705         * search.c (dfs_push_type_decls): Only avoid
3706         template-self-reference TYPE_DECLs if they are from base classes.
3707
3708 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
3709
3710         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3711         nodes.  Tidy.
3712
3713 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
3714
3715         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3716         (finish_struct_1): Don't call build_class_init_list.
3717
3718 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
3719
3720         * tinfo.h (__class_type_info): Fix illegal declaration.
3721
3722         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3723         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3724         (IDENTIFIER_CLASS_VALUE): Improve documentation.
3725         (is_properly_derived_from): Declare.
3726         (invalidate_class_lookup_cache): Likewise.
3727         (maybe_maybe_note_name_used_in_class): Likewise.
3728         (note_name_declared_in_class): Likewise.
3729         (push_using_decl): Remove duplicate declaration.
3730         (id_in_current_class): Remove declaration.
3731         (push_class_binding): Change prototype.
3732         (clear_identitifer_class_values): Declare.
3733         * call.c (is_properly_derived_from): Make it global.
3734         (build_new_function_call): Be careful about updating candidates.
3735         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
3736         asked to make illegal calls.
3737         * class.c: Include splay-tree.h.
3738         (class_stack_node): Add names_used slot.
3739         (check_member_decl_is_same_in_complete_scope): Remove.
3740         (add_method): Fix comment.  Push the declaration into class
3741         scope.
3742         (finish_struct_1): When popping the class, pop the bindings too.
3743         Remove check for data member/function member conflict.
3744         (finish_struct): Remove calls to
3745         check_member_decl_is_same_in_complete_scope.  Change calls to
3746         popclass.
3747         (pushclass): Clear names_used in the class stack entry.
3748         Use invalidate_class_lookup_cache to remove cached entries, rather
3749         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
3750         before entering a new class.  Remove dead code.  Don't mess with
3751         current_function_decl when pushing declarations.
3752         (invalidate_class_lookup_cache): New function, split out from ...
3753         (popclass): Here.  Clean up names_used on our way out.
3754         (instantiate_type): Adjust.
3755         (build_self_reference): Don't push the declaration here.
3756         (maybe_note_name_used_in_class): New function.
3757         (note_name_declared_in_class): Likewise.
3758         * decl.c (add_binding): Change prototype.
3759         (find_class_binding_level): New function.
3760         (innermost_nonclass_level): Likewise.
3761         (current_binding_level): Update documentation.
3762         (inner_binding_level): Remove.  Replace with current_binding_level
3763         throughout.
3764         (push_binding_level): Remove special handling of
3765         class_binding_level.
3766         (pop_binding_level): Likewise.  Use find_class_binding_level.
3767         (suspend_binding_level): Likewise.
3768         (global_bindings_p): Use innermost_nonclass_level.
3769         (toplevel_bindings_p): Likewise.
3770         (namespace_bindings_p): Likewise.
3771         (pseudo_global_level_p): Likewise.
3772         (push_binding): Clear INHERITED_VALUE_BINDING_P.
3773         (add_binding): Check for illegal multiple declarations.  Return a
3774         value indicating whether or not the new binding was legal.
3775         (push_local_binding): Skip over class binding levels.  Check
3776         return value from add_binding.
3777         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
3778         note_name_declared_in_class.
3779         (pushlevel_class): Remove "fake out the rest of the compiler"
3780         code.
3781         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3782         (clear_identifier_class_values): New function.
3783         (pop_from_top_level): Use it.
3784         (pop_everything): Tweak.
3785         (maybe_process_template_type_declaration): Don't push the
3786         declaration for the template here.
3787         (pushtag): Don't push tag declarations into class scope here.
3788         (pushdecl): Apply DeMorgan's law for readability.
3789         (pushdecl_class_level): Remove special-case code for
3790         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
3791         (push_class_level_bindng): Deal with inherited bindings.
3792         (lookup_name_real): Remove special-case code for
3793         TYPE_BEING_DEFINED, and some implicit typename magic.
3794         (grokdeclarator): Handle COMPONENT_REF for a template function.
3795         (build_enumerator): Don't call pushdecl_class_level here.
3796         (id_in_current_class): Remove.
3797         * decl2.c (grokfield): Don't call pushdecl_class_level or
3798         check_template_shadow.
3799         * errfn.c (cp_file_of): Don't declare.
3800         (cp_line_of): Likewise.
3801         * error.c (dump_decl): Handle an OVERLOAD.
3802         (cp_file_of): Likewise.
3803         (cp_line_of): Likewise.
3804         * init.c (build_member_call): Handle a COMPONENT_REF.
3805         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3806         pushdecl_class_level.
3807         * method.c (hack_identifier): Build COMPONENT_REFs for references
3808         to member templates as well as member functions.  Remove dead
3809         code.
3810         * parse.y (left_curly): Remove.
3811         (nonnested_type): Call maybe_note_name_used_in_class, not
3812         pushdecl_class_level.
3813         * parse.c: Regenerated.
3814         (nested_name_specifier_1): Likewise.
3815         * pt.c (check_explicit_specialization): Adjust, for robustness.
3816         (check_template_shadow): Handle OVERLOADs.
3817         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3818         TEMPLATE_DECL, if appropriate.
3819         * search.c (envelope_add_decl): Remove.
3820         (dfs_pushdecls): Likewise.
3821         (dfs_compress_decls): Likewise.
3822         (dfs_push_decls): New function.
3823         (dfs_push_type_decls): Likewise.
3824         (setup_class_bindings): Likewise.
3825         (template_self_reference_p): Likewise.
3826         (lookup_field_r): Use it.
3827         (looup_member): Remove old comment.  Deal with ambiguity.
3828         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3829         and remove envelope processing.
3830         * semantics.c (begin_class_definition): Let pushclass push
3831         declarations for base classes.
3832         (finish_member_declaration): Push declarations into class scope.
3833         * typeck.c (build_component_ref): Just put an OVERLOAD into the
3834         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3835         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
3836         * Makefile.in (class.o): Depend on splay-tree.h.
3837
3838 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
3839
3840         * cvt.c (convert_pointer_to_real): Use same_type_p.
3841         * typeck.c (comp_target_types): Use same_type_p.
3842
3843 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
3844
3845         * semantics.c (begin_inline_definitions,
3846         finish_inline_definitions): Rename from finish_default_args and
3847         begin_inline_definitions, respectively, to something that isn't a
3848         total lie.  :)
3849         * parse.y (structsp): Adjust.
3850
3851         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3852         (list_hash_lookup): Likewise.
3853         (hash_tree_chain): Adjust.
3854         * pt.c (tsubst): Adjust.
3855         (tsubst_arg_types): Use plain hash_tree_cons.
3856         * cp-tree.h (hash_tree_cons_simple): Lose.
3857         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3858
3859 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3860
3861         * Makefile.in (hash.h): Generate using gperf language 'C', not
3862         'KR-C', so gperf uses the `const' keyword on strings.
3863
3864         * gxx.gperf (resword): Const-ify a char*.
3865
3866 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
3867
3868         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3869         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3870         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3871         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3872         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3873         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3874         tree.c: Adjust.
3875
3876 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
3877
3878         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3879
3880 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
3881
3882         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3883
3884 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
3885
3886         * cp-tree.h (add_friend): Declare.
3887         (add_friends): Likewise.
3888         * friend.c (add_friend): Make it global.  Don't add to
3889         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3890         (add_friends): Make it global.
3891         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3892         befriending class is a template.
3893         * parse.y (component_decl_1): Fix typo in comment.
3894         * parse.c: Regenerated.
3895         * pt.c (instantiate_class_template): Use add_friend and
3896         add_friends rather that duplicating some of their functionality
3897         here.
3898
3899 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
3900
3901         * call.c (build_field_call): Unify 'this' and non-'this' cases.
3902
3903         * typeck.c (build_indirect_ref): Check for 'this' sooner.
3904
3905 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3906
3907         * call.c (op_error): Const-ify a char*.
3908         (add_candidate, source_type, add_warning): Add static prototype.
3909         (print_z_candidates): Const-ify a char*.
3910
3911         * class.c (resolve_address_of_overloaded_function,
3912         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3913         (get_vtable_name, finish_struct_1): Const-ify a char*.
3914
3915         * cvt.c (convert_to_reference): Likewise.
3916
3917         * decl.c (redeclaration_error_message, record_builtin_type,
3918         record_unknown_type, member_function_or_else, bad_specifiers):
3919         Likewise.
3920         (find_binding, select_decl, unqualified_namespace_lookup,
3921         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3922         Add static prototype.
3923         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3924         implicitly_declare, record_builtin_java_type, define_function,
3925         grok_op_properties, tag_name): Const-ify a char*.
3926
3927         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3928         (define_function, finish_builtin_type): Const-ify a char*.
3929         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3930         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3931         (file_name_nondirectory): Const-ify a char*.
3932         (init_filename_times): Don't prototype.
3933         (compiler_error): Prototype.
3934         (yyerror, init_repo): Const-ify a char*.
3935         (build_srcloc): Don't prototype.
3936         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3937         Const-ify a char*.
3938         (warn_for_assignment): Don't prototype.
3939         (convert_for_initialization, readonly_error, check_for_new_type,
3940         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3941         Const-ify a char*.
3942
3943         * decl2.c (acceptable_java_type, output_vtable_inherit,
3944         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3945         merge_functions, decl_namespace, validate_nonmember_using_decl,
3946         do_nonmember_using_decl): Add static prototype.
3947         (lang_f_options): Const-ify a char*.
3948         (finish_builtin_type): Likewise.
3949         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
3950         prototype.
3951
3952         * errfn.c: Include cp-tree.h.
3953         (cp_thing): Add static prototype.
3954         (compiler_error): Don't protoptype.
3955         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
3956         passing it to `cp_thing'.
3957
3958         * error.c (interesting_scope_p): Add static prototype.
3959
3960         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
3961         a char*.
3962
3963         * init.c (compiler_error): Don't prototype.
3964         (member_init_ok_or_else): Const-ify a char*.
3965         (build_java_class_ref): Add static prototype.
3966
3967         * lex.c (compiler_error): Don't prototype.
3968         (get_time_identifier, interface_strcmp, extend_token_buffer,
3969         handle_cp_pragma): Const-ify a char*.
3970         (is_global, init_filename_times): Add static prototype.
3971         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
3972         (compiler_error): Change from fixed args to variable args.
3973         (yyerror): Const-ify a char*.
3974
3975         * parse.y (cond_stmt_keyword): Const-ify a char*.
3976         (parse_decl): Add static prototype.
3977
3978         * pt.c (template_args_equal, print_template_context): Likewise.
3979         (print_candidates, check_default_tmpl_args): Const-ify a char*.
3980         (instantiate_class_template): Likewise.
3981
3982         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
3983
3984         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
3985         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
3986
3987         * search.c (lookup_field_info, lookup_member): Likewise.
3988         (lookup_member): Cast the first argument of `bzero' to a PTR.
3989
3990         * sig.c (compiler_error): Don't prototype.
3991         (build_signature_pointer_or_reference_nam): Const-ify a char*.
3992         (get_sigtable_name, build_member_function_pointer): Likewise.
3993
3994         * tree.c (compiler_error): Don't prototype.
3995         (no_linkage_helper, build_srcloc): Add static prototype.
3996         (build_vbase_pointer_fields): Const-ify a char*.
3997         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
3998
3999         * typeck.c (compiler_error): Don't prototype.
4000         (convert_for_assignment): Const-ify a char*.
4001         (comp_cv_target_types): Add static prototype.
4002         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4003         build_component_addr, build_unary_op, convert_for_initialization):
4004         Const-ify a char*.
4005
4006         * typeck2.c (ack): Add static prototype and change from fixed args
4007         to variable args.
4008         (readonly_error, check_for_new_type): Const-ify a char*.
4009
4010         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4011         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4012         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4013         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4014         gen_assign, GNU_xref_member): Const-ify a char*.
4015
4016 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4017
4018         * gxxint.texi: Remove old discussion on copying virtual bases.
4019
4020 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4021
4022         * Make-lang.in: Remove all references to g++.o/g++.c.
4023         Link g++ from gcc.o.
4024
4025 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4026
4027         * decl2.c (comdat_linkage): Treat vtables like functions.
4028
4029 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4030
4031         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4032
4033 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4034
4035         * decl.c (init_decl_processing): Add `signed' type as a synonym
4036         for `int'.
4037
4038 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4039
4040         * typeck.c (common_type): Handle cv-qual unification for pointers
4041         to members.
4042
4043         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4044         on error.
4045         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4046         * lex.c (do_identifier): If we got error_mark_node, call
4047         lookup_name again.
4048
4049 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4050
4051         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4052         classes.
4053
4054 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4055
4056         * decl.c (lookup_name_real): Do nested field lookup regardless of
4057         TYPE_BEING_DEFINED.
4058
4059 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4060
4061         * cp-tree.h (lang_type): Remove has_assignment and
4062         has_real_assignment.  Add befriending_classes.
4063         (TYPE_HAS_ASSIGNMENT): Remove.
4064         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4065         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4066         (lang_decl): Document.
4067         (DECL_BEFRIENDING_CLASSES): New macro.
4068         (FRIEND_NAME): Move declaration to more obvious location.
4069         (FRIEND_DECLS): Likewise.
4070         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4071         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4072         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4073         (grok_op_properties): Likewise.
4074         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4075         (add_friend): Likewise.  Don't do weird things with assignment
4076         operators.  Update DECL_BEFRIENDING_CLASSES.
4077         (add_friends): Don't do weird things with assignment operators.
4078         (make_friend_class): Likewise.  Update
4079         CLASSTYPE_BEFRIENDING_CLASSES.
4080         * pt.c (instantiate_class_template): Don't set
4081         TYPE_HAS_ASSIGNMENT.
4082         (tsubst_copy): Substitute the TREE_TYPE for more unary
4083         expressions.
4084         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4085         * search.c (protected_accessible_p): New function.
4086         (friend_accessible_p): Likewise.
4087         (accessible_p): Use them.
4088
4089 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4090
4091         * pt.c (convert_nontype_argument): Don't create things that aren't
4092         PTRMEM_CSTs when applying a qualification conversion to a
4093         PTRMEM_CST.
4094
4095 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4096
4097         * Makefile.in (OBJS): Don't mention hash.o.
4098         (OBJDEPS): Likewise.
4099
4100 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4101
4102         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4103         * decl.c (expand_static_init): Make sure we don't add any after
4104         then.
4105
4106         * decl.c (cp_finish_decl): Move intelligence about handling
4107         DECL_COMDAT for variables from here...
4108         * decl2.c (comdat_linkage): ...to here.
4109         (maybe_make_one_only): Tweak.
4110         (import_export_decl): Call comdat_linkage for variables, too.
4111         (finish_file): Handle template statics properly.
4112
4113 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4114
4115         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4116         Document internals of pointer-to-member-functions.
4117         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4118         (PFN_FROM_PTRMEMFUNC): Likewise.
4119         (build_type_conversion): Remove unused parameter.
4120         (build_ptrmemfunc1): Declare.
4121         (expand_ptrmemfunc_cst): New function.
4122         (delta2_from_ptrmemfunc): Likewise.
4123         (pfn_from_ptrmemfunc): Likewise.
4124         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4125         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4126         (convert_to_reference): Remove unused parameter to
4127         build_type_conversion.
4128         (ocp_convert): Likewise.
4129         (build_user_type_conversion): Likewise.
4130         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4131         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4132         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4133         open when handling pointer-to-member functions.
4134         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4135         more stringent with pointers-to-members.
4136         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4137         (build_unary_op): Tidy ever-so-slightly.
4138         (build_conditional_expr): Remove extra parameter to
4139         build_type_conversion.
4140         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4141         we're using.
4142         (expand_ptrmemfunc_cst): Define.
4143         (delta2_from_ptrmemfunc): Likewise.
4144         (pfn_from_ptrmemfunc): Likewise.
4145
4146 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4147
4148         * init.c (build_member_call): Handle template-id expressions
4149         correctly.
4150         * typeck.c (build_x_function_call): Likewise.
4151
4152 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4153
4154         * friend.c (make_friend_class): Avoid core dump when
4155         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4156
4157 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4158
4159         * decl.c (start_function): Suppress normal linkage heuristics
4160         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4161
4162 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4163
4164         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4165         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4166
4167 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4168
4169         * parse.y (named_complex_class_head_sans_basetype):
4170         Do not push a scope for error_mark_node.
4171         (maybe_base_class_list): Likewise.
4172
4173         * decl.c (start_decl): Check for error_mark_node as a type.
4174         Detected by g++.brendan/array-refs.C.
4175         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4176         (maybe_build_cleanup_1): Likewise.  Detected by
4177         g++.jason/incomplete1.C.
4178
4179         * tree.c (build_dummy_object): Use void_zero_node instead of the
4180         error_mark_node.
4181         (is_dummy_object): Check for such a node.
4182         Detected by g++.bob/inherit1.C
4183
4184 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4185
4186         * method.c (old_backref_index): Split out...
4187         (flush_repeats): From here.  Rename back from try_old_backref.
4188         (build_mangled_name): Put back some old-style repeat handling.
4189
4190 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4191
4192         * lex.c: Don't include setjmp.h.
4193         (parse_float): New static function.
4194         (pf_args): New struct.
4195         (real_yylex): Use them in call to `do_float_handler'.
4196
4197 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4198
4199         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4200         * tree.c (layout_basetypes): Not here.
4201         * search.c (dfs_search): Remove; no longer used.
4202
4203 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4204
4205         * decl2.c (validate_nonmember_using_decl): Issue sensible
4206         error-messages on bogus qualifiers.
4207
4208 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4209
4210         * call.c (add_function_candidate): Fix uninitialized variable.
4211
4212         * Makefile.in (search.o): Add dependency on varray.h.
4213
4214 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4215
4216         * decl.c (duplicate_decls): Use same_type_p.
4217         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4218         same_type_p.  Don't try to handle repeats.  Return success.
4219         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4220         calls from old-style code, too.
4221         (check_ktype): Use same_type_p.
4222         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4223         (build_qualified_name): Simplify logic.
4224         (process_overload_item): Strip typedefs and quals at the top.
4225         (build_mangled_name_for_type_with_Gcode): Remove call to
4226         type_canonical_variant.
4227         (build_mangled_name): Likewise.  Remove support for old-style
4228         repeats, which have been disabled since 2.7.2.  Don't mess with
4229         TREE_USED.
4230         (build_decl_overload_real): Don't mess with TREE_USED.
4231
4232 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4233
4234         * error.c (cp_printers): Add 'F' escape character.
4235         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4236         Functionality moved to dump_parameters.
4237         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4238         (dump_function_decl): Extend meaning of V parameter.  Use
4239         dump_parameters and dump_exception_spec.
4240         (dump_parameters): New static function.
4241         (dump_exception_spec): New static function.
4242         (fndecl_as_string): Change argument semantics.  Use
4243         dump_function_decl directly.
4244
4245         * sig.c (build_signature_table_constructor): Use cp_error.
4246
4247 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4248
4249         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4250         Detected by g++.law/enum5.C.
4251
4252         * typeck.c (build_modify_expr): Check for errors after resolving
4253         offsets.  Detected by g++.brendan/static1.C.
4254
4255         * decl.c (complete_array_type): Ignore initial_value if it is an
4256         error.  Detected by g++.benjamin/17930.C.
4257
4258         * typeck2.c (process_init_constructor): Return error if one argument
4259         is in error.  Detected by g++.benjamin/13478.C.
4260
4261 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4262
4263         * decl.c (select_decl): Allow class templates when we need types.
4264         * decl2.c (ambiguous_decl): Likewise.
4265
4266 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4267
4268         * lex.c (do_identifier): Correct call to enforce_access.
4269         * search.c (accessible_p): Tweak comment.
4270
4271 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4272
4273         * semantics.c (begin_class_definition): Call build_self_reference.
4274         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4275
4276         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4277
4278         * search.c (dfs_canonical_queue): New function.
4279         (dfs_assert_unmarked_p): Likewise.
4280         (assert_canonical_unmarked): Likewise.
4281         (access_in_type): Use it.
4282         (accessible_p): Likewise.  Walk the whole tree when umarking.
4283
4284         * sig.c (build_signature_table_constructor): Use accessible_p
4285         instead of compute_access.
4286
4287 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4288
4289         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4290
4291 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4292
4293         * cp-tree.h (flag_access_control): Declare.
4294         (TREE_VIA_PPUBLIC): Document.
4295         (DECL_NONSTATIC_MEMBER_P): New macro.
4296         (enforce_access): Return an indication of whether or not access
4297         was permitted.
4298         (build_self_reference): Change prototype.
4299         (compute_access): Replace with ...
4300         (accessible_p): New function.
4301         (dfs_walk): Change prototype.
4302         (dfs_unmark): Likewise.
4303         (markedp): Likewise.
4304         * call.c (enforce_access): Use accessible_p.
4305         * class.c (build_self_reference): Insert the declaration into the
4306         list of members for this type, and make it public.
4307         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4308         * init.c (build_offset_ref): Use lookup_member, not three separate
4309         name-lookups.  Call enforce_access rather than checking for
4310         illegal accesses here.
4311         (resolve_offset_ref): Likewise.
4312         * lex.c (do_identifier): Likewise.
4313         * method.c (hack_identifier): Likewise.
4314         * parse.y (self_reference): Remove.
4315         (opt_component_decl_list): Don't use it.
4316         * parse.c: Regenerated.
4317         * pt.c (print_candidates): Generalize to handle lists of
4318         overloaded functions.
4319         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4320         not set.
4321         (get_template_base): Use new calling convention for dfs_walk.
4322         * search.c: Include varray.h.  Add prototypes.
4323         (dfs_walk): Accept a data pointer to pass to the work functions.
4324         All callers changed.  All work functions changed.
4325         (breadth_first_search): Rename to bfs_walk, and make consistent
4326         with dfs_walk.
4327         (dfs_walk_real): New function.
4328         (canonical_binfo): New function.
4329         (context_for_name_lookup): Likewise.
4330         (shared_marked_p): Likewise.
4331         (shared_unmarked_p): Likewise.
4332         (lokup_field_queue_p): Likewise.
4333         (lookup_field_r): Generalize to handle both functions and fields.
4334         (lookup_field): Just call lookup_member.
4335         (lookup_fnfields): Likewise.
4336         (lookup_member): Move body of lookup_field here and generalize.
4337         (dfs_accessible_queue_p): Likewise.
4338         (dfs_accessible_p): Likewise.
4339         (dfs_access_in_type): Likewise.
4340         (access_in_type): Likewise.
4341         (compute_access): Remove, and replace with ...
4342         (accessible_p): New function.
4343         (vbase_types): Remove.
4344         (vbase_decl_ptr_intermediate): Likewise.
4345         (vbase_decl_ptr): Likewise.
4346         (vbase_init_result): Likewise.
4347         (closed_envelopes): Likewise.
4348         (bvtable): Likewise.
4349
4350 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4351
4352         * call.c (add_function_candidate): Check for proper number of args
4353         before checking the validity of those args.
4354
4355 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
4356
4357         * cp-tree.h (struct lang_type): Add anon_union field.
4358         (ANON_UNION_TYPE_P): Use it instead of examining type.
4359         (SET_ANON_UNION_TYPE_P): New macro.
4360         * decl.c (check_tag_decl): Use it.
4361
4362         * search.c (compute_access): Handle non-type contexts earlier, and
4363         handle NULL_TREE.
4364
4365         * tree.c (build_exception_variant): Use copy_to_permanent.
4366
4367         * decl2.c (setup_initp): Give statics with no priority the default
4368         priority here.
4369         (do_dtors, do_ctors, finish_file): Remove special handling of
4370         non-prioritized statics.
4371
4372 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
4373
4374         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4375         * decl.c (make_typename_type): Don't issue an error if an
4376         immediate lookup fails; it migt be resolved later.
4377         * friend.c (is_friend): Add comment.
4378         * search.c (breadth_first_search): Add POSTFN and DATA
4379         parameters.  Tidy.  All callers changed.
4380         (lookup_field_queue_p): New function.
4381         (lookup_field_r): Likewise.
4382         (lookup_field_post): Likewise.
4383         (lookup_field): Use them, via breadth_first_search, instead of
4384         duplicating logic.
4385         (compute_access): Robustify.
4386         (lookup_fnfield_info): New structure.
4387
4388 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
4389
4390         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4391
4392 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
4393
4394         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4395         cc happy.
4396
4397         * decl2.c (import_export_class): Also return if
4398         CLASSTYPE_INTERFACE_ONLY is set.
4399
4400 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4401
4402         * decl.c (push_overloaded_decl): Only overwrite the old binding if
4403         there was one.
4404         * decl2.c (do_local_using_decl): Fix loop termination.
4405
4406 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
4407
4408         * cp-tree.h (determine_specialization): Don't declare.
4409         * pt.c (determine_specialization): Make it static.  Eliminate
4410         complain parameter.  Note that decl is always non-NULL now, and
4411         simplify accordingly.
4412
4413         * decl.c (maybe_push_to_top_level): Always call
4414         push_cp_function_context.
4415         (pop_from_top_level): Always call pop_cp_function_context.
4416
4417 1999-02-26  Nathan Sidwell  <nathan@acm.org>
4418
4419         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4420         diagnostics.
4421         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4422         * init.c (build_new_1): Extra arg to complete_type_or_else.
4423         (build_delete): Likewise.
4424         * typeck.c (require_complete_type): Likewise.
4425         (pointer_int_sum): Likewise.
4426         (pointer_diff): Likewise.
4427         (build_component_ref): Likewise.
4428
4429         * typeck2.c (incomplete_type_error): Always use cp_error.
4430         Show declaration of undefined type, if appropriate.
4431         Deal with UNKNOWN_TYPE nodes.
4432
4433         * typeck.c (require_complete_type): Use TYPE_SIZE as
4434         size_zero_node to mean incomplete type.
4435         (require_complete_type_in_void): New function.
4436         (build_compound_expr): Call complete_type_in_void for LHS.
4437         (build_c_cast): Call complete_type_in_void for void cast.
4438         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4439         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4440         require_complete_type_in_void.  Call it.
4441         * cp-tree.h (require_complete_type_in_void): Prototype new function.
4442
4443         * typeck.c (convert_arguments): Use alternative format for
4444         function decls.  Don't require_complete_type here.  Simplify
4445         diagnostic printing.
4446         (convert_for_initialization): Don't require_complete_type on RHS yet.
4447         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4448
4449         * call.c (build_over_call): Cope with qualified void return type.
4450         * semantics.c (finish_call_expr): Likewise.
4451         * typeck.c (build_function_call_real): Likewise.
4452         (c_expand_return): Likewise.
4453         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4454
4455         * call.c (print_z_candidates): Use alternate print format, to be
4456         consistent with (pt.c) print_candidates.
4457         * method.c (hack_identifier): List candidate members.
4458         * search.c (lookup_field): Build ambiguous list, and show it, if
4459         ambiguous.
4460
4461 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
4462
4463         * typeck.c (decay_conversion): Don't confuse constant array
4464         variables with their initializers.
4465
4466         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4467         merging decls.
4468         * pt.c (regenerate_decl_from_template): Tweak for clarity.
4469         (instantiate_decl): Mark a decl instantiated before regenerating
4470         it to avoid recursion.
4471         * tree.c (mapcar): Don't call decl_constant_value unless we know
4472         something is TREE_READONLY_DECL_P.
4473
4474         * class.c (check_for_override): Don't stop checking when we find
4475         the first overridden function.  Delete #if 0'd code.
4476         * search.c (get_matching_virtual): Likewise.
4477
4478 1999-02-25  Richard Henderson  <rth@cygnus.com>
4479
4480         * lang-specs.h: Define __FAST_MATH__ when appropriate.
4481
4482 1999-02-24  Mike Stump  <mrs@wrs.com>
4483
4484         * typeck.c (convert_for_assignment): Allow boolean integral constant
4485         expressions to convert to null pointer.
4486
4487 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4488
4489         * decl.c (lookup_namespace_name): Resolve namespace aliases.
4490
4491         * class.c (push_nested_class): Allow namespaces.
4492
4493         * decl2.c (set_decl_namespace): Add friendp parameter.
4494         * decl.c (grokfndecl): Pass it.
4495         (grokvardecl): Likewise.
4496         * cp-tree.h: Change declaration.
4497
4498 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
4499
4500         * pt.c (tsubst): Allow an array of explicit size zero.
4501
4502 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
4503
4504         * errfn.c: Change varargs code to look like toplev.c.
4505
4506         * method.c (process_modifiers): Don't prepend 'U' for char or
4507         wchar_t.
4508
4509 1999-02-20  Craig Burley  <craig@jcb-sc.com>
4510
4511         * Make-lang.in (cplib2.ready): Don't consider updating
4512         cplib2 stuff if the current directory isn't writable, as
4513         it won't work (such as during a `make install').
4514
4515 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
4516
4517         * decl2.c (start_objects): Make file scope constructors and
4518         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4519         ASM_OUTPUT_DESTRUCTOR are defined.
4520
4521 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
4522
4523         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4524         (fn_type_unification): Adjust prototype.
4525         (lookup_fnfields_1): Declare.
4526         * call.c (add_template_candidate_real): Adjust call to
4527         fn_type_unification.
4528         * class.c (add_method): Don't allow duplicate declarations of
4529         constructors or destructors.
4530         (resolve_address_of_overloaded_function): Remove unused variable.
4531         Adjust call to fn_type_unification.
4532         * decl.c (grokfndecl): Be more robust in the face of illegal
4533         specializations.
4534         * decl2.c (check_classfn): Remove hokey handling of member
4535         templates.
4536         * pt.c (determine_specialization): Improve comments.  Adjust to
4537         handle template argument deduction as per the standard.
4538         (check_explicit_specialization): Fix comment spacing.  Handle
4539         type-conversion operators correctly.  Improve error-recovery.
4540         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4541         (get_bindings_real): Simplify handling of static members.
4542         * search.c (lookup_fnfields_1): Make it have external linkage.
4543         * typeck.c (compparms): Fix comment.
4544         (build_unary_op): Don't try to figure out which template
4545         specialization is being referred to when when the address-of
4546         operator is used with a template function.
4547
4548 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4549
4550         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4551         keyword to match an analogous change at the top level.
4552
4553         * tree.c (lvalue_or_else): Likewise.
4554
4555 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
4556
4557         * decl.c (xref_basetypes): Comment.
4558         * pt.c (instantiate_class_template): Use xref_basetypes.
4559
4560 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
4561
4562         * cp-tree.h (tsubst): Change prototype.
4563         (tsubst_expr): Likewise.
4564         (tsubst_copy): Likewise.
4565         (type_unification): Remove prototype.
4566         * call.c (convert_default_arg): Adjust call to tsubst_expr.
4567         * class.c (resolve_address_of_overloaded_function): Just use
4568         fn_type_unification.
4569         * decl.c (grokdeclarator): Adjust call to tsubst.
4570         * method.c (build_template_parm_names): Likewise.
4571         * pt.c (GTB_VIA_VIRTUAL): New macro.
4572         (GTB_IGNORE_TYPE): Likewise.
4573         (resolve_overloaded_unification): Add `complain' parameter.
4574         (try_one_overload): Likewise.
4575         (tsubst_template_arg_vector): Likewise.
4576         (tsubst_template_parms): Likewise.
4577         (tsubst_aggr_type): Likewise.
4578         (tsubst_arg_types): Likewise.
4579         (tsubst_call_declarator_parms): Likewise.
4580         (unify): Remove explicit_mask.
4581         (type_unification_real): Likewise.
4582         (get_template_base_recursive): Likewise.
4583         (coerce_template_template_parms): Provide prototype.
4584         (tsubst_function_type): Likewise.
4585         (try_class_unification): New function.
4586         All callers changed to use new complain parameter.
4587         (get_template_base): Use try_class_unification.
4588         (unify): Adjust handling of classes derived from template types.
4589         (fn_type_unification): Substitute explicit arguments before
4590         unification.
4591
4592 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4593
4594         * decl.c (pushdecl): Remove dead code.
4595
4596 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
4597
4598         * decl2.c (finish_objects): Fix code I missed in previous change.
4599
4600 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
4601
4602         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4603         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4604
4605         * pt.c (maybe_process_partial_specialization): Complain about
4606         'template <>' on non-specialization.
4607
4608 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
4609
4610         * decl.c (grokdeclarator): Catch wierd declarators.
4611         * decl2.c (finish_file): Don't abort because of namespace parsing
4612         failure.
4613         (check_decl_namespace): Remove.
4614
4615 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
4616
4617         * cp-tree.h (get_template_base): Don't declare.
4618         (dfs_walk): Declare.
4619         (dfs_unmark): Likewise.
4620         (markedp): Likewise.
4621         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
4622         targs to get_template_base.
4623         (get_template_base_recursive): Move here from search.c.  Check to
4624         see that the base found can be instantiated to form the desired
4625         type.
4626         (get_template_base): Likewise.
4627         (get_class_bindings): Simplify.
4628         * search.c (get_template_base_recursive): Move to pt.c.
4629         (get_template_base): Likewise.
4630         (markedp): Make it global.
4631         (dfs_walk): Likewise.
4632         (dfs_unmark): Likewise.
4633
4634 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
4635
4636         * pt.c (maybe_process_partial_specialization): Complain about
4637         specialization in wrong namespace.
4638         * tree.c (decl_namespace_context): New fn.
4639
4640 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4641
4642         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4643         * pt.c (coerce_template_template_parms): Handle nested
4644         template template parameters.
4645
4646 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
4647
4648         * typeck2.c: Update email addresses.
4649
4650 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4651
4652         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4653         turned off.
4654
4655 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
4656
4657         * lex.c (retrofit_lang_decl): Split out...
4658         (build_lang_decl): From here.
4659         * decl.c (pushdecl): Call it for functions generated by the middle
4660         end that don't have DECL_LANG_SPECIFIC.
4661         * cp-tree.h: Declare it.
4662
4663         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
4664         (start_objects, finish_objects): Only use special
4665         init_priority code if the user specified a priority.
4666         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4667         objects.
4668
4669 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
4670
4671         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4672         mkstemp.o.  Get them from libiberty now.
4673         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4674
4675 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4676
4677         * decl2.c (lang_decode_option): Use read_integral_parameter.
4678
4679 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
4680
4681         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4682         before calling complete_type_or_else.
4683
4684 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4685
4686         * input.c (inline): Don't define, its handled by system.h.
4687
4688 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
4689
4690         * decl2.c: Don't define flag_no_ident here.  Don't process
4691         -f(no-)ident here.
4692         * cp-tree.h: Don't declare flag_no_ident here.
4693         * lang-specs.h: Map -Qn to -fno-ident.
4694
4695 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
4696
4697         * cp-tree.h (struct tree_binding): Replace scope field with a union.
4698         (BINDING_SCOPE): Adjust.
4699         * decl.c (BINDING_LEVEL): Adjust.
4700
4701 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
4702
4703         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4704         member constants.
4705
4706         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4707         a ctor initializer.
4708
4709         * tree.c (equal_functions): Fix name in prototype.
4710
4711         * decl.c (push_local_binding): Add FLAGS argument.
4712         (pushdecl, push_overloaded_decl): Pass it.
4713         * decl2.c (do_local_using_decl): Likewise.
4714         * cp-tree.h: Adjust prototype.
4715         * decl.c (poplevel): Fix logic.
4716
4717         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4718         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
4719         (cat_namespace_levels): Don't loop forever.
4720
4721 1999-01-25  Richard Henderson  <rth@cygnus.com>
4722
4723         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4724
4725 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
4726
4727         * class.c (resolve_address_of_overloaded_function): Mark the
4728         chosen function used.
4729
4730         * call.c (build_call): Make sure that a function coming in has
4731         been marked used already.
4732         * decl.c (expand_static_init): Call mark_used instead of
4733         assemble_external.
4734         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4735         alloc_eh_object, expand_throw): Likewise.
4736         * init.c (build_builtin_delete_call): Likewise.
4737         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4738         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4739         expand_generic_desc): Likewise.
4740
4741 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4742
4743         * tree.c (equal_functions): New function.
4744         (ovl_member): Call it.
4745
4746 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4747
4748         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4749
4750 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4751
4752         * decl.c (decls_match): Return 1 if old and new are identical.
4753         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4754
4755 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
4756
4757         * decl.c (start_function): Make member functions one_only on windows.
4758         * decl2.c (import_export_decl): Likewise.
4759
4760         * decl.c (grokdeclarator): Don't complain about implicit int in
4761         a system header.  Change same-name field check to not complain in
4762         a system header instead of within extern "C".
4763
4764 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4765
4766         * cp-tree.h (PUSH_GLOBAL): New macro.
4767         (PUSH_LOCAL): Likewise.
4768         (PUSH_USING): Likewise.
4769         (namespace_bindings_p): Declare.
4770         (push_overloaded_decl): Likewise.
4771         * decl.c (push_overloaded_decl): Don't make it static.  Check for
4772         illegal declarations after using declarations here.
4773         (namespace_bindings_p): Likewise.
4774         (duplicate_decls): Don't consider declarations from different
4775         namespaces to be the same.
4776         (pushdecl): Use symbolic PUSH_ constants in calls to
4777         push_overloaded_decl.
4778         (push_overloaded_decl_1): Likewise.
4779         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4780         (do_nonmember_using_decl): Check for illegal using declarations
4781         after ordinary declarations here.
4782         (do_local_using_decl): Call pushdecl to insert declarations.
4783
4784 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
4785
4786         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4787
4788 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
4789
4790         * tree.c (build_cplus_array_type_1): Don't call build_array_type
4791         for types involving template parameters.
4792
4793         * cp-tree.h (PARM_DECL_EXPR): Delete.
4794         (convert_default_arg): Change prototype.
4795         (check_default_argument): Declare.
4796         (search_tree): Likewise.
4797         * call.c (convert_default_arg): Take the function to which the
4798         default argument belongs as a parameter, and do any necessary
4799         instantiation here, instead of ...
4800         (build_over_call): Here.
4801         * decl.c (local_variable_p): New function.
4802         (check_default_argument): Likewise, split out and tidied from ...
4803         (grokparms): Here.
4804         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4805         * pt.c (tsubst_call_declarator_parms): New function.
4806         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
4807         with CALL_EXPRs, rather than trying to be clever.
4808         (tsubst): Use tsubst_call_declarator_parms.
4809         * tree.c (search_tree): Don't make it static.
4810         * typeck.c (convert_arguments): Use new interface to
4811         convert_default_arg.
4812
4813 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
4814
4815         * error.c (dump_function_decl): Don't print the argument types for
4816         a function when the verbosity level is negative.
4817
4818         * call.c (build_over_call): Check format attributes at call-time.
4819
4820         * pt.c (tsubst_copy): Fix comment.
4821         (unify): Don't allow unification with variable-sized arrays.
4822
4823         * semantics.c (finish_stmt_expr): When processing a template make
4824         the BIND_EXPR long-lived.
4825
4826 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
4827
4828         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4829         (import_export_vtable): Not here.
4830
4831 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4832
4833         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4834         non-static member function.
4835
4836 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4837
4838         * class.c (instantiate_type): Only diagnose illegal address of member
4839         function if complaining.
4840
4841         * decl.c (lookup_name_real): Remove duplicate code.
4842
4843 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
4844
4845         * tree.c (copy_template_template_parm): Use permanent_obstack.
4846
4847 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
4848
4849         * pt.c (unify): Remove restrictions on deduction of argument
4850         of template template parameters.
4851
4852 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4853
4854         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4855
4856         * class.c (resolve_address_of_overloaded_function): Show list of
4857         all candidates, when none of them match.
4858
4859 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
4860
4861         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4862         definition of 'casting away const' in reinterpret_cast<>.
4863
4864 1999-01-18  Graham  <grahams@rcp.co.uk>
4865
4866         * cvt.c: Add include for decl.h, remove extern for
4867         static_aggregates which is now provided by decl.h.
4868
4869         * Makefile.in (cvt.o): Add dependency for decl.h and missing
4870         dependencies for convert.h and flags.h.
4871
4872 1999-01-18  Nathan Sidwell  <nathan@acm.org>
4873
4874         * decl2.c (do_dtors): Set current location to that of the
4875         decl, for sensible diagnostics and debugging.
4876         (check_classfn): Issue `incomplete type' error, if
4877         class is not defined.
4878
4879 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4880
4881         * cp-tree.h: Add prototype for bound_pmf_p.
4882
4883 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
4884             Manfred Hollstein <manfred@s-direktnet.de>
4885
4886         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4887         -Wreturn-type.
4888
4889 1999-01-16  Nathan Sidwell  <nathan@acm.org>
4890
4891         * cp-tree.h (struct lang_type): Added has_mutable flag.
4892         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4893         (TYPE_HAS_MUTABLE_P): New macro to read it.
4894         (cp_has_mutable_p): Prototype for new function.
4895         * class.c (finish_struct_1): Set has_mutable from members.
4896         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4897         it contains a mutable.
4898         * typeck.c (cp_has_mutable_p): New function.
4899
4900 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
4901
4902         * pt.c (process_template_parm): Ignore top-level qualifiers on
4903         non-type parameters.
4904
4905         * decl.c (start_function): Use current_function_parms in the call
4906         to require_complete_type_for_parms, not the probably empty
4907         DECL_ARGUMENTS.
4908
4909 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
4910
4911         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4912
4913         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4914         that we don't suppress the other copies.
4915         * lex.c (handle_cp_pragma): Likewise.
4916
4917 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
4918
4919         * decl.c (grokdeclarator): Undo 1998-12-14 change.
4920         * tree.c (build_cplus_array_type_1): Likewise.
4921         * pt.c (instantiate_class_template): Remove misleading comment.
4922         (tsubst_aggr_type): Substitute if there are template parameters,
4923         regardless of whether or not they use template arguments.
4924         (unify): Likewise, but for unification.
4925
4926 1999-01-12  Richard Henderson  <rth@cygnus.com>
4927
4928         * cp-tree.h (flag_permissive): Declare extern.
4929
4930 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
4931
4932         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4933         here.
4934         (lang_type): Add is_partial_instantiation.  Decrease width of
4935         dummy.
4936         (PARTIAL_INSTANTIATION_P): New macro.
4937         (OPERATOR_TYPENAME_P): Remove.
4938         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4939         OPERATOR_TYPENAME_P.
4940         (grok_op_properties): Likewise.
4941         * friend.c (do_friend): Handle friends that are member functions
4942         correctly.
4943         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4944         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
4945         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
4946         any more partial instantiation than is absolutely necessary for
4947         implicit typename.  Set PARTIAL_INSTANTIATION_P.
4948         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
4949         * semantics.c (begin_class_definition): Handle partial
4950         specializations of a type that was previously partially
4951         instantiated.
4952
4953 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
4954
4955         * g++spec.c (LIBSTDCXX): Provide default definition.
4956         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
4957
4958 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4959
4960         * Make-lang.in (g++.o): Depend on prefix.h.
4961
4962 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
4963
4964         * tree.c (bound_pmf_p): New fn.
4965         * typeck.c (build_c_cast): Use it.
4966
4967         * decl.c (grok_op_properties): Use same_type_p.
4968
4969 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4970
4971         * Makefile.in (cvt.o): Depend on toplev.h.
4972
4973         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
4974
4975         * cvt.c: Include toplev.h.
4976
4977         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
4978         definitions.
4979
4980         * init.c (expand_vec_init): Initialize variable `itype'.
4981
4982         * lex.c (yyerror): Cast the argument passed to a ctype function to
4983         an unsigned char.
4984
4985         * method.c (build_mangled_C9x_name): Wrap prototype and definition
4986         in "HOST_BITS_PER_WIDE_INT >= 64".
4987
4988         * typeck.c (build_binary_op): Mark parameter `convert_p' with
4989         ATTRIBUTE_UNUSED.
4990
4991 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
4992
4993         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
4994         * tree.c (build_exception_variant): Don't crash on empty throw
4995         specs.
4996
4997 1998-12-18  DJ Delorie  <dj@cygnus.com>
4998
4999         * cvt.c (convert_to_reference): Check for both error_mark_node
5000         and NULL_NODE after call to convert_for_initialization.
5001
5002 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5003
5004         * error.c (interesting_scope_p): New fn.
5005         (dump_simple_decl): Use it.
5006         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5007         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5008
5009 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5010
5011         * class.c (resolve_address_of_overloaded_function): Do conversion
5012         to correct type here, rather than ...
5013         (instantiate_type): Here.
5014
5015         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5016         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5017         (decl_template_parm_p): Remove.
5018         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5019         parameter.
5020         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5021         * pt.c (push_inline_template_parms_recursive): Set it.
5022         (decl_template_parm_p): Remove.
5023         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5024         (process_template_parm): Set it.
5025
5026 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5027
5028         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5029         if configured with cpplib.
5030
5031 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5032
5033         * decl.c (poplevel): Make sure ns_binding is initialized.
5034
5035         * decl.c (finish_function): Undo inadvertent change in previous
5036         patch.
5037
5038 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5039
5040         * class.c (pushclass): Tweak handling of class-level bindings.
5041         (resolve_address_of_overloaded_function): Update pointer-to-member
5042         handling.
5043         (instantiate_type): Likewise.
5044         * cvt.c (cp_convert_to_pointer): Likewise.
5045         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5046         Deal with `struct stat' hack.
5047         (binding_level): Add to documentation.
5048         (push_binding): Clear BINDING_TYPE.
5049         (add_binding): New function.
5050         (push_local_binding): Use it.
5051         (push_class_binding): Likewise.
5052         (poplevel): Adjust calls to pop_binding.
5053         (poplevel_class): Likewise.
5054         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5055         declarations to current binding level.
5056         (push_class_level_binding): Likewise.
5057         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5058         bindings.
5059         (lookup_namespace_name): Don't crash when confronted with a
5060         TEMPLATE_DECL.
5061         (lookup_name_real): Do `struct stat' hack in local binding
5062         contexts.
5063         (build_ptrmemfunc_type): Adjust documentation.
5064         (grokdeclarator): Don't avoid building real array types when
5065         processing templates unless really necessary.
5066         (finish_method): Adjust calls to pop_binding.
5067         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5068         not reparse_decl_as_expr.
5069         (build_expr_from_tree): Deal with a template-id as the function to
5070         call in a METHOD_CALL_EXPR.
5071         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5072         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5073         METHOD_TYPEs here.
5074         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5075         pointer-to-member types where necessary.
5076         * tree.c (build_cplus_array_type_1): Don't avoid building real
5077         array types when processing templates unless really necessary.
5078         (build_exception_variant): Compare the exception lists correctly.
5079
5080 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5081
5082         * cp-tree.def (CPLUS_BINDING): Update documentation.
5083         * cp-tree.h (LOCAL_BINDING_P): New macro.
5084         (lang_identifier): Rename local_value to bindings.
5085         (tree_binding): Make `scope' of type `void*', not `tree'.
5086         (BINDING_SCOPE): Update documentation.
5087         (IDENTIFIER_LOCAL_VALUE): Remove.
5088         (IDENTIFIER_CLASS_VALUE): Document.
5089         (IDENTIFIER_BINDING): New macro.
5090         (IDENTIFIER_VALUE): Likewise.
5091         (TIME_IDENTIFIER_TIME): Likewise.
5092         (TIME_IDENTIFIER_FILEINFO): Likewise.
5093         (IMPLICIT_TYPENAME_P): Likewise.
5094         (set_identifier_local_value): Remove.
5095         (push_local_binding): New function.
5096         (push_class_binding): Likewise.
5097         * class.c (pushclass): Update comments; use push_class_binding.
5098         * decl.c (set_identifier_local_value_with_scope): Remove.
5099         (set_identifier_local_value): Likewise.
5100         (push_binding): New function.
5101         (pop_binding): Likewise.
5102         (binding_level): Update documentation.  Remove shadowed.
5103         (BINDING_LEVEL): New macro.
5104         (free_binding_nodes): New variable.
5105         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5106         BLOCK_VARs when doing for-scope extension.  Remove effectively
5107         dead code.
5108         (pushlevel_class): Tweak formatting.
5109         (poplevel_class): Adjust for new name-lookup scheme.
5110         (print_binding_level): Likewise.
5111         (store_bindings): Likewise.
5112         (pushdecl): Likewise.
5113         (pushdecl_class_level): Likewise.
5114         (push_class_level_binding): Likewise.
5115         (push_overloaded_decl): Update comments.  Adjust for new
5116         name-lookup scheme.
5117         (lookup_name_real): Likewise.
5118         (lookup_name_current_level): Likewise.
5119         (cp_finish_decl): Likewise.
5120         (require_complete_types_for_parms): Likewise.  Remove misleading
5121         #if 0'd code.
5122         (grok_parms): Likewise.  Don't call
5123         require_complete_types_for_parms here.
5124         (grok_ctor_properties): Don't treat templates as copy
5125         constructors.
5126         (grop_op_properties): Or as assignment operators.
5127         (start_function): Document.  Adjust for new name-lookup scheme.
5128         (finish_function): Likewise.
5129         * decl2.c (do_local_using_decl): Use push_local_binding.
5130         * lex.c (begin_definition_of_inclass_inline): New function, split
5131         out from ...
5132         (do_pending_inlines): Here, and ...
5133         (process_next_inline): Here.
5134         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5135         (init_filename_times): Likewise.
5136         (extract_interface_info): Likewise.
5137         (ste_typedecl_interface_info): Likewise.
5138         (check_newline): Likewise.
5139         (dump_time_statistics): Likewise.
5140         (handle_cp_pragma): Likewise.
5141         (do_identifier): Adjust for new name-lookup scheme.
5142         * parse.y (function_try_block): Return ctor_initializer_opt value.
5143         (fndef): Use it.
5144         (fn.defpen): Pass appropriate values to start_function.
5145         (pending_inline): Use functor_try_block value, and pass
5146         appropriate values to finish_function.
5147         * pt.c (is_member_template): Update documentation; remove handling
5148         of FUNCTION_DECLs.  As per name, this function should deal only in
5149         TEMPLATE_DECLs.
5150         (decl_template_parm_p): Change name of olddecl parameter to decl.
5151         (check_template_shadow): Adjust for new name-lookup scheme.
5152         (lookup_template_class): Likewise.
5153         (tsubst_decl): Tweak so as not to confuse member templates with
5154         copy constructors and assignment operators.
5155         (unify): Handle UNION_TYPEs.
5156         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5157         (lang_print_xnode): Adjust for new name-lookup scheme.
5158         * typeck.c (mark_addressable): Likewise.
5159         (c_expand_return): Likewise.
5160
5161 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5162
5163         * decl.c (grokdeclarator): Allow field with same name as class
5164         in extern "C".
5165
5166         * decl.c (lookup_name_real): Don't limit field lookup to types.
5167         * class.c (check_member_decl_is_same_in_complete_scope): No error
5168         if icv and x are the same.
5169         * lex.c (do_identifier): Tweak error message.
5170
5171 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5172
5173         * decl.c (start_enum): Use push_obstacks, not
5174         end_temporary_allocation.
5175         (finish_enum): Call pop_obstacks.
5176
5177 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5178
5179         * class.c (instantiate_type): Return error_mark_node rather than
5180         junk.
5181
5182 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5183
5184         * cp-tree.h (most_specialized_instantiation): New function.
5185         (print_candidates): Likewise.
5186         * class.c (validate_lhs): Remove.
5187         (resolve_address_of_overloaded_function): New function, split out
5188         and then substantially reworked, from ...
5189         (instantiate_type): Use it.  Simplify.
5190         * cvt.c (convert_to_reference): Complain when caller has indicated
5191         that's the right thing to do.  Don't crash if instantiate_type
5192         fails.
5193         * pt.c: Substitute `parameters' for `paramters' throughout.
5194         (print_candidates): Don't make it static.
5195         (most_specialized_instantiation): Split out from ...
5196         (most_specialized): Here.
5197
5198 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5199
5200         * lex.c (lang_init_options): Initialize cpplib.
5201         * decl2.c (parse_options,cpp_initialized): Removed.
5202         (lang_decode_option): Move initialization of cpplib to
5203         lang_init_options.
5204
5205 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5206
5207         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5208         well as the TYPE_DECL, when a typedef name is assigned to a
5209         previously anonymous type.
5210
5211 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5212
5213         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5214         __cp_eh_info for getting the eh info pointer.  Add table_index to
5215         field list.
5216         (push_eh_cleanup): Don't increment 'handlers' data field.
5217         (process_start_catch_block): Don't set the 'caught' field.
5218
5219         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5220         exception info pointer within library routines.
5221         (__cp_eh_info): Use CP_EH_INFO.
5222         (__start_cp_handler): Get exception info pointer, set caught field,
5223         and increment the handlers field.  Avoids this being done by handlers.
5224         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5225         (uncaught_exception): Use CP_EH_INFO macro.
5226
5227 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5228
5229         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5230
5231 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5232
5233         * lex.c (check_newline): Add support for \ as `natural'
5234         characters in file names in #line to be consistent with #include
5235         handling.  We support escape processing in the # 1 "..." version of
5236         the command.  See also support in cp/lex.c.
5237
5238 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5239
5240         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5241         structure.
5242
5243 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5244
5245         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5246
5247         * error.c (dump_simple_decl): Also print namespace context.
5248         (dump_function_decl): Likewise.
5249
5250         * decl2.c (ambiguous_decl): Don't print old value if it's
5251         error_mark_node.
5252
5253         * decl.c (lookup_name_real): Fix handling of local types shadowed
5254         by a non-type decl.  Remove obsolete code.
5255         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5256
5257         * lang-options.h: Add -fpermissive.
5258         * decl2.c: Likewise.
5259         * cp-tree.h: Add flag_permissive.
5260         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5261         were specified, set flag_pedantic_errors.
5262         * call.c (build_over_call): Turn dropped qualifier messages
5263         back into pedwarns.
5264         * cvt.c (convert_to_reference): Likewise.
5265         * typeck.c (convert_for_assignment): Likewise.
5266
5267 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5268
5269         * decl2.c (coerce_new_type): Use same_type_p.
5270         (coerce_delete_type): Likewise.
5271
5272         * call.c (check_dtor_name): Return 1, not error_mark_node.
5273
5274 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5275
5276         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5277         if MULTIPLE_SYMBOL_SPACES.
5278
5279         * pt.c (check_template_shadow): New fn.
5280         * decl2.c (grokfield): Use it.
5281         * decl.c (pushdecl): Likewise.
5282         (pushdecl_class_level): Likewise.
5283         (start_method): Likewise.
5284         (xref_tag): Don't try to use 't' if we're defining.
5285
5286         * call.c (check_dtor_name): Just return an error_mark_node.
5287         * pt.c (lookup_template_class): Complain about using non-template here.
5288         * parse.y (apparent_template_type): Not here.
5289
5290         * pt.c (check_explicit_specialization): Complain about specialization
5291         with C linkage.
5292
5293         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5294
5295         * pt.c (convert_nontype_argument): Don't assume that any integer
5296         argument is intended to be a constant-expression.
5297
5298 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5299
5300         * class.c (handle_using_decl): Fix comment.  Don't lookup
5301         constructors in base classes.
5302         (validate_lhs): Fix typo in comment.
5303         * search.c (lookup_field_1): Don't return a USING_DECL.
5304
5305         * cp-tree.h (DECL_ACCESS): Improve documentation.
5306
5307         * decl.c (expand_static_init): Don't set the initialization-done
5308         flag until the initialization is done.
5309
5310 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
5311
5312         * decl2.c (validate_nonmember_using_decl): Complain about using
5313         declarations for class members.
5314
5315 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
5316
5317         * typeck2.c (process_init_constructor): Use same_type_p.
5318
5319         * decl.c (check_tag_decl): Don't warn about null decl inside a
5320         class.
5321
5322         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5323         UNIFY_ALLOW_NONE.
5324         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5325         (resolve_overloaded_unification): Strip baselinks.
5326
5327 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5328
5329         * g++spec.c: Don't prototype xmalloc.
5330
5331 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
5332
5333         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5334
5335         * decl.c (check_tag_decl): Do complain about null friend decl at
5336         file scope.
5337
5338 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5339
5340         * lex.c (make_lang_type): Clear the whole struct lang_type, not
5341         only the first multiple of sizeof (int).
5342
5343 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5344
5345         * decl.c (start_decl): An explicit specialization of a static data
5346         member is only a definition if it has an initializer.
5347
5348         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5349         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5350         cp_finish_decl.
5351         * init.c (expand_default_init): Check for DIRECT_BIND instead of
5352         DECL_ARTIFICIAL.
5353
5354         * call.c (build_over_call): Use build_decl.
5355
5356         * except.c (expand_throw): Just use convert, not
5357         build_reinterpret_cast.
5358
5359         * lex.c (handle_generic_pragma): Use token_buffer.
5360
5361         * decl.c (check_tag_decl): Don't complain about null friend decl.
5362
5363 1998-11-24  Dave Pitts  <dpitts@cozx.com>
5364
5365         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5366         first position.
5367         * lex.c (check_newline): Use ISALPHA.
5368         (readescape): Use ISGRAPH.
5369         (yyerror): Use ISGRAPH.
5370
5371 1998-11-24  Nathan Sidwell  <nathan@acm.org>
5372
5373         * search.c (get_abstract_virtuals): Do not use initial
5374         CLASSTYPE_ABSTRACT_VIRTUALS.
5375         * typeck2.c (abstract_virtuals_error): Show location of abstract
5376         declaration.
5377         * call.c (build_new_method_call): Use
5378         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5379         * class.c (finish_struct_bits): Don't bother working out whether
5380         get_abstract_virtuals will do anything, just do it.
5381
5382 1998-11-24  Graham  <grahams@rcp.co.uk>
5383
5384         * typeck.c (build_component_ref): Remove unused statement.
5385
5386 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
5387
5388         * class.c (add_method): Catch invalid overloads.
5389
5390         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5391         * search.c (lookup_conversions): Handle getting real OVERLOADs.
5392         (add_conversions): Likewise.  Revert last change.
5393         * call.c (add_conv_candidate): Pass totype to add_candidate instead
5394         of fn.  Don't add a new candidate if the last one was for the same
5395         type.
5396         (print_z_candidates): Handle getting a type as a function.
5397         (joust): If we got two conversion candidates to the same type,
5398         just pick one.
5399         (build_object_call): Lose 'templates'.
5400         (build_user_type_conversion_1): Handle getting real OVERLOADs.
5401
5402 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5403
5404         * typeck2.c (process_init_constructor): If there are elements
5405         that don't have initializers and they need to have constructors
5406         run, supply them with initializers.
5407
5408         * class.c (finish_struct_1): A class with a 0-width bitfield is
5409         still empty.
5410
5411 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
5412
5413         * pt.c (instantiate_class_template): Don't try to figure out what
5414         specialization to use for a partial instantiation.  Correct
5415         typos in a couple of comments.  Avoid calling uses_template_parms
5416         multiple times.
5417
5418 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
5419
5420         * method.c (process_overload_item): Add call to
5421         build_mangled_C9x_name for intTI_type_nodes.
5422         (build_mangled_C9x_name): Add prototype, define.
5423         * decl.c (init_decl_processing): Add names for
5424         TImode_type_node.
5425
5426 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
5427
5428         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5429
5430         * class.c (finish_struct_1): Set things up for 0-width bitfields
5431         like we do for others.
5432
5433         * decl.c (check_tag_decl): New fn.
5434         (shadow_tag): Split out from here.
5435         * decl2.c (grok_x_components): Call it.
5436
5437 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
5438
5439         * decl.c: Lose warn_about_return_type.
5440         (grokdeclarator): Always complain about implicit int, except for
5441         `main () { ... }'.
5442
5443         * decl.c (tag_name): New fn.
5444         (xref_tag): Complain about using typedef-name after class-key.
5445
5446         * init.c (expand_vec_init): Also keep going if from_array.
5447
5448         * tree.c (is_overloaded_fn): Also handle the output of
5449         build_offset_ref.
5450
5451         * decl.c (grokdeclarator): Use constructor_name when comparing
5452         field name against enclosing class.
5453         * class.c (finish_struct_anon): Likewise.
5454
5455 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
5456
5457         * decl.c (poplevel): Remove code to handle KEEP == 2.
5458         (finish_function): Don't confuse BLOCK-order when
5459         processing a destructor.
5460
5461 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5462
5463         * decl.c (require_complete_types_for_parms): Call layout_decl
5464         after we've completed the type.
5465
5466 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5467
5468         * decl2.c (validate_nonmember_using_decl): Allow using templates
5469         from the global namespace.
5470
5471 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
5472
5473         Handle specifying template args to member function templates.
5474         * tree.c (build_overload): Always create an OVERLOAD for a template.
5475         * search.c (add_conversions): Handle finding an OVERLOAD.
5476         * decl2.c (check_classfn): Likewise.
5477         * lex.c (identifier_type): See through a baselink.
5478         * parse.y (do_id): Don't call do_identifier if we got a baselink.
5479         * class.c (instantiate_type, case TREE_LIST): Recurse.
5480
5481         * decl.c (grokdeclarator): Allow a boolean constant for array
5482         bounds, odd as that sounds.
5483
5484         * pt.c (unify): Be more strict about non-type parms, except for
5485         array bounds.
5486         (UNIFY_ALLOW_INTEGER): New macro.
5487
5488 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
5489
5490         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5491
5492 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
5493
5494         * semantics.c (begin_class_definition): Call
5495         maybe_process_partial_specialization before push_template_decl.
5496         Don't call push_template_decl for a specialization.
5497         * search.c (lookup_field): Do return a member template class.
5498         * decl2.c (handle_class_head): Handle member template classes.
5499
5500         * decl.c (grokdeclarator): A parm type need not be complete.
5501
5502         * pt.c (convert_nontype_argument): Fix thinko.
5503
5504 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5505
5506         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5507         (global_delete_fndecl): New variable.
5508         * decl.c (global_delete_fndecl): Define it.
5509         (init_decl_processing): Set it.
5510         * init.c (build_builtin_delete_call): Use it.
5511         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5512         nodes.
5513
5514 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5515
5516         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5517         type.
5518
5519         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5520         * call.c (build_object_call): Also support references to functions.
5521         * typeck.c (convert_for_initialization): Don't decay a function
5522         if the target is a reference to function.
5523
5524         * search.c (add_conversions): Get all the overloads from a class.
5525
5526         * decl.c (grok_ctor_properties): Complain about any constructor
5527         that will take a single arg of the class type by value.
5528
5529         * typeck2.c (build_functional_cast): Can't create objects of
5530         abstract classes this way.
5531         * cvt.c (ocp_convert): Likewise.
5532
5533         * decl.c (grokfndecl): Member functions of local classes are not
5534         public.
5535
5536 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
5537
5538         * Make-lang.in (cc1plus): Add dependency on hash.o.
5539
5540 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
5541
5542         * search.c (get_abstract_virtuals): Complain about virtuals with
5543         no final overrider.
5544         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5545         with no final overrider.
5546         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5547         on virtuals with no final overrider.
5548
5549         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5550
5551         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5552         after layout_type.
5553
5554         * friend.c (do_friend): Don't set_mangled_name_for_decl.
5555
5556         * class.c (finish_struct_anon): Complain about non-fields.
5557         * decl2.c (build_anon_union_vars): Likewise.
5558
5559         * decl.c (grokdeclarator): Normal data members can't have the same
5560         name as the class, either.
5561         * class.c (finish_struct_anon): Neither can members of an
5562         anonymous union.
5563
5564 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
5565
5566         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5567         (TYPE_BINFO): Likewise.
5568         (IS_AGGR_TYPE): Tweak.
5569         (SET_IS_AGGR_TYPE): New macro.
5570         (CLASS_TYPE_P): Tweak.
5571         (lang_type): Group mark bitfields together.  Remove linenum.
5572         (CLASSTYPE_SOURCE_LINE): Remove macro.
5573         (CLASSTYPE_MARKED_N): New macro.
5574         (SET_CLASSTYPE_MARKED_N): Likewise.
5575         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5576         (CLASS_TYPE_MARKED_*): Use them.
5577         (SET_CLASSTYPE_MARKED_*): Likewise.
5578         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5579         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5580         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5581         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5582         * class.c (class_cache_obstack): New variable.
5583         (class_cache_firstobj): Likewise.
5584         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5585         (pushclass): Free the cache, when appropriate.
5586         (popclass): Tidy.
5587         (maybe_push_cache_obstack): Use class_cache_obstack.
5588         * decl.c (include hash.h).
5589         (typename_hash): New function.
5590         (typename_compare): Likewise.
5591         (build_typename_type): Check the hash table to avoid creating
5592         duplicates.
5593         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5594         (grokdeclarator): Use CLASS_TYPE_P.
5595         (xref_basetypes): Likewise.
5596         (start_function): Likewise.  Don't put current_class_ref on the
5597         permanent obstack.
5598         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5599         and TYPE_TI_ARGS.
5600         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5601         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5602         fields for types other than class types.  Do clear TYPE_ALIAS_SET
5603         for types other than class types, though.
5604         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5605         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5606         * pt.c (process_template_parm): Don't set
5607         CLASSTYPE_GOT_SEMICOLON.
5608         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5609         Coerce arguments on the momentary obstack.
5610         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5611         (instantiate_class_template): Calculate template arguments on the
5612         momentary obstack.  Tidy.
5613         (tsubst_template_arg_vector): Use make_temp_vec.
5614         (tsubst_aggr_type): Put template arguments on the momentary
5615         obstack.
5616         (tsubst_decl): Likewise.
5617         (tsubst): Copy the array bounds index to the permanent obstack
5618         before building index types.  Use new macros.
5619         (unify): Use new macros.
5620         (do_type_instantiation): Likewise.
5621         * search.c (lookup_fnfields_1): Use new macros.
5622         (dfs_pushdecls): Build envelopes on the cache obstack.
5623         (dfs_compress_decls): Use new macros.
5624         (push_class_decls): Build on the cache obstack.
5625         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5626         * sign.c (build_signature_pointer_or_reference_type): Use
5627         SET_IS_AGGR_TYPE.
5628         * tree.c (make_binfo): Check CLASS_TYPE_P.
5629         (copy_template_template_parm): Adjust.
5630         (make_temp_vec): Use push_expression_obstack.
5631         * typeck.c (complete_type): Use new macros.
5632         (comptypes): Likewise.
5633
5634 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
5635
5636         * pt.c (tsubst): Add diagnostics for invalid array, reference
5637         and pointer to member types.
5638
5639 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5640
5641         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5642
5643         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5644         Simplify.
5645
5646         * parse.y (structsp): Fix cut-and-paste error.
5647
5648         * init.c (build_new): Complain about non-integral size.
5649
5650         * parse.y (unary_expr): Complain about defining types in sizeof.
5651
5652         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5653
5654         * rtti.c (build_x_typeid): Complain about typeid without
5655         including <typeinfo>.
5656         (get_typeid): Likewise.  Complain about typeid of incomplete type.
5657         (get_tinfo_fn_dynamic): Likewise.
5658         (get_typeid_1): Not static anymore.
5659         * except.c (build_eh_type_type): Use get_typeid_1.
5660
5661         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5662         ambiguous or private bases.  Fix warning for reference cast.
5663
5664 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
5665
5666         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5667         * decl.c (duplicate_decls): Remove special-case code to deal with
5668         template friends, and just do the obvious thing.
5669         * pt.c (register_specialization): Tweak for clarity, and also to
5670         clear DECL_INITIAL for an instantiation before it is merged with a
5671         specialization.
5672         (check_explicit_specialization): Fix indentation.
5673         (tsubst_friend_function): Handle both definitions in friend
5674         declaration and outside friend declarations.
5675         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5676         (regenerate_decl_from_template): Tweak accordingly.
5677         (instantiate_decl): Likewise.
5678
5679 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
5680
5681         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5682         member function reference to error.
5683         * cvt.c (ocp_convert): Complain about converting an overloaded
5684         function to void.
5685
5686         * init.c (build_offset_ref): Just return a lone static member
5687         function.
5688
5689         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5690         not internal ones.
5691
5692         * typeck.c (build_binary_op_nodefault): Improve error handling.
5693
5694         * decl.c (grokfndecl): Complain about making 'main' a template.
5695
5696         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5697
5698         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5699         TYPE_DECL in a template.
5700
5701 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
5702
5703         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5704
5705         * decl.c (struct cp_function): Add named_label_uses.
5706         (push_cp_function_context): Save it.
5707         (pop_cp_function_context): Restore it.
5708         (define_label): Also complain about jumping into the scope of
5709         non-POD objects that don't have constructors.
5710         * tree.c (pod_type_p): New fn.
5711
5712         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5713         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5714         (get_tinfo_fn): Not here.
5715         * repo.c (repo_get_id): Abort if we get called for an incomplete
5716         type.
5717
5718 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
5719
5720         * except.c (expand_throw): Make sure first argument to
5721         __cp_push_exception is of type `void*' to avoid spurious error
5722         messages.
5723
5724 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
5725
5726         * pt.c (try_one_overload): Take orig_targs again.  Only check for
5727         mismatches against them; we don't care what a previous call found.
5728         (resolve_overloaded_unification): Adjust.
5729
5730         * search.c (lookup_field): Don't return anything for a non-type
5731         field from a dependent type.
5732         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5733         in an array declarator.
5734         (start_decl): Push into the class before looking for the field.
5735
5736 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
5737
5738         * method.c (build_overload_value): Handle REFERENCE_TYPE.
5739
5740 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5741
5742         * decl.c (grokdeclarator): Allow namespace-scoped members if they
5743         are friends.
5744
5745 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
5746
5747         * pt.c (tsubst_decl): Don't mess with the global value of an
5748         un-mangled DECL_ASSEMBLER_NAME.
5749
5750 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
5751
5752         * decl.c (init_decl_processing): Remove CYGWIN conditional
5753         since CYGWIN is now able to deal with trapping signals.
5754
5755 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5756
5757         * cp-tree.h: Don't include gansidecl.h.
5758         * exception.cc: Include gansidecl.h (since we don't include config.h)
5759         * g++spec.c: Don't include gansidecl.h.
5760
5761 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
5762
5763         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
5764         size of dummy.
5765         (DECL_DEFINED_IN_CLASS_P): New macro.
5766         (TEMPLATE_PARMS_FOR_INLINE): Document.
5767         (check_static_variable_definition): New function.
5768         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5769         appropriate.
5770         (check_static_variable_definition): Split out from ...
5771         (grokdeclarator): Here.
5772         * pt.c (check_default_tmpl_args): New function, split out from ...
5773         (push_template_decl_real): Here.
5774         (instantiate_template): Fix comment.
5775
5776 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
5777
5778         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5779         (CP_TYPE_VOLATILE_P): Likewise.
5780         (CP_TYPE_RESTRICT_P): Likewise.
5781
5782 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
5783
5784         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5785
5786 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
5787
5788         * class.c (instantiate_type): Be more helpful.
5789
5790         * decl2.c (import_export_decl): Call import_export_class.
5791
5792         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5793         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5794         * pt.c (tsubst_copy): Likewise.
5795
5796 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
5797
5798         * init.c (expand_vec_init): Fix off-by-one error.
5799
5800 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
5801
5802         * parse.y (apparent_template_type): New type.
5803         (named_complex_class_head_sans_basetype): Use it.
5804         * Makefile.in (CONFLICTS): One new conflict.
5805         * parse.c: Regenerated.
5806
5807 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
5808
5809         * cp-tree.h (COMPARE_STRICT): New macro.
5810         (COMPARE_BASE): Likewise.
5811         (COMPARE_RELAXED): Likewise.
5812         (COMPARE_REDECLARATION): Likewise.
5813         (same_type_p): Likewise.
5814         (same_or_base_type_p): Likewise.
5815         * call.c (standard_conversion): Use them, in place of comptypes
5816         with numeric arguments.
5817         (reference_binding): Likewise.
5818         (convert_like): Likewise.
5819         (build_over_call): Likewise.
5820         (is_subseq): Likewise.
5821         (is_properly_derived_from): Likewise.
5822         (compare_ics): Likewise.
5823         (joust): Likewise.
5824         * class.c (delete_duplicate_fields_1): Likewise.
5825         (resolves_to_fixed_type_p): Likewise.
5826         (instantiate_type): Likewise.  Remove #if 0'd code.
5827         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
5828         (pushdecl): Likewise.
5829         (lookup_name_real): Likewise.
5830         (grokdeclarator): Likewise.  Check for illegal array declarations.
5831         (grokparms): Likewise.
5832         (grok_op_properties): Likewise.
5833         * decl2.c (check_classfn): Likewise.
5834         * friend.c (is_friend): Likewise.
5835         (make_friend_class): Likewise.
5836         * init.c (expand_aggr_init): Likewise.
5837         (expand_vec_init): Likewise.
5838         * pt.c (is_member_template_class): Remove declaration.
5839         (is_specialization_of): Use COMPARE_* and new macros.
5840         (comp_template_parms): Likewise.
5841         (convert_nontype_argument): Likewise.
5842         (coerce_template_template_parms): Likewise.
5843         (template_args_equal): Likewise.
5844         (lookup_template_class): Likewise.
5845         (type_unification_real): Likewise.
5846         (unify): Likewise.
5847         (get_bindings_real): Likewise.
5848         * search.c (covariant_return_p): Likewise.
5849         (get_matching_virtual): Likewise.
5850         * sig.c (match_method_types): Likewise.
5851         * tree.c (vec_binfo_member): Likewise.
5852         (cp_tree_equal): Likewise.
5853         * typeck.c (common_type): Likewise.
5854         (comp_array_types): Likewise.  Get issues involving unknown array
5855         bounds right.
5856         (comptypes): Update comments.  Use new flags.
5857         (comp_target_types): Use new macros.
5858         (compparms): Likewise.
5859         (comp_target_parms): Likewise.
5860         (string_conv_p): Likewise.
5861         (build_component_ref): Likewise.
5862         (build_indirect_ref): Likewise.
5863         (build_conditional_expr): Likewise.
5864         (build_static_cast): Likewise.
5865         (build_reinterpret_cast): Likewise.
5866         (build_const_cast): Likewise.
5867         (build_modify_expr): Likewise.
5868         (convert_for_assignment): Likewise.
5869         (comp_ptr_ttypes_real): Likewise.
5870         (ptr_reasonably_similar): Likewise.
5871         (comp_ptr_ttypes_const): Likewise.
5872
5873 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
5874
5875         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5876
5877 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
5878
5879         * decl2.c (delete_sanity): Pass integer_zero_node, not
5880         integer_two_node, to build_vec_delete.
5881         * init.c (build_array_eh_cleanup): Remove.
5882         (expand_vec_init_try_block): New function.
5883         (expand_vec_init_catch_clause): Likewise.
5884         (build_vec_delete_1): Don't deal with case that auto_delete_vec
5885         might be integer_two_node anymore.
5886         (expand_vec_init): Rework for initialization-correctness and
5887         exception-correctness.
5888         * typeck2.c (process_init_constructor): Make mutual exclusivity
5889         of cases more obvious.
5890
5891 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
5892
5893         * decl.c (lookup_name_real): OK, only warn if not lexing.
5894         Simplify suggested fix.
5895
5896         * cp-tree.h (IDENTIFIER_MARKED): New macro.
5897         * search.c (lookup_conversions): Use breadth_first_search.
5898         (add_conversions): Avoid adding two conversions to the same type.
5899         (breadth_first_search): Work with base binfos, rather
5900         than binfos and base indices.
5901         (get_virtual_destructor): Adjust.
5902         (tree_has_any_destructor_p): Adjust.
5903         (get_matching_virtual): Adjust.
5904
5905         * pt.c (push_template_decl_real): Generalize check for incorrect
5906         number of template parms.
5907         (is_member_template_class): #if 0.
5908
5909 1998-10-29  Richard Henderson  <rth@cygnus.com>
5910
5911         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5912         last.
5913
5914 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5915
5916         * lex.c: Call check_newline from lang_init always.  After
5917         calling cpp_start_read, set yy_cur and yy_lim to read from the
5918         cpplib token buffer.
5919
5920 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
5921
5922         * class.c (instantiate_type): Don't consider templates for a normal
5923         match.
5924
5925         * class.c (finish_struct_1): Don't complain about non-copy
5926         assignment ops in union members.
5927
5928         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5929         (prepare_fresh_vtable): Likewise.
5930         (finish_struct_1): Don't call import_export_class.
5931         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5932         (finish_prevtable_vardecl): Lose.
5933         (finish_file): Don't call it.
5934         * pt.c (instantiate_class_template): Likewise.
5935         * cp-tree.h: Remove it.
5936
5937         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5938         * decl.c (finish_function): Not here.
5939         (start_function): Do set DECL_INITIAL.
5940
5941         * pt.c (push_template_decl_real): Complain about default template
5942         args for enclosing classes.
5943
5944         * call.c (add_function_candidate): Treat conversion functions
5945         as coming from the argument's class.
5946         * cp-tree.h (DECL_CONV_FN_P): New fn.
5947         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
5948         * class.c (add_method): Use DECL_CONV_FN_P.
5949         * decl2.c (check_classfn): Likewise.
5950         * error.c (dump_function_name): Likewise.
5951         (dump_function_decl): Likewise.
5952         * pt.c (fn_type_unification): Likewise.
5953         * search.c (add_conversions): Likewise.
5954
5955 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
5956
5957         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
5958         * method.c (hack_identifier): Also check for using RESULT_DECL
5959         from outer context.
5960
5961 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
5962
5963         * decl.c (grokdeclarator): Use type_quals, rather than constp,
5964         consistently.
5965
5966 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
5967
5968         * call.c (standard_conversion): instantiate_type here.
5969         (reference_binding): And here.
5970         (implicit_conversion): Not here.
5971         (build_op_delete_call): No need to cons up an OVERLOAD.
5972         * cvt.c (cp_convert_to_pointer): instantiate_type here.
5973         (convert_to_reference): And here.
5974         * decl.c (grok_reference_init): Not here.
5975         (grokparms): Or here.
5976         * typeck2.c (digest_init): Or here.
5977         * typeck.c (decay_conversion): Take the address of overloaded
5978         functions, too.
5979         (require_instantiated_type): Lose.
5980         (convert_arguments): Don't handle unknown types here.
5981         (build_c_cast): Likewise.
5982         (build_binary_op): Gut.
5983         (build_conditional_expr): Don't require_instantiated_type.
5984         (build_modify_expr): Likewise.
5985         (build_static_cast): Don't instantiate_type.
5986         (build_reinterpret_cast): Likewise.
5987         (build_const_cast): Likewise.
5988         (convert_for_initialization): Likewise.
5989         (build_ptrmemfunc): Use type_unknown_p.
5990         (convert_for_assignment): Also do default_conversion on overloaded
5991         functions.  Hand them off to ocp_convert.
5992
5993 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
5994
5995         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
5996         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
5997
5998         * class.c (finish_struct_1): Use build_cplus_array_type to build
5999         array types.
6000         * decl.c (init_decl_processing): Likewise.
6001         * except.c (expand_end_eh_spec): Likewise.
6002         * search.c (expand_upcast_fixups): Simplify very slightly.
6003
6004 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6005
6006         * decl.c (grokdeclarator): Complain about a variable using
6007         constructor syntax coming back null from start_decl.
6008
6009         * friend.c (make_friend_class): Complain about trying to make
6010         a non-class type a friend.
6011
6012         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6013         (start_function): Not here.
6014
6015 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6016
6017         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6018
6019 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6020
6021         * typeck2.c (process_init_constructor): Only skip anonymous fields
6022         if they are bitfields.
6023
6024         * cp-tree.def (TYPEOF_TYPE): New code.
6025         * error.c (dump_type_real): Handle it.
6026         * pt.c (tsubst): Likewise.
6027         * tree.c (search_tree): Likewise.
6028         * semantics.c (finish_typeof): New fn.
6029         * parse.y (typespec): Use it.
6030         * cp-tree.h: Declare it.
6031
6032 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6033
6034         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6035
6036 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6037
6038         * typeck.c (convert_arguments): Don't handle pmf references
6039         specially.
6040
6041         * init.c (build_member_call): Don't try to convert to the base type
6042         if it's ambiguous or pedantic.
6043
6044         * typeck2.c (check_for_new_type): Only depend on pedantic for
6045         C-style casts.
6046
6047 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6048
6049         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6050         non-converting constructors.
6051
6052 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6053
6054         * gxxint.texi: Correct documentation for n, N, Q, and B.
6055
6056 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6057
6058         * parse.y (condition): Convert VAR_DECL from reference to indirect
6059         reference.
6060
6061 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6062
6063         * exception.cc (__cp_pop_exception): Free the original exception
6064         value, not the potentially coerced one.
6065
6066 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6067
6068         * Makefile.in (hash.h): Run gperf when necessary.
6069
6070         * cp-tree.h (CP_TYPE_READONLY): Remove.
6071         (CP_TYPE_VOLATILE): Likewise.
6072         (CP_TYPE_QUALS): New macro.
6073         (CP_TYPE_CONST_P): Likewise.
6074         (CP_TYPE_VOLATILE_P): Likewise.
6075         (CP_TYPE_RESTRICT_P): Likewise.
6076         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6077         (cp_build_type_variant): Rename to ...
6078         (cp_build_qualified_type): New function.
6079         (c_apply_type_quals_to_decl): Declare.
6080         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6081         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6082         (cp_type_qual_from_rid): New function.
6083         (compparms): Remove unused parameter.  All callers changed.
6084         (cp_type_quals): New function.
6085         (at_least_as_qualified_p): Likewise.
6086         (more_qualified_p): Likewise.
6087
6088         * call.c (standard_conversion): Replace calls to
6089         cp_build_type_variant with cp_build_qualified_type.  Use
6090         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6091         compare them.  Use CP_TYPE_* macros to check qualifiers.
6092         (reference_binding): Likewise.
6093         (implicit_conversion): Likewise.
6094         (add_builtin_candidates): Likewise.
6095         (build_over_call): Likewise.
6096         * class.c (overrides): Compare all qualifiers, not just `const',
6097         on method declarations.
6098         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6099         (convert_pointer_to_real): Likewise.
6100         (type_promotes_to): Likewise.
6101         * decl.c (check_for_uninitialized_const_var): New function.
6102         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6103         (cp_finish_decl): Use check_for_uninitialized_const_var.
6104         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6105         handle `restrict'.
6106         (grok_ctor_properties): Likewise.
6107         (grok_op_properties): Likewise.
6108         (start_function): Likewise.
6109         (rever_static_member_fn): Likewise.
6110         * decl2.c (grok_method_quals): Likewise.
6111         (grokfield): Likewise.
6112         * error.c (dump_readonly_or_volatile): Rename to ...
6113         (dump_qualifiers): New function.  Handle `restrict'.
6114         (dump_type_real): Use it.
6115         (dump_aggr_type): Likewise.
6116         (dump_type_prefix): Likewise.
6117         (dump_type_suffix): Likewise.
6118         (dump_function_decl): Likewise.
6119         (cv_as_string): Likewise.
6120         * gxx.gperf: Add __restrict and __restrict__.
6121         * gxxint.texi: Document `u' as used for `__restrict', and a few
6122         other previously undocumented codes.
6123         * hash.h: Regenerated.
6124         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6125         (build_member_call): Likewise.
6126         (build_new_1): Likewise.
6127         * lex.c (init_parse): Add entry for RID_RESTRICT.
6128         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6129         (cp_type_qual_from_rid): Define.
6130         * lex.h (enum rid): Add RID_RESTRICT.
6131         * method.c (process_modifiers): Deal with `restrict'.
6132         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6133         * parse.c: Regenerated.
6134         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6135         (tsubst_aggr_type): Likewise.
6136         (tsubst): Likewise.
6137         (check_cv_quals_for_unify): Likewise.
6138         (unify): Likewise.
6139         * rtti.c (init_rtti_processing): Likewise.
6140         (build_headof): Likewise.
6141         (get_tinfo_var): Likewise.
6142         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6143         (expand_class_desc): Likewise.
6144         (expand_attr_desc): Likewise.
6145         (synthesize_tinfo_fn): Likewise.
6146         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6147         (get_matching_virtual): Likewise.
6148         (expand_upcast_fixups): Likewise.
6149         * sig.c (build_signature_pointer_or_reference_name): Take
6150         type_quals, not constp and volatilep.
6151         (build_signature_pointer_or_reference_type): Likewise.
6152         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6153         (build_signature_pointer_constructor): Likewise.
6154         (build_signature_method_call): Likewise.
6155         * tree.c (build_cplus_array_type): Likewise.
6156         (cp_build_type_variant): Rename to ...
6157         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6158         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6159         (build_exception_variant): Likewise.
6160         (mapcar): Likewise.
6161         * typeck.c (qualif_type): Likewise.
6162         (common_type): Likewise.
6163         (comptypes): Likewise.
6164         (comp_cv_target_types): Likewise.
6165         (at_least_as_qualified_p): Define.
6166         (more_qualified_p): Likewise.
6167         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6168         (compparms): Likewise.
6169         (inline_conversion): Likewise.
6170         (string_conv_p): Likewise.
6171         (build_component_ref): Likewise.
6172         (build_indirect_ref): Likewise.
6173         (build_array_ref): Likewise.
6174         (build_unary_op): Likewise.
6175         (build_conditional_expr): Likewise.
6176         (build_static_cast): Likewise.
6177         (build_c_cast): Likewise.
6178         (build_modify_expr): Likewise.
6179         (convert_For_assignment): Likewise.
6180         (comp_ptr_ttypes_real): Likewise.
6181         (cp_type_quals): New function.
6182
6183 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6184
6185         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6186         (CP_TYPE_VOLATILE): Likewise.
6187         * decl.c (grokdeclarator): Use them.
6188         * tree.c (canonical_type_variant): Likewise.
6189
6190 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6191
6192         * parse.y (named_class_head): Push into class while parsing the
6193         base class list.
6194         * decl2.c (push_scope, pop_scope): New functions.
6195         * cp-tree.h: Declare them.
6196         * init.c (build_new_1): Delay cleanup until end of full expression.
6197
6198 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6199
6200         * typeck.c (build_component_ref): Use of a type here is an error.
6201
6202 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6203
6204         Revamp references to member functions.
6205         * method.c (hack_identifier): Call build_component_ref for a
6206         reference to a member function.
6207         * typeck.c (build_component_ref): Only return a single function
6208         if it's static.  Otherwise, return a COMPONENT_REF.
6209         (build_x_function_call): Handle a COMPONENT_REF.
6210         (build_unary_op): Handle all unknown-type things.
6211         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6212         * class.c (instantiate_type): Complain if the function we get is a
6213         nonstatic member function.  Remove code for finding "compatible"
6214         functions.
6215         * pt.c (tsubst_copy): Handle NOP_EXPR.
6216         * tree.c (build_dummy_object): New fn.
6217         (maybe_dummy_object): New fn.
6218         (is_dummy_object): New fn.
6219         * cp-tree.h: Declare them.
6220         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6221         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6222         * init.c (build_member_call): Use maybe_dummy_object and
6223         is_dummy_object.
6224         (build_offset_ref): Use maybe_dummy_object.
6225         (resolve_offset_ref): Use is_dummy_object.
6226         * typeck.c (build_x_function_call): Call build_dummy_object.
6227         (unary_complex_lvalue): Call is_dummy_object.
6228
6229         * typeck.c (build_component_addr): Make sure field is a field.
6230
6231         * call.c (build_new_op): Delete obsolete code.
6232
6233         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6234
6235 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6236
6237         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6238         std if std is ignored.
6239
6240 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6241
6242         * decl.c (grokvardecl): Fix thinko.
6243
6244         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6245         not the left.
6246
6247         * parse.y (fn.def2): Fix 'attrs' format.
6248
6249 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6250
6251         * Makefile.in (CONFLICTS): Update.
6252         * parse.y (expr_or_declarator_intern): New rule.
6253         (expr_or_declarator, direct_notype_declarator, primary,
6254         functional_cast): Use it.
6255         (notype_declarator_intern): New rule.
6256         (notype_declarator, complex_notype_declarator): Use it.
6257
6258 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6259
6260         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6261         (grokvardecl): Likewise.
6262
6263 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6264
6265         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6266         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6267
6268         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6269
6270         * pt.c (process_partial_specialization): Cast 1st argument of
6271         `bzero' to (PTR).
6272
6273         * tree.c (build_base_fields): Cast `base_align' to (int) when
6274         comparing against one.
6275
6276 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6277
6278         * decl.c (lookup_name_real): Handle template parameters for member
6279         templates where said parameters have the same name as the
6280         surrounding class.
6281
6282         * decl.c (expand_static_init): Build cleanups before entering the
6283         anonymous function used to do them to avoid access-checking
6284         confusion.
6285
6286         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6287         accidentally removed by previous change, and make DECL_RTL here.
6288         * class.c (add_method): Don't make DECL_RTL here.
6289
6290         * pt.c (for_each_template_parm): Don't examine uninstantiated
6291         default arguments.
6292
6293 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6294
6295         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6296
6297 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6298
6299         * class.c (add_method): Fix documentation to reflect previous
6300         changes.  Check for duplicate method declarations here.
6301         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6302         correctly; such things never match.
6303         (grokfndecl): Don't look for duplicate methods here.
6304         * decl2.c (check_classfn): Don't assume names are mangled.
6305         Don't add bogus member function declarations to a class before the
6306         class type is complete.
6307         (grokfield): Reformat error message.
6308         * method.c (set_mangled_name_for_decl): Don't mangle names while
6309         processing_template_decl.
6310
6311 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
6312
6313         * typeck.c (build_indirect_ref): Complain about a pointer to data
6314         member, too.
6315         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6316         data member.
6317         * init.c (resolve_offset_ref): Don't undo the above.
6318
6319         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6320         (struct lang_decl_flags): Add `bitfield'.
6321         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6322         DECL_BIT_FIELD.
6323         * decl2.c (grokbitfield, grok_alignof): Likewise.
6324         * init.c (build_offset_ref): Likewise.
6325         * typeck.c (build_component_addr, expr_sizeof): Likewise.
6326         * cvt.c (build_up_reference): Don't crash if taking the address
6327         returns error_mark_node.
6328
6329         * decl.c (grokfndecl): Also check ctype when checking for ::main().
6330
6331 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
6332
6333         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6334         Do mangling here.
6335         (grokdeclarator): Instead of here.
6336         * friend.c (do_friend): Lose special handling of ::main and
6337         __builtin_*.
6338         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6339
6340         * spew.c (yylex): Clear looking_for_typename if we got
6341         'enum { ... };'.
6342
6343 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
6344
6345         * class.c (maybe_warn_about_overly_private_class): Improve error
6346         messages for class with only private constructors.
6347
6348         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6349         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6350         (build_typename_type): New function.
6351         * decl.c (build_typename_type): Broken out from ...
6352         (make_typename_type): Use it.
6353         * search.c (lookup_field): Likewise.
6354
6355 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6356
6357         * pt.c (convert_nontype_argument): Check against type_referred_to.
6358         * decl.c (grokvardecl): Check for declarator name before building
6359         DECL_ASSEMBLER_NAME.
6360
6361 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
6362
6363         * pt.c (lookup_template_class): Add comment.
6364         (instantiate_class_template): Don't mark the _TYPE node for
6365         member class templates as an instantiation.
6366
6367 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
6368
6369         * decl.c (grokfndecl): Fix my thinko.
6370
6371 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
6372
6373         * tinfo2.cc (fast_compare): Remove.
6374         (before): Just use strcmp.
6375         * tinfo.cc (operator==): Just use strcmp.
6376
6377 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6378
6379         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6380         declarations.
6381
6382 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
6383
6384         * cp-tree.h (specializations_of_same_template_p): Remove.
6385         * search.c (get_template_base): Don't use it.
6386         (get_template_base_recursive): Likewise.
6387         * pt.c (specializations_of_same_template_p): Remove.
6388         (unify): Don't use it.
6389         (lookup_template_class): Find the correct parent when setting
6390         CLASSTYPE_TI_TEMPLATE.
6391
6392 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6393
6394         * tinfo.cc (operator==): Always compare names.
6395
6396 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
6397
6398         * decl.c (start_function): Fix cut-and-paste error.
6399
6400 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
6401
6402         * inc/typeinfo: Add #pragma interface.
6403         (operator!=): Just call operator==.
6404         * tinfo.cc: Add #pragma implementation.
6405         (operator==): Move from inc/typeinfo and tinfo2.cc.
6406         Check __COMMON_UNRELIABLE instead of _WIN32.
6407
6408         * typeck2.c (my_friendly_abort): Add URL.
6409
6410 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6411
6412         * decl.c (start_method): Added extra parameter for attributes.
6413         * cp-tree.h (start_method): Update prototype.
6414         * parse.y (fn.def2): Update start_method parameter list.
6415
6416 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
6417
6418         * cp-tree.h (specializations_of_same_template_p): Declare.
6419         * pt.c (specializations_of_same_template_p): New function.
6420         (unify): Use it.
6421         * search.c (get_template_base): Use it.
6422         (get_template_base_recursive): Likewise.
6423
6424 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
6425
6426         * decl2.c (start_objects): Add new variable `joiner' and
6427         initialize it properly.
6428
6429 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
6430
6431         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6432         change to vtable types.
6433
6434         * cvt.c (ocp_convert): Avoid infinite recursion caused by
6435         1998-10-03 change.
6436
6437 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
6438
6439         * pt.c (resolve_overloaded_unification): New fn.
6440         (try_one_overload): Likewise.
6441         (unify): Don't fail on unknown type.
6442         (type_unification_real): Likewise.  Use resolve_overloaded_unification
6443         to handle an overloaded argument.
6444         (template_args_equal): Split out...
6445         (comp_template_args): From here.
6446         (determine_specialization): Also allow a template with more
6447         parms than were explicitly specified.
6448         * cp-tree.h: Add template_args_equal.
6449         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6450
6451 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
6452
6453         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6454         change.
6455
6456 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
6457
6458         * typeck.c (unsigned_type): Only return TItype nodes when
6459         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6460         (signed_type): Likewise.
6461         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6462         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6463         (init_decl_processing): Only create TItype nodes when
6464         HOST_BITS_PER_WIDE_INT is >= 64 bits.
6465         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6466         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6467
6468 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6469
6470         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6471         (gxx.gperf): Update comments describing invocation flags.
6472         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6473
6474 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
6475
6476         * class.c (finish_struct_1): Add commentary on previous change.
6477
6478         * cp-tree.h (vtbl_ptr_type_node): New variable.
6479         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6480         already of the right type.
6481         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6482         Simplify code to grow vtable.
6483         * decl.c (vtbl_ptr_type_node): Define.
6484         (init_decl_processing): Initialize it.
6485
6486 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
6487
6488         * cp-tree.def (PTRMEM_CST): New tree node.
6489         * cp-tree.h (ptrmem_cst): New type.
6490         (lang_type): Remove local_typedecls.
6491         (dummy): Increase to 12 bits from 11.
6492         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6493         (PTRMEM_CST_CLASS): New macro.
6494         (PTRMEM_CST_MEMBER): Likewise.
6495         (current_access_specifier): New variable.
6496         (current_class_type): Remove duplicate declaration.
6497         (finish_struct): Change prototype.
6498         (unreverse_member_declarations): New function.
6499         (pushdecl_class_level): Change prototype.
6500         (grok_enum_decls): Remove.
6501         (fixup_anonymous_union): New function.
6502         (grok_x_components): Change prototype.
6503         (tsubst_chain): Remove.
6504         (finish_member_template_decl): Likewise.
6505         (check_explicit_specialization): Fix indentation.
6506         (finish_class_definition): Change prototype.
6507         (finish_member_class_template): Likewise.
6508         (finish_member_declaration): New function.
6509         (check_multiple_declarators): Likewise.
6510         * class.c (class_stack_node_t): New type.
6511         (current_class_base): Remove.
6512         (current_class_stack): Change type.
6513         (current_access_specifier): New variable.
6514         (grow_method): Remove.
6515         (check_member_decl_is_same_in_complete_scope): Break out from
6516         finish_struct.
6517         (make_method_vec): New function.
6518         (free_method_vec): Likewise.
6519         (add_implicitly_declared_members): Break out from finish_struct_1.
6520         (free_method_vecs): New variable.
6521         (add_method): Rework for direct use from parser.
6522         (handle_using_decl): Watch for NULL_TREE while iterating through
6523         CLASSTYPE_METHOD_VEC.
6524         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6525         just do some error-checking.
6526         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6527         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
6528         (finish_struct): Change prototype.  Simplify; fields and methods
6529         are already set up at this point.
6530         (init_class_processing): Set up current_class_stack.
6531         (pushclass): Save current_access_specifier.
6532         (popclass): Restore it.
6533         (currently_open_class): Simplify.
6534         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6535         * decl.c (saved_scope): Add access_specifier.
6536         (maybe_push_to_top_level): Save it.
6537         (pop_from_top_level): Restore it.
6538         (maybe_process_template_type_declaration): Use
6539         finish_member_declaration.
6540         (pushtag): Likewise.
6541         (pushdecl_class_level): Don't return a value.
6542         (fixup_anonymous_union): Break out from grok_x_components.
6543         (shadow_tag): Use it.
6544         (xref_tag): Complain about using an elaborated type specifier to
6545         reference a template type parameter or typedef name.
6546         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6547         (current_local_enum): Remove.
6548         (build_enumerator): Call finish_member_declaration.
6549         (grok_enum_decls): Remove.
6550         * decl2.c (grok_x_components): Simplify.
6551         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6552         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6553         (merge_functions): Add to comment.
6554         (arg_assoc_type): Prototype.
6555         (arg_assoc): Pass as many arguments as there are parameters.
6556         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
6557         OFFSET_REF.
6558         * expr.c (cpls_expand_expr): Remove dead code.  Handle
6559         PTRMEM_CST.
6560         * friend.c (do_friend): Lookup friends when in nested classes.
6561         Change comments.
6562         * init.c (build_offset_ref): Do lookup even for classes that are
6563         only partially defined.
6564         (decl_constant_value): Remove dead code.
6565         * method.c (build_overload_value): Remove hack where by TYPE was
6566         not a TYPE.  Handle PTRMEM_CST.
6567         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6568         should go.
6569         * parse.y (components, notype_components, component_decl,
6570         component_decl_1, component_declarator, component_declarator0):
6571         Now all are itype rather than ttype.  Rework to add members to
6572         classes on the fly.
6573         (typesqpecqual_reserved): Use check_multiple_declarators.
6574         (structsp): Update class to finish_class_definition.
6575         (do_xref_defn): Unsplit into named_class_head.
6576         (access_specifier): Set current_access_specifier.
6577         * pt.c (set_current_access_from_decl): New function.
6578         (finish_member_template_decl): Don't take the parameters.
6579         (comp_template_args): Make more robust.
6580         (lookup_template_class): Don't use current_local_enum.
6581         (for_each_template_parm): Handle PTRMEM_CST.
6582         (instantiate_class_template): Use set_current_access_from_decl,
6583         finish_member_declaration and unreverse_member_declarations.  Set
6584         lineno/input_filename before generating implicit member functions.
6585         (type_unification_real): Don't assume back-unification happens
6586         only for the last argument.
6587         (regenerate_decl_from_template): Call pushclass a bit earlier.
6588         (tsubst_chain): Remove.
6589         (tsubst_enum): Use set_current_access_from_decl.
6590         (set_mangled_name_for_template_decl): Fix indentation.
6591         * search.c (lookup_fnfields_1): Change iteration through
6592         CLASSTYPE_METHOD_VEC.
6593         (dfs_pushdecls): Likewise.
6594         (dfs_compress_decls): Likewise.
6595         (add_conversions): Likewise.
6596         * semantics.c (finish_class_definition): Don't take components.
6597         Change call to finish_struct.
6598         (finish_member_declaration): New function.
6599         (finish_member_class_template): Don't take template parameters.
6600         Change call to grok_x_components.  Call finish_member_template_decl.
6601         (check_multiple_declarators): New function.
6602         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6603         a passed in fieldlist.
6604         * tree.c (search_tree): Handle PTRMEM_CST.
6605         (mapcar): Likewise.
6606         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6607         INTEGER_CSTs, for pointer-to-data members.
6608
6609         * call.c (resolve_args): Resolve template specializations, if
6610         possible.
6611
6612 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6613
6614         * Makefile.in (spew.o): Depend on toplev.h.
6615
6616         * call.c (compare_ics): Initialize variables `deref_from_type2',
6617         `deref_to_type1' and `deref_to_type2'.
6618
6619         * except.c (get_eh_type): Hide prototype and definition.
6620         (process_start_catch_block_old): Remove unused static prototype.
6621
6622         * pt.c (tsubst_decl): Initialize variable `argvec'.
6623
6624         * spew.c: Include toplev.h.
6625
6626 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
6627
6628         * pt.c (instantiate_decl): Do save and restore file position.
6629
6630 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6631
6632         * method.c (build_decl_overload_real): Clear
6633         numeric_output_need_bar after __.
6634
6635 1998-10-05  Nathan Sidwell  <nathan@acm.org>
6636
6637         * call.c (build_new_method_call): Issue 'incomplete type' error,
6638         if class is not defined.
6639
6640 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6641
6642         * call.c (build_object_call): Move declaration of variable
6643         `fn' into the scope where it is used.  Don't access variable
6644         `fn' when it is uninitialized, instead use `fns'.
6645
6646 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6647
6648         * errfn.c (cp_thing): Print buf as a string not as a printf format
6649         to avoid problems with the operator%.  Consequently, `%%' sequences
6650         in format are copied as `%' in buf.
6651
6652 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
6653
6654         * pt.c (pop_tinst_level): Call extract_interface_info.
6655         (instantiate_decl): Don't save and restore file position.
6656
6657         * decl.c (cp_finish_decl): Make statics in extern inlines and
6658         templates common, if possible and the target doesn't support weak
6659         symbols.
6660
6661         * decl.c (grokdeclarator): Remove redundant calls to
6662         build_type_variant and some duplicated code.
6663         * sig.c (build_signature_reference_type): Only take the type parm.
6664         (build_signature_pointer_type): Likewise.
6665         * tree.c (build_cplus_method_type): Adjust.
6666         * cp-tree.h: Update.
6667
6668 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
6669
6670         * call.c (build_over_call): Make pedwarns about dropped qualifiers
6671         into full-fledged errors.
6672         * cvt.c (convert_to_reference): Likewise.
6673         * typeck.c (convert_for_assignment): Likewise.
6674
6675         * search.c (expand_upcast_vtables): In addition to unsetting
6676         TREE_READONLY, remove top-level const type qualifier.
6677
6678 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
6679
6680         * class.c (current_class_ptr, current_class_ref): Clarify
6681         documentation.
6682         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6683         NOP type conversions.
6684         * decl.c (decls_match): Use comptypes directly; ignore
6685         qualifiers on the DECL.
6686         (duplicate_decls): Remove qualifier checks on DECL.
6687         (grokdeclarator): Make the type built up include top-level
6688         qualifiers.
6689         * decl2.c (do_dtors): Fix spelling error.
6690         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6691         when printing type information.
6692         * init.c (build_new_1): Add documentation.  Deal with the fact
6693         that type of allocated memory now contains qualifiers.
6694         * lex.c (is_global): Improve error-recovery.
6695         * sig.c (build_member_function_pointer): Don't cast away const
6696         on fields of sigtable_entry_type.
6697         * tree.c (lvalue_type): Don't look at top-level qualifiers on
6698         expressions.
6699         * typeck.c (decay_conversion): Likewise.
6700         (build_component_ref): Make sure the type of the COMPONENT_REF
6701         contains top-level qualifiers, as appropriate.  Improve
6702         error-handling.
6703         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
6704         (build_array_ref): Likewise.
6705         (build_unary_op): Improve error-recovery.
6706         (unary_complex_lvalue): Make taking the address a bound member
6707         function an error, not a sorry.
6708         (build_conditional_expr): Look at the type qualifiers, not the
6709         qualifiers on the expression itself.
6710
6711 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
6712
6713         * decl2.c (merge_functions): Remove duplicates.
6714
6715         * decl2.c: Add -f{no-,}implicit-inline-templates.
6716         (import_export_decl): Check it.
6717
6718         * decl.c (lookup_name_real): Template parms also take precedence
6719         over implicit typename.  Only warn if yylex.
6720
6721         * typeck.c (build_conditional_expr): Only fold if ifexp is an
6722         INTEGER_CST.
6723
6724         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6725         instead of linkage.
6726
6727 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
6728
6729         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6730         * class.c (build_vbase_pointer): Use it.
6731         * rtti.c (expand_class_desc): Likewise.
6732         * tree.c (build_vbase_pointer_fields): Likewise.
6733
6734 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
6735
6736         * decl.c (start_decl): Add invocation of
6737         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6738         (start_function): Add invocation of
6739         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6740
6741         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6742         HANDLE_GENERIC_PRAGMAS.
6743
6744 1998-09-28  Anthony Green  <green@cygnus.com>
6745
6746         * semantics.c (finish_asm_stmt): Always permit volatile asms.
6747
6748 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
6749
6750         * decl.c (grokdeclarator): Tighten checks for invalid
6751         destructors.  Improve error-messages and error-recovery.
6752         * decl2.c (check_classfn): Don't assume that mangled destructor
6753         names contain type information.
6754
6755 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
6756
6757         * search.c (get_base_distance): Remove assert.
6758
6759         * decl2.c (build_anon_union_vars): Don't process a field with no
6760         name.
6761         (finish_anon_union): Also complain about local anon unions with no
6762         members.
6763
6764 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6765
6766         * decl.c (lookup_namespace_name): If the name is a namespace,
6767         return it immediately.
6768
6769 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6770
6771         * cp-tree.h (define_case_label): Remove unused parameter.
6772         (check_java_method): Likewise.
6773         (grokclassfn): Likewise.
6774         (expand_aggr_init): Likewise.
6775         (build_x_delete): Likewise.
6776         (maybe_end_member_template_processing): Likewise.
6777         (unshare_base_binfos): Add prototype.
6778         (string_conv_p): Likewise.
6779         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6780
6781         * cvt.c (build_up_reference): Remove unused parameter
6782         `checkconst', all callers changed.
6783         (build_type_conversion): Mark parameter `code' with
6784         ATTRIBUTE_UNUSED.
6785         (build_expr_type_conversion): Initialize variable `conv'.
6786
6787         * decl.c (push_namespace): Initialize variable `d'.
6788         (define_case_label): Remove unused parameter `decl', all callers
6789         changed.
6790
6791         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6792         `argc' with ATTRIBUTE_UNUSED.
6793         (grokclassfn): Remove unused parameter `cname', all callers
6794         changed.
6795         (check_java_method): Likewise for parameter `ctype'.
6796         (copy_assignment_arg_p): Mark parameter `virtualp' with
6797         ATTRIBUTE_UNUSED.
6798         (finish_prevtable_vardecl): Likewise for parameter `prev'.
6799
6800         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6801
6802         * init.c (expand_aggr_init_1): Remove unused parameter
6803         `alias_this', all callers changed.
6804         (expand_aggr_init): Likewise.
6805         (expand_default_init): Likewise.
6806         (build_new_1): Initialize variable `susp'.
6807         (build_x_delete): Remove unused parameter `type', all callers
6808         changed.
6809
6810         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6811         ATTRIBUTE_UNUSED.
6812         (readescape): Use (unsigned) value in shift.
6813         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
6814         comparing to a signed quantity.
6815
6816         * pt.c (maybe_end_member_template_processing): Remove unused
6817         parameter `decl', all callers changed.
6818         (check_explicit_specialization): Add braces around empty body in
6819         an else-statement.
6820         (current_template_args): Initialize variable `args'.
6821         (lookup_template_class): Likewise for variable `prev_local_enum'.
6822         (tsubst_decl): Likewise for variable `r'.
6823         (set_mangled_name_for_template_decl): Initialize variable
6824         `context'.
6825
6826         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6827         Likewise for variable `i'.
6828         (yylex): Initialize variable `trrr'.
6829
6830         * typeck.c (compparms): Mark variable `strict' with
6831         ATTRIBUTE_UNUSED.
6832
6833         * xref.c (simplify_type): Cast argument of ctype function to
6834         `unsigned char'.
6835
6836 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
6837
6838         * cp-tree.h (language_lvalue_valid): Remove.
6839         * decl.c (grokdeclarator): Don't disallow references to functions.
6840         * tree.c (lvalue_p_1): New function, combining duplicated
6841         code from ...
6842         (lvalue_p): Use it.
6843         (real_lvalue_p): Likewise.
6844         * typeck.c (language_lvalue_valid): Remove.
6845         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6846         they don't have TREE_READONLY set.
6847         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6848
6849 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6850
6851         * spew.c (yylex): Give diagnostic.
6852         * hash.h (is_reserved_word): Add export.
6853         * gxx.gperf: Likewise.
6854         * lex.h (rid): Add RID_EXPORT.
6855         * lex.c (init_parse): Likewise.
6856
6857 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6858
6859         * friend.c (do_friend): Make warning a full sentence.
6860
6861 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6862
6863         * parse.y (component_decl_list): Improve error-recovery.
6864
6865 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6866
6867         * decl.c (make_typename_type): Move error to point where name
6868         variable can be used by dump_type.
6869
6870 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
6871
6872         * decl.c (grokfndecl): Improve error-recovery.
6873         * decl2.c (grokfield): Likewise.
6874         * pt.c (finish_member_template_decl): Likewise.
6875
6876 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6877
6878         * method.c (hack_identifier): Finding multiple members is always
6879         an error.
6880
6881 1998-09-21  Per Bothner  <bothner@cygnus.com>
6882
6883         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
6884
6885 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
6886
6887         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6888
6889 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
6890
6891         * class.c (maybe_warn_about_overly_private_class): Reformat.
6892
6893 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
6894
6895         * exception.cc (__cplus_type_matcher): Realign some code.
6896
6897 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
6898
6899         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6900         (tinfo2.o): Likewise.
6901         (exception.o): Likewise.
6902         (new.o): Likewise.
6903         (opnew.o): Likewise.
6904         (opnewnt.o): Likewise.
6905         (opvnew.o): Likewise.
6906         (opvnewnt.o): Likewise.
6907         (opdel.o): Likewise.
6908         (opdelnt.o): Likewise.
6909         (opvdel.o): Likewise.
6910         (opvdelnt.o): Likewise.
6911
6912 1998-09-16  Richard Henderson  <rth@cygnus.com>
6913
6914         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6915
6916 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
6917
6918         * call.c (build_field_call): Handle static data members too.
6919
6920         * typeck.c (comptypes): When comparing pointer types, check
6921         whether referred types match even in strictest modes.
6922
6923 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
6924
6925         * cp-tree.h: Revert previous change.
6926         (finish_struct_methods): Remove declaration.
6927         * class.c: Revert previous change.
6928         (maybe_warn_about_overly_private_class): New function.
6929         (finish_struct_methods): Declare here, and make static.  Remove
6930         unnecessary parameters.  Tidy slightly.  Use
6931         maybe_warn_about_overly_private_class.
6932         (finish_struct_1): Adjust.  Remove check for private constructors,
6933         now done elsewhere.
6934         (finish_struct): Adjust.
6935
6936 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
6937
6938         * except.c (expand_start_catch_block): No need to check for new
6939         exception model.
6940         (process_start_catch_block_old): Deleted.
6941         (process_start_catch_block): Add call to start_decl_1().
6942         (expand_end_catch_block): Add call to end_catch_handler().
6943         * exception.cc (__cplus_type_matcher): Only check the exception
6944         language if there is an exception table.
6945
6946 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
6947
6948         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
6949         as used to prevent conflicts with virtual function tables.
6950
6951 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
6952
6953         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
6954         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
6955         * class.c (maybe_class_too_private_p): New function.
6956         (finish_struct_methods): Use it.
6957         (finish_struct_1): Likewise.
6958         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
6959         appropriate.
6960
6961         * pt.c (check_specialization_scope): Fix spelling error.
6962         (check_explicit_specialization): Remove code to handle explicit
6963         specializations in class scope; they are now correctly diagnosed
6964         as errors.
6965
6966 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
6967
6968         * decl.c (pushdecl): Don't copy types if the
6969         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
6970         type.
6971
6972 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6973
6974         * class.c (get_enclosing_class): New function.
6975         (is_base_of_enclosing_class): Likewise.
6976         * cp-tree.h (get_enclosing_class): Declare.
6977         (is_base_of_enclosing_class): Likewise.
6978         * pt.c (coerce_template_parms): Use them.
6979
6980 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
6981
6982         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
6983         null to decide whether to use it.
6984
6985         * error.c (dump_type_real): Handle NAMESPACE_DECL.
6986         * parse.y (base_class.1): Avoid crash on error.
6987
6988 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6989
6990         * decl.c (make_typename_type): If context is a namespace, the code
6991         is in error.
6992
6993 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
6994
6995         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
6996
6997 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
6998
6999         * cp-tree.h (anonymous_namespace_name): Declare.
7000         * decl.c: Define it.
7001         (push_namespace): Use anonymous_namespace_name, rather than local
7002         static anon_name.
7003         * error.c (dump_decl): If a namespace is named
7004         anonymous_namespace_name, call it {anonymous}.
7005
7006         * decl.c (grokparms): Distinguish between references and pointers
7007         in error message.
7008
7009 1998-09-08  Richard Henderson  <rth@cygnus.com>
7010             Mark Mitchell  <mark@markmitchell.com>
7011
7012         * pt.c (process_partial_specialization): Consistently allocate
7013         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7014         tpd.parms, where appropriate.
7015
7016 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7017
7018         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7019         reorganizations.
7020
7021 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7022
7023         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7024         * class.c (finish_struct): Remove hackery to deal with explicit
7025         specializations in class scope.
7026         * decl.c (grokfndecl): Improve error-recovery.
7027         * decl2.c (grokfield): Likewise.
7028         * pt.c (check_specialization_scope): New function.
7029         (begin_specialization): Call it.
7030         (process_partial_specialization): New function, split out from
7031         push_template_decl.  Check partial specializations more
7032         stringently.
7033         (push_template_decl): Call it.
7034         (check_explicit_specialization): Don't attempt to handle explicit
7035         specializations in class scope.
7036         (template_parm_data): Document.  Add current_arg and
7037         arg_uses_template_parms.
7038         (mark_template_parm): Set it.
7039         (tsubst_arg_types): Remove unused variable.
7040         * semantics.c (begin_class_definition): Tweak.
7041
7042 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7043
7044         * inc/typeinfo (type_info::type_info(const char*)): Make
7045         `explicit'.
7046
7047         * cp-tree.h (hash_tree_cons_simple): New macro.
7048         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7049         (coerce_template_parms): Use make_temp_vec, instead of
7050         make_tree_vec.  Document this behavior.
7051         (lookup_template_class): Likewise.
7052         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7053         Remove dead code (and add assertion to check its deadness).  Fix
7054         bug w.r.t. exception specifications.
7055
7056 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7057
7058         * decl2.c (import_export_vtable): Always make artificials comdat.
7059         (import_export_decl): Likewise.
7060         * pt.c (mark_decl_instantiated): Likewise.
7061
7062 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7063
7064         * cp-tree.h (finish_globally_qualified_member_call_expr):
7065         Rename to ...
7066         (finish_qualified_call_expr).
7067         * semantics.c: Likewise.
7068         * parse.y (primary): Use it.
7069         * method.c (hack_identifier): Remove redundant code.
7070
7071         * init.c (resolve_offset_ref): Call convert_from_reference to
7072         handle members of reference type.  Improve error recovery.
7073
7074 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7075
7076         * cp-tree.h: Declare warn_nontemplate_friend.
7077         * decl2.c (lang_decode_option): Set.
7078         * lang-options.h: Add -Wnon-template-friend.
7079         * friend.c (do_friend): Use to toggle non-template function warning.
7080
7081 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7082
7083         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7084         corresponding INTEGER_CSTs when processing_template_decl.
7085         * pt.c (tsubst_enum): Tweak accordingly.
7086
7087 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7088
7089         * decl.c (pushdecl_class_level): Add warning here.
7090         (pushdecl): Tweak.
7091
7092 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7093
7094         * cvt.c (convert_pointer_to_real): Tidy.
7095         * search.c (get_base_distance_recursive): Simplify.
7096         (get_base_distance): Likewise.
7097
7098         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7099         parms.
7100
7101 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7102
7103         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7104         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7105         if unknown pragmas are encountered.
7106         (handle_sysv_pragma): Interpret return code from
7107         handle_pragma_token ().  Return success/failure indication rather
7108         than next unprocessed character.
7109         (pragma_getc): New function: retrieves characters from the
7110         input stream.  Defined when HANDLE_PRAGMA is defined.
7111         (pragma_ungetc): New function: replaces characters back into the
7112         input stream.  Defined when HANDLE_PRAGMA is defined.
7113
7114 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7115
7116         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7117         * class.c (build_vtable_entry_ref): Likewise.
7118
7119 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7120
7121         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7122         * decl2.c (import_export_decl): Likewise.
7123         * pt.c (instantiate_decl): Use it.
7124
7125 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7126
7127         * decl.c (lookup_name_real): Also do implicit typename thing for
7128         artificial TYPE_DECLs.
7129         * search.c (lookup_field): Likewise.
7130         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7131         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7132         (enter_scope_of): Extract type from implicit typename.
7133         (begin_class_definition): Likewise.
7134         * lex.c (identifier_type): Handle implicit typename when checking
7135         for SELFNAME.
7136
7137         * cp-tree.h: Declare flag_strict_prototype.
7138         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7139         -fstrict-prototype.
7140         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7141         specified, set it to the value of pedantic.
7142
7143 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7144
7145         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7146
7147 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7148
7149         * decl.c (finish_enum): Handle member enums of classes declared in
7150         template functions.
7151
7152         * decl2.c (grok_x_components): Strip attributes before calling
7153         groktypename.
7154
7155 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7156
7157         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7158         -fenum-int-equivalence and -fno-nonnull-objects.
7159         * class.c (check_for_override): Remove support for -fall-virtual.
7160         (finish_struct_1): Likewise.
7161         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7162         * typeck.c (build_binary_op_nodefault): Likewise.
7163         * cvt.c (ocp_convert): Likewise.
7164         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7165         * class.c (build_vbase_path): Likewise.
7166
7167 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7168
7169         * Makefile.in (INTERFACE): New, set to 1.
7170
7171 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7172
7173         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7174         comparing with global_namespace.
7175         (dump_aggr_type): Likewise.
7176
7177         * decl.c (grokfndecl): Issue error on declaration of friend
7178         templates with explicit template arguments.
7179
7180         * pt.c (convert_template_argument): New function, split out
7181         from...
7182         (coerce_template_parms): Here.
7183         (tsubst): Attempt better error-recovery.
7184
7185 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7186
7187         * pt.c (decl_template_parm_p): Add checks for
7188         TEMPLATE_TEMPLATE_PARM.
7189
7190 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7191
7192         * lex.c (do_identifier): Fix thinko in previous change.
7193
7194 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7195
7196         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7197         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7198
7199 1998-08-28  Richard Henderson  <rth@cygnus.com>
7200
7201         Add support for discarding unused virtual functions.
7202         * lang-options.h: Add -fvtable-gc.
7203         * cp-tree.h: Add flag_vtable_gc.
7204         * decl2.c (output_vtable_inherit): New fn.
7205         (finish_vtable_vardecl): Call it.
7206         * class.c (build_vtable_entry_ref): New fn.
7207         (build_vtbl_ref): Call it.
7208
7209 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7210
7211         * cp-tree.h (build_enumerator): Take the enumeration type as a
7212         parameter.
7213         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7214         enumeration constant values if we're processing_template_decls.
7215         Don't set the type for the CONST_DECLs either; that's done in
7216         build_enumerator.
7217         (build_enumerator): Take the enumeration type as a
7218         parameter.
7219         * lex.c (do_identifier): Don't resolve enumeration constants while
7220         processing template declarations, even if they happen to be
7221         TEMPLATE_PARM_INDEXs.
7222
7223         * parse.y (current_enum_type): New variable.
7224         (primary): Don't allow statement-expression in local classes just
7225         as we don't in global classes.
7226         (structsp): Use current_enum_type.
7227         (enum_list): Likewise.
7228         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7229         finish_enum; they no longer occur.
7230
7231         * cp-tree.h (finish_base_specifier): New function.
7232         * parse.y (base_class): Use it.
7233         * semantics.c (finish_base_specifier): Define it.
7234
7235         * parse.y (structsp): Warn on use of typename outside of template
7236         declarations.
7237
7238 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7239
7240         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7241         * lang-options.h: Remove +e options.
7242         * decl2.c (lang_decode_option): Likewise.
7243         (import_export_vtable): Don't check write_virtuals.
7244         (finish_vtable_vardecl, finish_file): Likewise.
7245         * search.c (dfs_debug_mark): Likewise.
7246         * semantics.c (begin_class_definition): Likewise.
7247         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7248
7249         * call.c (build_over_call): Check flag_elide_constructors.
7250         * decl2.c: flag_elide_constructors defaults to 1.
7251         * typeck.c (convert_arguments): Remove return_loc parm.
7252         (build_function_call_real): Adjust.
7253
7254         * search.c: Tear out all mi_matrix and memoize code.
7255         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7256         * lang-options.h: Remove documentation for -fhandle-exceptions,
7257         -fmemoize-lookups and -fsave-memoized.
7258         * cp-tree.h: Lose mi_matrix and memoize support.
7259         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7260         * class.c: Lose struct class_level.
7261         (pushclass, popclass): Lose memoize support.
7262         * init.c (build_offset_ref): Likewise.
7263
7264         Never change BINFO_INHERITANCE_CHAIN.
7265         * init.c (emit_base_init): Change modification of
7266         BINFO_INHERITANCE_CHAIN to an assert.
7267         * search.c (get_base_distance_recursive): Likewise.
7268         (get_base_distance): Likewise.
7269         (lookup_member): Likewise.
7270         (convert_pointer_to_single_level): Likewise.
7271         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7272         (lookup_fnfields): Likewise.
7273         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7274         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7275         (layout_basetypes): Call propagate_binfo_offsets instead of
7276         unshare_base_binfos.
7277         * decl.c (xref_basetypes): Call unshare_base_binfos.
7278         * pt.c (instantiate_class_template): Likewise.
7279         * tree.c (reverse_path): Remove 'copy' parm; always make a
7280         temporary copy.
7281         * class.c (build_vbase_path): Just call it.
7282         * search.c (compute_access): Likewise.  Don't re-reverse.
7283
7284 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7285
7286         * class.c (build_vbase_path): Use reverse_path.
7287         (finish_base_struct): Move warnings for inaccessible bases to
7288         layout_basetypes.
7289         (modify_one_vtable): Remove check of TREE_USED (binfo).
7290         (fixup_vtable_deltas1): Likewise.
7291         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7292         (xref_tag): Remove binfos parameter.
7293         (make_binfo): Remove chain parameter.
7294         (reverse_path): Add copy parameter.
7295         * decl.c (init_decl_processing): Change calls to xref_tag.
7296         (xref_tag): Remove binfos parameter.
7297         (xref_basetypes): Change calls to make_binfo.
7298         * decl2.c (grok_x_components): Change calls to xref_tag.
7299         (handle_class_head): Likewise.
7300         * friend.c (do_friend): Likewise.
7301         * lex.c (make_lang_type): Change calls to make_binfo.
7302         * parse.y (structsp): Change calls to xref_tag.
7303         (named_complex_class_head_sans_basetype): Likewise.
7304         (named_class_head): Likewise.
7305         * rtti.c (init_rtti_processing): Likewise.
7306         * search.c (compute_access): Change calls to reverse_path.
7307         (dfs_get_vbase_types): Change calls to make_binfo.
7308         (get_vbase_types): Remove dead code.
7309         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7310         (layout_basetypes): Warn here about inaccessible bases.
7311         (make_binfo): Remove chain parameter.
7312         (reverse_path): Add copy parameter.
7313
7314 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7315
7316         * class.c: #if 0 complete_type_p.
7317         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7318         * method.c (process_overload_item): Likewise.
7319         * typeck.c (comp_target_types): Likewise.
7320
7321         Stop sharing binfos for indirect virtual bases.
7322         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7323         (layout_basetypes): Likewise.
7324         (unshare_base_binfos): Copy vbases, too.
7325         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7326         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7327         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7328         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7329         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7330         reference to BINFO_VIA_PUBLIC.
7331         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7332         (push_class_decls): Use them.
7333         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7334         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7335
7336 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7337
7338         * decl.c (build_enumerator): Set DECL_CONTEXT for the
7339         CONST_DECLs.
7340
7341 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
7342
7343         * cp-tree.h (finish_enum): Change prototype.
7344         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7345         VALUES parameter.  Don't try to compute mins/maxs if
7346         processing_template_decl.
7347         * parse.y (structsp): Use new calling sequence for finish_enum.
7348         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
7349         (lookup_template_class): Remove unused variables.  Tweak.
7350         Register enums on instantiation list before substituting
7351         enumeration constants.
7352         (tsubst_decl): Remove unused variables.
7353         (regenerate_decl_from_template): Likewise.
7354
7355         * decl.c (duplicate_decls): Don't obliterate the
7356         DECL_TEMPLATE_INFO for a template if we're not replacing it with
7357         anything.
7358
7359         * lex.c (do_identifier): Fix typo in comment.
7360
7361 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7362
7363         * errfn.c: Remove stdarg.h/varargs.h.
7364         * tree.c: Likewise.
7365
7366 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
7367
7368         * pt.c (tsubst_copy): Only do typename overloading on an
7369         IDENTIFIER_NODE that happens to look like a typename if it actually
7370         has a type for us to use.
7371
7372 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7373
7374         * typeck.c (comp_cv_target_types): Split out...
7375         (comp_target_types): From here.  Don't allow cv-qual changes under
7376         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
7377         (build_ptrmemfunc): Pass 1 to nptrs.
7378         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7379
7380 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
7381
7382         * search.c (dependent_base_p): Don't compare a binfo to
7383         current_class_type; use the TREE_TYPE of the binfo instead.
7384
7385         * cp-tree.h (CLASS_TYPE_P): Revise definition.
7386
7387 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
7388
7389         * decl.c (duplicate_decls): Don't complain about different
7390         exceptions from an internal decl even if pedantic.
7391
7392         * typeck.c (convert_for_assignment): Converting from pm of vbase
7393         to derived is an error, not a sorry.
7394
7395         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7396         * class.c (fixed_type_or_null): Rename from
7397         resolves_to_fixed_type_p.  Return the dynamic type of the
7398         expression, if fixed, or null.
7399         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
7400         does not match the static type.
7401         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
7402         resolves_to_fixed_type_p again.
7403
7404 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7405
7406         * pt.c (tsubst_decl): Move special case code for dealing with
7407         tricky friend templates here from ...
7408         (regenerate_decl_from_template): Here.
7409
7410 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7411
7412         * decl.c (start_decl): Remove redundant linkage check.
7413
7414 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
7415
7416         * typeck.c (c_expand_return): Handle the case that valtype
7417         is wider than the functions return type.
7418
7419 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7420
7421         * cp-tree.h (CLASS_TYPE_P): New macro.
7422         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7423         * pt.c (process_template_parm): Undo previous change.
7424
7425 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
7426
7427         * cp-tree.h: Declare.
7428         * pt.c (decl_template_parm_p): New function.
7429         * decl.c (pushdecl): Check decls for redeclaring template parms.
7430         (xref_tag): Make redeclaration an error, print decl.
7431         * decl2.c (grokfield): Check field_decls for redeclaration as well.
7432
7433 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7434
7435         * parse.y (primary): Fix up the type of string constants.
7436
7437 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
7438
7439         * typeck.c (convert_for_initialization): Move check for odd uses
7440         of NULL to avoid duplicate warnings.
7441
7442 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
7443
7444         * tree.c (lvalue_type): Fix for arrays.
7445         * typeck.c (string_conv_p): New fn.
7446         (convert_for_assignment): Use it.
7447         (build_unary_op): Use lvalue_type.
7448         * call.c (standard_conversion, convert_like): Use string_conv_p.
7449         (add_function_candidate): Use lvalue_type.
7450         * cvt.c (convert_to_reference): Likewise.
7451         * decl2.c (lang_decode_option): Ignore -traditional.
7452         * decl.c (init_decl_processing): flag_writable_strings inhibits
7453         flag_const_strings.
7454
7455 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
7456
7457         * lang-options.h (lang_options): Add fconst-strings to the list
7458         of valid options.
7459         * decl2.c (lang_f_options, lang_decode_option): Likewise.
7460
7461 1998-08-24  Nathan Sidwell  <nathan@acm.org>
7462
7463         * lex.c (real_yylex): Don't warn about long long constants if
7464         we're allowing long long.
7465
7466 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7467
7468         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7469         accessing bindings directly.
7470
7471         * search.c (my_tree_cons): Reimplement.
7472
7473         * lang-specs.h: Remove __HONOR_STD.
7474         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7475
7476 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
7477
7478         * decl.c (grokdeclarator): Complain about in-class initialization
7479         of aggregates and/or references.
7480         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7481         TEMPLATE_TYPE_PARMs.
7482
7483         * decl2.c (grok_array_decl): Add comment.
7484         (mark_used): Don't instantiate an explicit instantiation.
7485         * friend.c (make_friend_class): Remove bogus comment.  Fix check
7486         for partial specializations.
7487         * pt.c (check_explicit_specialization): Don't
7488         SET_DECL_EXPLICIT_INSTANTIATION here.
7489         (mark_decl_instantiated): Or here.
7490         (do_decl_instantiation): Do it here, instead.  Add checks for
7491         duplicate explicit instantiations, etc.  Tidy.
7492         (do_type_instantiation): Likewise.
7493         (instantiate_decl): Improve comments.  Complain about explicit
7494         instantiations where no definition is available.
7495
7496         * cp-tree.h (ansi_null_node): Remove.
7497         * call.c (build_over_call): Warn about converting NULL to an
7498         arithmetic type.
7499         * cvt.c (build_expr_type_conversion): Likewise.  Use
7500         null_ptr_cst_p instead of expanding it inline.
7501         * decl.c (ansi_null_node): Remove.
7502         (init_decl_processing): Make null_node always have integral type.
7503         * except.c (build_throw): Warn about converting NULL to an
7504         arithmetic type.
7505         * lex.c (init_parse): Remove handling of ansi_null_node.
7506         * pt.c (type_unification_real): Don't convert NULL to void* type.
7507         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7508         (convert_for_assignment): Warn about converting NULL to an
7509         arithmetic type.
7510         (convert_for_initialization): Likewise.
7511
7512 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7513
7514         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7515         * pt.c (coerce_template_parms): Use no_linkage_check.
7516         * decl.c (grokvardecl): Likewise.
7517         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
7518
7519         * method.c (process_overload_item): Remove useless code.
7520
7521 1998-08-20  Per Bothner  <bothner@cygnus.com>
7522
7523         Handle new'ing of Java classes.
7524         * init.c (build_class_classref):  New function.
7525         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
7526         constructor does not return this;  don't need to exception-protect.
7527
7528         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
7529         * decl2.c (acceptable_java_type):  Handle template-derived types.
7530
7531 1998-08-20  Per Bothner  <bothner@cygnus.com>
7532
7533         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
7534
7535 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
7536
7537         * decl.c (duplicate_decls): Always merge the old and new patterns
7538         for templates, regardless of whether or not the new one has
7539         DECL_INITIAL.  Don't throw away specializations.  Merge
7540         DECL_SAVED_TREE.
7541         * pt.c (tsubst_decl): Use the right pattern when calculating the
7542         complete args for a new template instance.
7543         (do_decl_instantiation): Fix typo in comment.
7544         (regenerate_decl_from_template): Deal with tricky friend template
7545         case.
7546         (instantiate_decl): Likewise.
7547
7548 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
7549
7550         * init.c (build_builtin_delete_call): Add missing assemble_external
7551         call.
7552
7553 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
7554
7555         * parse.y (notype_unqualified_id): Also accept ~A<int>.
7556
7557 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
7558
7559         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7560         arithmetic.
7561         * except.c (build_throw): Warn when NULL is thrown, even with
7562         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
7563         thrown expression.
7564
7565         * cp-tree.h (ansi_null_node): New variable.
7566         * decl.c (ansi_null_node): New variable.
7567         (init_decl_processing): Initialize its type.
7568         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
7569         for null_node in non-ANSI mode.
7570         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7571         place of null_node to avoid spurious errors.
7572
7573 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
7574
7575         * cp-tree.h (enter_scope_of): New function.
7576         * parse.y (complex_direct_notype_declarator): Use it.
7577         * semantics.c (enter_scope_of): New function.
7578
7579 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
7580
7581         * decl.c (grokparms): No, here.
7582
7583         * decl.c (grokdeclarator): Catch parm with pointer to array of
7584         unknown bound here...
7585         * method.c (process_overload_item): ...not here.
7586
7587         * gxxint.texi: Remove obsolete documentation of overloading code.
7588
7589         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7590         * class.c (finish_struct_bits): Likewise.
7591
7592         * tree.c (lvalue_type): Fix for arrays.
7593         * typeck.c (build_unary_op): Use lvalue_type.
7594         * call.c (add_function_candidate): Likewise.
7595         * cvt.c (convert_to_reference): Likewise.
7596
7597         * decl2.c (lang_decode_option): Ignore -traditional.
7598
7599         * init.c (build_offset_ref): Don't mess with error_mark_node.
7600         * lex.c (do_scoped_id): Use cp_error.
7601
7602         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7603
7604 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7605
7606         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7607
7608 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
7609
7610         * cp-tree.h (set_identifier_local_value): Provide prototype.
7611
7612         * decl2.c (do_namespace_alias): Remove unused variables `binding'
7613         and `old'.
7614
7615 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
7616
7617         * Makefile.in: Rename BBISON to BISON so that it can be properly
7618         inherited from the parent makefile.
7619
7620 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7621
7622         * lang-options.h: Add -finit-priority.
7623         * decl2.c: Likewise.  Check flag_init_priority instead of
7624         USE_INIT_PRIORITY.
7625
7626         * decl2.c (setup_initp): New fn.
7627         (start_objects, finish_objects, do_ctors): Handle init_priority.
7628         (do_dtors, finish_file): Likewise.
7629
7630 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
7631
7632         * pt.c (tsubst_copy): Hush warning.
7633
7634         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7635
7636 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
7637
7638         * pt.c (print_template_context): Don't abort when instantiating a
7639         synthesized method.
7640
7641         * decl.c (grokdeclarator): Issue errors on namespace qualified
7642         declarators in parameter lists or in class scope.
7643
7644 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
7645
7646         * pt.c (check_explicit_specialization): Don't abort on bogus
7647         explicit instantiations.
7648
7649 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
7650
7651         * typeck.c (require_complete_type): Use complete_type_or_else.
7652         (complete_type_or_else): Always return NULL_TREE on failure, as
7653         documented.
7654
7655         * pt.c (tsubst_aggr_type): Prototype.
7656         (tsubst_decl): New function, split out from tsubst.  Set
7657         input_filename and lineno as appropriate.
7658         (pop_tinst_level): Restore the file and line number saved in
7659         push_tinst_level.
7660         (instantiate_class_template): Set input_filename and lineno as
7661         appropriate.
7662         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
7663         context for a TYPENAME_TYPE is complete.
7664
7665         * decl2.c (grokbitfield): Issue errors on bitfields declared with
7666         function type.
7667         (do_dtors): As in do_ctors, pretend to be a member of the same
7668         class as a static data member while generating a call to its
7669         destructor.
7670
7671         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7672         conversions, even in complex virtual base class hierarchies.
7673
7674 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
7675
7676         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7677         (TYPE_TEMPLATE_INFO): Likewise.
7678         (SET_TYPE_TEMPLATE_INFO): Likewise.
7679         (ENUM_TI_TEMPLATE): Likewise.
7680         (ENUM_TI_ARGS): Likewise.
7681         (lookup_nested_type_by_name): Remove.
7682         * decl.c (maybe_process_template_type_declaration): Handle enums.
7683         (start_enum): Don't check for primary-template enum declarations
7684         here.
7685         (finish_enum): Clean up, document.  Make sure template enum
7686         constants get the correct type.
7687         (build_enumerator): Copy initializers for template enumerations,
7688         too.
7689         (grok_enum_decls): Document.
7690         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7691         better.  Build LOOKUP_EXPRs for local variables, even if they are
7692         TREE_PERMANENT.
7693         * pt.c (tsubst_enum): Remove field_chain parameter.
7694         (template_class_depth): Include the depth of surrounding function
7695         contexts.
7696         (push_template_decl): Check for primary-template enum declarations
7697         here.  Deal with enumeration templates.
7698         (lookup_template_class): Likewise.
7699         (for_each_template_parm): Likewise.
7700         (instantiate_class_template): Don't call tsubst_enum directly,
7701         call tsubst instead, to instantiate enums.  Deal with all
7702         field_chain issues here, not in tsubst_enum.
7703         (lookup_nested_type_by_name): Remove.
7704         (tsubst_aggr_type): Revise handling of enumeration types.
7705         (tsubst): Likewise.
7706         (tsubst_copy): Likewise.
7707         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7708
7709 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
7710
7711         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7712         uses template parameters.
7713         * method.c (build_template_parm_names): Use the full set of
7714         template arguments for tsubst'ing.
7715         (build_overload_identifier): Pass the full set of template
7716         arguments to build_template_parm_names, not just the
7717         innermost_args.
7718         * pt.c (TMPL_ARGS_DEPTH): Define using
7719         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7720         (NUM_TMPL_ARGS): New macro.
7721         (add_outermost_template_args): Deal with the case where the outer
7722         args will be completely discarded.
7723         (coerce_template_parms): Use the full set of template arguments
7724         for tsubst'ing.  Simplify.  Add some asserts.  Improve
7725         error messages.
7726         (lookup_template_class): Pass the full set of template arguments
7727         to coerce_template_parms.
7728         (tsubst): Add assertion.
7729         (do_type_instantiation): Don't instantiate member template
7730         classes.
7731
7732         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7733         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7734
7735 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
7736
7737         * method.c (set_mangled_name_for_decl): Change return type to void.
7738
7739         * decl.c (lookup_name_real): A namespace-level decl takes priority
7740         over implicit typename.  Avoid doing the same lookup twice.
7741
7742         * search.c (dependent_base_p): New fn.
7743         (dfs_pushdecls, dfs_compress_decls): Use it.
7744
7745         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7746         virtual functions if the type doesn't have any.
7747
7748 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
7749
7750         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7751         uses template parameters.
7752
7753 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
7754
7755         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
7756         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7757         * lex.c (do_identifier): Don't use a second argument, or a type,
7758         when building LOOKUP_EXPRs.
7759         (do_identifier): Likewise.
7760         (do_scoped_id): Likewise.
7761         * method.c (hack_identifier): Improve error message.
7762         * pt.c (lookup_template_function): Don't needlessly call
7763         copy_to_permanent or build_min.
7764         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
7765         necessary.
7766         (do_decl_instantiation): Improve error message.
7767         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7768         (build_min): Copy the type to the permanent obstack, too.
7769
7770 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
7771
7772         * init.c (init_init_processing): Remove BI* handling.
7773         (build_builtin_call): Remove.
7774         (build_builtin_delete_call): New fn.
7775         (build_delete): Use it.
7776
7777 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
7778
7779         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7780         (maybe_check_template_type): New function.
7781         * decl.c (maybe_process_template_type_declaration): New function,
7782         split out from pushtag  Call maybe_check_template_type.
7783         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
7784         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7785         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7786         * pt.c (template_class_depth_real): Generalization of ...
7787         (template_class_depth): Use it.
7788         (register_specialization): Use duplicate_decls for duplicate
7789         declarations of specializations.
7790         (maybe_check_template_type): New function.
7791         (push_template_decl_real): Fix comment.
7792         (convert_nontype_argument): Likewise.
7793         (lookup_template_class): Likewise.  Avoid an infinite loop on
7794         erroneous code.
7795         (tsubst_friend_function): Fix comment.
7796         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7797         an IDENTIFIER_NODE.
7798         * semantics.c (begin_function_definition): Use
7799         reset_specialization to note that template headers don't apply
7800         directly to declarations after the opening curly for a function.
7801
7802 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
7803
7804         * decl.c (push_overloaded_decl): Use current_namespace instead of
7805         DECL_CONTEXT (decl) to determine where we go.
7806
7807         * decl.c (lookup_name_real): Fix typo.
7808
7809 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
7810
7811         * friend.c (is_friend): Be lenient with member functions to deal
7812         with nested friends.
7813
7814 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
7815
7816         * class.c (finish_struct_1): Convert integer_zero_node to
7817         ssizetype before passing it to set_rtti_entry.
7818         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7819         of any size to a pointer.
7820
7821 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
7822
7823         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7824         (build_template_decl_overload): Remove.
7825         (set_mangled_name_for_decl): New function.
7826         (innermost_args): Remove is_spec parameter.
7827         (most_specialized, most_specialized_class): Remove declarations.
7828         (lookup_template_class): Add entering_scope parameter.
7829         (maybe_process_partial_specialization): New function.
7830         (finish_template_decl): Likewise.
7831         (finish_template_type): Likewise.
7832         * class.c (finish_struct): Clean up processing of member template
7833         specializations.
7834         * decl.c (pushtag): Fix formatting.
7835         (lookup_tag): Improve handling of pseudo-global levels.
7836         (make_typename_type): Adjust call to lookup_template_class.
7837         (shadow_tag): Use maybe_process_partial_specialization.
7838         (xref_tag): Improve handling of member friends.
7839         (start_function): Call push_nested_class before
7840         push_template_decl.  Don't call push_template_decl for
7841         specializations.
7842         * decl2.c (grok_x_components): Don't call xref_tag for
7843         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
7844         (grokclassfn): Use set_mangled_name_for_decl.
7845         (arg_assoc_class): Adjust call to innermost_args.
7846         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7847         * error.c (dump_function_name): Improve printing of template
7848         function names.
7849         * friend.c (is_friend): Don't compare types of decls to determine
7850         friendship, unless flag_guiding_decls.
7851         (make_friend_class): Partial specializations cannot be friends.
7852         (do_friend): Use set_mangled_name_for_decl.  Call
7853         push_template_decl_real instead of push_template_decl.
7854         * method.c (build_decl_overload_real): Remove prototype.  Give it
7855         external linkage.
7856         (build_overload_identififer): Adjust call to innermost_args.
7857         (build_template_decl_overload): Remove.
7858         (set_mangled_name_for_decl): New function.
7859         * parse.y (.finish_template_type): New non-terminal.
7860         (template_def): Use finish_template_decl.  Use template_extdef
7861         instead of extdef.
7862         (template_extdef, template_datadef): New non-terminals, containing
7863         only those rules for things which can be templates.
7864         (datadef): Tidy.
7865         (template_type, self_template_type): Use .finish_template_type.
7866         (named_class_head): Use maybe_process_partial_specialization.
7867         * pt.c (mangle_class_name_for_template): Remove context parameter.
7868         (get_class_bindings): Remove outer_args parameter.
7869         (complete_template_args): Remove.
7870         (add_outermost_template_args): New function.
7871         (register_specialization): Return the specialization.
7872         (unregister_specialization): New function.
7873         (tsubst_template_parms): Likewise.
7874         (most_specialized, most_specialized_class): Prototype here as
7875         static.
7876         (original_template): Rename to most_general_template.
7877         (tsubst_template_parms): New function.
7878         (set_mangled_name_for_template_decl): Likewise.
7879         (TMPL_ARGS_DEPTH): New macro.
7880         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7881         (TMPL_ARGS_LEVEL): New macro.
7882         (SET_TMPL_ARGS_LEVEL): Likewise.
7883         (TMPL_ARG): Likewise.
7884         (SET_TMPL_ARG): Likewise.
7885         (TMPL_ARGS_DEPTH): Likewise.
7886         (finish_member_template_decl): Use finish_template_decl.
7887         (maybe_process_partial_specialization): New function, split out
7888         from tsubst.
7889         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7890         (maybe_begin_member_template_processing): Use new macros.
7891         (is_member_template): Likewise.
7892         (is_member_template_class): Likewise.
7893         (add_to_template_args): Likewise.  Deal with multiple levels of
7894         args.
7895         (maybe_process_partial_specialization): New function.
7896         (retrieve_specialization): Add consistency check.
7897         (determine_specialization): Return full argument list.
7898         (check_explicit_specialization): Tweak friend handling.  Use full
7899         argument lists.  Simplify.
7900         (current_template_args): Use new macros.
7901         (push_template_decl_real): Change ill-named mainargs to specargs.
7902         Check that a partial specialization actually specializes at least
7903         one parameter.   Improve friend handling.  Modify for full
7904         template arguments.
7905         (classtype_mangled_name): Don't mangle the names of
7906         specializations.
7907         (lookup_template_class): Add entering_scope parameter.  Use it to
7908         avoid finding a template type when an instantiation is required.
7909         Simplify.  Use full template arguments.
7910         (tsubst_friend_function): Use unregister_specialization.  Use new
7911         macros.  Use full template arguments.
7912         (tsubst_friend_class): Substitute, using tsubst_template_parms,
7913         into the template parameters before passing them to
7914         redeclare_class_template.
7915         (instantiate_class_template): Simplify.  Use full template
7916         arguments.  Adjust calls to get_class_bindings.  Use
7917         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
7918         (innermost_args): Use new macros.
7919         (tsubst_aggr_type): New function, split out from tsubst.
7920         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7921         conventions for lookup_template_class.  Refine handling of partial
7922         instantiations.   Remove calls to complete_template_args.
7923         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
7924         and set_mangled_name_for_template_decl.
7925         (tsubst_copy): Use tsubst_aggr_type.
7926         (instantiate_template): Use full template arguments.
7927         (more_specialized): Improve formatting.
7928         (more_specialized_class): Adjust calls to get_class_bindings.
7929         (get_bindings_real): Don't call complete_template_args.
7930         (most_specialized): Don't overwrite input; create a new list.
7931         (most_specialized_class): Use most_general_template.
7932         (regenerate_decl_from_template): Use unregister_specialization.
7933         Use full template arguments.
7934         (instantiate_decl): Use full template arguments.
7935         (set_mangled_name_for_template_decl): New function.
7936         * semantics.c (begin_class_definition): Use
7937         maybe_process_partial_specialization.
7938         (finish_member_class_template): New function.
7939         (finish_template_decl): Likewise.
7940         (finish_template_type): Likewise.
7941         (typeck.c): Don't crash after issuing a compiler_error.
7942         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7943
7944 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
7945
7946         * typeck2.c (build_functional_cast): Handle default-initialization.
7947
7948         * call.c (build_over_call): Pass 1 to popclass.
7949
7950         * parse.y (direct_notype_declarator): Add precedence declaration
7951         to notype_unqualified_id case.
7952         * Makefile.in (EXPECT): Adjust.
7953
7954         * tree.c (ovl_member): Fix for single function in OVL.
7955
7956 1998-07-27  Dave Brolley  <brolley@cygnus.com>
7957
7958         * c-lex.c (yylex): Fix boundary conditions in character literal and
7959         string literal loops.
7960
7961 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
7962
7963         * decl.c (lookup_name_real): OK, do return the from_obj value
7964         unless got_object depends on template parms.
7965
7966         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
7967
7968         * pt.c (coerce_template_parms): Also complain about local enums.
7969
7970         * cp-tree.h: Add prototype for set_identifier_local_value.
7971         * decl.c (set_identifier_local_value_with_scope): Make static,
7972         prototype.
7973         * search.c (covariant_return_p): Likewise.
7974         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
7975
7976         * call.c (build_method_call): Only pull out the type of a destructor
7977         if it's a template type parm.
7978         * decl.c (lookup_name_real): Never return the from_obj value.
7979
7980 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
7981
7982         * except.c (process_start_catch_block_old): Call start_decl_1 for
7983         catch parm.
7984         * decl.c (start_decl_1): Avoid duplicate error.
7985
7986         * init.c (expand_default_init): Only perform the initialization if
7987         it will do something.
7988
7989 1998-07-23  H.J. Lu  (hjl@gnu.org)
7990
7991         * parse.y (base_class): Check for invalid base class.
7992
7993 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
7994
7995         * decl2.c (import_export_template): Fold in...
7996         (import_export_class): ...to here.  Handle dllimport/export.
7997
7998         * class.c (build_vtable): Pass at_eof to import_export_vtable.
7999         (prepare_fresh_vtable): Likewise.
8000         * decl2.c (import_export_class): Split out...
8001         (finish_prevtable_vardecl): From here.
8002         * class.c (finish_struct_1): Call import_export_class if at_eof.
8003
8004         * decl.c (start_function): #if 0 mysterious code I wrote and have
8005         forgotten why.
8006         * rtti.c (get_tinfo_fn): If this is for a class type, set
8007         DECL_CONTEXT.
8008
8009 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8010
8011         * inc/exception: Change terminate and unexpected to ().
8012
8013         * parse.y (named_class_head_sans_basetype_defn): A
8014         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8015
8016 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8017
8018         * tree.c (canonical_type_variant): New fn to handle arrays.
8019         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8020         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8021         * method.c (process_overload_item): Use build_overload_value for
8022         arrays.
8023
8024 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8025
8026         * lex.c (mbchar.h): #include it.
8027         (GET_ENVIRONMENT): New macro.
8028         (init_parse): Set character set based on LANG environment variable.
8029         (real_yylex): Handle multibyte characters in character literals.
8030         (real_yylex): Handle multibyte characters in string literals.
8031
8032 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8033
8034         * lex.c (do_identifier): Look for class value even if we don't
8035         have a global value.  Do implicit declaration if parsing is 2.
8036         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8037         lookup.
8038
8039 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8040
8041         * decl.c (pushtag): Revert previous change.
8042         * pt.c (lookup_template_class): Don't put out debugging
8043         information for types that use template parameters.
8044
8045         * decl.c (pushtag): Don't put out debugging information for
8046         compiler-generated typedefs.
8047
8048         * error.c (dump_type_real): Don't crash when presented with
8049         intQI_type_node or the like.
8050
8051         * semantics.c (finish_translation_unit): Fix spelling error in
8052         comment.
8053
8054 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8055
8056         * decl.c (lookup_name_real): Pull out single function here.
8057         (select_decl): Not here.
8058         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8059
8060         * decl.c (qualify_lookup): Tweak again.
8061
8062         * pt.c (lookup_template_class): Don't mess with the context of the
8063         instantiation.
8064         * decl2.c (current_decl_namespace): Remove special handling for
8065         templates.
8066
8067         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8068         a member template specialization.
8069
8070         * tree.c (ovl_member): Use decls_match to compare functions.
8071         * decl.c (decls_match): Check the context of a function.
8072
8073         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8074         in Koenig lookup support rules.
8075         * semantics.c (finish_call_expr): Handle the new cases.
8076
8077         * typeck.c (build_x_function_call): Handle overloaded methods.
8078
8079         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8080
8081 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8082
8083         * semantics.c (finish_object_call_expr): Revert previous change.
8084         * call.c (build_new_method_call): Likewise.  Instead, convert
8085         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8086
8087 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8088
8089         * decl.c (qualify_lookup): Handle templates.
8090
8091         * decl2.c (do_using_directive): Don't pass ancestor.
8092         * decl.c (push_using_directive): Calculate ancestor.
8093
8094         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8095         * decl.c (pushdecl): Move type shadowing handling from here...
8096         (duplicate_decls): ...to here.
8097         * decl.c (set_identifier_local_value_with_scope): New fn.
8098         (pushdecl): Use it.
8099         (set_identifier_local_value, lookup_type_current_level): New fns.
8100         * decl2.c (do_local_using_decl): Handle types and binding level
8101         stuff properly.
8102
8103         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8104         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8105         (lookup_namespace_name): Likewise.
8106         * typeck.c (build_unary_op): Not here anymore.
8107
8108         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8109         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8110
8111         * decl.c (qualify_lookup): New fn.
8112         (lookup_name_real): Use it.
8113
8114 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8115
8116         * decl2.c (add_using_namespace): When directly using a namespace
8117         that was indirect before, promote it.
8118
8119         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8120         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8121         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8122         * decl.c (select_decl): Replace two flag parameters by one.
8123         (unqualified_namespace_lookup): Likewise, pass flag.
8124         (lookup_flags): New function.
8125         (lookup_name_real): Compute flags, pass them.
8126         (lookup_namespace_name): Call with zero-flag.
8127         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8128         according to flags.
8129         (lookup_using_namespace, qualified_lookup_using_namespace):
8130         Add flag parameter, pass them through.
8131         * lex.c (do_scoped_id): Call with zero-flag.
8132
8133 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8134
8135         * typeck.c (convert_for_assignment): Use comptypes.
8136
8137 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8138
8139         * semantics.c (finish_object_call_expr): Move test for the
8140         function called being a TYPE_DECL to ...
8141         * call.c (build_new_method_call): Here.
8142
8143 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8144
8145         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8146         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8147
8148         * lex.c (looking_for_typename): Don't initialize.
8149
8150         * decl2.c (ambiguous_decl): Clarify error message.
8151
8152         * decl.c (push_using_directive): Iterate over namespaces used
8153         indirectly.
8154
8155 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8156
8157         * decl2.c (add_using_namespace): Iterate over namespaces used
8158         indirectly.
8159
8160         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8161         (cat_namespace_levels): Ignore aliases.
8162         (duplicate_decls): Ignore duplicate aliases.
8163         * decl2.c (do_namespace_alias): Process block level namespace
8164         aliases.  Store alias with pushdecl.  Remove odr errors.
8165         * parse.y (namespace_alias): New non-terminal.
8166         (extdef): Use it.
8167
8168 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8169
8170         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8171         Handle TEMPLATE_TYPE_PARM.
8172         (arg_assoc): Rewrite.
8173
8174         * pt.c (complete_template_args): Don't look at the context unless
8175         we have to.
8176
8177         * method.c (build_decl_overload_real): Fix namespace handling.
8178
8179         * typeck.c (build_unary_op): Extract a lone function from an
8180         OVERLOAD.
8181
8182         * call.c (build_scoped_method_call): Handle getting a namespace
8183         for basetype in a destructor call.
8184         (check_dtor_name): Handle enums.
8185
8186         * parse.y (using_directive): New nonterminal.
8187         (extdef, simple_stmt): Use it.
8188
8189 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8190
8191         * decl2.c (add_function): Move error message ...
8192         (arg_assoc_namespace): ... from here.
8193
8194 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8195
8196         * parse.y (namespace_qualifier): Fix multiple level handling.
8197         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8198         (arg_assoc): Don't skip the first argument of a function.
8199
8200 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8201
8202         * search.c (my_tree_cons): Clean up.
8203
8204 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8205
8206         * call.c (joust): Don't warn about "confusing" conversions to the
8207         same type.
8208
8209 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8210
8211         * class.c (push_nested_class): Complain about namespaces.
8212         * decl.c (start_decl): Enter the object's namespace.
8213         (cp_finish_decl): Leave it.
8214         (grokdeclarator): Likewise.
8215         * decl2.c (check_decl_namespace): New function.
8216         (finish_file): Call it.
8217         * parse.y (complex_direct_notype_declarator): Set complexity
8218         of namespace-qualified ids to -1, enter the namespace.
8219
8220         * method.c (build_template_decl_overload): Expect _DECL as first
8221         parameter.  Put context temporarily into current_namespace.
8222         * pt.c (check_explicit_specialization): Change caller.
8223         (tsubst): Likewise.
8224
8225         * init.c (build_offset_ref): Call mark_used and
8226         convert_from_reference for namespace members.
8227
8228 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8229
8230         * search.c (my_tree_cons): The bitfield is at index 2.
8231
8232 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8233
8234         * lang-options.h: Format changed to work with new --help support
8235         in gcc/toplev.c
8236
8237 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8238
8239         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8240         Do Koenig lookup in CALL_EXPR.
8241         (arg_assoc): Handle error_mark.
8242         * lex.c (is_global): New function.
8243         (do_identifier): Expect arguments for Koenig lookup.
8244         * parse.y (primary): Add rules for calls of unqualified function calls.
8245         (do_id): Change call of do_identifier.
8246         * pt.c (finish_stmt_expr): Likewise.
8247         * semantics.c (finish_id_expr): Likewise.
8248         (finish_call_expr): Add integer parameter to indicate
8249         argument-dependent lookup.
8250
8251         * decl.c (struct binding_level): New field using_directives.
8252         (push_using_decl): Not sorry anymore.
8253         (push_using_directive): New function.
8254         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8255         (unqualified_namespace_lookup): New function, code from ...
8256         (lookup_name_real): ... here.
8257         * decl2.c (lookup_using_namespace): Pass using list instead of
8258         initial scope.
8259         (validate_nonmember_using_decl): New function.
8260         (do_nonmember_using_decl): New function.
8261         (do_toplevel_using_decl): Use them.
8262         (do_local_using_decl): New function.
8263         (do_using_directive): Support block-level directives.
8264         * parse.y (simple_stmt): Support using declarations and
8265         directives.
8266         (namespace_qualifier, namespace_using_decl): New non-terminals.
8267
8268         * xref.c (classname): New function.
8269         (GNU_xref_hier): Change class and base parameters to tree.
8270         * decl.c (xref_baseypes): Change caller.
8271         * friend.c (make_friend_class): Likewise.
8272
8273 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8274
8275         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8276         comparison.
8277
8278         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8279         template template parameter, record its use.
8280         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8281         its template arguments if exists.
8282
8283         * pt.c (coerce_template_template_parms): New function equivalent
8284         to coerce_template_parms when IS_TMPL_PARM is true.
8285         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8286         all callers changed.
8287
8288         (coerce_template_parms): Access ARGLIST properly when creating a
8289         new vector.  Only accept implicit TYPE_DECL as valid argument for
8290         a template template parameter when it is a base class of
8291         current_class_type.  Don't display error message when COMPLAIN is
8292         false.
8293
8294 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8295
8296         * repo.c (get_base_filename): Use file_name_nondirectory.
8297         (open_repo_file): Likewise.
8298         * cp-tree.h (file_name_nondirectory): Add prototype.
8299
8300 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8301
8302         * friend.c (do_friend): Pull the identifier out of declarator.
8303         Use cp_error and friends.
8304         * decl2.c (qualified_lookup_using_namespace): Fix call to
8305         purpose_member.
8306         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8307         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8308         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8309         * class.c (warn_hidden): Fix for OVERLOAD.
8310         From grahams@rcp.co.uk:
8311         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8312         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8313
8314 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
8315
8316         * g++.1 (-traditional): Remove duplicated documentation.
8317
8318 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
8319
8320         * method.c (flush_repeats): Add nrepeats parameter.
8321         (issue_nrepeats): Likewise.
8322         (is_back_referenceable_type): New function.  Don't back-reference
8323         TEMPLATE_TYPE_PARMs as well as simple types like integers.
8324         (build_mangled_name_for_type): Likewise.
8325         (build_mangled_name_for_type_with_Gcode): Likewise.
8326         (lasttype): Remove.
8327         (nrepeats): Likewise.
8328         (Nrepeats): Likewise.
8329         (start_squangling): Don't clear the variables removed above.
8330         (end_squangling): Likewise.
8331         (flush_repeats): Tidy.  Use nrepeats parameter rather than
8332         Nrepeats global.
8333         (issue_nrepeats): Likewise, but with nrepeats global.  Use
8334         is_backreferenceable_type.
8335         (build_overload_nested_name): Tidy.  Add comment.  Use
8336         build_mangled_name_for_type.
8337         (build_underscore_int): Comment.
8338         (build_overload_scope_ref): Use build_mangled_name_for_type.
8339         (build_overload_int): Likewise.
8340         (build_template_template_parm_names): Tidy.
8341         (build_template_parm_names): Use build_mangled_name_for_type.
8342         (build_overload_identifier): Add comments.
8343         (build_mangled_name_for_type_with_Gcode): Split out from
8344         build_mangled_name.
8345         (build_mangled_name_for_type): Use it.
8346         (build_mangled_name): Rework to use build_mangled_name_for_type
8347         and to not use global nrepeats/Nrepeats.  Tidy.
8348         (process_modifiers): Tidy.
8349         (check_btype): Use is_backreferenceable_type.  Add comment.
8350         Rename `node' to `type'.
8351         (process_overload_item): Set numeric_output_need_bar here.
8352         Use build_mangled_name_for_type.  Tidy.
8353         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
8354         build_mangled_name_for_type.
8355
8356         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8357         for TYPE_DECLs.
8358
8359 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
8360
8361         * cp-tree.h (warn_long_long): Define.
8362         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8363         warning "ANSI C++ does not support `long long'".
8364         * decl2.c (warn_long_long): Define.
8365         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8366
8367 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
8368
8369         * decl.c (xref_tag): Handle attributes between 'class' and name.
8370         * parse.y (aggr): Likewise.
8371         * semantics.c (finish_class_definition): Likewise.
8372         * Makefile.in (EXPECTED): Adjust.
8373
8374         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8375         * decl2.c: Define them.
8376         (lang_decode_option): Handle them.
8377         * lang-options.h: Add -foptional-diags.
8378         * class.c (finish_struct): Don't complain about multiple meanings of
8379         name if -fno-optional-diags.
8380         * decl.c (pushdecl_class_level): Likewise.
8381         * lex.c (real_yylex): Check warn_multichar.
8382
8383 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
8384
8385         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8386
8387         * tree.c (make_binfo): Fix length.
8388
8389 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
8390
8391         * decl2.c (lang_decode_option): Remove warn_template_debugging.
8392         * lang-options.h: Likewise.
8393
8394 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8395
8396         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8397         (process_start_catch_block): Likewise for variables
8398         `false_label_rtx', `call_rtx' and `return_value_rtx'.
8399
8400 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
8401
8402         * tree.c (build_srcloc): Make sure we allocate this node on the
8403         permanent obstack.
8404
8405 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
8406
8407         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8408         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8409         (lang_specific_driver): Only add -lm automatically if need_math is
8410         nonzero.
8411
8412 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
8413
8414         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
8415
8416 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8417
8418         * Makefile.in (EXPR_H): New dependency variable.
8419         (decl2.o): Depend on $(EXPR_H).
8420         (typeck.o): Likewise.
8421         (init.o): Likewise.
8422         (expr.o): Likewise.
8423
8424 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8425
8426         * decl.c (start_enum): Put local enums on permanent_obstack.
8427
8428 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
8429
8430         * cp-tree.h (c_get_alias_set): Declare.
8431         * decl.c (init_decl_processing): Set lang_get_alias_set.
8432
8433 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
8434
8435         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8436         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8437         flag for all function decls which are in the exception table.
8438         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8439         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8440         code is emitted for any referenced rtti function.
8441
8442 1998-06-25  Dave Brolley  <brolley@cygnus.com>
8443
8444         * lang-specs.h: Use new | syntax to eliminate
8445         string concatenation.
8446
8447 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
8448
8449         * cp-tree.h (CP_DECL_CONTEXT): New macro.
8450         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8451         * method.c (build_overload_nested_name): Likewise.
8452         * sig.c (build_signature_pointer_or_reference_type): Don't set
8453         DECL_CONTEXT.
8454
8455 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8456
8457         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8458         * cp-tree.h (FROB_CONTEXT): New macro.
8459         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8460         * decl.c (namespace_binding): Replace NULL_TREE with
8461         global_namespace.
8462         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8463         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8464         Likewise.
8465         * decl.c (pushtag): Use FROB_CONTEXT.
8466         (pushdecl, make_typename_type, define_function, grokdeclarator):
8467         Likewise.
8468         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8469         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8470         Likewise.
8471         * decl2.c (decl_namespace): Return global_namespace if no context.
8472         * method.c (build_overload_nested_name): Expect null as context.
8473         * pt.c (mangle_class_name_for_template): Do nothing for null
8474         contexts.
8475         (lookup_template_class): Allow for null id_context.
8476
8477 1998-06-25  Richard Henderson  <rth@cygnus.com>
8478
8479         * method.c (emit_thunk): Set current_function_is_thunk for the
8480         ASM_OUTPUT_MI_THUNK case as well.
8481
8482 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8483
8484         * exception.cc (__cplus_type_matcher): Get a match_info pointer
8485         instead of an exception table entry as a parameter.
8486
8487 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
8488
8489         * parse.y (function_try_block): Don't call start_catch_handler.
8490         * except.c (call_eh_info): Remove coerced field from declaration.
8491         (build_eh_type_type_ref): New function to create an address of a
8492         rtti function for the new style exception tables.
8493         (expand_start_catch_block): Split function, this contains the
8494         common part.
8495         (process_start_catch_block_old): New function to perform the rest
8496         of expand_start_catch_block under old style exceptions.
8497         (process_start_catch_block_old): New function to perform the rest
8498         of expand_start_catch_block under new style exceptions.
8499         (expand_end_catch_block): Only pop the false label off the stack under
8500         the old style of exceptions.
8501         * semantics.c (finish_try_block): Don't call start_catch_handler.
8502         * exception.cc (struct cp_eh_info): Add original_value field.
8503         (__cplus_type_matcher): Perform type matching on the original exception
8504         value, and if we have a match, set the current value.
8505         (__cp_push_exception): Set the original exception value.
8506
8507 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
8508
8509         * call.c (joust): Fix confusing conversion warning.
8510
8511         * call.c (build_op_delete_call): Add placement parm.  Check
8512         LOOKUP_SPECULATIVELY.
8513         * cp-tree.h, decl2.c, init.c: Adjust.
8514         * decl.c (finish_function): Use it.
8515
8516         * pt.c (tsubst): Diagnose creating void fields or variables.
8517
8518 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8519
8520         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8521
8522         * cp-tree.h (check_dtor_name): Add prototype.
8523
8524         * init.c (expand_member_init): Remove unused variables
8525         `ptr_type_node', `parm' and `rval'.
8526
8527         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8528         in call to fprintf.
8529         (lang_print_xnode): Likewise.
8530
8531         * typeck2.c (enum_name_string): Cast argument to sprintf to long
8532         and use %ld specifier.
8533
8534         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8535         specifier in call to fprintf.
8536         (GNU_xref_member): Cast argument to sprintf to int.
8537
8538 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
8539
8540         * typeck2.c (pop_init_level): Warn about implicit zero initialization
8541         of struct members.
8542
8543 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8544
8545         * cp-tree.h: Prototype function `check_java_method'.
8546
8547 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8548
8549         * class.c (finish_struct): Make conflicting use of id a pedwarn.
8550         * decl.c (pushdecl_class_level): Likewise.
8551
8552 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8553
8554         * pt.c (convert_nontype_argument): Issue an error when presented
8555         with an integer (real) constant that cannot be simplified to an
8556         INT_CST (REAL_CST).
8557
8558         * cp-tree.h (c_get_alias_set): Remove declaration added in
8559         1998-06-13 change that should never have been checked in.
8560
8561 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8562
8563         * typeck.c (build_binary_op_nodefault): Change % in format strings
8564         to %%.
8565
8566         * decl.c (grokvardecl): Don't build_static_name for decls that
8567         aren't at namespace scope.
8568
8569         * init.c (perform_member_init): Catch default-initialization of
8570         references.
8571
8572 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
8573
8574         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8575
8576 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
8577
8578         * method.c (hack_identifier): Complain about getting a namespace
8579         or class template.
8580         * typeck.c (decay_conversion): Remove check for namespaces.
8581         * typeck2.c (incomplete_type_error): Likewise.
8582         * parse.y (template_arg): Add PTYPENAME expansion.
8583
8584 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
8585
8586         * decl.c (grokvardecl): Don't build external assembler names for
8587         TYPENAMEs in other namespaces as there is no declarator.
8588         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8589         info from DECL_CONTEXT if it is NULL.
8590
8591 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
8592
8593         * call.c (check_dtor_name): Split out.
8594         (build_scoped_method_call): Use it.
8595         (build_method_call): Use it.
8596         * init.c (build_offset_ref): Use it.
8597
8598         * typeck.c (build_static_cast): Fix handling of pointers to members.
8599
8600         * decl.c (finish_function): Just return nothing from a constructor.
8601         * typeck.c (c_expand_return): Complain about returning a void
8602         expression from a destructor.
8603
8604 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
8605
8606         * class.c (alter_access): Accept a BINFO explaining how to get
8607         from the entity whose accessed is being altered to the type doing
8608         the altering.
8609         (handle_using_decl): New function containing code split out from ...
8610         (finish_struct_1): Here.
8611
8612         * cp-tree.h (complete_type_or_else): Declare.
8613         * init.c (build_new_1, build_delete): Use it.
8614         * typeck.c (require_complete_type): Use complete_type, rather than
8615         expanding it inline.
8616         (complete_type_or_else): New function.
8617         (build_component_ref): Use it.
8618         (pointer_int_sum): Make sure the type pointed to is complete.
8619         (pointer_diff): Likewise.
8620
8621         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8622         types.
8623
8624         * search.c (get_matching_virtual): Note that member templates
8625         cannot override virtual functions.
8626
8627 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
8628
8629         * pt.c (check_explicit_specialization): If DECLARATOR turned into
8630         an error_mark_node from lookup_template_function, return the same.
8631         (determine_specialization): Also make sure TEMPLATE_ID isn't an
8632         error_mark_node, before we try to read its operands.
8633         * decl.c (grokdeclarator): If we got an error_mark_node from
8634         check_explicit_specialization, just return it right back.
8635
8636 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
8637
8638         * class.c (instantiate_type): Don't treat template-ids that don't
8639         specify any template arguments as equivalent to ordinary
8640         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
8641         pointer-to-members for member templates.  Tidy slightly.
8642         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8643         * init.c (build_offset_ref): Handle template-ids like ordinary
8644         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8645         offset part of the OFFSET_REF.
8646         * typeck.c (build_unary_op): Change check for unknown types to
8647         look for OFFSET_REFs, not SCOPE_REFs.
8648
8649 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
8650
8651         * pt.c (is_member_template_class): New function.
8652         (push_template_decl_real): Use it.
8653
8654 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
8655
8656         * friend.c (do_friend): Add support for nested classes using
8657         member functions of the enclosing class as friends.
8658
8659 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
8660
8661         * call.c (convert_default_arg): Make global, not static.
8662         (convert_arg_for_ellipsis): Split out from ...
8663         (build_over_call): Here.
8664         * cp-tree.h (convert_default_arg); Declare.
8665         (convert_arg_to_ellipsis): Likewise.
8666         (do_member_init): Remove.
8667         * init.c (do_member_init): Remove; this code is dead.
8668         (expand_member_init): Remove much of this code; it is dead.
8669         * typeck.c (convert_arguments): Use convert_default_arg and
8670         convert_arg_for_ellipsis, rather than duplicating here.
8671
8672         * call.c (convert_like): Don't fail silently if
8673         build_user_type_conversion fails.  Always return error_mark_node
8674         for failure.
8675
8676 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8677
8678         * search.c (covariant_return_p): Complain about ambiguous base.
8679
8680         * typeck.c (build_component_ref): Diagnose ref to nested type.
8681
8682 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8683
8684         * decl.c (grokparms): Check that INIT isn't an error_mark_node
8685         before giving error about invalid type for default arg.
8686
8687 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8688
8689         * call.c (build_method_call): Fix thinko.
8690
8691 1998-06-10  Dave Brolley  <brolley@cygnus.com>
8692
8693         * decl2.c (lang_decode_option): New argc/argv interface.
8694         * cp-tree.h (lang_decode_option): New argc/argv interface.
8695         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8696         specified for cpplib-enabled compilers.
8697         * lex.c (lang_init): Don't check_newline for cpplib.
8698         (init_parse): Don't initialize cpplib here.
8699
8700 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
8701
8702         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8703         piece before checking DECL_MUTABLE_P.
8704
8705 1998-06-10  John Carr  <jfc@mit.edu>
8706
8707         * tree.c (debug_binfo): Make printf format match arguments.
8708
8709         * error.c (OB_PUTI): Make printf format match arguments.
8710
8711 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
8712
8713         * init.c (perform_member_init): Handle default-initialization.
8714
8715         * except.c (build_throw): Handle throwing NULL.
8716
8717         * typeck.c (build_x_function_call): Use resolve_offset_ref.
8718
8719         * search.c (compute_access): Only strip an anonymous union
8720         for a FIELD_DECL.
8721
8722         * call.c (add_builtin_candidates): Tweak.
8723
8724         * cvt.c (build_expr_type_conversion): Restore code for conversion
8725         from class types.
8726         * decl2.c (delete_sanity): Use it.  Clean up.
8727
8728         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8729
8730 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
8731
8732         * typeck.c (c_expand_return): Don't warn about void expressions on
8733         return statements in functions returning void.
8734
8735 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
8736
8737         * pt.c (fn_type_unification): Revise documentation.  Tidy.
8738         (type_unification): Likewise.
8739
8740 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
8741
8742         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8743         expand_end_catch.
8744         * parse.y (function_try_block): Rename expand_start_catch, and delete
8745         expand_end_catch.
8746         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8747         expand_end_catch.
8748
8749 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
8750
8751         * search.c (lookup_member): New fn.
8752         * class.c (finish_struct_1): Use it.
8753         * decl.c (lookup_name_real): Use it.
8754
8755 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8756
8757         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8758
8759         * cp-tree.h: Add prototype for `maybe_print_template_context' and
8760         `maybe_make_one_only'.
8761
8762         * decl.c (auto_function): Remove unused variable `decl'.
8763
8764         * decl2.c: Include dwarf2out.h and dwarfout.h.
8765
8766         * lex.c: Remove redundant declarations of `set_float_handler' and
8767         `asm_out_file'.
8768
8769 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
8770
8771         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8772         time flag.  Call __cp_eh_info instead of __cp_exception_info.
8773         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8774         (__cp_exception_info): Return offset into cp_eh_info structure to
8775         match what use to be the start of this structure.
8776         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8777         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8778         compile time flag.
8779         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8780         __cp_eh_info instead of __cp_exception_info.
8781
8782 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
8783
8784         * decl.c (cp_finish_decl): Disable inlining of extern inlines
8785         with static variables.
8786
8787 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
8788
8789         * init.c (build_offset_ref): Correct previous change to use build,
8790         not build_min.
8791
8792 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
8793
8794         * class.c (instantiate_type): Handle pointer-to-members where the
8795         member is a template.
8796         * init.c (build_offset_ref): Likewise.
8797         * typeck.c (build_unary_op): Likewise.
8798
8799 1998-06-07  Richard Henderson  <rth@cygnus.com>
8800
8801         * lex.c (lang_init_options): New function.
8802         (lang_init): Remove flag_exceptions == 2 hack.
8803
8804 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8805
8806         * search.c (envelope_add_decl): Tweak for implicit typename.
8807
8808         * call.c (joust): Also warn about confusing conversion op/constructor
8809         overload resolution.
8810
8811         * spew.c (yylex): Also return the TYPE_DECL if got_object.
8812         Don't clear got_object after '~'.
8813         * call.c (build_scoped_method_call): Tweak destructor handling.
8814         (build_method_call): Likewise.
8815         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8816         TYPE_MAIN_VARIANT for destructors.
8817         * semantics.c (finish_object_call_expr): Complain about calling a
8818         TYPE_DECL.
8819
8820 1998-06-05  Per Bothner  <bothner@cygnus.com>
8821
8822         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8823         Define - update needed by gcc.c change.
8824
8825 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
8826
8827         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8828
8829 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8830
8831         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8832         * decl.c (lookup_name_real): Add namespaces_only parameter.
8833         If set, return only NAMESPACE_DECLs.
8834         (select_decl): Likewise.
8835         (identifier_type_value): Give additional parameter.
8836         (lookup_name_nonclass): Likewise.
8837         (lookup_name): Likewise.
8838         (find_binding): Skip namespace aliases.
8839         (binding_for_name): Likewise.
8840         (push_namespace): Check for namespace aliases.
8841         (lookup_name_namespace_only): New function.
8842         (begin_only_namespace_names, end_only_namespace_names): New functions.
8843         * decl2.c (set_decl_namespace): Skip namespace aliases.
8844         (do_using_directive): Likewise.
8845         (do_namespace_alias): Produce namespace aliases, fix alias
8846         redeclaration.
8847         * error.c (dump_decl): Support SCOPE_REF.
8848         * parse.y (extdef): Wrap lookup with namespace_only for namespace
8849         aliases and using declarations.
8850
8851 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
8852
8853         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8854
8855         * error.c (dump_expr): Clean up NEW_EXPR case.
8856
8857 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8858
8859         Suggested by Brendan Kehoe
8860         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8861         treat it as using ::decl.
8862
8863         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8864
8865         * tree.c (mapcar): Support NEW_EXPR.
8866
8867         * error.c (dump_expr): Support NEW_EXPR.
8868
8869 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
8870
8871         * method.c (make_thunk): Use overload machinery to make name.
8872         * search.c (covariant_return_p): New fn.
8873         (get_matching_virtual): Use it.
8874
8875         * init.c (build_new_1): Fix check for void.
8876
8877 1998-06-01  Per Bothner  <bothner@cygnus.com>
8878
8879         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
8880         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8881         java_int_type_node, java_long_type_node, java_float_type_node,
8882         java_double_type_node, java_char_type_node, java_boolean_type_node):
8883         New "primitive" types, with predefined names __java_byte etc.
8884         (record_builtin_java_type):  New function.
8885         (init_decl_processing):  Make Java types with record_builtin_java_type.
8886         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
8887         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
8888         (grokfndecl):  Call check_java_method for Java classes.
8889         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
8890         (process_overload_item):  Match types against specific
8891         java_XX_type_node types, rather than using is_java_type.
8892         * class.c (finish_struct_1):  Don't add default copy constructor
8893         or operator= if TYPE_FOR_JAVA.
8894         (pop_lang_conext):  Restore strict_prototyp proper if Java.
8895         * decl2.c (acceptable_java_type, check_java_method):  New functions.
8896         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
8897         (tsubst):  Move common statement after if statement.
8898         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
8899
8900 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
8901
8902         * pt.c (for_each_template_parm): Use first_rtl_op.
8903
8904         * tree.c (build_cplus_array_type_1): Also check index_type for
8905         template parms.
8906
8907 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
8908
8909         * pt.c (tsubst): Always copy BINFO_BASETYPES.
8910
8911 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
8912
8913         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8914         TYPE_SIZE_UNIT too.
8915
8916 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
8917
8918         * decl.c (grokdeclarator): Don't complain about in-class
8919         initialization of static consts if we don't really know the type
8920         of the variable.
8921
8922 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
8923
8924         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8925         * method.c (build_destructor_name): New fn.
8926         * decl2.c (maybe_retrofit_in_chrg): Split out...
8927         (grokclassfn): From here.  Reorganize.
8928         * decl.c (grok_ctor_properties): Make sure ctors for types with
8929         vbases have the in_chrg parm.
8930         * pt.c (instantiate_class_template): Update
8931         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
8932         grok_*_properties.
8933         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8934
8935 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
8936
8937         * pt.c (instantiate_decl): Make test for whether or not static
8938         variables should be instantiated early match its comment.
8939
8940 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
8941
8942         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8943         a member.
8944         (start_function): Call check_default_args.
8945         * decl2.c (grokfield): Don't call check_default_args.
8946         (check_default_args): Use cp_error_at.
8947         * lex.c (do_pending_defargs): Call check_default_args.
8948
8949 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
8950
8951         * call.c (build_method_call): Make sure get_type_value returns
8952         something before we try to use its TYPE_MAIN_VARIANT.
8953         (build_scoped_method_call): Likewise.
8954
8955 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
8956
8957         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
8958         initialize an array.
8959
8960         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
8961         DECL_VIRTUAL_P.
8962
8963         * friend.c (do_friend): Clarify template warning.
8964
8965 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
8966
8967         * decl.c (shadow_label): Don't treat decls as identifiers.
8968         (maybe_push_to_top_level): Clear shadowed_labels.
8969
8970         * pt.c (instantiate_decl): Reset lineno and filename after calling
8971         regenerate_decl_from_template.
8972
8973         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
8974         error_mark_node.
8975
8976 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
8977
8978         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
8979
8980 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
8981
8982         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
8983         (convert_nontype_argument): Handle cases when nontype template
8984         parameters become classes after substitution.
8985
8986 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
8987
8988         * friend.c (is_friend): Use comptypes, rather than == to compare
8989         types.  Modify for new representation of template friends.
8990         (make_friend_class): Likewise.
8991         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
8992         (instantiate_class_template): Deal with template friends.
8993
8994         * decl.c (store_parm_decls): Remove redundant call to
8995         expand_main_function.
8996
8997 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8998
8999         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9000         DECL_USE_TEMPLATE.
9001
9002 1998-05-26  Per Bothner  <bothner@cygnus.com>
9003
9004         * language_as_string:  Handle lang_java.
9005
9006 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9007
9008         * decl.c (pushdecl): Don't copy the type_decl.
9009
9010 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9011
9012         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9013         current_class_type.
9014         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9015
9016         * parse.y (complex_direct_notype_declarator): Use $1 to access
9017         scope of notype_qualified_id.
9018
9019 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9020
9021         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9022         (init_parse): Initialize cpplib interface.
9023
9024         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9025         empty continuation.
9026
9027 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9028
9029         * decl.c (pushtag): Avoid crashing on erroneous input.
9030
9031 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9032
9033         * decl.c (push_namespace): Only produce one unique name for
9034         anonymous namespaces.
9035         (get_unique_name): Remove.
9036
9037 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9038
9039         * call.c (tourney): Don't do any extra comparisons.
9040
9041         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9042
9043         * cp-tree.h (processing_template_parmlist): Declare.
9044         * decl.c (pushtag): Don't call push_template_decl when we
9045         shouldn't.
9046         * pt.c (processing_template_parmlist): New variable.
9047         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9048         (complete_template_args): Use it.
9049         (add_to_template_args): Likewise.
9050         (innermost_args): Likewise.
9051         (tsubst): Likewise.
9052         (begin_template_parm_list): Use processing_template_parmlist.
9053         (end_template_parm_list): Likewise.
9054
9055         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9056         * decl.c (grokdeclarator): Use it.
9057         * decl2.c (grok_x_components): Likewise.
9058         * init.c (initializing_context): Likewise.
9059         * method.c (do_build_copy_constructor): Likewise.
9060         (do_build_assign_ref): Likewise.
9061         * search.c (compute_access): Likewise.
9062         * typeck.c (build_component_ref): Likewise.
9063
9064         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9065         unnamed type a typedef name "for linkage purposes".
9066
9067         * pt.c (lookup_template_class): Don't look at
9068         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9069
9070         * method.c (build_overload_int): Handle error cases gracefully.
9071
9072         * pt.c (instantiate_decl): Handle static member variables
9073         correctly.
9074
9075         * pt.c (tsubst): Use the tsubst'd type when producing new
9076         TEMPLATE_PARM_INDEX nodes.
9077
9078 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9079
9080         * tree.c (cp_tree_equal): Handle pointers to member functions.
9081
9082         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9083         sure the type of the REF_BIND is a reference type.
9084         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9085         target_type for clarity.
9086
9087         * parse.y (xcond): Move call to condition_conversion ...
9088         * semantics.c (finish_for_cond): Here.
9089         * parse.c: Regenerated.
9090
9091 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9092
9093         * decl.c (push_namespace): Namespaces have type void.
9094         * typeck2.c (incomplete_type_error): Complain about namespace
9095         used as expression.
9096         * typeck.c (decay_conversion): Likewise.
9097
9098 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9099
9100         * error.c (dump_expr): Support namespaces.
9101
9102 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9103
9104         * cp-tree.def: Add SRCLOC.
9105         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9106         * tree.c (build_srcloc, build_srcloc_here): New fns.
9107         * pt.c (add_pending_template): Use build_srcloc_here.
9108         (push_tinst_level): Update last_template_error_tick before erroring.
9109         (instantiate_decl): Restore lineno and input_filename before
9110         calling add_pending_template.
9111         * decl2.c (finish_file): Set up lineno and input_filename for
9112         pending templates.
9113
9114 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9115
9116         * decl.c (lang_print_error_function): New fn.
9117         (init_decl_processing): Set print_error_function to use it.
9118         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9119
9120         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9121         ICS_BAD_FLAG.
9122
9123         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9124         copy-initialization.
9125
9126         * class.c (build_vtable_entry): Use int_fits_type_p.
9127         (build_vtable): Pass a signed offset to build_vtable_entry.
9128         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9129         set_rtti_entry): Likewise.
9130
9131 1998-05-22  Per Bothner  <bothner@cygnus.com>
9132
9133         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9134         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9135
9136 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9137
9138         * pt.c (print_template_context): Use fprintf instead of cp_error.
9139
9140         * pt.c (determine_specialization): Just return an error_mark_node.
9141         Also print the decl we want in error messages.  If we complain,
9142         return error_mark_node.
9143         (tsubst_friend_function): Set lineno and input_filename so
9144         error messages will be useful.
9145         (instantiate_template): Just return an error_mark_node.
9146         (check_explicit_specialization): Don't mess with a returned
9147         error_mark_node.
9148
9149         * pt.c (print_template_context): Add new argument.
9150         (maybe_print_template_context): New fn.
9151         (push_tinst_level): Increment tinst_level_tick.
9152         (pop_tinst_level): Likewise.
9153         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9154         xrealloc instead of xmalloc.
9155
9156         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9157
9158 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9159
9160         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9161         if the template we looked up is the same as the one we already
9162         have.
9163
9164 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9165
9166         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9167         (cpp_reader,parse_in): Add for cpplib.
9168         (check_newline): Call handle_sysv_pragma with new interface.
9169         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9170
9171         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9172         (sub_getch): Call GETC for cpplib.
9173
9174         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9175         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9176
9177         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9178
9179 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9180
9181         * decl2.c (maybe_make_one_only): New fn.
9182         (import_export_vtable): Use it.
9183         (import_export_decl): Likewise.
9184         * pt.c (mark_decl_instantiated): Likewise.
9185
9186 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9187
9188         * decl2.c (find_representative_member): Rename to ...
9189         (build_anon_union_vars): New function.
9190         (finish_anon_union): Fix stupidity of previous change.
9191
9192 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9193
9194         * decl.c (grokfndecl): Handle definition of specialization in
9195         friend declaration.
9196
9197         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9198
9199 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9200
9201         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9202         to look for type declarations.
9203         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9204         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9205         (finish_member_class_template): Declare.
9206         * decl.c (pushtag): Put member class templates on the
9207         CLASSTYPE_TAGS list, just as for ordinary member classes.
9208         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9209         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9210         IDENTIFIER_NAMESPACE_VALUEs.
9211         * parse.y (component_decl): Move code to ...
9212         * semantics.c (finish_member_class_template): New function.
9213         Don't put member class templates on the list of components for a
9214         class.
9215         * parse.c: Regenerated.
9216         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9217         In fact, don't use DECL_CONTEXT at all here.
9218
9219 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9220
9221         * decl.c (record_unknown_type): New function.
9222         (init_decl_processing): Call it for the unknown and global type
9223         nodes.
9224
9225 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9226
9227         * decl2.c (find_representative_member): New function.
9228         (finish_anon_union): Use it.
9229
9230         * cp-tree.h (MAIN_NAME_P): New macro.
9231         (DECL_MAIN_P): Likwise.
9232         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9233         (grokfndecl): Use the new macros.
9234         (grokdeclarator): Likewise.
9235         (start_function): Likewise.
9236         (store_parm_decls): Likewise.
9237         (finsh_function): Likewise.
9238         * friend.c (do_friend): Likewise.
9239         * typeck.c (build_function_call_real): Likewise.
9240         (build_unary_op): Likewise.
9241
9242 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9243
9244         * decl2.c (start_objects, finish_objects, do_dtors,
9245         do_ctors): Split out from...
9246         (finish_file): ...here.
9247
9248 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9249
9250         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9251         push_class_decls.
9252
9253 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9254
9255         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9256
9257         * error.c (dump_expr): Handle an ARROW_EXPR.
9258
9259 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9260
9261         * decl.c (saveable_obstack): Declare.
9262         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9263         declare, if necessary.
9264
9265 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9266
9267         * call.c (compare_qual): Remove.
9268         (is_subseq): Tweak.
9269         (is_properly_derived_from): New function.
9270         (maybe_handle_ref_bind): Likewise.
9271         (maybe_handle_implicit_object): Likewise.
9272         (compare_ics): Modify substantially to bring into conformance with
9273         the standard.
9274         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9275         (comp_cv_qualification): Declare.
9276         (comp_cv_qual_signature): Likewise.
9277         * typeck.c (comp_cv_qualification): Likewise.
9278         (comp_cv_qual_signature): Likewise.
9279
9280 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9281
9282         * Makefile.in (parse.o): Depend on toplev.h.
9283
9284         * class.c (typecode_p): Remove prototype and definition.
9285
9286         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9287         Add prototype.
9288
9289         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9290         definition.
9291
9292         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9293         in call to `cp_thing'.
9294         (cp_warning): Likewise for function pointer `warning'.
9295
9296         * except.c (do_function_call): Remove prototype and definition.
9297         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9298
9299         * method.c (is_java_type): Add prototype and make it static.
9300
9301         * parse.y: Include toplev.h.
9302
9303         * pt.c (type_unification): Remove unused variable `arg'.
9304         (instantiate_decl): Likewise for `save_ti'.
9305
9306         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9307
9308 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9309
9310         * init.c (build_member_call): Handle template_ids.
9311         * parse.y (primary): Add global_scope template_id.
9312
9313 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
9314
9315         * decl2.c (get_sentry): Use end_temporary_allocation.
9316         Don't declare permanent_obstack.
9317
9318 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
9319
9320         * parse.y (.finish_new_placement): New non-terminal.
9321         (unary_expr, new_type_id): Use it.
9322         * parse.c: Regenerated.
9323
9324 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
9325
9326         * pt.c (redeclare_class_template): Say where the original definition
9327         of the template-parameter's default argument appeared.
9328
9329 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
9330
9331         * call.c (build_over_call): Tweak empty class handling.
9332
9333         * decl.c (make_typename_type): Use currently_open_class.
9334
9335         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9336
9337 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9338
9339         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9340         for a type unless it is one.
9341
9342         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9343
9344 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
9345
9346         * Makefile.in (program_transform_name, objdir): Define.
9347
9348         * Makefile.in (BISON): Use bison from the build tree if it exists.
9349         (FLEX): Likewise.
9350
9351 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9352
9353         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9354
9355         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9356
9357 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
9358
9359         * call.c (build_scoped_method_call): Likewise.
9360
9361 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
9362
9363         * init.c (build_new_1): Call suspend_momentary around the creation
9364         of values that must be saved for exception handling.
9365         * parse.y (.build_new_placement): New non-terminal.
9366         (unary_expr, new_placement): Use it.
9367         * parse.c: Regenerated.
9368
9369 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
9370
9371         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9372         old and new types.
9373
9374         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9375         canonical type.
9376
9377         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9378
9379 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
9380
9381         * decl.c (start_decl): Revert problem change.
9382
9383         * Makefile.in (CONFLICTS): Fix.
9384
9385 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9386
9387         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9388
9389 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
9390
9391         * class.c (finish_struct_1): Use BINFO_SIZE.
9392
9393         * decl.c (start_decl): Use 'tem'.
9394
9395 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
9396
9397         * exception.cc: Include eh-common.h.
9398         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9399         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9400         (__cp_push_exception): Initialize eh_info struct as well.
9401         * except.c: Remove local structs and include eh-common.h.
9402         (init_exception_processing): Set language and version codes.
9403         (call_eh_info): Add presence of eh_info to runtime description of
9404         struct cp_eh_info.
9405         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9406         * semantics.c (finish_try_block): Call start_catch_block() and
9407         end_catch_block().
9408         * parse.y (function_try_block): Call start_catch_block() and
9409         end_catch_block().
9410
9411 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
9412
9413         * typeck.c (original_type): New function.
9414         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9415         to see if they're actually the same.
9416         * cp-tree.h (original_type): Declare.
9417
9418 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9419
9420         * Makefile.in (lex.o): Depend on output.h.
9421
9422         * call.c (add_function_candidate): Remove unused variable `cand'.
9423         (add_conv_candidate): Likewise.
9424         (build_builtin_candidate): Likewise.
9425
9426         * cp-tree.h: Add prototype for `types_overlap_p'.
9427
9428         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9429
9430         * decl2.c (merge_functions): Remove unused variables `tmp' and
9431         `tempn'.
9432
9433         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9434         (code_as_string): Likewise.
9435         (language_as_string): Likewise.
9436         (parm_as_string): Likewise.
9437         (op_as_string): Likewise.
9438         (assop_as_string): Likewise.
9439         (cv_as_string): Likewise.
9440
9441         * lex.c: Include output.h.
9442
9443         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9444
9445         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9446         ATTRIBUTE_UNUSED.
9447
9448         * tinfo.cc (__class_type_info::dcast): Change the type of variable
9449         `i' from int to size_t.
9450
9451         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9452         ATTRIBUTE_UNUSED.
9453
9454 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
9455
9456         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9457         DECL_NAMESPACE_SCOPE_P.
9458         (lang_decl_name): Likewise.
9459         * pt.c (tsubst_friend_function, tsubst): Likewise.
9460         * decl.c (pushdecl, redeclaration_error_message, start_decl,
9461         cp_finish_decl, start_function): Likewise.
9462         * class.c (finish_struct_1): Likewise.
9463         * call.c (build_over_call): Likewise.
9464         (compare_ics): Use DERIVED_FROM_P.
9465
9466 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
9467
9468         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9469         * method.c (build_mangled_name): Use it.
9470         (build_decl_overload_real): Likewise.
9471
9472         * error.c (dump_simple_decl): New function, broken out from ...
9473         (dump_decl): Use it.
9474
9475 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
9476
9477         * ptree.c (lang_print_xnode): Add missing `break'.
9478
9479         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9480
9481         * call.c (add_template_candidate): Adjust for changes to
9482         fn_type_unification.
9483         (add_template_candidate_real): Likewise.
9484         (add_template_conv_candidate): Likewise.
9485         (build_user_type_conversion_1): Likewise.
9486         (build_new_function_call): Likewise.
9487         (build_object_call): Likewise.
9488         (build_new_op): Likewise.
9489         (build_new_method_call): Likewise.
9490         * class.c (instantiate_type): Likewise.
9491         * cp-tree.h (unification_kind_t): New type.
9492         (fn_type_unification): Adjust prototype.
9493         (type_unificaiton): Likewise.
9494         * pt.c (UNIFY_ALLOW_NONE): New macro.
9495         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9496         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9497         (UNIFY_ALLOW_DERIVED): Likewise.
9498         (unify): Change prototype.
9499         (maybe_adjust_types_for_deduction): New function.
9500         (check_cv_quals_for_unify): Likewise.
9501         (determine_specialization): Adjust.
9502         (fn_type_unification): Likewise.
9503         (type_unification): Likewise.
9504         (type_unification_real): Likewise.  Use
9505         maybe_adjust_types_for_deduction.  Fix mishandling of
9506         back-unification of template functions passed as arguments.  Pass
9507         appropriate combination of UNIFY_ALLOW_* to unify.
9508         (unify): Remove unused NTPARMS parameter.  Use
9509         check_cv_quals_for_unify.  Remove bogus code that allowed
9510         too-generous unification in order to adhere more closely to standard.
9511         (get_bindings_real): Adjust.
9512         (get_class_bindings): Likewise.
9513
9514         * method.c (build_overload_identifier): Only use the innermost
9515         template arguments when mangling.
9516         * pt.c (tsubst_template_argument_vector): New function.
9517         (complete_template_args): Deal with the situation where the
9518         extra_args contain more than one level of arguments.
9519         (lookup_template_class): Deal with member template classes, which
9520         may have more than one level of arguments.
9521         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9522         Improve handling of member template classes.  Use
9523         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
9524         tsubst_template_argument_vector where appropriate.
9525         (regenerate_decl_from_template): Break out from ...
9526         (instantiate_decl): Here.
9527
9528         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9529         * parse.h: Regenerated.
9530         * parse.c: Really regenerated.
9531
9532         * cp-tree.h (finish_unary_op_expr): New function.
9533         (finish_id_expr): Likewise.
9534         (begin_new_placement): Likewise.
9535         (finish_new_placement): Likewise.
9536         (finish_declarator): Likewise.
9537         (finish_translation_unit): Likewise.
9538         (finish_parmlist): Likewise.
9539         (begin_class_definition): Likewise.
9540         (finish_class_definition): Likewise.
9541         (finish_default_args): Likewise.
9542         (finish_inline_definitions): Likewise.
9543         * parse.y (GCC_ASM_KEYWORD): Remove.
9544         (TYPENAME_ELLIPSIS): Likewise.
9545         * parse.c: Regenerated.
9546         Use new functions in semantics.c in the actions for many rules.
9547         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9548         * hash.h: Regenerated.
9549         * semantics.c (finish_expr_stmt): Allow NULL expr.
9550         (finish_unary_op_expr): New function, containing
9551         code previously in parse.y.
9552         (finish_id_expr): Likewise.
9553         (begin_new_placement): Likewise.
9554         (finish_new_placement): Likewise.
9555         (finish_declarator): Likewise.
9556         (finish_translation_unit): Likewise.
9557         (finish_parmlist): Likewise.
9558         (begin_class_definition): Likewise.
9559         (finish_class_definition): Likewise.
9560         (finish_default_args): Likewise.
9561         (finish_inline_definitions): Likewise.
9562
9563 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
9564
9565         * typeck.c (build_c_cast): Don't decay arrays and functions to
9566         pointer type when converting to a class type.
9567
9568 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
9569
9570         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9571         (DECL_CLASS_SCOPE_P): Likewise.
9572
9573 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
9574
9575         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9576         * decl2.c (constructor_name_full): Likewise.
9577
9578 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
9579
9580         * tree.c (mapcar): Add OVERLOAD support.
9581
9582         * init.c (resolve_offset_ref): We must use basetype_path before we
9583         destroy it with a call to convert_pointer_to.
9584
9585 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
9586
9587         * class.c (currently_open_class): New fn.
9588         * decl.c (lookup_name_real): Use it.
9589         * search.c (lookup_field): Likewise.
9590
9591 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9592
9593         * cp-tree.def (OVERLOAD): New node.
9594         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9595         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9596         (NAMESPACE_BINDING): Remove.
9597         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9598         namespace_binding.
9599         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9600         Define.
9601         (tree_overload): New struct.
9602         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9603         (REAL_IDENTIFIER_TYPE_VALUE): Define.
9604         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9605         (lang_decl_flags): Remove in_namespace.
9606         (lang_decl): Remove chain.
9607         (DECL_CHAIN, DECL_NAMESPACE): Remove.
9608         (flag_honor_std): Declare extern.
9609         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9610         namespace_binding, set_namespace_binding,
9611         lookup_function_nonclass, cat_namespace_levels,
9612         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9613         scratch_ovl_cons, ovl_member, build_overload): Declare.
9614         (decl_list_length, get_namespace_id, current_namespace_id,
9615         overloaded_globals_p): Remove.
9616         (lookup_using_namespace, qualified_lookup_using_namespace): Change
9617         return type.
9618         (push_scratch_obstack): New macro.
9619         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9620         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9621         convs, fns.
9622         (build_new_function_call): Iterate using OVL_CHAIN.
9623         Print DECL_NAME in when reporting ambiguities.
9624         (build_object_call): Iterate using OVL_NEXT for fns, convs.
9625         (build_new_op): Call lookup_function_nonclass.
9626         Iterate using OVL_NEXT.
9627         (build_op_delete_call): Change detection of members.
9628         Do not wrap TREE_LIST around fields and single global functions.
9629         (build_over_call): Don't push a class level if the context is a
9630         namespace.
9631         (build_new_method_call): Iterate using OVL_NEXT.
9632         * class.c (add_method): Chain overloaded members using
9633         build_overload.  Remove copying of method.
9634         (grow_method): When iterating through the obstack, expect OVERLOAD
9635         nodes.  Chain overload members.
9636         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
9637         nodes in call to get_baselinks.
9638         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9639         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
9640         fdecls that are OVERLOAD nodes.
9641         (validate_lhs): New function.
9642         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
9643         code.  Use DECL_NAME in error messages.  Split code between global
9644         and member function processing.
9645         * decl.c (global_type_node): New static variable.
9646         (in_std): New global.
9647         (struct binding_level): New field usings.
9648         (resume_binding_level): Assert that we are not in a class.
9649         (toplevel_bindings_p): Just check for namespace_p or
9650         pseudo_global.
9651         (resume_level): Remove.
9652         (find_binding): New function.
9653         (binding_for_name): Call it.
9654         (namespace_binding, set_namespace_binding): New functions.
9655         (push_namespace): Associate binding level with new namespace,
9656         resume_binding_level for existing namespace.  Remove old code.
9657         Fake std by counting.
9658         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9659         (maybe_push_to_top_level): Save current namespace.
9660         (pop_from_top_level): Restore saved namespace.
9661         (pop_namespace): Call suspend_binding_level.  Remove old code.
9662         (cat_namespace_levels): New function.
9663         (set_identifier_type_value_with_scope): For namespace bindings,
9664         set BINDING_TYPE, and use global_type_node.
9665         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9666         (identifier_type_value): New function.
9667         (pushtag): If no context, use current_namespace.
9668         (duplicate_decls): Don't process DECL_CHAIN.
9669         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9670         already set.  Never reset it to NULL_TREE.  Lookup global variables
9671         in their namespace.  Push overloaded templates if they are on
9672         namespace level.
9673         (pushdecl_namespace_level): New function.
9674         (pushdecl_top_level): Implement using pushdecl_namespace_level.
9675         (pushdecl_using_decl): New function.
9676         (overloaded_globals_p): Remove.
9677         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9678         them.  Use namespace_binding and set_namespace_value.
9679         (redeclaration_error_message): Complain if the declarations come
9680         from different namespaces.
9681         (lookup_tag): On namespace level, look in the BINDING_TYPE.
9682         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
9683         old code.
9684         (select_decl): New function.
9685         (lookup_name_real): Call it for qualified and unqualified lookup.
9686         Pass tree_bindings from the stack.
9687         If prefer_type is 1, also accept namespaces.
9688         (lookup_function_nonclass): New function.
9689         (init_decl_processing): Set the binding level of the global
9690         namespace to global_binding_level.
9691         Build a proper type list for __builtin_apply.
9692         Initialize std_node to "fake std" if flag_honor_std is set.
9693         Initialize global_type_node.
9694         Allocated bad_alloc in namespace std if flag_honor_std.
9695         (define_function): Set the DECL_CONTEXT to the current_namespace.
9696         (start_decl): A namespace is not considered as a context here.  If
9697         the DECL_CONTEXT is a namespace, push the decl.
9698         (cp_finish_decl): Check for namespaces used as initializers.
9699         (grokfndecl): Add namespace parameter.  Remove processing of
9700         DECL_CHAIN.
9701         (grokvardecl): Add namespace parameter.
9702         (grokdeclarator): Process SCOPEs that are namespaces.  For
9703         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9704         (start_function): Check for contexts that are namespaces.
9705         Set context for declarations that have not been pushed.
9706         (store_parm_decls): Check for ::main only.
9707         (finish_function): Likewise.
9708         (start_method): Check for contexts that are namespaces.
9709         (start_method): Remove DECL_CHAIN processing.
9710         * decl2.c (flag_honor_std): Declare.
9711         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9712         (decl_namespace_list): New static global.
9713         (grok_x_components): Ignore namespaces as type contexts.
9714         (check_classfn): Expect OVERLOAD nodes.
9715         (grokfield): Remove DECL_CHAIN processing.
9716         (finish_file): Call cat_namespace_levels.
9717         (merge_functions): New function.
9718         (ambiguous_decl): Rewrite.
9719         (lookup_using_namespace): Produce tree_bindings.
9720         (qualified_lookup_using_namespace): Likewise.
9721         (set_decl_namespace, decl_namespace, current_decl_namespace,
9722         push_decl_namespace, pop_decl_namespace): New functions.
9723         (arg_lookup): New struct.
9724         (add_function, arg_assoc_namespace, arg_assoc_class,
9725         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9726         New functions.
9727         (get_namespace_id, current_namespace_id): Remove.
9728         (do_toplevel_using_decl): Rewrite.
9729         (do_class_using_decl): Complain about namespace qualifiers.
9730         (do_using_directive): Sorry if not on namespace level.  Complain
9731         about unknown namespaces.
9732         * error.c (dump_aggr_type): Check for namespace contexts.
9733         * except.c (init_exception_processing): Push terminate into std.
9734         * friend.c (is_friend): A namespace is not a context, here.
9735         * init.c (expand_member_init): Remove DECL_CHAIN processing.
9736         (build_offset_ref): Process OVERLOAD nodes.
9737         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9738         * lex.c (identifier_type): Loop using OVL_CHAIN.
9739         (see_typename): Set looking_for_typename to 2.
9740         (real_yylex): Likewise.
9741         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9742         (do_scoped_id): Expect OVERLOAD nodes.
9743         Change calling convention for qualified_lookup_using_namespace.
9744         (build_lang_decl): Don't set in_namespace anymore.
9745         * method.c (typevec_size): New global.
9746         (build_overload_nested_name): Return if global_namespace.
9747         Otherwise, always expect a declaration context.
9748         (build_qualified_name): Likewise.
9749         Make sure we don't write beyond typevec_size.
9750         (build_decl_overload_real): Likewise.
9751         Allocate one extra slot for the namespace.
9752         (hack_identifier): Mark code dead.
9753         Process OVERLOAD and NAMESPACE_DECL nodes.
9754         * parse.y (program): Pop namespaces until in global namespace.
9755         (extdef): In a using-declaration, don't discard the identifier if
9756         there is no declaration.
9757         (left_curly): Ignore type contexts which are namespaces.
9758         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9759         used as scope.
9760         * pt.c (template_class_depth): Expect types to be namespaces.
9761         (determine_specialization): Simplify by expecting OVERLOAD nodes.
9762         (push_template_decl): Push into namespace level.
9763         Reset ctx if it is a namespace.
9764         Set DECL_CONTEXT to current_namespace if not set already.
9765         Ignore real contexts that are namespaces.
9766         (mangle_class_name_for_template): Skip global_namespace.
9767         Mangle other namespaces as declarations.
9768         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9769         (lookup_template_class): Push into namespace of context.
9770         If the context is a namespace, set it to global_namespace.
9771         Use id_context for mangling.
9772         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9773         (tsubst_friend_function): Ignore namespace contexts.
9774         Push into namespace level.
9775         (tsubst): Handle NAMESPACE_DECL nodes.
9776         Remove DECL_CHAIN processing.
9777         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9778         * ptree.c (print_lang_identifier): Print bindings.
9779         (lang_print_xnode): Print OVERLOAD nodes.
9780         * rtti.c (init_rtti_processing): Push type_info into std.
9781         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9782         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9783         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9784         lookup_fnfields_here): Likewise.
9785         Process all nodes, instead of going through TREE_CHAIN.
9786         * sig.c (build_signature_pointer_or_reference_type): Set context
9787         to global_namespace.
9788         (build_signature_table_constructor): Expect OVERLOAD nodes.
9789         * spew.c (yylex): Save old setting of looking_for_typename.
9790         * tree.c (decl_list_length): Remove.
9791         (binding_init): New function.
9792         (count_functions): Rewrite.
9793         (is_overloaded_fn): Expect OVERLOAD nodes.
9794         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9795         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9796         ovl_member): New functions.
9797         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9798         (type_unknown_p): Likewise.
9799         (require_instantiated_type): Likewise.
9800         (build_component_ref): Declare code dead.
9801         (build_x_function_call): Create and expect OVERLOAD nodes.
9802         (build_function_call_real): Check for ::main only.
9803         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
9804         (convert_for_assignment): Check for TREE_LIST before accessing
9805         TREE_VALUE.
9806         * decl.c (duplicate_decls): Check for namespace bindings instead
9807         of global bindings.
9808         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9809         lookup_name_current_level, start_decl, xref_tag,
9810         finish_enum): Likewise.
9811         * init.c (build_offset_ref): Likewise.
9812         * search.c (lookup_field): Likewise.
9813         (lookup_fnfields): Likewise.
9814         (dfs_debug_mark): Likewise.
9815         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9816         (poplevel_class, pop_from_top_level): Likewise.
9817         * decl2.c (finish_method): Likewise.
9818         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9819         * decl.c (record_builtin_type): Likewise.
9820         (init_decl_processing, grokfndecl): Likewise.
9821         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9822         (make_lang_type): Likewise.
9823         * parse.y (make_thunk): Likewise.
9824         * pt.c (tsubst): Likewise.
9825         * tree.c (debug_binfo): Likewise.
9826         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9827         tinfo2.cc, inc/new.h: Add std qualifications.
9828         * inc/new: Wrap with namespace std if __HONOR_STD.
9829         * inc/typeinfo: Likewise.
9830
9831 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
9832
9833         * call.c (build_user_type_conversion_1): Handle second_conv
9834         properly for templates.
9835
9836 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
9837
9838         * method.c (build_decl_overload_real): Set TREE_USED flag to
9839         zero for build_type_variants nodes as well.
9840
9841 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
9842
9843         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9844
9845 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
9846
9847         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9848         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9849         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9850         xref.o): Add toplev.h dependencies.
9851
9852 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
9853
9854         * errfn.c (cp_error, cp_warning): Remove declarations for
9855         error and warning respectively.
9856
9857 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9858
9859         * error.c: Convert to using ctype macros defined in system.h.
9860         * method.c: Likewise.
9861         * xref.c: Likewise.
9862         * lex.c: Likewise.  Also remove redundant system header stuff.
9863
9864 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
9865
9866         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9867         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9868         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9869         xref.c: Add include of toplev.h.
9870
9871 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
9872
9873         * tree.c (perm_manip): Also regenerate the RTL of an extern.
9874         (copy_to_permanent): Use end_temporary_allocation.
9875
9876 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
9877
9878         * init.c (expand_vec_init): The initialization of each array
9879         element is a full-expression.
9880
9881 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
9882
9883         * method.c (build_mangled_name): Add a call to build_type_variant
9884         to get the right type.
9885
9886 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
9887
9888         * Makefile.in: Add .SUFFIXES.
9889
9890         * cp-tree.def: Remove NAMESPACE_DECL.
9891
9892 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
9893
9894         * call.c (build_over_call): Do evaluate arg even if it has empty
9895         class type.
9896         * decl.c (start_function): Don't push a member function.
9897
9898 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
9899
9900         * Makefile.in (g++FAQ.info): Put -o option before input file.
9901
9902 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
9903
9904         * gxxint.texi: Add info for squangling codes K and B.
9905
9906 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
9907
9908         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9909         the expression in templates.
9910         (finish_stmt_expr): Likewise.
9911
9912 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
9913
9914         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9915
9916 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
9917
9918         * decl.c (maybe_push_to_top_level): Always clear
9919         current_template_parms and processing_template_decl.
9920         (pushtag): Remove check of current_class_type and some comments,
9921         since maybe_push_to_top_level no longer creates confusion.
9922
9923 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
9924
9925         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9926         (DECL_CLASS_TEMPLATE_P): Likewise.
9927         (DECL_PRIMARY_TEMPLATE): Likewise.
9928         (PRIMARY_TEMPLATE_P): Use it.
9929         (push_template_decl_real): New function.
9930         (redeclare_class_template): Take new template parameters as
9931         input.
9932         (is_specialization_of): New function.
9933         (comp_template_args): Declare.
9934         * decl.c (pushtag): Handle friend template classes.
9935         (xref_tag): Likewise.  Use new calling convention for
9936         redeclare_class_template.
9937         * decl2.c (grok_x_components): Handle friend templates.
9938         * friend.c (is_friend): Use is_specialization_of where
9939         appropriate.  Deal with friend class templates.
9940         (make_friend_class): Let a class template be friends with itself.
9941         * pt.c (comp_template_args): Remove declaration.
9942         (tsubst_friend_class): New function.
9943         (push_template_decl_real): New function.
9944         (push_template_decl): Use it.
9945         (redeclare_class_template): Adjust for new calling convention.
9946         (comp_template_args): Give it external linkage.
9947         (instantiate_class_type): Use tsubst_friend_class to deal
9948         with friend templates.
9949         * typeck.c (comptypes): Use comp_template_args, rather than
9950         expanding it inline.
9951         * parse.y (component_decl): Handle a nested template type
9952         like other component type declarations.
9953
9954         * pt.c (check_explicit_specialization): Handle overloaded
9955         constructors correctly.
9956
9957         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
9958         (lookup_template_class): Use it.
9959
9960 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
9961
9962         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
9963         * cp-tree.h: Add WRAPPER support.
9964         * call.c (add_candidate): Split out from add_*_candidate fns.
9965         (build_over_call): Take the candidate instead of function and args.
9966         Enforce access control here.  Emit overload warnings here.
9967         (add_warning): New fn.
9968         (joust): Add WARN parm.  If not set, call add_warning instead of
9969         printing a warning.  Re-enable some warnings.
9970         (tourney): Pass it.
9971         (convert_like): Adjust.
9972         (build_new_op): Adjust.
9973         (build_new_function_call): Adjust.
9974         (build_user_type_conversion_1): Adjust.
9975         (USER_CONV_FN): Adjust.
9976         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
9977         build_int_wrapper): New fns.
9978
9979 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
9980
9981         * pt.c (unify): Fix typo in previous change.
9982
9983 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
9984
9985         * error.c (dump_type_real): Declare canonical_name.
9986
9987         * typeck.c (comp_target_types): Fix PMFs.
9988
9989 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
9990
9991         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
9992         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
9993         TEMPLATE_DECL.
9994
9995         * pt.c (tsubst): Decrease the template-level of
9996         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
9997         TEMPLATE_PARM_INDEX.
9998         (template_decl_level): New function.
9999         (unify): Make sure to record unifications for template
10000         parameters, even when the parameters exactly match the arguments.
10001         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10002         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10003         aren't from the level we're currently working on.
10004
10005 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10006
10007         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10008
10009         * decl2.c (check_member_template): Set DECL_IGNORED for member
10010         class templates, too.
10011
10012         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10013
10014 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10015
10016         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10017
10018 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10019
10020         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10021         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10022         (init_decl_processing): Handle TI types.
10023         * typeck.c (unsigned_type, signed_type): Handle TI types.
10024
10025 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10026
10027         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10028         New local added_libraries.  Increment count when add library to
10029         arglist.
10030
10031 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10032
10033         * cp-tree.h (type_as_string_real): New function.
10034         * pt.c (mangle_class_name_for_template): Use it.
10035         * error.c (dump_aggr_type): Change prototype.
10036         (dump_type_prefix): Likewise.
10037         (dump_type_suffix): Likewise.
10038         (dump_type_real): Convert from dump_type.  If desired, the
10039         "canonica" name of a typedef, i.e., the name of the underlying
10040         type, can be printed.
10041         (dump_type): Call dump_type_real.
10042
10043 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10044
10045         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10046
10047         * typeck.c (comp_target_types): Tweak pedantic case.
10048         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10049         Return -1 or 1 instead of 1 or 2.
10050         (compparms): Remove STRICT handling.
10051         (convert_for_assignment): Fix handling of pmfs.
10052
10053 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10054
10055         * typeck.c (comp_target_types): Handle references like pointers.
10056         (comp_target_parms): Note that return code from comp_target_types
10057         can be negative to indicate failure.
10058
10059 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10060
10061         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10062         which requires a working target compiler to build.
10063
10064 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10065
10066         * tree.c (avoid_overlap): Add prototype.
10067
10068         * spew.c (num_tokens): Add prototype.
10069         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10070
10071         * search.c (dfs_check_overlap): Add prototype.
10072         (dfs_no_overlap_yet): Likewise.
10073
10074         * pt.c (original_template): Add prototype.
10075         (inline_needs_template_parms): Likewise.
10076         (push_inline_template_parms_recursive): Likewise.
10077         (retrieve_specialization, register_specialization): Likewise.
10078         (print_candidates, reduce_template_parm_level): Likewise.
10079         (build_template_decl, mark_template_parm): Likewise.
10080         (tsubst_friend_function, get_bindings_real): Likewise.
10081
10082         * method.c (start_squangling): Add prototype.
10083         (end_squangling, check_ktype, issue_ktype): Likewise.
10084         (build_overloaded_scope_ref, check_btype): Likewise.
10085         (build_mangled_template_parm_index): Likewise.
10086
10087         * lex.c (init_cpp_parse): Add prototype.
10088         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10089         (reduce_cmp, token_cmp): Likewise.
10090
10091         * except.c (call_eh_info): Add prototype.
10092         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10093         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10094
10095         * decl2.c (is_namespace_ancestor): Add prototype.
10096         (namespace_ancestor, add_using_namespace): Likewise.
10097         (ambiguous_decl): Likewise.
10098
10099         * decl.c (indent): Add prototype.
10100
10101         * call.c (add_template_candidate_real): Add prototype.
10102
10103 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10104
10105         * decl2.c (build_expr_from_tree): Just return a PMF.
10106
10107 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10108
10109         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10110         when doing initializations.
10111
10112         * pt.c (unify): Use comptypes to compare type args.
10113
10114 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10115
10116         * decl.c (duplicate_decls): Fix check for when it's safe to free
10117         the new decl.
10118
10119         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10120         to type_as_string.
10121
10122 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10123
10124         * pt.c (build_template_parm_index): Add prototype.
10125
10126         * search.c (my_tree_cons): Don't clear words outside the
10127         newly allocated node.
10128
10129 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10130
10131         * lex.c (init_parse): Now returns char* containing the filename.
10132
10133 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10134                           Jeff Law   <law@cygnus.com>
10135
10136         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10137         than a pointer.
10138
10139 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10140
10141         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10142
10143 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10144
10145         * decl.c (duplicate_decls): Don't warn for redundant decls if
10146         friend: let add_friend take care of it.
10147
10148 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10149
10150         * sig.c (build_signature_pointer_constructor): Don't set
10151         TREE_HAS_CONSTRUCTOR for a signature pointer.
10152         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10153         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10154         here, too.
10155         * typeck.c (build_unary_op): Only allow taking the address of a
10156         real constructor.
10157         * typeck2.c (digest_init): Simplify.
10158         (store_init_value): Don't pedwarn about using { } for pmfs.
10159
10160 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10161
10162         * cp-tree.h (start_decl):  Update prototype.
10163         * decl.c (start_decl):  Like the C version, new parameters
10164         for the attributes.  Call cplus_decl_attributes here,
10165         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10166         (grokdeclarator):  Pass NULL for new start_decl arguments.
10167         * pt.c (tsubst_expr):  Likewise.
10168         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10169         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10170         * lex.c (build_lang_decl): Add lang_name_java.
10171         * class.c (push_lang_context): Add lang_name_java.
10172         * method.c (build_mangled_name): Check for is_java_type.
10173
10174 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10175
10176         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10177         * call.c (build_scoped_method_call): Check for TREE_CODE for
10178         VOID_TYPE instead of type ==  void_type_node.
10179         (build_method_call): Likewise.
10180         * decl.c (lookup_name_real): Likewise.
10181         (grokdeclarator): Likewise.
10182         (start_decl): Likewise.
10183         (grokparms): Likewise.
10184         (start_function): Likewise.
10185         (finish_function): Likewise.
10186         (start_method): Likewise.
10187
10188 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10189
10190         * lex.c (finput): New variable.
10191         (init_cpp_parse):  Renamed from init_parse.
10192         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10193         (finish_parse): New function.
10194         * cp-tree.h (init_lex, init_parse): Remove declarations.
10195
10196 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10197
10198         * call.c (build_call): Still evaluate the actual argument.
10199         * class.c (is_empty_class): Update for -fnew-abi.
10200
10201         * decl2.c: -fnew-abi implies -fsquangle.
10202
10203         * method.c (do_build_assign_ref): Don't do anything to copy
10204         an empty class.
10205         (do_build_copy_constructor): Likewise.
10206         * call.c (build_over_call): Likewise.
10207
10208 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10209
10210         * tree.c (avoid_overlap): Return a value.
10211
10212 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10213
10214         * method.c (check_btype): Add missing argument to xrealloc.
10215         (check_ktype): Likewise.
10216
10217 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10218
10219         Implement empty base optimization.
10220         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10221         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10222         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10223         (types_overlap_p): New fn.
10224         * tree.c (avoid_overlap): New fn.
10225         (build_base_fields): Use it to avoid overlapping empty bases.
10226         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10227
10228         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10229
10230         Re-implement allocation of base class subobjects.
10231         * tree.c (unshare_base_binfos): New fn.
10232         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10233         non-virtual bases, after layout_type.
10234         (layout_vbasetypes): Remove.
10235         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10236         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10237         * class.c (finish_base_struct): Lose offset handling code.
10238         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10239         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10240         * cp-tree.h: Adjust.
10241
10242 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10243
10244         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10245         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10246         * class.c (duplicate_tag_error): Likewise.
10247         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10248         * tree.c (layout_vbasetypes): Update from layout_record, remove
10249         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10250         (layout_basetypes): Likewise.
10251
10252 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10253
10254         * class.c, Make sure system.h is included just after config.h.
10255         Delete lingering stdio and errno references too.
10256         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10257
10258 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10259
10260         * friend.c (is_friend): Fix access control for local classes.
10261
10262         * class.c (is_empty_class): New fn.
10263         * call.c (build_call): Don't pass empty class objects to a function.
10264
10265 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10266
10267         * call.c (build_over_call): Do name resolution for default
10268         arguments of function templates in the scope of the templates.
10269
10270 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10271
10272         * call.c: Include system.h.  Remove includes, declarations and
10273         defines provided by system.h.
10274         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10275         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10276         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10277         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10278         * typeck2.c, xref.c: Likewise.
10279         * Makefile.in: Dependencies updated as appropriate.
10280         * Make-lang.in: Likewise.
10281
10282 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10283
10284         * pt.c (fn_type_unification): Allow incomplete unification without
10285         an immediate error message.
10286
10287 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10288
10289         * tree.c (member_p): New fn.
10290         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10291         initializing class members.
10292
10293         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10294         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10295
10296         * call.c (build_method_call): Handle non-scoped destructors, too.
10297         * pt.c (tsubst_copy): Likewise.
10298
10299         * pt.c (print_template_context): Split out...
10300         (push_tinst_level): ...from here.
10301
10302         * friend.c (is_friend): Don't pass a type to decl_function_context.
10303
10304         * typeck.c (convert_for_initialization): Always hand off
10305         conversions to class type.
10306
10307 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10308
10309         * friend.c (is_friend): Local classes have the same access as the
10310         enclosing function.
10311
10312 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
10313
10314         * typeck.c (expand_target_expr): Delete dead function.
10315
10316         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10317
10318         * repo.c (save_string): Delete dead function.
10319
10320         * method.c (thunk_printable_name): Delete dead function.
10321
10322         * lex.c (yynextch): Delete dead function.
10323
10324         * expr.c (tree_extract_aggr_init): #if 0 out.
10325
10326         * except.c (do_unwind): Delete dead function.
10327         (easy_expand_asm): Likewise.
10328
10329         * cvt.c (build_conversion_type_1): Delete dead function.
10330
10331         * cp-tree.h (push_expression_obstack): Declare.
10332
10333         * call.c (source_type): #if 0 out.
10334
10335         * class.c (alter_access): Remove unused label.  Add braces
10336         around empty else clause.
10337
10338         * lex.c (yyprint): Fix argument to printf.
10339
10340 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
10341
10342         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10343
10344         * pt.c (instantiate_class_template): Make sure template
10345         arguments are permanent.
10346         * init.c (resolve_offset_ref): Don't go looking around in
10347         template types.
10348
10349         * semantics.c: Add routines to handle expressions, and some
10350         declaration processing.
10351         * parse.y: Use them.
10352         (current_class_depth): Move declaration to cp-tree.h.
10353         * parse.c: Regenerated.
10354         * cp-tree.h: Use them.
10355         (current_class_depth): Declare.
10356         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10357
10358 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
10359
10360         * error.c (dump_decl): Be a bit more explicit with template
10361         type arguments, when verbose.
10362
10363 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
10364
10365         * inc/exception: Reorder closing braces.
10366
10367 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
10368
10369         * pt.c (redeclare_class_template): New function.
10370         * cp_tree.h (redeclare_class_template): Declare it.
10371         * decl.c (xref_tag): Use it.
10372
10373 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
10374
10375         * call.c (build_over_call): Check IS_AGGR_TYPE, not
10376         TYPE_LANG_SPECIFIC.
10377         * typeck.c (convert_arguments): Likewise.
10378
10379         * decl.c (grokdeclarator): Remove const and volatile from type after
10380         setting constp and volatilep.
10381
10382         * class.c (finish_struct_1): Don't warn about bool bitfield larger
10383         than one bit.
10384
10385 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
10386
10387         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10388
10389 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
10390
10391         * call.c (build_object_call): Complain about ambiguous operator(),
10392         rather that crashing.
10393         (build_new_op): Likewise.
10394         (build_op_delete_call): Likewise.
10395
10396 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
10397
10398         * cvt.c (perform_qualification_conversions): Use comp_target_types
10399         instead of comp_ptr_ttypes.
10400
10401 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
10402
10403         * cp-tree.h (enforce_access): Declare.
10404         * call.c (enforce_access): Make it extern, not static.
10405         * class.c (alter_access): Use enforce_access; modify code for ISO
10406         compliance, rather than ARM rules.
10407
10408 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10409
10410         * cp-tree.h: Fix typo.
10411
10412 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
10413
10414         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10415         if (aggregate_value_p (type)).
10416
10417         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10418
10419 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
10420
10421         * tree.c (mapcar): When dealing with a DECL, use it's constant
10422         value, if any.
10423         * pt.c (lookup_template_class): Don't mangle the names of template
10424         classes whose arguments are unknown.
10425
10426         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10427
10428 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10429
10430         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10431
10432 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
10433
10434         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10435         boolean_type_node to 1.
10436
10437 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
10438
10439         * error.c (dump_expr): Remove unused variable `l'.
10440
10441         * pt.c (for_each_template_parm): New function, created by
10442         converting uses_template_parms.
10443         (tree_fn_t): New typedef.
10444         (uses_template_parms): Use it.
10445         (mark_template_parm): New function.
10446         (push_template_decl): Check that the argument list of a partial
10447         specialization uses all the template parameters.
10448
10449         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10450         with it; we might want it for debugging.
10451         * cp-tree.h (type_unification): Change interface.
10452         * class.c (finish_struct_1): Skip nested template types, just like
10453         ordinary nested types.
10454         (instantiate_type): Use new interface to type_unification.
10455         * lex.c (init_lex): Add __sz as opname for sizeof.
10456         * method.c (build_overload_scope_ref): New function.
10457         (build_overload_int): Handle complex expressions.  Set
10458         numeric_output_need_bar if necessary.
10459         (build_overload_value): Handle non-PARM_DECL nodes; this
10460         routine is now used by build_overload_int.  Remove some
10461         assignments to numeric_output_need_bar.  Use
10462         build_overload_scope_ref.
10463         (build_qualified_name): Note that some template mangled names end
10464         with digits, and set numeric_output_need_bar appropriately.  Use
10465         build_underscore_int.
10466         * pt.c (unify): Change interface.
10467         (type_unification_real): Likewise.
10468         (determine_specialization): Use new interfaces.
10469         (tsubst): Deal gracefully with situations in which the argument
10470         vector is not fully filled.
10471         (fn_type_unification): Use new interfaces.
10472         (type_unification): Likewise.  Remove NOP_EXPR hack.
10473         (type_unification_real): Likewise.
10474         (unify): Likewise.  Deal with unification of complex expressions.
10475
10476 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10477
10478         * pt.c (complete_template_args): Initialize skip properly.
10479
10480         * decl.c (make_typename_type): Revert.
10481         (make_implicit_typename): Remove.
10482         (lookup_name_real): Don't call it.  Call lookup_field if we see a
10483         TYPE_DECL from a template base.
10484         * search.c (lookup_field): Do implicit typename stuff.
10485
10486 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
10487                           Geoff Noer    <noer@cygnus.com>
10488
10489         * Makefile.in: Various fixes for building cygwin32 native toolchains.
10490         * Make-lang.in: Likewise.
10491
10492 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10493
10494         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10495
10496 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
10497
10498         * decl.c (make_implicit_typename): Rewrite removed code.
10499         (make_typename_type): Call it if the type we look up comes from
10500         a base that uses template parms.
10501
10502         * pt.c (complete_template_args): Rewrite.
10503         (tsubst, FUNCTION_DECL): Use it.
10504
10505 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
10506
10507         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
10508         c_expand_asm_operands () if output_operands, input_operands or
10509         clobbers is not NULL_TREE.
10510
10511 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10512
10513         * pt.c (complete_template_args): New function.
10514         (get_bindings): Deal with specializations of function templates
10515         with return type containing parameters from outer class
10516         templates.
10517         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10518         substitute arguments and compose a new type.
10519
10520 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
10521
10522         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10523         FUNCTION_DECLs.
10524
10525 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10526
10527         * decl.c (make_implicit_typename): Lose useless code.
10528
10529         * call.c (standard_conversion): Handle A* -> const A* properly.
10530
10531         * pt.c (get_bindings_real): Rename from get_bindings.  Add
10532         check_rettype parm.
10533         (get_bindings): Pass 1.
10534         (get_bindings_overload): Pass 0.
10535
10536 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
10537
10538         * pt.c (check_explicit_specialization): When reverting a static
10539         member function, also remove the `this' parameter from
10540         last_function_parms.
10541
10542 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10543
10544         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10545         a function context.
10546
10547         * decl.c (store_bindings): Use free_binding_vecs.
10548         (pop_from_top_level): Likewise.
10549
10550 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10551
10552         * decl.c (make_implicit_typename): Only change the type of a
10553         TYPENAME_TYPE.
10554
10555 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
10556
10557         * semantics.c: New file, containing routines to perform the
10558         semantic phase of parsing.
10559         * parse.y: Use it.
10560         * pt.c (tsubst_expr): Likewise.
10561         * cp-tree.h: Declare the various functions in semantics.c.
10562         Provide macros to access _STMT tree nodes.
10563         * cp-tree.def: Add ASM_STMT tree node.
10564         * Makefile.in, Make-lang.in: Add dependencies on and for
10565         semantics.c.
10566
10567 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
10568
10569         * pt.c (push_template_decl): Only check primary templates.
10570
10571         * pt.c (check_explicit_specialization): Complain about default args
10572         in explicit specialization.
10573
10574         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10575         constructor_declarator.
10576
10577 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
10578
10579         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10580         has no overloaded operator ->.
10581
10582         * call.c (build_field_call): Don't crash when presented with a
10583         field that is actually a nested type.
10584
10585         * decl.c (pushtag): Deal with friend class injection in local
10586         classes.
10587
10588         * call.c (build_object_call): Don't crash if OBJ is a
10589         pointer-to-member-function.
10590
10591 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10592
10593         * pt.c (push_template_decl): Complain about template with C linkage,
10594         anonymous template class.
10595
10596 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10597
10598         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10599         * search.c: Likewise.
10600
10601         * lex.c (do_pending_defargs): Only call
10602         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10603
10604         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10605
10606 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
10607
10608         * parse.y: Deal with CONSTRUCTORS in new_initializers.
10609
10610 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
10611
10612         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10613         closely mimics the behavior in parse.y.
10614         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10615         into a compound statement.
10616
10617 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
10618
10619         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10620         * pt.c (inline_needs_template_parms): New fn.
10621         (original_template): New fn.
10622         (push_inline_template_parms_recursive): New fn.
10623         (maybe_begin_member_template_processing): Use them.
10624         (maybe_end_member_template_processing): Likewise.
10625         (is_member_or_friend_template): Rename to is_member_template.
10626         Member functions of local classes are never member templates.
10627
10628 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10629
10630         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10631         added in the class scope to catch redefinition error.
10632
10633         * pt.c (reduce_template_parm_level): Also copy
10634         the DECL_TEMPLATE_PARMS field.
10635
10636 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
10637
10638         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10639         reduced-level template type parameter.
10640
10641 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10642
10643         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10644         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10645         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10646         * decl.c (duplicate_decls): Propagate it.
10647         * typeck2.c (abstract_virtuals_error): Use two loops to emit
10648         abstract virtual functions and virtual functions which need a
10649         final overrider separately.
10650
10651 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10652
10653         * lang-specs.h: Properly put brackets around array elements in
10654         initializer.
10655
10656         * typeck.c (build_binary_op_nodefault): Correctly place parens around
10657         && and || in expression.
10658
10659 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10660
10661         * call.c (default_parm_conversions): Remove prototype definition.
10662         (build_method_call): Remove unused variable result.
10663
10664         * cvt.c (ocp_convert): Remove unused variable conversion.
10665
10666         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10667
10668         * except.c (do_unwind): #if 0 definition of unused variables fcall
10669         and next_pc.
10670
10671         * expr.c (extract_scalar_init): #if 0 prototype and function
10672         definition.
10673
10674         * init.c (expand_aggr_init_1): Remove unused variable init_type.
10675         (build_new_1): Remove unused variable t.
10676
10677         * pt.c (instantiate_class_template): Remove unused variable newtag;
10678         cast called function return value to void.
10679         (do_decl_instantiation): Remove unused variables name and fn.
10680
10681         * tree.c (get_type_decl): Add default return to shut up compiler from
10682         complaining control reaches end of non-void function.
10683
10684         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10685
10686 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10687
10688         * call.c (default_parm_conversions): Remove prototype definition.
10689         (build_method_call): Remove unused variable result.
10690         (build_over_call): Add default case in enumeration switch.
10691
10692 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
10693
10694         * decl2.c (lang_decode_option): Change j's type to size_t.
10695
10696         * tree.c (layout_vbasetypes): record_align and desired_align are of
10697         type unsigned int; const_size and nonvirtual_const_size likewise.
10698
10699 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
10700
10701         * parse.y (new_initializer): Make sure all initializers are
10702         lists.
10703
10704 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
10705
10706         * decl2.c (import_export_decl): Mark tinfo functions for
10707         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10708
10709 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
10710
10711         * method.c: Fix typo.
10712
10713 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10714
10715         * method.c: Include "system.h" to get stdlib.h, stdio.h,
10716         ctype.h, string.h, etc.
10717         (issue_nrepeats): Add default case in enumeration switch.
10718         (check_btype): Likewise.
10719         (process_overload_item): Likewise.
10720
10721         * Makefile.in (method.o): Depend on system.h.
10722
10723 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10724
10725         * lex.c (do_scoped_id): Fix parenthesizing.
10726
10727 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
10728
10729         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10730         FLAG_RTTI is unset, initialize type info machinery and continue
10731         with FLAG_RTTI enabled.
10732         (get_typeid): Likewise.
10733
10734 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10735
10736         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10737         from B.
10738
10739 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
10740
10741         * pt.c (finish_member_template_decl): Deal more gracefully with
10742         invalid declarations.
10743
10744 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
10745
10746         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10747         cp-tree.h: Clean up more old overloading code, old RTTI code, and
10748         some formatting quirks.
10749
10750         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10751         method.c, pt.c, ptree.c, typeck.c: Remove support for
10752         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10753         * class.h: Remove.
10754         * Makefile.in: Adjust.
10755
10756         * pt.c (unify): Don't allow reduced cv-quals when strict.
10757
10758         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10759         *type_unification* and unify.
10760
10761 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10762
10763         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10764         (nested_name_specifier): And add it before this use.
10765         (typename_sub0): And this use.  Also add use without the keyword.
10766         (typename_sub1): Likewise.
10767         * pt.c (instantiate_class_template): Don't actually instantiate
10768         anything if our type uses template parms.
10769
10770 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
10771
10772         * decl.c (start_function): Don't call temporary_allocation for a
10773         nested function.
10774
10775 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10776
10777         * pt.c (instantiate_class_template): Don't mess with friends if
10778         our type uses template parms.
10779
10780 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
10781
10782         * parse.y (nested_name_specifier): Use explicit_template_type.
10783         (typename_sub): Allow a template_type, an explicit_template_type,
10784         or an implicit template type at the end.
10785         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10786         * decl.c (make_typename_type): Handle template-id where the name
10787         is a TEMPLATE_DECL.
10788         * call.c (build_scoped_method_call): Handle member template
10789         destructor call.
10790         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10791         destructor is represented by the type.
10792
10793         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10794         * parse.y (nested_name_specifier): Add 'template' case.
10795         (explicit_template_type): New rule.
10796         (typename_sub): Use it.
10797         * decl.c (make_typename_type): Handle getting a template-id for NAME.
10798         * pt.c (tsubst): Likewise.
10799
10800 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10801
10802         * pt.c (add_to_template_args): Fix thinko.
10803         (instantiate_class_template): Call it later.
10804
10805         * pt.c (get_class_bindings): Add outer_args parm.
10806         (most_specialized_class): Likewise.
10807         (instantiate_class_template): Pass it.
10808         (more_specialized_class): Likewise.
10809         (lookup_template_class): Get context from template if none
10810         was specified.
10811         (finish_member_template_decl): Don't do anything with a
10812         partial specialization.
10813         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10814         AGGREGATE_TYPE_P.
10815         * class.c (finish_struct): Member class templates have already been
10816         checked for name clashes.
10817         * decl.c (pushdecl_with_scope): Handle pushing at class level.
10818
10819 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
10820
10821         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10822         (tsubst, *_PARM): Support multiple levels of template classes.
10823         (instantiate_class_template): Look up the pattern from the
10824         original template.
10825         (lookup_template_class): Handle getting a template for d1.
10826         (push_template_decl): Correct setting of 'primary'.
10827         (reduce_template_parm_level): Add 'levels' parm.
10828         (finish_member_template_decl): Support member class templates.
10829         (template_class_depth): Handle multiple levels.
10830         * parse.y (component_decl_1, fn.def2): Remove member template case.
10831         (component_decl): Add member template cases.
10832         * decl2.c (check_member_template): We now handle member template
10833         classes.
10834         * decl.c (pushtag): Handle member templates.
10835         * method.c (do_inline_function_hair): Don't touch
10836         IDENTIFIER_GLOBAL_VALUE.
10837         * init.c (build_offset_ref): If name isn't an identifier, just
10838         return it.
10839         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10840
10841         * typeck.c (get_delta_difference): Do adjust for conversions to
10842         and from virtual base.
10843
10844 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
10845
10846         * typeck.c (get_delta_difference): Give hard error for conversion
10847         from virtual base.
10848
10849         * cp-tree.h: Tweak formatting.
10850
10851 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
10852
10853         * decl.c (push_namespace): Handle redeclaration error.
10854
10855         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10856         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10857         (NAMESPACE_BINDING): New macro.
10858         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10859         * *.c: Use them.
10860
10861         * pt.c (push_template_decl): Use innermost_args.
10862
10863         * decl.c (get_unique_name): Tweak from earlier in the name.
10864
10865 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10866
10867         * cp-tree.def: Add CPLUS_BINDING node.
10868         * cp-tree.h (tree_binding): New struct.
10869         (BINDING_SCOPE, BINDING_VALUE): New macros.
10870         (current_namespace, global_namespace): Declare extern.
10871         (struct lang_decl_flags): New field in_namespace.
10872         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10873         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10874         (TREE_INDIRECT_USING): New macro.
10875         * decl2.c (current_namespace, global_namespace): Declare.  The
10876         value is a NAMESPACE_DECL now, not a TREE_LIST.
10877         (is_namespace_ancestor, namespace_ancestor): New static functions.
10878         (add_using_namespace, ambiguous_decl): Likewise.
10879         (lookup_using_namespace): New support function for lookup_name.
10880         (qualified_lookup_using_namespace): New support function for
10881         do_scoped_id and lookup_namespace_name.
10882         (get_namespace_id): Mark as obsolete.
10883         (current_namespace_id): Likewise.
10884         (do_namespace_alias): Implement.
10885         (do_using_directive): Implement as call to add_using_namespace.
10886         * decl.c (binding_for_name): New function.
10887         (push_namespace, pop_namespace): Implement.
10888         (push_decl): Don't install a FUNCTION_DECL in the global branch.
10889         (lookup_namespace_name): Implement using qualified lookup.
10890         (lookup_name_real): For global scoping, lookup in
10891         global_namespace.  For namespace scoping, lookup in given
10892         namespace.  For unscoped lookup, iterate over namespace,
10893         considering using directives.
10894         (init_decl_processing): Initialize global_namespace.
10895         (grokvardecl): Build assembler name as static name for globals.
10896         (grokdeclarator): Remove old namespace mangling.
10897         (xref_tag): When installing a global binding for the
10898         tag, make sure we have an identifier.
10899         * method.c (build_overload_nested_name): Mangle namespaces.
10900         (build_qualified_name): Likewise.
10901         (build_decl_overload_real): Likewise.
10902         * lex.c (build_lang_decl): Set namespace for new declaration to
10903         current_namespace.
10904         (do_scoped_id): Find global names in global or current
10905         namespace, or using qualified namespace lookup, depending on
10906         context.
10907         * init.c (build_member_call): When scope is namespace, use
10908         build_x_function_call instead.
10909         (build_offset_ref): When scope is namespace, collapse processing
10910         to lookup_namespace_name instead.
10911         * error.c (dump_decl): Support NAMESPACE_DECL.
10912         * decl.c (pushdecl): Bind globals to current namespace.
10913         (push_overloaded_decl): Likewise.
10914         (lookup_tag): Likewise.
10915         (lookup_name_current_level): Likewise.
10916         (xref_tag): Likewise.
10917         (start_function): Likewise.
10918         * lex.c (do_identifier): Likewise.
10919         (identifier_typedecl_value): Likewise.
10920         (real_yylex): Likewise.
10921         * method.c (do_inline_function_hair): Likewise.
10922         * parse.y (unscoped): Likewise.
10923         * pt.c (check_explicit_specialization): Likewise.
10924         (lookup_template_class): Likewise.
10925         * rtti.c (call_void_fn): Likewise.
10926         * sig.c (build_sigtable): Likewise.
10927         * ptree.c (lang_print_xnode): New function.
10928
10929 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
10930
10931         * pt.c (instantiate_class_template): Don't instantiate if pedantic
10932         and the args use template parms.
10933
10934         * pt.c (push_tinst_level): If the instantiation uses template parms,
10935         fail silently.
10936         * decl.c (xref_basetypes): Do call complete_type for basetypes
10937         that involve template parameters.
10938
10939 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
10940
10941         * typeck2.c (process_init_constructor): Fix labeled init check.
10942
10943 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
10944
10945         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10946         argument to tsubst and friends.
10947
10948         * pt.c (tsubst, FUNCTION_DECL): Tidy.
10949
10950         * typeck.c (build_x_function_call): Handle static member function
10951         templates like non-templates.  Handle friend templates like normal
10952         function templates.
10953         * pt.c (tsubst, *_PARM): Don't use orig_level.
10954         (get_bindings): Don't call add_to_template_args.
10955         (instantiate_template): Likewise.
10956         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
10957         * ptree.c (print_lang_type): Print index/level for template parms.
10958
10959 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
10960
10961         * Make-lang.in (cc1plus): Note that cc1plus depends on
10962         cp/cp-tree.h and cp/cp-tree.def.
10963
10964         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
10965         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
10966         position in a template parameter list.
10967         * cp-tree.h (template_parm_index): New structure, used as the tree
10968         structure for a TEMPLATE_PARM_INDEX.
10969         (TEMPLATE_PARM_IDX): New macro.
10970         (TEMPLATE_PARM_LEVEL): Likewise.
10971         (TEMPLATE_PARM_DESCENDANTS): Likewise.
10972         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
10973         (TEMPLATE_PARM_DECL): Likewise.
10974         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10975         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
10976         (TEMPLATE_TYPE_DECL): Likewise.
10977         (TEMPLATE_CONST_IDX): Remove.
10978         (TEMPLATE_CONST_LEVEL): Likewise.
10979         (TEMPLATE_CONST_SET_INFO): Likewise.
10980         (TEMPLATE_TYPE_SET_INFO): Likewise.
10981         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
10982         node.
10983         (TEMPLATE_TYPE_LEVEL): Likewise.
10984         * decl.c (decls_match): Call comp_template_parms, rather than
10985         expanding it inline.
10986         (duplicate_decls): If two template declarations are being merged,
10987         then their TEMPLATE_INFOs should be merged as well.
10988         (grokfndecl): Save template-id information when declaring a friend
10989         with explicit template arguments.  Pass arguments to
10990         check_explicit_specialization via correct convention; at some
10991         point check_explicit_specialization changed, but these call-sites
10992         did not.
10993         (grokdeclarator): Tidy up slightly.
10994         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
10995         two template functions with the same DECL_ASSEMBLER_NAME the same,
10996         since the names are not yet mangled.
10997         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
10998         TEMPLATE_CONST_PARM.
10999         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11000         decl for a non-type parameter, rather than printing `<tparm ...>'.
11001         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11002         (do_friend): Deal with template friends.
11003         * lex.c (do_pending_inlines): Call
11004         maybe_begin_member_template_processing, rather than
11005         conditionally calling begin_member_template_processing.
11006         (process_next_inline): Likewise.  Call
11007         maybe_end_member_template_processing, rather than
11008         conditionally calling end_member_template_processing.
11009         (do_pending_defargs): Likewise.
11010         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11011         TEMPLATE_CONST_PARM.
11012         * method.c (build_mangled_template_parm_index): New function.
11013         (build_overload_value): Use it.
11014         (build_overload_name): Likewise.
11015         * pt.c (finish_member_template_decl): Allow friend declarations.
11016         (template_class_depth): New function.
11017         (is_member_template): Rename, and modify, to become...
11018         (is_member_or_friend_template): New function.
11019         (end_member_template_processing): Rename, and modify, to become...
11020         (maybe_end_member_template_processing).
11021         (build_template_parm_index): New function.
11022         (reduce_template_parm_level): New function.
11023         (process_template_parm): Modify to use build_template_parm_index.
11024         (push_template_decl): Deal with friend templates.
11025         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11026         TEMPLATE_CONST_PARM.
11027         (tsubst_friend_function): New function.
11028         (instantiate_class_template): Generate the DECL_FRIENDLIST
11029         for a new instantiation by using tsubst_friend_function rather
11030         than just tsubst.
11031         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11032         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11033         appropriate new macros.  Use reduce_template_parm_level to
11034         generate lower-level template parameters.  Handle tsubst'ing into
11035         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11036         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11037         templates.  Similarly for the template parameters for a new
11038         template.
11039         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11040         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11041         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11042         (get_bindings): Call add_to_template_args if necessary.
11043         (instantiate_decl): Handle instantiations of friend templates.
11044         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11045         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11046         * spew.c (yylex): Do a little manual constant propagation to
11047         clarify the code.
11048
11049 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11050
11051         * error.c: Include sys/types.h.
11052
11053 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11054
11055         * method.c (build_mangled_name): Start CPP directives in column zero.
11056
11057 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11058
11059         * typeck2.c (process_init_constructor): Sorry about non-trivial
11060         labeled initializers.
11061         * parse.y (initlist): Re-enable labeled initializers.
11062
11063 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11064
11065         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11066         all callers changed.  Rely on the new parameter instead of arg
11067         being a TREE_LIST when determine whether we are working inside
11068         template template parameter.  Clean up is_type test.
11069
11070 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11071
11072         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11073         * typeck2.c (initializer_constant_valid_p): Allow conversions
11074         between pointers and references.
11075
11076 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11077
11078         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11079         if pedantic || warn_pointer_arith.
11080
11081 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11082
11083         * pt.c (unify): Handle TEMPLATE_DECL.
11084
11085 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11086
11087         * cp-tree.h (strip_attrs): Remove decl.
11088
11089 1998-02-18  Doug Evans  <devans@cygnus.com>
11090
11091         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11092         Update olddecl's attributes too.
11093         (strip_attrs): Remove function.
11094         * typeck.c (common_type): Call merge_machine_type_attributes.
11095
11096 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11097
11098         * parse.y (initdcl0_innards): New grammar symbol.
11099         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11100         none, since the resulting value is never used.
11101         (parse_decl): New function.
11102         (datadef): Remove redundant actions.
11103         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11104         * parse.c: Regenerated.
11105
11106 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11107
11108         * parse.y (simple_stmt): Use getdecls() to check for decl.
11109
11110 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11111
11112         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11113         macros.
11114         (c++.install-common): Install c++filt properly as native or as cross
11115         variant.
11116         (c++.uninstall): Add c++filt.
11117
11118 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11119
11120         * call.c (standard_conversion): Fix multi-level ptr conversions.
11121
11122 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11123
11124         * init.c (build_new): Propagate error_mark_node up.
11125
11126 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11127
11128         * parse.y (simple_stmt): If the condition isn't a declaration,
11129         start the controlled block after the test.
11130
11131 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11132
11133         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11134         tree-codes.
11135         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11136         builtins.
11137
11138 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11139
11140         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11141
11142 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11143
11144         * cp-tree.h: Add access_protected_virtual_node.
11145         * class.c (init_class_processing): Initialize it.
11146         * decl.c (xref_basetypes): Use it.
11147         * parse.y (base_class_access_list): Likewise.
11148
11149         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11150         (c++.install-common): Install c++filt.
11151
11152 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11153
11154         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11155
11156 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11157
11158         * call.c (reference_binding): Use comptypes when comparing
11159         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11160
11161 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11162
11163         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11164         (really_overloaded_fn): Move check here from is_overloaded_fn.
11165         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11166
11167 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11168
11169         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11170         conversions.
11171
11172 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11173
11174         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11175         equivalent duplicate.
11176         * decl.c (pushtag): Use the return value from push_template_decl.
11177         (duplicate_decls): When duplicating a template declaration, merge
11178         the DECL_TEMPLATE_RESULTs as well.
11179         (make_implicit_typename): Don't try to dive into typename types to
11180         find a context for making a new implicit typename.
11181         (start_decl): Use the return value from push_template_decl.
11182         (grokdeclarator): Complain about declarations list `const operator
11183         int'.  Since we don't correctly handle in-class initializations of
11184         non-static data members, complain about this (now illegal)
11185         practice.  Issue an error for initializations of non-const statics
11186         since that is illegal as well, and since we don't handle that case
11187         correctly either.
11188         (start_function): Use the return value from push_template_decl.
11189         (start_method): Likewise.
11190         * decl2.c (grokfield): Likewise.  Since the change to
11191         grokdeclarator ensures that all initialized fields are in fact
11192         static, remove a redundant test for TREE_PUBLIC.
11193         * parse.y (initlist): Disable labeled initializers since they do
11194         not work as per the documentation, and since they do not use the
11195         same syntax as the C front end.
11196         * pt.c (push_template_decl): Return the decl passed in, or an
11197         equivalent duplicate.
11198         (lookup_template_class): When searching in a nested context,
11199         use the right arguments.
11200         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11201         * typeck.c (build_component_ref): Assign the correct type to the
11202         result of build_vfn_ref.
11203
11204 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11205
11206         * pt.c (convert_nontype_argument): Fix typo.
11207         (check_explicit_specialization): Allow old-style specialization
11208         of class template members.
11209
11210 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11211                           Manfred Hollstein  <manfred@s-direktnet.de>
11212
11213         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11214         when deciding to override DECL_ASSEMBLER_NAME.
11215
11216 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11217
11218         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11219         * cp-tree.h (flag_do_squangling): Add declaration.
11220         * lang-options.h: Add -fsquangle and -fno-squangle.
11221         * method.c: Add macros and static variables for squangling.
11222         (build_overload_name): Rename to build_mangled_name, add logic for B
11223         compression, and split into process_modifiers and
11224         process_overload_item.
11225         (process_modifiers): New function, to handle constant, reference,
11226         and pointer types.
11227         (process_overload_item): New function, handles issue of type codes.
11228         (build_overload_name): New function, start squangling and call
11229         build_mangled_name.
11230         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11231         (start_squangling): New function to initialize squangling structs.
11232         (end_squangling): New function to destroy squangling structs.
11233         (nrepeats): Rename variable to Nrepeats.
11234         (issue_nrepeats): New function for issuing 'n' type repeats.
11235         (check_ktype): New function to check for type K name compression.
11236         (build_overload_nested_name): Add a check for K name compression.
11237         (build_qualified_name): Add a check for K name compression and don't
11238         use DECL_ASSEMBLER_NAME when squangling is on.
11239         (check_btype): New function, checks for B type compression.
11240         (build_static_name, build_decl_overload_real): Initiate squangling.
11241         (build_typename_overload, build_overload_with_type): Initiate
11242         squangling
11243
11244 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11245
11246         * method.c (make_thunk): Avoid name buffer overflow.
11247
11248 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11249
11250         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11251         don't define them yet.
11252
11253         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11254
11255 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11256
11257         * config-lang.in (diff_excludes): Use basename only.
11258
11259 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11260
11261         * tinfo2.cc: Add tinfo for signed char.
11262
11263 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11264
11265         * search.c (compute_access): Handle protected constructors in derived
11266         classes as accessible.
11267
11268 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11269
11270         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11271         Call convert_from_reference sooner.
11272
11273 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11274
11275         * cvt.c (ocp_convert): Obtain the constant values from constant
11276         decls even if the destination type is the same as the type of the
11277         decl.
11278
11279         * decl2.c (finish_file): Make sure that static inlines with
11280         definitions are not marked DECL_EXTERNAL before returning.
11281
11282 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11283
11284         * decl.c: Lose arg_looking_for_template.
11285         (lookup_name_real): Likewise.
11286         * parse.y: Lose processing_template_arg, template_arg1.
11287         (primary): Likewise.
11288         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11289
11290 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11291
11292         * error.c (dump_decl): Fix type of default arguments for template
11293         template parameters and nontype template parameters.
11294         * parse.y (template_parm): Handle invalid default template
11295         template arguments here.
11296
11297         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11298         for default template template argument.
11299         * pt.c (coerce_template_parms): Merge default template argument
11300         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11301         created.  Fix argument index in error message.
11302         * typeck.c (comptypes): Merge template argument comparison codes in
11303         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11304
11305 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11306
11307         * lex.c (file_name_nondirectory): Also check for '/'.
11308
11309 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
11310
11311         * parse.y (primary): Deal with statement-expressions in
11312         templates.
11313         * pt.c (tsubst_copy): Handle BIND_EXPR.
11314         * tree.c (mapcar): Likewise.
11315
11316         * call.c (add_template_candidate_real): Pass extra parameter to
11317         fn_type_unification.
11318         * cp-tree.h (fn_type_unification): Add parameter.
11319         * pt.c (fn_type_unification): Add additional parameter to deal with
11320         static member functions.
11321         (get_bindings): Deal with static member functions.
11322
11323         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11324         (revert_static_member_fn): Declare.
11325         * decl.c (revert_static_member_fn): Remove declaration.  Change
11326         linkage from internal to external.
11327         (cp_finish_decl): Deal with virtual functions in classes local to
11328         template functions.
11329         * decl2.c (finish_file): Don't forget to emit increment/decrement
11330         expressions in initializers for file-scope variables.
11331         * parse.y (typename_sub2): If the typename doesn't names a
11332         template, rather than a type, issue an error message.
11333         * pt.c (check_explicit_specialization): Handle specializations of
11334         static member functions.
11335         (coerce_template_parms): Handle offset references to lists of
11336         member functions.
11337         * search.c (note_debug_info_needed): Don't crash when handed a
11338         type which is being defined.
11339         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11340         that can happen with some illegal code.
11341
11342 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11343
11344         * call.c (user_harshness): Initialize `code' to 0.
11345         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11346         (null_ptr_cst_p): Add parentheses around && within ||.
11347         (standard_conversion): Likewise.
11348         (z_candidate): Likewise.
11349         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11350         (build_object_call): Likewise for `mem_args'.
11351         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
11352         default case in enumeration switch.
11353
11354         * class.c (build_vtable_entry): Add explicit braces to avoid
11355         ambiguous `else'.
11356         (build_class_init_list): Likewise.
11357         (finish_struct_1): Initialize `width' to 0.
11358         (instantiate_type): Initialize `name' to NULL_TREE.  Add
11359         explicit braces to avoid ambiguous `else'.
11360
11361         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11362         `else'.
11363
11364         * decl.c (grok_reference_init): Eliminate unused parameter, all
11365         callers changed.
11366         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11367         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11368         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11369         (grokdeclarator): Add parentheses around && within ||.  Add
11370         explicit braces to avoid ambiguous `else'.
11371         (grokparms): Initialize `type' to NULL_TREE.
11372         (xref_tag): Remove unused label `just_return'.
11373         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11374         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11375         (hack_incomplete_structures): Add parentheses around assignment
11376         used as truth value.
11377
11378         * decl2.c (coerce_delete_type): Hide definition of `e3'.
11379
11380         * error.c: Include <stdlib.h>.
11381         (dump_expr): Change the type of `i' to size_t.  Remove unused
11382         label `error'.
11383
11384         * except.c (init_exception_processing): Remove unused variable `d'.
11385         (expand_throw): Likewise for `label'.
11386
11387         * friend.c (add_friends): Add explicit braces to avoid ambiguous
11388         `else'.
11389
11390         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11391         (sort_base_init): Likewise for `binfo'.
11392         (expand_member_init): Likewise for `rval'.
11393         (build_member_call): Add parentheses around assignment used as
11394         truth value.
11395         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11396         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
11397         `old_immediate_size_expand' to 0.
11398         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11399         (build_vec_delete_1): Remove unused variable `block'.
11400         (expand_vec_init): Initialize `itype' to NULL_TREE.
11401
11402         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
11403         declaration of `index' and `rindex' with autoconf macros.
11404         (reinit_parse_for_expr): Remove unused variables
11405         `look_for_semicolon' and `look_for_lbrac'.
11406         (cons_up_default_function): Initialize `args' to NULL_TREE.
11407         (readescape): Initialize `firstdig' to 0.
11408         (real_yylex): Add parentheses around assignment used as truth value.
11409
11410         * method.c: Include <strings.h> if we don't have <string.h>.
11411         Protect declaration of `index' with autoconf macro.
11412
11413         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11414         Initialize `type' to NULL_TREE.
11415         (structsp): Remove unused variable `id'.
11416
11417         * pt.c (coerce_template_parms): Add explicit braces to avoid
11418         ambiguous `else'.
11419         (lookup_template_class): Initialize `template' to NULL_TREE.
11420         (instantiate_class_template): Remove unused variable `name' and `e'.
11421         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
11422         (do_poplevel): Initialize `saved_warn_unused' to 0.
11423         (type_unification): Remove unused varable `parm'.
11424         (unify): Likewise for `j'.
11425
11426         * repo.c (init_repo): Add parentheses around assignment used as
11427         truth value.
11428         (finish_repo): Remove unused varable `p'.
11429
11430         * search.c (get_binfo): Initialize `type' to NULL_TREE.
11431         (get_base_distance): Likewise.
11432         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11433         and `new_v' to NULL_TREE.
11434         (lookup_fnfields): Likewise for `rval_binfo_h'.
11435         (breadth_first_search): Add parentheses around assignment used as
11436         truth value.
11437         (get_template_base): Initialize `type' to NULL_TREE.
11438
11439         * sig.c (append_signature_fields): Initialize `last_mfptr' to
11440         NULL_TREE.
11441         (build_signature_table_constructor): Likewise for
11442         `last_rhs_field', `pfn' and `vt_off'.
11443         (build_sigtable): Likewise for `init'.
11444
11445         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11446         (propagate_binfo_offsets): Likewise for `delta'.
11447         (hash_tree_cons): Initialize hashcode to 0.
11448         (can_free): Likewise for `size'.
11449         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11450
11451         * typeck.c (convert_sequence): Hide prototype.
11452         (common_type): Add explicit braces to avoid ambiguous `else'.
11453         (comp_target_types): Likewise.
11454         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11455         (build_function_call_real): Add explicit braces to avoid ambiguous
11456         `else'.
11457         (convert_arguments): Initialize `called_thing' to 0.
11458         (convert_for_initialization): Initialize `savew' and `savee' to 0.
11459
11460         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11461         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11462         (build_x_arrow): Likewise for `last_rval'.
11463
11464         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11465
11466 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
11467
11468         * decl.c (init_decl_processing): Use set_sizetype.
11469         * decl2.c (sizetype): Don't declare.
11470         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11471         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11472         (build_component_addr, unary_complex_lvalue): Likewise.
11473         * rtti.c (expand_class_desc): Likewise.
11474         * class.c (get_vfield_offset): Likewise.
11475
11476 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
11477
11478         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11479         early to avoid bogus error.  Handle overloaded function
11480         names provided as template arguments correctly.
11481         (coerce_template_parms): Don't mishandle overloaded functions when
11482         dealing with template template parameters.
11483         (lookup_template_class): Issue an error message, rather than
11484         crashing, when the TYPE_DECL provided is not a template type.
11485
11486 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11487
11488         * class.c (instantiate_type): Don't just return a known type if
11489         it's wrong.
11490
11491 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
11492
11493         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11494         since that code could never be reached.
11495
11496         * error.c (dump_decl): Avoid aborting in the midst of printing an
11497         error message about an illegal template declaration.
11498
11499         * parse.y (structsp): Print an error message, rather than crashing,
11500         when a class-head does not name a class.
11501
11502         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
11503         template arguments as a g++ extension.
11504
11505         * cp-tree.def (ALIGNOF_EXPR): New tree code.
11506         * decl2.c (grok_alignof): If processing_template_decl, just store
11507         the expression.
11508         * typeck.c (c_alignof): Likewise.
11509         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11510         * error.c (dump_expr): Likewise.
11511         * pt.c (tsubst_copy): Likewise.
11512         * tree.c (cp_tree_equal): Likewise.
11513         * pt.c (uses_template_parms): Correctly determine whether or not a
11514         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11515         folding can be done.
11516
11517         * cp-tree.h (grok_enum_decls): Remove type parameter.
11518         * decl.c (grok_enum_decls): Likewise.
11519         * decl2.c (grok_x_components): Call grok_enum_decls
11520         unconditionally, since it will do nothing if there is no
11521         current_local_enum.  Use the new calling sequence.
11522         * pt.c (tsubst_enum): Use the new calling sequence for
11523         grok_enum_decls.
11524
11525         * decl.c (start_function): Make member functions of local classes
11526         in extern inline functions have comdat linkage here...
11527         (grokdeclarator): Rather than here.
11528
11529 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
11530
11531         * pt.c (convert_nontype_argument): Use decl_constant_value.
11532
11533 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
11534
11535         * call.c (add_template_candidate_real): New function.
11536         (add_template_candidate): Use it.
11537         (add_template_conv_candidate): Likewise.
11538         (joust): Pass extra argument to more_specialized.
11539         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11540         (is_local_class): Remove.
11541         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11542         * cp-tree.h (is_local_class): Remove.
11543         (perform_array_to_pointer_conversion): Likewise.
11544         (finish_member_template_decl): Add.
11545         (check_explicit_specialization): Return a tree, not an int.
11546         (more_specialized): Take additional argument.
11547         (get_bindings): Likewise.
11548         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11549         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11550         (perform_array_to_pointer_conversion): Remove.
11551         * decl.c (saved_scope): Add processing_specialization,
11552         processing_explicit_instantiation fields.
11553         (maybe_push_to_top_level): Save them.
11554         (pop_from_top_level): Restore them.
11555         (grokfndecl): Use new return value from
11556         check_explicit_specialization.
11557         (start_decl): Don't check flag_guiding_decls before pushing
11558         decls.
11559         (cp_finish_decl): Remove previous (bogus) change.
11560         (grok_declarator): Use decl_function_context rather than
11561         is_local_class.
11562         * decl2.c (finish_file): Pass extra argument to get_bindings.
11563         (build_expr_from_tree): Let build_x_component_ref check
11564         validity of arguments rather than doing it here.
11565         * lex.c (cons_up_default_function): Remove code fooling with
11566         processing_specialization, processing_explicit_instantiation
11567         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11568         * method.c (build_overload_identifier): Mangle local classes in
11569         template functions correctly.
11570         * parse.y (finish_member_template_decl): Move to pt.c.
11571         * pt.c (finish_member_template_decl): Moved here from parse.y.
11572         (print_candidates): New function.
11573         (determine_specialization): Change interface.  Properly look for
11574         most specialized versions of template candidates.
11575         (check_explicit_specialization): Fully process explicit
11576         instantiations.
11577         (push_template_decl): Avoid looking at CLASSTYPE fields in
11578         FUNCTION_DECLS.
11579         (determine_overloaded_function): Remove.
11580         (convert_nontype_argument): Change name from
11581         convert_nontype_parameter.  Use determine_overloaded_function
11582         instead of instantiate_type.
11583         (mangle_class_name_for_template): Handle type contexts as well as
11584         function contexts.
11585         (classtype_mangled_name): Likewise.
11586         (lookup_template_class): Likewise.
11587         (tsubst): Likewise.
11588         (more_specialized): Take explict template arguments as a
11589         parameter.
11590         (most_specialized): Likewise.
11591         (get_bindings): Likewise.  Check that return types match before
11592         proclaiming a function a match.
11593         (do_decl_instantiation): Remove code searching for function to
11594         instantiate; that is now done in check_explicit_specialization.
11595         (add_maybe_template): Pass extra argument to get_bindings.
11596         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11597         implementation.
11598         * typeck.c (build_component_ref): Check for invalid arguments.
11599
11600 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11601
11602         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11603         return_target and call_target are equivalent.
11604
11605         * pt.c (type_unification_real): Just accept function parms that
11606         don't use any template parms.
11607
11608 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11609
11610         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11611         unset DECL_NOT_REALLY_EXTERN.
11612
11613         * parse.y (typename_sub*): Fix std::.
11614
11615 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11616
11617         * error.c (dump_decl): Fix type default template args.
11618         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11619
11620 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11621
11622         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11623         (file_name_nondirectory): Use.
11624
11625 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11626
11627         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11628         that are not really present.  Substitute default arguments in
11629         template template arguments.  Correctly convert TEMPLATE_DECL to
11630         TEMPLATE_TEMPLATE_PARM.
11631         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11632         are no longer treated specially here.
11633         * parse.y (template_template_parm): Fix copy error.
11634         * decl.c (grokdeclarator): Warn about missing `typename' for nested
11635         type created from template template parameters.
11636         * parse.y (bad_parm): Likewise
11637
11638         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11639         (push_nested_class): Likewise.
11640         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11641         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11642         (copy_template_template_parm): Declare.
11643         * decl.c (arg_looking_for_template): New variable.
11644         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11645         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11646         node if arg_looking_for_template is nonzero.
11647         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11648         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11649         (grokdeclarator): Handle TEMPLATE_DECL.
11650         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11651         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11652         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11653         (dump_decl): Handle unnamed template type parameters.
11654         Handle template template parameters.
11655         (dump_function_name): Handle template template parameters.
11656         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11657         Handle TEMPLATE_TEMPLATE_PARM.
11658         * method.c (build_template_template_parm_names): New function.
11659         (build_template_parm_names): Handle TEMPLATE_DECL.
11660         (build_overload_nested_name, build_overload_name):
11661         Handle TEMPLATE_TEMPLATE_PARM.
11662         * parse.y (maybe_identifier): New nonterminal.
11663         (template_type_parm): Use it.
11664         (template_template_parm, template_arg1): New nonterminal.
11665         (template_parm): Add template_template_parm rules.
11666         (template_arg): Set processing_template_arg.
11667         (template_arg1): Rules moved from template_arg.
11668         (primary, nonnested_type): Set arg_looking_for_template if we are
11669         processing template arguments.
11670         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11671         (process_template_parm): Handle template template parameters.
11672         (coerce_template_parms, comp_template_args): Likewise.
11673         (mangle_class_name_for_template, lookup_template_class): Likewise.
11674         (uses_template_parms): Handle TEMPLATE_DECL and
11675         TEMPLATE_TEMPLATE_PARM.
11676         (current_template_args): Handle TEMPLATE_DECL.
11677         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11678         * search.c (dfs_walk, dfs_record_inheritance):
11679         Handle TEMPLATE_TEMPLATE_PARM.
11680         * tree.c (copy_template_template_parm): New function.
11681         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11682         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11683
11684 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
11685
11686         * decl.c (start_decl): Don't allow duplicate definitions of static
11687         data members.
11688
11689         * call.c (build_user_type_conversion_1): Handle user-defined
11690         template conversion operators correctly.
11691
11692         * decl2.c (build_expr_from_tree): Issue an error message if the
11693         object in a COMPONENT_REF is a TEMPLATE_DECL.
11694
11695         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11696
11697         * class.c (is_local_class): New function.
11698         * cp-tree.h (is_local_class): Declare it.
11699         (last_tree): Likewise.
11700         (begin_tree): Likewise.
11701         (end_tree): Likewise.
11702         (lookup_template_class): Change prototype.
11703         * decl.c (cp_finish_decl): Check for NULL where necessary.
11704         Consider FUNCTION_DECLS to declare objects with top-level binding,
11705         when calling make_decl_rtl.
11706         (grokdeclarator): Give members of local classes internal linkage.
11707         (start_function): Remove declaration of last_tree.
11708         (finish_function): Set flag_keep_inline_functions around call to
11709         rest_of_compilation if we are processing a member function in a
11710         local class.
11711         (start_method): Call push_template_decl for member functions of
11712         local classes in template functions.
11713         * decl2.c (import_export_decl): Don't give external linkage to
11714         instantiations of templates with internal linkage.
11715         * parse.y (last_tree): Remove declaration.
11716         (template_type): Pass extra parameter to lookup_template_class.
11717         (self_template_type): Likewise.
11718         (structsp): Move call to reset_specialization into left_curly.
11719         (left_curly): Call reset_specialization, and begin_tree.
11720         * pt.c (saved_trees): New variable.
11721         (mangle_class_name_for_template): Change prototype.  Use
11722         additional function context to name local classes in templates
11723         correctly.
11724         (classtype_mangled_name): Pass the context.
11725         (push_template_decl): Handle local classes and templates, and
11726         member functions for such classes.
11727         (convert_nontype_parameter): Fix handling of pointer-to-member
11728         constants.
11729         (lookup_template_class): Handle local classes in templates.
11730         (tsubst): Likewise.  Don't assume that template instantiations
11731         have external linkage; pay attention to the template declaration.
11732         (mark_decl_instantiated): Likewise.
11733         (begin_tree): New function.
11734         (end_tree): Likewise.
11735
11736         * decl.c (xref_basetypes): Don't call complete_type for basetypes
11737         that involve template parameters; that can lead to infinite
11738         recursion unnecessarily.
11739
11740         * pt.c (register_specialization): Do not register specializations
11741         that aren't ready to be registered yet.
11742         (check_explicit_specialization): Handle explicit specialization of
11743         constructors and destructors.
11744         (build_template_decl): New function.
11745         (push_template_delc): Handle out-of-class specializations of
11746         member templates.
11747
11748         * pt.c (check_explicit_specialization): Set up the template
11749         information before registering the specialization.
11750         (coerce_template_parms): Fix thinko.
11751         (tsubst): Handle specializations of member templates correctly.
11752
11753         * class.c (finish_struct_methods): Remove calls to
11754         check_explicit_specialization from here.
11755         (finish_struct): And insert them here.
11756         * cp-tree.h (perform_qualification_conversions): New function.
11757         (perform_array_to_pointer_conversion): Likewise.
11758         (begin_explicit_instantiation): Likewise.
11759         (end_explicit_instantiation): Likewise.
11760         (determine_specialization): Renamed from
11761         determine_explicit_specialization.
11762         (comp_template_parms): New function.
11763         (processing_explicit_instantiation): New variable.
11764         * cvt.c (perform_qualification_conversions): New function.
11765         (perform_array_to_pointer_conversion): Likewise.
11766         * decl.c (duplicate_decls): Don't consider template functions
11767         alike unless they have the same parameters.  Refine handling of
11768         instantiation/specialization mismatches.
11769         (start_decl): Don't call pushdecl for template specializations,
11770         since they don't affect overloading.
11771         (start_function): Likewise.
11772         (grokfndecl): Call check_explicit_specialization a little later.
11773         Don't call duplicate_decls for memberm template specializations.
11774         (grokdeclarator): Don't update template_count for classes that are
11775         themselves specializations.  Remove use of `2' as parameter to
11776         grokfndecl since that value isn't used.
11777         * lex.c (cons_up_default_function): Save and restore
11778         processing_explicit_instantiation around calls to grokfield.
11779         * parse.y (finish_member_template_decl): New function.
11780         (component_decl_1): Use it.
11781         (fn.def2): Likewise.
11782         (template_arg_list_opt): New nonterminal.
11783         (template_type): Use it.
11784         (self_template_type): Likewise.
11785         (template_id): Likewise.
11786         (object_template_id): Likewise.
11787         (notype_template_declarator): Likwise.
11788         (begin_explicit_instantiation): Likewise.
11789         (end_explicit_instantiation): Likewise.
11790         (explicit_instantiation): Use them.
11791         * pt.c (coerce_template_parms): Add parameters.
11792         (processing_explicit_instantiation): New variable.
11793         (convert_nontype_parameter): New function.
11794         (determine_overloaded_function): Likewise.
11795         (begin_explicit_instantiation): Likewise.
11796         (end_explicit_instantiation): Likewise.
11797         (retrieve_specialization): Likewise.
11798         (register_specialization): Likewise.
11799         (processing_explicit_specialization): Removed.
11800         (determine_specialization): Handle specializations of member
11801         functions of template class instantiations.
11802         (check_explicit_specialization): Refine to conform to standard.
11803         (comp_template_parms): New function.
11804         (coerce_template_parms): Call convert_nontype_parameter.
11805         (tsubst): Refine handling of member templates.  Use
11806         register_specialization.
11807         (instantiate_template): Use retrieve_specialization.
11808         (do_decl_instantiation): Likewise.
11809         (instantiate_decl): Likewise.
11810         (type_unification): Improve handling of explict template
11811         arguments.
11812         * tree.c (mapcar): Return error_mark_node, rather than aborting,
11813         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11814         * typeck.c (build_unary_op): Call determine_specialization, rather
11815         than determine_explicit_specialization.
11816
11817 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
11818
11819         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11820
11821 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11822
11823         * error.c (dump_decl): For enum tags, output the tag, not its value.
11824
11825 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
11826
11827         * decl.c (init_decl_processing): Only call init_rtti_processing
11828         FLAG_RTTI is set.
11829
11830 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
11831
11832         * init.c (build_new_1): Split out from build_new.
11833         (build_new): Just return a NEW_EXPR.
11834         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11835
11836         * decl2.c (get_temp_regvar): Tweak.
11837
11838         * cp-tree.h (TREE_CALLS_NEW): Comment out.
11839         * class.c (resolves_to_fixed_type_p): Remove use.
11840         * method.c (build_opfncall): Likewise.
11841         * call.c (build_new_op): Likewise.
11842
11843 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11844
11845         * exception.cc (__eh_alloc, __eh_free): New fns.
11846         (__cp_push_exception, __cp_pop_exception): Use them.
11847         (__uncatch_exception): Call terminate here if no exception.
11848         * except.c (build_terminate_handler): New fn.
11849         (expand_start_catch_block): Use it.
11850         (expand_exception_blocks): Likewise.
11851         (alloc_eh_object): New fn.
11852         (expand_throw): Use it.  Protect exception init with terminate.
11853         * typeck.c (build_modify_expr): Remove code that ignores trivial
11854         methods.
11855
11856 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11857
11858         * call.c (add_builtin_candidate): Add default case in enumeration
11859         switch.
11860         (build_new_op): Likewise.
11861         (convert_like): Likewise.
11862         * cvt.c (build_expr_type_conversion): Likewise.
11863         * tree.c (real_lvalue_p): Likewise.
11864         (lvalue_p): Likewise.
11865         (cp_tree_equal): Likewise.
11866         * typeck.c (comptypes): Likewise.
11867         (build_component_ref): Likewise.
11868         (build_function_call_real): Likewise.
11869         (build_binary_op_nodefault): Likewise.
11870         (build_unary_op): Likewise.
11871         (build_modify_expr): Likewise.
11872         * typeck2.c (initializer_constant_valid_p): Likewise.
11873
11874 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
11875
11876         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11877
11878 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
11879
11880         * pt.c (coerce_template_parms): Make sure to digest_init if
11881         possible.
11882
11883         * decl.c (duplicate_decls): Make the newdecl virtual if the
11884         olddecl was, just as is done with other attributes of olddecl.
11885
11886 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
11887
11888         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11889         address of an OFFSET_REF.
11890
11891         * cp-tree.def: Add AGGR_INIT_EXPR.
11892         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11893         AGGR_INIT_EXPR where appropriate.
11894         * expr.c (cplus_expand_expr): Likewise.  Simplify.
11895
11896         * decl2.c (finish_file): Remove call to register_exception_table.
11897
11898 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11899
11900         * pt.c (instantiate_class_template): Don't do injection when
11901         processing_template_decl is true, as pollutes current_binding_level
11902         for base classes.
11903
11904 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
11905
11906         * pt.c (maybe_fold_nontype_arg): Add prototype.
11907
11908 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11909
11910         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11911         * error.c (dump_expr): Likewise.
11912
11913 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
11914
11915         * typeck.c (build_function_call_real): Remove "inline called before
11916         definition" pedwarn.
11917
11918         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11919
11920 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
11921
11922         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11923
11924         * pt.c (type_unification_real): Change __null to type void* with
11925         a warning.
11926
11927 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
11928
11929         * call.c (implicit_conversion): Don't call
11930         build_user_type_conversion_1 with a NULL expr, since it will
11931         crash.
11932
11933         * pt.c (unify): Don't try to unify array bounds if either array is
11934         unbounded.
11935
11936 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
11937
11938         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11939         Replace extern decls with casts.
11940
11941         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11942         Update last_parm_cleanup_insn.
11943         (store_after_parms): Remove.
11944         * cp-tree.h: Adjust.
11945
11946 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
11947
11948         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
11949         (finish_file): Check DECL_COMDAT instead of weak|one_only.
11950         (import_export_vtable): Use make_decl_one_only instead of
11951         comdat_linkage for win32 tweak.
11952         (import_export_decl): Likewise.
11953         * pt.c (mark_decl_instantiated): Likewise.
11954
11955         * decl2.c (finish_file): Lose handling of templates in pending_statics.
11956
11957 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
11958
11959         * decl2.c (finish_file): Lose call to expand_builtin_throw.
11960         * except.c (expand_builtin_throw): Remove.
11961         * cp-tree.h: Remove ptr_ptr_type_node.
11962         * decl.c: Likewise.
11963
11964 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
11965
11966         * decl.c (ptr_ptr_type_node): Define.
11967         (init_decl_processing): Initialize it.
11968         * cp-tree.h: Declare it.
11969         * exception.cc (__cp_exception_info): Use __get_eh_info.
11970         (__cp_push_exception): Likewise.
11971         (__cp_pop_exception): Likewise.
11972
11973         From Scott Snyder <snyder@d0sgif.fnal.gov>:
11974         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
11975         saved_pc.
11976         (init_exception_processing): Removed saved_pc initialization.
11977
11978 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
11979
11980         * pt.c (instantiate_decl): Defer all templates but inline functions.
11981
11982 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
11983
11984         * init.c (expand_vec_init): Don't fold a list of parameters.
11985
11986         * decl.c (copy_args_p): Handle copy elision for types with virtual
11987         bases.
11988         * call.c (build_over_call): Likewise.
11989
11990 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
11991
11992         * pt.c (lookup_template_function): Copy the template arguments,
11993         not just the list containing them, to the permanent obstack.
11994
11995 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
11996
11997         * except.c (expand_start_catch_block): suspend_momentary for the
11998         terminate handler.
11999
12000         * error.c (dump_decl): Handle LOOKUP_EXPR.
12001
12002 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12003
12004         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12005         permanent obstack if we are processing a template decl.
12006         * typeck.c (build_static_cast): Likewise.
12007         (build_const_cast): Likewise.
12008         (build_reinterpret_cast): Likewise.
12009
12010         * pt.c (coerce_template_parms): Coerce some expressions, even
12011         when processing_template_decl.
12012
12013 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12014
12015         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12016         handling of pointer difference expressions.
12017
12018         * typeck.c (comp_target_types): Comparison of function/method types
12019         is independent of nptrs.
12020
12021 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12022
12023         * pt.c (tsubst): Avoid creating pointer to reference and
12024         reference to reference types.
12025
12026 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12027
12028         * parse.y (do_id): New nonterminal.
12029         (template_id): Use it.
12030
12031 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12032
12033         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12034         * spew.c (yylex): Don't do_identifier here.
12035         * decl2.c (build_expr_from_tree): Revert last change.
12036
12037         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12038         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12039
12040 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12041
12042         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12043         alloc_expr.
12044         * call.c (build_op_delete_call): Adjust.
12045
12046         * except.c (expand_end_catch_block): Lose rethrow region.
12047         (expand_start_catch_block): Likewise.
12048         (expand_end_catch_block): Don't expand_leftover_cleanups.
12049
12050 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12051
12052         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12053         DECL_TEMPLATE_INSTANTIATION).
12054
12055 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12056
12057         * tree.c (is_overloaded_fn): Handle getting a fn template.
12058         (really_overloaded_fn): Likewise.
12059         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12060         * pt.c (check_explicit_specialization): Tweak.
12061         (determine_explicit_specialization): Tweak.
12062
12063         * tree.c, cp-tree.h (get_target_expr): New fn.
12064
12065 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12066
12067         * pt.c (check_explicit_specialization): Fix misspelling in
12068         diagnostic: `preceeded'.
12069         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12070         `conversiona'.
12071
12072 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12073
12074         * pt.c (determine_explicit_specialization): Avoid an internal
12075         error for bad specializations.
12076
12077         * method.c (build_overload_value): Handle SCOPE_REF.
12078
12079 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12080
12081         * class.c (prepare_fresh_vtable): Enable even more complex MI
12082         vtable names.
12083
12084 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12085
12086         * exception.cc (__check_eh_spec): Optimize a bit.
12087
12088         * exception.cc (__cp_pop_exception): Lose handler arg.
12089         * except.c (do_pop_exception): Likewise.
12090         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12091         (expand_end_catch_block): Likewise.
12092
12093 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12094
12095         * pt.c (check_explicit_specialization): Complain about using a
12096         template-id for a non-specialization.
12097
12098 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12099
12100         * repo.c: Prototype rindex only if needed.
12101         * xref.c: Likewise.
12102
12103 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12104
12105         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12106
12107 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12108
12109         * typeck.c (build_const_cast): Handle references here instead of
12110         handing off to convert_to_reference.
12111
12112         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12113         TerminateFunctionCall.
12114         (init_exception_processing): Likewise.  Terminate et al are now
12115         the fns, not ADDR_EXPRs.
12116         (various): Lose redundant assemble_external calls.
12117         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12118
12119         * cp-tree.h (struct lang_decl_flags): Add comdat.
12120         (DECL_COMDAT): New macro.
12121         * decl.c (duplicate_decls): Propagate it.
12122         (cp_finish_decl): Handle it.
12123         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12124
12125         * class.c: Remove static pending_hard_virtuals.
12126         (add_virtual_function): Take pointers to pending_virtuals
12127         and pending_hard_virtuals.
12128         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12129
12130 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12131
12132         * decl2.c (import_export_vtable): If we support one_only but not
12133         weak symbols, mark instantiated template vtables one_only.
12134         (import_export_decl): Likewise for tinfo functions.
12135         (finish_vtable_vardecl): Also write out vtables from explicitly
12136         instantiated template classes.
12137         * pt.c (mark_class_instantiated): Revert last change.
12138
12139         * except.c (expand_throw): Call mark_used on the destructor.
12140
12141 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12142
12143         * lex.c (lang_init): Enable flag_exceptions by default if no
12144         command line switch was specified.
12145
12146 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12147
12148         * pt.c (unify): Handle `void' template parameters in
12149         specializations.
12150
12151 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12152
12153         * rtti.c (build_dynamic_cast): Handle template case here.
12154         (build_dynamic_cast_1): Not here.
12155
12156         * typeck2.c (digest_init): Make copies where appropriate.
12157
12158         * decl2.c (delete_sanity): resolve_offset_ref.
12159
12160         * except.c: Call terminate without caching so many bits.
12161
12162         * except.c (expand_start_catch_block): Fix catching a reference
12163         to pointer.
12164
12165 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12166
12167         * init.c (build_new): Copy size to the saveable obstack.
12168
12169         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12170         TRY_CATCH_EXPR for now.
12171
12172 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12173
12174         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12175         has DECL_LANG_SPECIFIC.
12176
12177         * exception.cc (struct cp_eh_info): Add handlers field.
12178         (__cp_push_exception): Initialize it.
12179         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12180         (__throw_bad_exception): Remove.
12181         * except.c (call_eh_info): Add handlers field.
12182         (get_eh_handlers): New fn.
12183         (push_eh_cleanup): Increment handlers.
12184
12185 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12186
12187         * except.c (expand_start_eh_spec): Use the try/catch code.
12188         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12189         doing everything inline.
12190         (init_exception_processing): throw_type_match now takes
12191         const void pointers.
12192         * exception.cc (__check_eh_spec): New fn.
12193         * inc/exception: Neither terminate nor unexpected return.
12194         * decl.c: Make const_ptr_type_node public.
12195         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12196
12197         * except.c (expand_start_catch_block): We only need the rethrow
12198         region for non-sjlj exceptions.
12199         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12200
12201 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12202
12203         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12204         (various.o): Likewise.
12205         * inc/new: Add placement deletes.  Add throw specs for default new.
12206         * new.cc (set_new_handler): Move here from libgcc2.
12207         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12208         (new): Move from libgcc2.  Throw bad_alloc.
12209         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12210         * decl.c (init_decl_processing): Update exception specs on new and
12211         delete.
12212
12213         * method.c (build_decl_overload_real): Don't mess with global
12214         placement delete.
12215
12216         * init.c (build_new): Check for null throw spec, not nothrow_t.
12217
12218         * decl.c (duplicate_decls): Don't complain about different exceptions
12219         from an internal declaration.
12220
12221         * call.c (build_op_delete_call): Fix check for member fns again.
12222
12223         * decl2.c (import_export_decl): Interface hackery affects
12224         virtual synthesized methods.
12225
12226 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12227
12228         * decl.c (start_decl): Don't just complain about a mismatched
12229         scope, fix it.
12230
12231         * decl.c (make_implicit_typename): Handle case where t is not
12232         actually from context.
12233         * tree.c (get_type_decl): Lose identifier case.
12234         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12235         * parse.y (nonnested_type): Just use lookup_name.
12236         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12237
12238 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12239
12240         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12241         T was built in C language context (for example, by
12242         output_func_start_profiler).
12243
12244 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12245
12246         * decl.c (make_implicit_typename): New fn.
12247         (lookup_name_real): Use it.  Use current_class_type as the context.
12248
12249 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12250
12251         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12252
12253 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12254
12255         * friend.c (do_friend): Warn about non-template friends in templates.
12256
12257         * call.c (build_op_delete_call): Fix handling of inherited delete.
12258
12259         * search.c (dfs_record_inheritance): Ignore template type parms.
12260
12261 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12262
12263         * call.c (build_new_op): Fix copy error.
12264         (build_op_new_call): New fn.
12265         (build_op_delete_call): New fn.
12266         * cp-tree.h: Declare them.
12267         * init.c (build_new): Use them.  Support placement delete.
12268         (build_x_delete): Use build_op_delete_call.
12269         (build_delete): Likewise.
12270         * decl2.c (delete_sanity): Likewise.
12271         (coerce_delete_type): Don't complain about placement delete.
12272
12273 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12274
12275         * call.c (build_new_function_call): Remove unused 'obj' parm.
12276         * cp-tree.h, typeck.c: Adjust.
12277
12278         * init.c (build_new): Make the cleanup last longer.
12279         (expand_vec_init): Call do_pending_stack_adjust.
12280
12281 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12282
12283         * pt.c (do_type_instantiation): Fix typo.
12284         (mark_class_instantiated): If we support one_only but not weak
12285         symbols, don't mark this as known.
12286
12287         * init.c (build_new): Handle vec delete in EH cleanup.
12288
12289 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12290
12291         * call.c (build_method_call): Call complete_type before checking
12292         for destructor.
12293
12294 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12295
12296         * decl.c (add_block_current_level): Delete.
12297         * init.c (build_vec_delete_1): Delete build_block and
12298         add_block_current_level calls.
12299
12300 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12301
12302         * init.c (build_new): Handle freeing allocated memory when the
12303         constructor throws.
12304
12305         * call.c (build_new_method_call): Fix flags arg.
12306
12307         * pt.c (do_type_instantiation): Don't try to instantiate
12308         member templates.
12309         (mark_decl_instantiated): If we support one_only but not
12310         weak symbols, mark this one_only.
12311         * decl2.c (import_export_vtable): Don't defer handling of vtables
12312         if MULTIPLE_SYMBOL_SPACES.
12313
12314 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12315
12316         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12317
12318 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
12319
12320         * except.c (do_pop_exception): Return a value.
12321
12322 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
12323
12324         * call.c (build_new_method_call): Handle getting a
12325         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
12326         if we got template parms.
12327         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12328         not just the args.
12329         * decl2.c (build_expr_from_tree): Tweak last change.
12330         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12331         (maybe_fold_nontype_arg): Split out from tsubst_copy.
12332         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12333
12334 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12335
12336         * pt.c (tsubst_copy): Handle explicit template arguments in
12337         function calls.
12338         * typeck.c (build_x_function_call): Likewise.
12339         * decl2.c (build_expr_from_tree): Lookup function name if it
12340         hasn't been done.
12341
12342         * pt.c (tsubst): Instantiate template functions properly when
12343         template parameter does not appear in function arguments and return
12344         type.
12345         (comp_template_args): Handle member templates required by tsubst.
12346
12347 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12348
12349         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12350         previous change.
12351
12352 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12353
12354         * pt.c (coerce_template_parms): Tweak error message.
12355
12356         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12357         return type defaults to `int', even if there are storage-class
12358         specifiers.
12359
12360 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12361
12362         Complete nested exception support.
12363         * except.c (do_pop_exception): Split out...
12364         (push_eh_cleanup): From here.  Handle the EH region by hand.
12365         (expand_start_catch_block): Add a new level for the catch parm.
12366         Move the rethrow region outside the two cleanup regions.
12367         Protect the initializer for the catch parm with terminate.
12368         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
12369         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
12370         popping off the middle of the stack.
12371         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12372         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12373         (build_cplus_new): Only wrap CALL_EXPRs.
12374         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12375         the constructor call.
12376
12377 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12378
12379         * Make-lang.in (c++.distdir): Make inc subdirectory.
12380
12381 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12382
12383         * decl2.c (finish_file): Put back some code.
12384
12385 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12386
12387         * decl2.c (finish_file): Remove redundant code.
12388         * method.c (emit_thunk): Don't let the backend defer generic thunks.
12389
12390 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
12391
12392         * except.c (call_eh_info): Split out...
12393         (push_eh_info): From here.
12394         (expand_builtin_throw): Use it.
12395         (expand_start_catch_block): Move region start back.
12396
12397 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
12398
12399         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12400         (real_yylex): Record wide strings using target endianness, not host.
12401
12402 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
12403
12404         * repo.c (rindex): Add decl unconditionally.
12405         (get_base_filename, open_repo_file): Don't cast rindex.
12406         * xref.c (rindex): Add decl unconditionally.
12407         (index): Remove unused decl.
12408         (open_xref_file): Don't cast rindex.
12409
12410 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
12411
12412         * class.c (build_vbase_path): Propagate the result type properly.
12413
12414 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
12415
12416         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12417         remaining use of saved_throw_type with a call to get_eh_type.
12418
12419 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
12420
12421         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12422         (file_name_nondirectory): New function, doing the same as the macro.
12423         (set_typedecl_interface_info): Use it instead of the macro.
12424         (check_newline): Likewise.
12425         (handle_cp_pragma): Likewise.
12426
12427         * repo.c (get_base_filename): Cast result of rindex to char*.
12428         (open_repo_file): Likewise.
12429         * xref.c (open_xref_file): Likewise.
12430         * error.c (dump_char): Make its arg int, not char.
12431
12432         * except.c (push_eh_info): Pass the number of fields - 1 down, not
12433         the exact number of fields.
12434
12435 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
12436
12437         Support for nested exceptions.
12438         * tinfo2.cc (__is_pointer): New fn.
12439         * exception.cc (struct cp_eh_info): Define.
12440         (__cp_exception_info, __uncatch_exception): New fns.
12441         (__cp_push_exception, __cp_pop_exception): New fns.
12442         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12443         Lose empty_fndecl.
12444         (init_exception_processing): Likewise.  __eh_pc is now external.
12445         (push_eh_info): New fn.
12446         (get_eh_{info,value,type,caught}): New fns.
12447         (push_eh_cleanup): Just call __cp_pop_exception.
12448         (expand_start_catch_block): Use push_eh_info.  Start the eh region
12449         sooner.
12450         (expand_end_eh_spec): Use push_eh_info.
12451         (expand_throw): Call __cp_push_exception to set up the exception info.
12452         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
12453         when we rethrow.
12454         (expand_builtin_throw): Don't refer to empty_fndecl.
12455
12456 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
12457
12458         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12459
12460 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
12461
12462         * method.c (build_template_parm_names, build_decl_overload_real):
12463         Add static to definitions.
12464         * pt.c (add_to_template_args, note_template_header,
12465         processing_explicit_specialization, type_unification_real): Likewise.
12466         ({determine,check}_explicit_specialization): Use a single string for
12467         error messages.
12468
12469 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12470
12471         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12472         (expand_end_catch_block): Likewise.
12473         (expand_end_eh_spec): Likewise.
12474
12475 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
12476
12477         * decl.c (duplicate_decls): Handle template specializations
12478         correctly.
12479         * error.c (dump_function_name): Fix printing of specializations of
12480         member functions that are not member templates.
12481         * cp-tree.h (processing_specialization): Make global.
12482         * pt.c (processing_specialization): Likewise.
12483         * lex.c (cons_up_default_function): Save and restore
12484         processing_specialization to avoid confusion.
12485
12486 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12487
12488         * decl.c (init_decl_processing): Give null_node unknown* type.
12489         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12490         (common_type): Likewise.
12491         * error.c (args_as_string): Recognize null_node.
12492
12493 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12494
12495         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12496         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12497
12498         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12499
12500         * Make-lang.in (g++): Include prefix.o.
12501
12502 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
12503
12504         * pt.c (determine_explicit_specialization): Initialize "dummy"
12505         to keep Purify quiet.
12506
12507 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12508
12509         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12510         (build_overload_int): Not here.
12511
12512 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
12513
12514         * class.c (build_type_pathname): Remove.
12515         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12516
12517 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
12518
12519         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12520         &&label GNU extension.
12521
12522 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
12523
12524         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12525         so as to avoid incorrect manglings.
12526         * method.c (build_decl_overload_real): Don't mangle return types
12527         for constructors.
12528
12529 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12530
12531         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12532         scratch_tree_cons): Define as macros for now.
12533         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12534         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12535         typeck2.c: Use them and the expression_obstack variants.
12536
12537 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12538
12539         * decl.c (store_return_init): Allow classes with explicit ctors to
12540         be used with the named return values extension.
12541
12542 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
12543
12544         * pt.c (instantiate_decl): Fix previous change.
12545
12546 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12547
12548         * pt.c (tsubst): Fix thinko.
12549         (instantiate_decl): Really use the original template.
12550
12551         * call.c (build_new_method_call): Use simple constructor_name for
12552         error messages.
12553
12554 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
12555
12556         * method.c (build_underscore_int): Don't use ANSI specific
12557         features.
12558
12559 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12560
12561         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12562         for our key method; it might have been inlined by -O3.
12563
12564 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
12565
12566         * decl.c (make_typename_type): Do not try to call lookup_field for
12567         non-aggregate types.
12568
12569 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
12570
12571         * typeck.c (build_reinterpret_cast): Tweak.
12572
12573 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12574
12575         * typeck.c (build_reinterpret_cast): Converting a void pointer
12576         to function pointer with a reinterpret_cast produces a warning
12577         if -pedantic is issued.
12578
12579 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12580
12581         * typeck.c (c_expand_return): Don't warn about returning a
12582         reference-type variable as a reference.
12583
12584 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
12585
12586         * method.c (build_static_name): Fix typo.
12587
12588 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
12589
12590         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12591         OLDDECL before we try to do DECL_USE_TEMPLATE.
12592
12593 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12594
12595         * decl.c (duplicate_decls): Don't warn about template instances.
12596
12597         * typeck.c (mark_addressable): Lose ancient code that unsets
12598         DECL_EXTERNAL.
12599
12600         * pt.c (do_decl_instantiation): Lose support for instantiating
12601         non-templates.
12602
12603         * call.c (build_new_function_call): Fix handling of null explicit
12604         template args.
12605         (build_new_method_call): Likewise.
12606
12607 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
12608
12609         * method.c (build_underscore_int): Fix typo.
12610
12611 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
12612
12613         * tree.c (print_lang_statistics): #if 0 call to
12614         print_inline_obstack_statistics until its definition is checked in.
12615
12616 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
12617
12618         * decl2.c (finish_file): Move dump_tree_statistics to end.
12619
12620         * pt.c (instantiate_decl): Look for the original template.
12621         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12622         of member templates.
12623
12624 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12625
12626         * Makefile.in (g++FAQ.*): New rules.
12627         (CONFLICTS): Update.
12628         * g++FAQ.texi: Moved from libg++.
12629
12630         * parse.y (PFUNCNAME): Only specify the type once.
12631
12632 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
12633
12634         * lex.c (real_yylex): Clean up the code to fully behave the way
12635         the c-lex.c parser does for complex and real numbers.
12636
12637 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12638
12639         * method.c (build_decl_overload_real): Reformat.
12640
12641 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
12642
12643         * method.c (synthesize_method): If at_eof, determine our linkage.
12644
12645 1997-09-29  Paul Eggert  <eggert@twinsun.com>
12646
12647         * lex.c (real_yylex): Treat `$' just like `_', except issue a
12648         diagnostic if !dollars_in_ident or if pedantic.
12649
12650         * lang-specs.h (@c++): -ansi no longer implies -$.
12651
12652         * decl2.c (lang_decode_option):
12653         -traditional and -ansi now do not mess with
12654         dollars_in_ident.
12655
12656 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
12657
12658         * Makefile.in (parse.o, decl.o): Also depend on
12659         $(srcdir)/../except.h $(srcdir)/../output.h.
12660         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12661         $(srcdir)/../except.h $(srcdir)/../output.h.
12662         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12663         ../insn-codes.h.
12664
12665         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12666
12667         * expr.c (cplus_expand_expr): Make it static.
12668
12669         * decl2.c, init.c, typeck.c: Include "expr.h".
12670         (expand_expr): Use proper values when calling the function.
12671
12672 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
12673
12674         * lang-options.h: New -Wold-style-cast flag.
12675         * cp-tree.h (warn_old_style_cast): New variable.
12676         * decl2.c (warn_old_style_cast): Likewise.
12677         (lang_decode_option): Support -Wold-style-cast.
12678         (reparse_absdcl_as_casts): Produce old-style-cast warning.
12679
12680 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12681
12682         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12683         TREE_USED, reset value based on already_used.
12684
12685         * init.c (expand_member_init): Revert change.
12686
12687 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
12688
12689         * cp-tree.h, decl.c, decl2.c, pt.c:
12690         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
12691
12692         * decl2.c (lang_decode_option): Add missing ;.
12693
12694 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
12695
12696         * friend.c (do_friend): Disable injection for all template-derived
12697         decls.
12698         * decl2.c (lang_decode_option): Handle -fguiding-decls.
12699         * parse.y (notype_template_declarator): New nonterminal.
12700         (direct_notype_declarator): Use it.
12701         (complex_direct_notype_declarator): Likewise.
12702         (object_template_id): Accept any kind of identifier after TEMPLATE.
12703         (notype_qualified_id): Don't add template declarators here.
12704
12705 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
12706
12707         * call.c (add_template_candidate): Add explicit_targs parameter.
12708         (build_scoped_method_call): Use it.
12709         (build_overload_call_real): Likewise.
12710         (build_user_type_conversion_1): Likewise.
12711         (build_new_function_call): Likewise.
12712         (build_object_call): Likewise.
12713         (build_new_op): Likewise.
12714         (build_new_method_call): Likewise.
12715         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12716         (build_new_method_call): Likewise.
12717
12718         * class.c (finish_struct_methods): Add specialization pass to
12719         determine which methods were specializing which other methods.
12720         (instantiate_type): Handle TEMPLATE_ID_EXPR.
12721
12722         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12723
12724         * cp-tree.h (name_mangling_version): New variable.
12725         (flag_guiding_decls): Likewise.
12726         (build_template_decl_overload): New function.
12727         (begin_specialization): Likewise.
12728         (reset_specialization): Likewise.
12729         (end_specialization): Likewise.
12730         (determine_explicit_specialization): Likewise.
12731         (check_explicit_specialization): Likewise.
12732         (lookup_template_function): Likewise.
12733         (fn_type_unification): Add explicit_targs parameter.
12734         (type_unification): Likewise.
12735
12736         * decl.c (duplicate_decls): Add smarts for explicit
12737         specializations.
12738         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12739         specializations.
12740         (grokfndecl): Call check_explicit_specialization.
12741
12742         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12743         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12744         (check_classfn): Handle specializations.
12745
12746         * error.c (dump_function_name): Print specialization arguments.
12747
12748         * friend.c (do_friend): Don't call pushdecl for template
12749         instantiations.
12750
12751         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12752
12753         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12754         and -fno-guiding-decls.
12755
12756         * lex.c (identifier_type): Return PFUNCNAME for template function
12757         names.
12758
12759         * method.c (build_decl_overload_real): New function.
12760         (build_template_parm_names): New function.
12761         (build_overload_identifier): Use it.
12762         (build_underscore_int): New function.
12763         (build_overload_int): Use it.  Add levels for template
12764         parameters.
12765         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
12766         (build_overload_nested_names): Handle template type parameters.
12767         (build_template_decl_overload): New function.
12768
12769         * parse.y (YYSTYPE): New ntype member.
12770         (nested_name_specifier): Use it.
12771         (nested_name_specifier_1): Likewise.
12772         (PFUNCNAME): New token.
12773         (template_id, object_template_id): New non-terminals.
12774         (template_parm_list): Note specializations.
12775         (template_def): Likewise.
12776         (structsp): Likewise.
12777         (fn.def2): Handle member template specializations.
12778         (component_decl_1): Likewise.
12779         (direct_notype_declarator): Handle template-ids.
12780         (component_decl_1): Likewise.
12781         (direct_notype_declarator): Handle template-ids.
12782         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12783
12784         * pt.c (processing_specializations): New variable.
12785         (template_header_count): Likewise.
12786         (type_unification_real): New function.
12787         (processing_explicit_specialization): Likewise.
12788         (note_template_header): Likewise.
12789         (is_member_template): Handle specializations.
12790         (end_template_decl): Call reset_specialization.
12791         (push_template_decl): Handle member template specializations.
12792         (tsubst): Likewise.
12793         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12794         (instantiate_template): Handle specializations.
12795         (instantiate_decl): Likewise.
12796         (fn_type_unification): Handle explicit_targs.
12797         (type_unification): Likewise.  Allow incomplete unification
12798         without an error message, if allow_incomplete.
12799         (get_bindings): Use new calling sequence for fn_type_unification.
12800
12801         * spew.c (yylex): Handle PFUNCNAME.
12802
12803         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12804         (really_overloaded_fn): Likewise.
12805         (get_first_fn): Handle function templates.
12806
12807         * typeck.c (build_x_function_call): Use really_overloaded_fn.
12808         Handle TEMPLATE_ID_EXPR.
12809         (build_x_unary_op): Likewise.
12810         (build_unary_op): Likewise.
12811         (mark_addressable): Templates whose address is taken are marked
12812         as used.
12813
12814 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12815
12816         * decl.c (init_decl_processing): Declare __builtin_constant_p as
12817         accepting any kind of type, not only int.
12818
12819 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12820
12821         * search.c (get_matching_virtual): Notice virtual bases when sorrying
12822         about covariant returns.
12823
12824         * parse.y (member_init): Also imply typename here.  Remove ancient
12825         extension for initializing base members.
12826
12827 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12828
12829         Handle multi-level typenames and implicit typename in base list.
12830         * parse.y (typename_sub{,[0-2]}): New rules.
12831         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12832         (nonnested_type): New rule.
12833         (complete_type_name): Use it.
12834         (base_class.1): Use typename_sub and nonnested_type.
12835         (nested_name_specifier): Don't elide std:: here.
12836         * decl.c (make_typename_type): Handle getting a type for NAME.
12837         (lookup_name_real): Turn std:: into :: here.
12838
12839         Rvalue conversions were removed in London.
12840         * call.c (is_subseq): Don't consider lvalue transformations.
12841         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12842         (joust): Re-enable ?: kludge.
12843
12844 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
12845
12846         * decl.c (start_function): Up warning of no return type to be a
12847         pedwarn.
12848
12849 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12850
12851         * init.c (expand_member_init): Don't set TREE_USED.
12852         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12853         set,don't clear TREE_USED wholesale.
12854
12855 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
12856
12857         * call.c (build_over_call): Do require_complete_type before
12858         build_cplus_new.
12859
12860 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12861
12862         * search.c (lookup_field): Call complete_type in all cases.
12863
12864         * decl.c (finish_function): Just warn about flowing off the end.
12865
12866 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
12867
12868         * decl.c (grokparms): Don't bash a permanent list node if we're
12869         in a function.
12870
12871 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
12872
12873         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12874
12875 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
12876
12877         * call.c (build_new_op): Give better error for syntactically
12878         correct, but semantically invalid, use of undeclared template.
12879
12880         * call.c (compare_qual): Handle pmfs.
12881
12882         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12883         after the exception spec.
12884
12885 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12886
12887         * call.c (null_ptr_cst_p): Integer type, not integral type.
12888
12889         * call.c (joust): Disable warnings until they can be moved to the
12890         right place.
12891
12892 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
12893
12894         * Makefile.in, config-lang.in:  Convert to autoconf.
12895
12896 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12897
12898         * decl.c (lookup_name_real): Add implicit 'typename' to types from
12899         base classes.
12900
12901         * pt.c (most_specialized_class): Fix typo.
12902         (tsubst): Move constant folding to TREE_VEC case.
12903
12904 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
12905
12906         * pt.c (do_poplevel): Don't warn about unused local variables
12907         while processing_template_decl since we don't always know whether
12908         or not they will need constructing/destructing.
12909
12910         * pt.c (uses_template_parms): Check the values of an enumeration
12911         type to make sure they don't depend on template parms.
12912
12913         * decl.c (make_typename_type): Don't lookup the field if the
12914         context uses template parms, even if we're not
12915         processing_template_decl at the moment.
12916
12917         * pt.c (coerce_template_parms): Avoid looking at the
12918         TYPE_LANG_DECL portion of a typename type, since there won't be
12919         one.
12920         (tsubst): Do constant folding as necessary to make sure that
12921         arguments passed to lookup_template_class really are constants.
12922
12923 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12924
12925         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12926         * decl2.c (finish_file): Only register exception tables if we
12927         need to.
12928
12929         * decl.c (init_decl_processing): Add __builtin_[fs]p.
12930
12931 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12932
12933         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12934
12935 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
12936
12937         * error.c (dump_decl): Avoid crashing when presented with a
12938         uninitialized constant, as can occur with a template parameter.
12939         (dump_expr): Make sure that there are enough levels of
12940         current_template_parms before we start diving through them.
12941
12942 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
12943
12944         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12945         c-typeck.c.
12946
12947 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12948
12949         * except.c (expand_throw): Call build_delete for all
12950         exception types, not just objects with destructors.
12951
12952 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
12953
12954         * decl.c (current_local_enum): Remove static.
12955         * pt.c (tsubst_enum): Save and restore value of current_local_enum
12956         in case template is expanded in enum decl.
12957         (instantiate_class_template): Use new tsubst_enum signature.
12958         (tsubst_expr): Likewise.
12959
12960 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
12961
12962         * pt.c (begin_member_template_processing): Take a function as
12963         argument, not a set of template arguments.  Use the template
12964         parameters, rather than the arguments.  Handle non-type parameters
12965         correctly.  Push a binding level for the parameters so that multiple
12966         member templates using the same parameter names can be declared.
12967         (end_member_template_processing): Pop the binding level.
12968         (push_template_decl): Mark member templates as static when
12969         appropriate.
12970
12971         * lex.c (do_pending_inlines): Pass the function, not its template
12972         arguments, to begin_member_template_processing.
12973         (process_next_inline): Likewise.
12974         (do_pending_defargs): Likewise.
12975
12976         * error.c (dump_expr): Obtain the correct declaration for a
12977         TEMPLATE_CONST_PARM.
12978
12979         * call.c (add_template_conv_candidate): New function.
12980         (build_object_call): Handle member templates, as done in the other
12981         build_ functions.
12982
12983 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
12984
12985         * decl.c (replace_defag): Undo previous change.
12986         * lex.c (do_pending_defargs): Deal with member templates.
12987
12988         * pt.c (is_member_template): Avoid crashing when passed a
12989         non-function argument.
12990
12991 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
12992
12993         * class.c (grow_method): Remove check for redeclaration.
12994
12995 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
12996
12997         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
12998         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
12999         (PRIMARY_TEMPLATE_P): Use it.
13000         * call.c (build_overload_call_real): Use it.
13001         * class.c (instantiate_type): Likewise.
13002         * decl.c (decls_match): Likewise.
13003         * method.c (build_overload_identifier): Likewise.
13004         * pt.c (push_template_decl): Likewise.
13005         (classtype_mangled_name): Likewise.
13006         (lookup_template_class): Likewise.
13007
13008         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13009         DECL_NTPARMS to conform to usage elsewhere.
13010         * call.c (add_template_candidate): Likewise.
13011         * class.c (instantiate_type): Likewise.
13012         * pt.c (instantiate_template): Likewise.
13013         (get_bindings): Likewise.
13014
13015         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13016         is_member_template.
13017
13018         * pt.c (unify): Undo changes to allow multiple levels of template
13019         parameters.
13020         (type_unification): Likewise.
13021         (fn_type_unification): Likewise.
13022         (get_class_bindings): Likewise.
13023         * cp-tree.h (Likewise).
13024
13025         * decl.c (replace_defarg): Check that the type of the default
13026         parameter does not invlove a template type before complaining
13027         about the initialization.
13028
13029         * error.c (dump_expr): Deal with template constant parameters in
13030         member templates correctly.
13031
13032         * pt.c (is_member_template): Deal with class specializations
13033         correctly.
13034         (tsubst): Handle "partial instantiation" of member templates
13035         correctly.
13036
13037 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13038
13039         * pt.c (type_unification): Change calling sequence to allow for
13040         multiple levels of template parameters.
13041         (tsubst_expr): Likewise.
13042         (tsubst): Likewise.
13043         (tsubst_copy): Likewise.
13044         (instantiate_template): Likewise.
13045         (unify): Likewise.
13046         * call.c (build_overload_call_real): Use it.
13047         (add_builtin_candidate): Use it.
13048         (build_new_method_call): Use it.
13049         * class.c (instantiate_type): Use it.
13050         * decl.c (grokdeclarator): Use it.
13051         * decl2.c (finish_file): Use it.
13052         * method.c (build_overload_identifier): Use it.
13053
13054         * call.c (add_template_candidate):  Add additional parameter for
13055         the function return type.  Call fn_type_unification istead of
13056         type_unification.
13057         (build_user_type_conversion_1): Handle member templates.
13058         (build_new_function_call): Likewise.
13059         (build_new_op): Likewise.
13060         (build_new_method_call): Likewise.
13061
13062         * class.c (grow_method): Don't give an error message indicating
13063         that two member templates with the same name are ambiguous.
13064         (finish_struct): Treat member template functions just like member
13065         functions.
13066
13067         * cp-tree.h (check_member_template): Add declaration.
13068         (begin_member_template_processing): Likewise.
13069         (end_member_template_processing): Likewise.
13070         (fn_type_unification): Likewise.
13071         (is_member_template): Likewise.
13072         (tsubst): Change prototype.
13073         (tsubst_expr): Likewise.
13074         (tsubst_copy): Likewise.
13075         (instantiate_template): Likewise.
13076         (get_bindings): Likewise.
13077
13078         * decl.c (decls_match): Handle multiple levels of template
13079         parameters.
13080         (pushdecl): Handle template type params just like other type
13081         declarations.
13082         (push_class_level_binding): Return immediately if the
13083         class_binding_level is NULL.
13084         (grokfndecl): If check_classfn() returns a member_template, use
13085         the result of the template, not the template itself.
13086
13087         * decl2.c (check_member_template): New function.  Check to see
13088         that the entity declared to be a member template can be one.
13089         (check_classfn): Allow redeclaration of member template functions
13090         with different types; the new functions can be specializations or
13091         explicit instantiations.
13092
13093         * error.c (dump_decl): Handle multiple levels of template
13094         parameters.
13095         (dump_function_decl): Update to handle function templates.
13096
13097         * lex.c (do_pending_inlines): Set up template parameter context
13098         for member templates.
13099         (process_next_inline): Likewise.
13100
13101         * method.c (build_overload_identifier): Adjust for multiple levels
13102         of template parameters.
13103
13104         * parse.y (fn.def2): Add member templates.
13105         (component_decl_1): Likewise.
13106
13107         * pt.c (begin_member_template_processing): New function.
13108         (end_member_template_processing): Likewise.
13109         (is_member_template): Likewise.
13110         (fn_type_unification): Likewise.
13111         (current_template_parms): Return a vector of all the template
13112         parms, not just the innermost level of parms.
13113         (push_template_decl): Deal with the possibility of member
13114         templates.
13115         (lookup_template_class): Likewise.
13116         (uses_template_parms): Likewise.
13117         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13118         TEMPLATE_CONST_PARM to deal with multiple levels of template
13119         arguments.   Add processing of TEMPLATE_DECL to produce new
13120         TEMPLATE_DECLs from old ones.
13121         (do_decl_instantiation): Handle member templates.
13122
13123         * search.c (lookup_fnfields_1): Handle member template conversion
13124         operators.
13125
13126         * tree.c (cp_tree_equal): Check the levels, as well as the
13127         indices, of TEMPLATE_CONST_PARMs.
13128
13129         * typeck.c (comptypes): Check the levels, as well as the indices,
13130         fo TEMPLATE_TYPE_PARMs.
13131         (build_x_function_call): Treat member templates like member
13132         functions.
13133
13134 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13135
13136         * typeck.c (c_expand_return): Always convert_for_initialization
13137         before checking for returning a pointer to local.
13138
13139         * pt.c (type_unification): If strict and the function parm doesn't
13140         use template parms, just compare types.
13141
13142 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13143
13144         * method.c (build_overloaded_value): Replace direct call
13145         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13146
13147 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13148
13149         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13150         of a set of overloaded functions.
13151
13152 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13153
13154         * lex.c (real_yylex): Don't elide __FUNCTION__.
13155
13156         * method.c (build_overload_value): Add in_template parm.
13157         (build_overload_int): Likewise.
13158         (build_overload_identifier): Pass it.
13159
13160         * decl.c (duplicate_decls): Don't bash a previous template
13161         definition with a redeclaration.
13162
13163         * pt.c (unify): float doesn't match double.
13164
13165         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13166         TYPE_DECL.  Handle getting non-template types.
13167         * parse.y (explicit_instantiation): Use typespec instead of
13168         aggr template_type.
13169
13170 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13171
13172         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13173
13174 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13175
13176         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13177         (compare_ics): Likewise.
13178
13179 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13180
13181         * call.c (joust): Warn about choosing one conversion op over
13182         another because of 'this' argument when the other return type is
13183         better.
13184         (source_type): New fn.
13185
13186         * call.c (build_new_op): Strip leading REF_BIND from first operand
13187         to builtin operator.
13188
13189         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13190         use its RTL.
13191
13192 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13193
13194         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13195
13196 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13197
13198         * typeck.c (expand_target_expr): Make definition match declaration.
13199
13200         * class.c (get_basefndecls): Make definition match declaration.
13201
13202 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13203
13204         * input.c (sub_getch): Eventually give up and release the input file.
13205
13206         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13207         right place.
13208
13209         * call.c (joust): Tweak message.
13210
13211 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13212
13213         * error.c (type_as_string): Put const/volatile on template type
13214         parameters where appropriate.
13215
13216 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13217
13218         * call.c (strictly_better): Make arguments unsigned ints.
13219
13220 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13221
13222         * lex.c (real_yylex): Refer to __complex instead of complex.
13223
13224 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13225
13226         * lex.c (real_yylex): Don't use getc directly.
13227
13228 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13229
13230         * call.c (is_subseq): Don't try to be clever.
13231
13232 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13233
13234         * parse.y, pt.c: Include "except.h".
13235         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13236         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13237         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13238         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13239         prototyping.
13240
13241 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13242
13243         * decl2.c (mark_vtable_entries): Instead of replacing pure
13244         virtuals with a reference to __pure_virtual, copy the decl and
13245         change the RTL.
13246
13247 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13248
13249         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13250
13251         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13252
13253         * pt.c (instantiate_class_template): Call repo_template_used
13254         before finish_prevtable_vardecl.
13255
13256         * call.c (is_subseq): New fn.
13257         (compare_ics): Use it.
13258
13259         * repo.c (finish_repo): Don't crash on no args.
13260
13261         * parse.y (named_complex_class_head_sans_basetype): Handle
13262         explicit global scope.
13263         * decl2.c (handle_class_head): New fn.
13264
13265         * pt.c (unify): Add CONST_DECL case.
13266
13267 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13268
13269         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13270
13271         * cp-tree.h (report_type_mismatch): Add prototype.
13272         * call.c (build_overload_call_real): Remove erroneous fourth
13273         argument to report_type_mismatch.
13274         (build_user_type_conversion_1): Remove erroneous second arg to
13275         tourney.
13276         (build_new_function_call): Likewise.
13277         (build_object_call): Likewise.
13278         (build_new_op): Likewise.
13279         (build_new_method_call): Likewise.
13280
13281 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13282
13283         * error.c (dump_decl): Don't bother processing a function with no
13284         DECL_LANG_SPECIFIC.
13285
13286         * method.c (emit_thunk): Call init_function_start in the macro case.
13287
13288 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13289
13290         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13291         defined and used to set flag_vtable_thunks.
13292
13293 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13294
13295         * parse.y: Don't clear the inlines from their obstack until they've
13296         all been processed.
13297
13298         * decl.c (duplicate_decls): Don't complain about exception
13299         specification mismatch if flag_exceptions is off.
13300
13301 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13302
13303         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13304
13305 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13306
13307         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13308         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13309         Include <stdio.h> before include files that formerly used STDIO_PROTO.
13310
13311         * decl.c, g++spec.c, lex.c, method.c, repo.c:
13312         Include "config.h" first, as per autoconf manual.
13313
13314 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13315
13316         * decl.c (duplicate_decls): Tweak wording.
13317         * lex.c (do_pending_defargs): Don't die if we see a default arg
13318         that isn't a DEFAULT_ARG.
13319         * error.c (dump_expr): Handle DEFAULT_ARG.
13320
13321         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13322         * lang-options.h: Add -fhandle-exceptions.
13323
13324         * class.c (build_vtable): Vtables are artificial.
13325         (prepare_fresh_vtable): Likewise.
13326
13327 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13328
13329         * cvt.c (ocp_convert): After converting to the target type, set
13330         LOOKUP_NO_CONVERSION.
13331
13332         * call.c (joust): Warn about potentially confusing promotion rules
13333         with -Wsign-promo.
13334         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13335
13336 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
13337
13338         * exception.cc: Declare __terminate_func with noreturn attribute.
13339
13340 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
13341
13342         * parse.y: Break out eat_saved_input, handle errors.
13343         (function_try_block): Use compstmt instead of compstmt_or_error.
13344
13345 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13346
13347         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13348
13349 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13350
13351         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13352         existence of cc1plus check whether $(LANGUAGES) contains C++.
13353
13354 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13355
13356         * method.c (do_build_copy_constructor): When copying an anonymous
13357         union member loop around to handle nested anonymous unions.  Use
13358         the offset of the member relative to the outer structure, not the
13359         union.
13360
13361 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13362
13363         * call.c (resolve_args): New fn.
13364         (build_new_function_call): Use it.
13365         (build_object_call): Likewise.
13366         (build_new_method_call): Likewise.
13367
13368 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13369
13370         * call.c (build_over_call): tsubst all default parms from templates.
13371
13372 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13373
13374         * decl.c (struct cp_function): Add static_labelno.
13375         (push_cp_function_context): Save it.
13376         (pop_cp_function_context): Restore it.
13377
13378 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13379
13380         * typeck.c (build_component_ref_1): Convert from reference.
13381
13382 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13383
13384         * parse.y (current_declspecs, prefix_attributes): Initialize to
13385         NULL_TREE.
13386
13387         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13388         before we try to force it to be a TREE_LIST.
13389         (decl): Make sure $1.t is non-nil.
13390
13391 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13392
13393         * pt.c (uses_template_parms): Handle template first-parse codes.
13394
13395         * decl.c (cp_finish_decl): Only warn about user-defined statics.
13396
13397 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13398
13399         * pt.c (unify): Handle BOOLEAN_TYPE.
13400
13401         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13402         * pt.c (tsubst): Don't set it.
13403         * call.c (build_over_call): Use uses_template_parms.
13404
13405 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13406
13407         * method.c (build_overload_nested_name): Use static_labelno
13408         instead of var_labelno.
13409         (build_qualified_name): New fn.
13410         (build_overload_name): Split out from here.
13411         (build_static_name): Use build_qualified_name.
13412         * decl.c (cp_finish_decl): Statics in extern inline functions
13413         have comdat linkage.
13414         (start_function): Initialize static_labelno.
13415
13416 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13417
13418         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13419         before "all member functions in class [] are private".
13420
13421 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13422
13423         * lex.c (do_scoped_id): convert_from_reference.
13424         * init.c (build_offset_ref): Likewise.
13425
13426 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13427
13428         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13429
13430 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13431
13432         * typeck.c (get_member_function_from_ptrfunc): Promote index
13433         before saving it.
13434
13435 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13436
13437         * tree.c (layout_basetypes): Move non-virtual destructor warning.
13438         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13439
13440 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13441
13442         * decl.c (grokdeclarator): Call add_defarg_fn for the function
13443         type, too.
13444         * lex.c (add_defarg_fn): Adjust.
13445         (do_pending_defargs): Adjust.  Don't skip the first parm.
13446
13447 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13448
13449         * decl.c (build_enumerator): Global enumerators are also readonly.
13450
13451         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13452         (build_dynamic_cast): Call it and convert_from_reference.
13453
13454         * lex.c (add_defarg_fn): New fn.
13455         (snarf_defarg): Don't add to defarg_types.
13456         (do_pending_defargs): Lose defarg_types.  All fns we process now
13457         have defargs.
13458         * decl.c (grokfndecl): Call add_defarg_fn.
13459
13460         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13461         * cp-tree.def: Add DEFAULT_ARG.
13462         * spew.c (yylex): Call snarf_defarg as appropriate.
13463         * parse.y: New tokens DEFARG and DEFARG_MARKER.
13464         (defarg_again, pending_defargs, defarg, defarg1): New rules.
13465         (structsp): Use pending_defargs.
13466         (parms, full_parm): Use defarg.
13467         * lex.c (init_lex): Initialize inline_text_firstobj.
13468         (do_pending_inlines): Never pass the obstack to feed_input.
13469         (process_next_inline): Call end_input instead of restore_pending_input.
13470         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13471         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13472         * input.c (end_input): New fn.
13473         (sub_getch): At the end of some fed input, just keep returning EOF
13474         until someone calls end_input.
13475         Remove 'obstack' field from struct input_source.
13476         * decl.c (grokparms): Handle DEFAULT_ARG.
13477         (replace_defarg): New fn.
13478         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13479
13480 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13481
13482         * call.c (implicit_conversion): If nothing else works, try binding
13483         an rvalue to a reference.
13484
13485 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
13486
13487         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13488         ifndef for Cygwin32 to include SIGSEGV.
13489
13490 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13491
13492         * class.c (finish_struct_1): Only complain about pointers without
13493         copy stuff if there are any constructors.
13494
13495         * rtti.c (build_dynamic_cast): Call complete_type on the types.
13496
13497         * decl.c (grokfndecl): If the function we chose doesn't actually
13498         match, die.
13499
13500         * decl2.c (grokclassfn): Don't specify 'const int' for the
13501         artificial destructor parm.
13502
13503         * pt.c (type_unification): If we are called recursively, nothing
13504         decays.
13505
13506 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
13507
13508         * decl.c (init_decl_processing): Stop trying to catch signals
13509         other than SIGABRT since the Cygwin32 library doesn't support
13510         them correctly yet.  This fixes a situation in which g++ causes
13511         a hang on SIGSEGVs and other such signals in our Win32-hosted
13512         tools.
13513
13514 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
13515
13516         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13517
13518 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13519
13520         * typeck2.c (store_init_value): Always return the value if our
13521         type needs constructing.
13522
13523         * method.c (hack_identifier): Convert class statics from
13524         reference, too.
13525
13526 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13527
13528         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13529
13530 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
13531
13532         * typeck.c (c_expand_return): Make sure we clean up temporaries at
13533         the end of return x;
13534
13535 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13536
13537         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13538
13539 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
13540
13541         * except.c (expand_builtin_throw): Add support
13542         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13543
13544 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13545
13546         * repo.c (extract_string): Null-terminate.
13547
13548         * cp-tree.h (TI_SPEC_INFO): New macro.
13549         (CLASSTYPE_TI_SPEC_INFO): New macro.
13550         * pt.c (push_template_decl): Correctly determine # of template parms
13551         for partial specs.
13552
13553         * call.c (compare_ics): Really fix 'this' conversions.
13554
13555         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13556         non-template fn.
13557
13558         * pt.c (push_template_decl): Complain about mismatch in # of
13559         template parms between a class template and a member template.
13560
13561 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13562
13563         * method.c (synthesize_method): You can't call
13564         function_cannot_inline_p after finish_function.
13565         * decl.c (finish_function): Turn on flag_inline_functions and turn
13566         off DECL_INLINE before handing a synthesized method to the
13567         backend.
13568
13569 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13570
13571         * method.c (synthesize_method): Remove July 30 change to never set
13572         DECL_INLINE if at_eof.
13573
13574 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
13575
13576         * xref.c (GNU_xref_member): Ensure that the node has a
13577         decl_lang_specific part before checking DECL_FRIEND_P.
13578
13579 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13580
13581         * pt.c (instantiate_class_template): Diagnose non-class types used
13582         as bases.
13583
13584 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13585
13586         * typeck.c (build_conditional_expr): Use convert_for_initialization
13587         instead of convert_and_check.
13588
13589 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13590
13591         * parse.y (typespec): Don't pedwarn for typeof.
13592
13593 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13594
13595         * repo.c (finish_repo): Only check changes if we would write a
13596         repo file.
13597
13598         * call.c (compare_ics): Fix handling of 'this' conversions.
13599
13600         * pt.c (do_decl_instantiation): Support static data too.  Rename
13601         from do_function_instantiation.
13602         * cp-tree.h: Adjust.
13603         * parse.y: Adjust.
13604
13605         * repo.c (extract_string): New fn.
13606         (get_base_filename): Use it.
13607         (init_repo): Compare old args with current args.
13608
13609 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
13610
13611         * Makefile.in, Make-lang.in: Protect C-ls with a comment
13612         character, idea from Paul Eggert <eggert@twinsun.com>.
13613
13614 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
13615
13616         * typeck.c (c_expand_return): Be more persistent in looking for
13617         returned temps.
13618
13619         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13620         pointer to reference.
13621
13622         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13623
13624 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
13625
13626         * init.c (build_member_call, build_offset_ref):
13627         Use do_scoped_id instead of do_identifier.
13628
13629         * cvt.c (convert): Remove bogosity.
13630
13631 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13632
13633         * cvt.c (build_up_reference): Do checks of ARGTYPE and
13634         TARGET_TYPE before trying to use get_binfo.
13635
13636 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13637
13638         * cvt.c (build_up_reference): Call get_binfo to get access control.
13639
13640         * decl2.c (import_export_decl): If we don't support weaks, leave
13641         statics undefined.
13642
13643 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
13644
13645         * except.c (expand_builtin_throw): Add support for machines that
13646         cannot access globals after throw's epilogue when
13647         -fno-sjlj-exceptions is used.
13648
13649 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
13650
13651         * parse.y: 'std::' becomes '::'.
13652         * lex.c (real_yylex): Remove 'namespace' warning.
13653         * init.c (build_member_call): Ignore 'std::'.
13654         (build_offset_ref): Likewise.
13655         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13656         (do_toplevel_using_decl): Ignore 'using std::whatever'.
13657         * decl.c (push_namespace): Just sorry.
13658         (pop_namespace): Nop.
13659         (init_decl_processing): Declare std namespace.
13660
13661 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13662
13663         * search.c (push_class_decls): A name which ambiguously refers to
13664         several instantiations of the same template just refers to the
13665         template.
13666
13667 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
13668
13669         * decl.c (build_enumerator): Fix problem with unsigned long
13670         enumerated values being smashed to ints, causing overflow
13671         when computing next enumerated value (for enum values around
13672         MAX_VAL).
13673
13674 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13675
13676         * typeck.c (build_component_ref): Only call mark_used on a decl.
13677
13678 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13679
13680         * typeck.c (build_c_cast): Make the check for a ptr to function
13681         more specific before possible default_conversion call.
13682
13683 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
13684
13685         * except.c (expand_exception_blocks): Simplify and fix and make
13686         sure we don't end a region in a sequence, as expand_end_bindings
13687         doesn't like it.
13688
13689 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
13690
13691         * except.c (init_exception_processing): Mark terminate as not
13692         returning so that the optimizer can optimize better.
13693
13694 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
13695
13696         * cvt.c (convert): Don't do any extra work, if we can avoid it
13697         easily.
13698
13699 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
13700
13701         * *.[chy]: Change cp_convert to ocp_convert, change convert to
13702         cp_convert.  convert is now reserved for the backend, and doesn't
13703         have the semantics a frontend person should ever want.
13704
13705 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13706
13707         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13708         Lose -traditional support.
13709
13710 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13711
13712         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13713
13714         * parse.y (self_reference): Do it for templates, too.
13715         * class.c (pushclass): Don't overload_template_name; the alias
13716         generated by build_self_reference serves the same purpose.
13717
13718         * tree.c (list_hash): Make static, take more args.
13719         (list_hash_lookup): Likewise.
13720         (list_hash_add): Make static.
13721         (list_hash_canon): Lose.
13722         (hash_tree_cons): Only build a new node if one isn't already in the
13723         hashtable.
13724         (hash_tree_chain): Use hash_tree_cons.
13725         * cp-tree.h: Adjust.
13726         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13727         of calling lookup_name.
13728
13729 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13730
13731         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13732         doesn't refer to the CONST_DECLs.
13733
13734 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
13735
13736         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13737         is bigger.
13738         (expand_class_desc): Convert the last argument to a sizetype.
13739
13740 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13741
13742         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13743         __real__): Add reswords.
13744         * hash.h: Regenerate.
13745         * lex.h (rid): Add RID_COMPLEX.
13746         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13747         * lex.c (init_lex): Add building of RID_COMPLEX.
13748         (real_yylex): General cleanup in line with what c-lex.c also has,
13749         sans the cruft for traditional; add handling of SPEC_IMAG, complex
13750         types, and imaginary numeric constants.
13751         * parse.y (REALPART, IMAGPART): Add tokens.
13752         (unary_expr): Add REALPART and IMAGPART rules.
13753         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13754         * decl.c (complex_{integer,float,double,long}_type_node): Define
13755         types.
13756         (init_decl_processing): Set up the types.
13757         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
13758         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13759         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13760         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13761         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13762         COMPLEX_TYPE case.
13763         * method.c (build_overload_name): Add handling of the different
13764         COMPLEX_TYPEs, prefixing them with `J'.
13765         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13766         as a template parm.
13767         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13768         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13769         (mapcar): Handle COMPLEX_CST.
13770         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13771         (common_type): Add code for complex types.
13772         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13773         (convert_for_assignment): Likewise.
13774         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13775
13776 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13777
13778         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13779         tsubst_expr, as it might try to do overload resolution.
13780
13781 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13782
13783         * pt.c (instantiate_class_template): Oops.
13784
13785 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13786
13787         * cp-tree.def: Add TAG_DEFN.
13788         * pt.c (tsubst_enum): New fn.
13789         (instantiate_class_template): Use it.
13790         (tsubst_expr): Support TAG_DEFN.
13791         (tsubst): Support local enums.
13792         (tsubst_copy): Likewise.
13793         * decl.c (finish_enum): Likewise.
13794         (start_enum): If this is a local enum, switch to permanent_obstack.
13795
13796 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
13797
13798         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13799         (finish_function): Put the base init code for constructors just
13800         after the parm cleanup insns.
13801         (struct cp_function): Add last_parm_cleanup_insn.
13802         (push_cp_function_context): Likewise.
13803         (pop_cp_function_context): Likewise.
13804
13805 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13806
13807         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13808
13809 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13810
13811         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13812         for THUNK_FNDECL before we switch to temporary allocation.
13813
13814 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13815
13816         * call.c (build_new_op): Handle null arg2 for ?:.
13817
13818 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
13819
13820         * except.c (expand_exception_blocks): Ensure that we flow through
13821         the end of the exception region for the exception specification.
13822         Move exception region for the exception specification in, so that
13823         it doesn't protect the parm cleanup.  Remove some obsolete code.
13824         * decl.c (store_parm_decls): Likewise.
13825         (finish_function): Likewise.
13826
13827 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
13828
13829         * init.c (build_new): Fix nothrow handling.
13830
13831 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13832
13833         * init.c (emit_base_init): Don't warn about the initialization
13834         list for an artificial member.
13835
13836 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13837
13838         * expr.c (do_case): Handle !START case for the error msg.
13839
13840 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13841
13842         * decl2.c, lang-options.h: New option -Weffc++.
13843         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13844         to -Weffc++.
13845
13846         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13847         to MULTIPLE_SYMBOL_SPACES.
13848
13849 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13850
13851         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13852
13853         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13854
13855         * typeck.c (c_expand_return): Don't complain about returning void
13856         to void in an artificial function.
13857         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13858         don't set DECL_RESULT, set DECL_ARTIFICIAL.
13859         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13860
13861 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
13862
13863         * init.c (init_decl_processing): Add support for setjmp/longjmp based
13864         exception handling.
13865         * except.c (init_exception_processing): Likewise.
13866         (expand_end_catch_block): Likewise.
13867         (expand_exception_blocks): Likewise.
13868         (expand_throw): Likewise.
13869         * exception.cc (__default_terminate): Likewise.
13870
13871         * init.c (perform_member_init): Use new method of expr level
13872         cleanups, instead of cleanups_this_call and friends.
13873         (emit_base_init): Likewise.
13874         (expand_aggr_vbase_init_1): Likewise.
13875         (expand_vec_init): Likewise.
13876         * decl.c (cp_finish_decl): Likewise.
13877         (expand_static_init): Likewise.
13878         (store_parm_decls): Likewise.
13879         (cplus_expand_expr_stmt): Likewise.
13880         * decl2.c (finish_file): Likewise.
13881
13882         * Make-lang.in (exception.o): Ok to compile with -O now.
13883
13884         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13885         we know it will be done later by the backend.
13886
13887         * decl2.c (lang_f_options): Remove support for short temps.
13888         * lang-options.h: Likewise.
13889
13890 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13891
13892         * tree.c (varargs_function_p): New fn.
13893         * method.c (emit_thunk): Replace broken generic code with code to
13894         generate a heavyweight thunk function.
13895
13896 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
13897
13898         * pt.c (process_template_parm): pedwarn about floating-point parms.
13899
13900         * decl.c (grokdeclarator): inline no longer implies static.
13901
13902         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13903
13904 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13905
13906         * class.c (check_for_override): The signature of an overriding
13907         function is not changed.
13908
13909         * call.c (build_over_call): Move setting of conv into the loop.
13910         Note: this change, along with the related changes of the 18th thru
13911         the 20th of April, fix an infinite loop problem in conversions.
13912
13913 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13914
13915         * call.c (build_user_type_conversion_1): Really ignore rvalue
13916         conversions when looking for a REFERENCE_TYPE.
13917
13918         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13919         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13920         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13921         (build_unary_op): Likewise.
13922         * call.c (build_over_call): See through a CONVERT_EXPR around the
13923         ADDR_EXPR for on a temporary.
13924         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13925         the ADDR_EXPR for a local variable.
13926
13927 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13928
13929         * call.c (build_user_type_conversion_1): If we're trying to
13930         convert to a REFERENCE_TYPE, only consider lvalue conversions.
13931         (build_new_function_call): Print candidates.
13932         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13933         (reference_binding): Binding a temporary of a reference-related type
13934         is BAD.
13935
13936 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13937
13938         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13939         * tinfo2.cc (type_info::before): Likewise.
13940
13941 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13942
13943         * call.c (implicit_conversion): Oops.
13944
13945 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13946
13947         * call.c (implicit_conversion): Try to find a reference conversion
13948         before binding a const reference to a temporary.
13949
13950 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
13951
13952         * exception.cc (__default_unexpected): Call terminate by default,
13953         so that if the user overrides terminate, the correct function will
13954         be called.
13955
13956 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
13957
13958         * parse.y (left_curly): Avoid trying to use any fields of
13959         error_mark_node, as there aren't any.
13960
13961 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13962
13963         * lex.c (do_identifier): Avoid breaking on overloaded methods
13964         as default arguments.
13965
13966 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
13967
13968         * call.c (add_template_candidate): Initialize the variable "dummy".
13969
13970 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
13971
13972         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
13973         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
13974
13975 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13976
13977         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
13978         (debug_binfo): Delete decl, not needed.
13979
13980         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
13981         promotes_to_aggr_type): Delete fns.
13982         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
13983         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
13984         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
13985
13986         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
13987
13988         * friend.c (is_friend_type): Delete fn.
13989         * cp-tree.h (is_friend_type): Delete decl.
13990
13991         * decl.c (original_result_rtx, double_ftype_double,
13992         double_ftype_double_double, int_ftype_int, long_ftype_long,
13993         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
13994         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
13995
13996         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
13997         fwd decls.
13998         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
13999
14000         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14001         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14002
14003         * lex.c (reinit_lang_specific): #if 0, unused.
14004         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14005
14006         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14007         * cp-tree.h (revert_static_member_fn): Delete decl.
14008
14009         * class.c (root_lang_context_p): Delete fn.
14010         * cp-tree.h (root_lang_context_p): Delete decl.
14011
14012         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14013         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14014
14015         * lex.c (set_vardecl_interface_info): Make static.
14016         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14017
14018         * call.c (find_scoped_type): Make static.
14019         * cp-tree.h (find_scoped_type): Delete decl.
14020
14021         * search.c (convert_pointer_to_vbase): Make static.
14022         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14023
14024         * decl.c (const_ptr_type_node): Likewise.
14025         * cp-tree.h (const_ptr_type_node): Delete decl.
14026
14027         * typeck.c (common_base_type): Make static.
14028         * cp-tree.h (common_base_types): Delete erroneous decl.
14029
14030         * pt.c (classtype_mangled_name): Make static.
14031         * cp-tree.h (classtype_mangled_name): Delete decl.
14032
14033         * lex.c (check_newline): Make static.
14034         * cp-tree.h (check_newline): Delete decl.
14035
14036         * typeck.c (build_x_array_ref): Delete fn, same idea as
14037         grok_array_decl.
14038         * cp-tree.h (build_x_array_ref): Delete decl.
14039
14040         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14041         copy_lang_decl.
14042         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14043
14044         * class.c (build_vtable_entry): Make static.
14045         * cp-tree.h (build_vtable_entry): Delete decl.
14046
14047         * class.c (build_vbase_pointer): Make static.
14048         * cp-tree.h (build_vbase_pointer): Delete decl.
14049
14050         * sig.c (build_sptr_ref): Add forward decl and make static.
14051         * cp-tree.h (build_sptr_ref): Delete decl.
14052
14053         * call.c (build_new_method_call): Add forward decl and make static.
14054         * cp-tree.h (build_new_method_call): Delete decl.
14055
14056         * call.c (build_object_call): Make static.
14057         * class.c (check_for_override, complete_type_p, mark_overriders):
14058         Likewise.
14059         * decl.c (cp_function_chain): Likewise.
14060         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14061         Likewise.
14062         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14063         Likewise.
14064         * tree.c (build_cplus_array_type_1): Likewise.
14065         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14066         (comp_target_parms): Likewise.
14067
14068         * init.c (build_builtin_call): Make static.
14069         * cp-tree.h (build_builtin_call): Delete decl.
14070
14071         * typeck.c (binary_op_error): Delete decl.
14072         * cp-tree.h (binary_op_error): Likewise.
14073
14074 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14075
14076         * call.c (build_method_call): Compare against error_mark_node
14077         directly, rather than the ERROR_MARK tree code.
14078         * cvt.c (cp_convert): Likewise.
14079         * decl.c (print_binding_level): Likewise.
14080         (duplicate_decls): Likewise.
14081         (grokdeclarator): Likewise.
14082         (grokdeclarator): Likewise.
14083         * init.c (expand_aggr_init_1): Likewise.
14084         (decl_constant_value): Likewise.
14085         * method.c (build_opfncall): Likewise.
14086         (hack_identifier): Likewise.
14087         * typeck.c (build_modify_expr): Likewise.
14088
14089         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14090
14091 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14092
14093         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14094
14095         * pt.c (coerce_template_parms): Add new error message.
14096
14097         * method.c (build_overload_value): Implement name mangling for
14098         floating-point template arguments.
14099
14100         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14101         arguments whose absolute value doesn't fit in a signed word.
14102
14103 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14104
14105         * friend.c: New file; put all of the friend stuff in here.
14106         * init.c: Instead of here.
14107         * Makefile.in (CXX_OBJS): Add friend.o.
14108         (friend.o): Add dependencies.
14109         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14110
14111 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14112
14113         * call.c (build_scoped_method_call): Complain if the scope isn't a
14114         base.
14115
14116 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14117
14118         * parse.y (left_curly): Don't crash on erroneous type.
14119
14120         * init.c (build_delete): Fix type of ref.
14121
14122 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14123
14124         * search.c (get_vbase_1): Renamed from get_vbase.
14125         (get_vbase): Wrapper, now non-static.
14126         (convert_pointer_to_vbase): Now static.
14127
14128         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14129         * init.c (build_delete): Pass one.
14130         (build_partial_cleanup_for): Use build_scoped_method_call.
14131         * decl.c (finish_function): Pass a binfo.
14132
14133 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14134
14135         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14136
14137         * typeck.c (build_c_cast): Lose other reference to flag.
14138
14139         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14140         * decl2.c (delete_sanity): Remove meaningless use of
14141         LOOKUP_HAS_IN_CHARGE.
14142         * decl.c (finish_function): Use build_scoped_method_call instead
14143         of build_delete for running vbase dtors.
14144         * init.c (build_delete): Call overload resolution code instead of
14145         duplicating it badly.
14146
14147 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14148
14149         * call.c (build_over_call): Call mark_used before trying to elide
14150         the call.
14151
14152         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14153
14154 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14155
14156         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14157         non-reference used as an lvalue.
14158
14159 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14160
14161         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14162
14163 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14164
14165         * parse.y (handler): Fix template typo.
14166
14167 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14168
14169         * error.c (lang_decl_name): New fn.
14170         * tree.c (lang_printable_name): Use it.
14171
14172 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14173
14174         * g++spec.c: Include config.h so that we can catch bzero #defines
14175         from the config file.
14176
14177 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14178
14179         * new1.cc: Include a declaration for malloc, to avoid warning, and
14180         avoid lossing on systems that require one (ones that define malloc
14181         in xm.h).
14182
14183 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14184
14185         * decl2.c (max_tinst_depth): New variable.
14186         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14187         option.
14188         * pt.c (max_tinst_depth): Variable moved.
14189         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14190         as legal.
14191
14192 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14193
14194         * decl.c (xref_basetypes): Allow a base class that depends on
14195         template parms to be incomplete.
14196
14197         * decl2.c (build_expr_from_tree): Support typeid(type).
14198         * rtti.c (get_typeid): Support templates.
14199         (expand_si_desc, expand_class_desc): Fix string length.
14200         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14201
14202 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14203
14204         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14205
14206         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14207
14208 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14209
14210         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14211         smashes together template and non-template decls of the same
14212         signature.
14213
14214 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14215
14216         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14217
14218 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14219
14220         * decl.c (duplicate_decls): Next route, pedwarn about different
14221         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14222
14223 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14224
14225         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14226         (struct lang_type): Delete has_default_implementation member.
14227         Increase dummy to 21.
14228         * decl.c (start_method): Delete usage.
14229
14230         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14231         store_after_parms, start_decl_1, auto_function): Add decls.
14232         (get_arglist_len_in_bytes, declare_implicit_exception,
14233         have_exceptions_p, make_type_decl, typedecl_for_tag,
14234         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14235         build_component_type_expr, cplus_exception_name,
14236         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14237         * call.c (build_this): Make static.
14238         (is_complete): Likewise.
14239         (implicit_conversion): Likewise.
14240         (reference_binding): Likewise.
14241         (standard_conversion): Likewise.
14242         (strip_top_quals): Likewise.
14243         (non_reference): Likewise.
14244         (build_conv): Likewise.
14245         (user_harshness): Likewise.
14246         (rank_for_ideal): Likewise.
14247         * decl.c (start_decl_1): Delete forward decl.
14248         (push_decl_level): Make static.
14249         (resume_binding_level): Make static.
14250         (namespace_bindings_p): Make static.
14251         (declare_namespace_level): Make static.
14252         (lookup_name_real): Make static.
14253         (duplicate_decls): Make static.  Take register off NEWDECL and
14254         OLDDECL parm decls.
14255         * decl2.c (get_sentry): Make static.
14256         (temp_name_p): Delete fn.
14257         * except.c (auto_function): Delete decl.
14258         * lex.c (handle_{cp,sysv}_pragma): Make static.
14259         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14260         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14261         * pt.c (tsubst_expr_values): Make static.
14262         * rtti.c (combine_strings): Delete decl.
14263
14264 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14265
14266         * pt.c (push_template_decl): Handle getting a typedef.
14267
14268         * call.c (build_new_function_call): Complain about void arg.
14269
14270 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14271
14272         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14273         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14274
14275 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14276
14277         * except.c (expand_throw): Don't expand the cleanup tree here,
14278         since we are not going to write the rtl out.  Fixes problem with
14279         -g -O on SPARC.
14280
14281 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14282
14283         * Make-lang.in: Add $(exeext) as necessary.
14284
14285 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14286
14287         * parse.y (handler_seq): Must have at least one catch clause.
14288
14289 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14290
14291         * call.c (add_builtin_candidate): Restore ?: hack.
14292
14293         * decl.c (grok_op_properties): More warnings.
14294
14295 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14296
14297         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14298         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14299
14300         * decl.c (duplicate_decls): Scale back to a warning, and only do
14301         'em if -pedantic.
14302
14303 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14304
14305         * decl.c (duplicate_decls): pedwarn mismatched exception
14306         specifications.
14307
14308 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14309
14310         * call.c (build_new_method_call): Don't display the invisible
14311         argument for controlling virtual bases.
14312
14313 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
14314
14315         * new: Add nothrow new and delete, bad_alloc and throw specifications
14316         for delete.
14317         * decl.c (init_decl_processing): Add throw specification for delete.
14318         * new.cc (nothrow): Define.
14319         * lex.c (real_yylex): Removing warning that throw and friends are
14320         keywords.
14321         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14322         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14323         * Make-lang.in: Add new{1,2}.{cc,o}.
14324
14325 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14326
14327         * lex.c (cons_up_default_function): Fix return type of synth op=.
14328
14329         * init.c (emit_base_init): Add warnings for uninitialized members
14330         and bases.
14331
14332         * decl.c (xref_basetypes): Add warning for non-polymorphic type
14333         with destructor used as base type.
14334
14335         * decl.c (grok_op_properties): Add warning for op= returning void.
14336         * typeck.c (c_expand_return): Add warning for op= returning anything
14337         other than *this.
14338
14339         * class.c (finish_struct_1): Add warning for class with pointers
14340         but not copy ctor or copy op=.
14341
14342         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14343         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14344         (instantiate_template): If -fexternal-templates, add this
14345         instantiation to pending_templates.
14346
14347         * decl2.c (copy_assignment_arg_p): Disable old hack to support
14348         Booch components.
14349
14350 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
14351
14352         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14353
14354 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14355
14356         * call.c (standard_conversion): Handle getting references.  Tack
14357         on RVALUE_CONV here.  Do it for non-class types, too.
14358         (reference_binding): Pass references to standard_conversion.
14359         (implicit_conversion): Likewise.
14360         (add_builtin_candidate): Disable one ?: kludge.
14361         (convert_like): Handle RVALUE_CONVs for non-class types.
14362         (joust): Disable the other ?: kludge.
14363
14364 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14365
14366         * decl.c (init_decl_processing): Add code to build up common
14367         function types beforehand, to avoid creation then removal of
14368         things already in the hash table.
14369
14370 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14371
14372         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14373         the arguments.
14374
14375         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14376         current_template_parms.
14377
14378 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
14379
14380         * search.c (lookup_field): Don't return a function, check want_type.
14381
14382 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14383
14384         * init.c (build_new): Make sure PLACEMENT has a type.
14385
14386 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14387
14388         * init.c (build_new): Support new (nothrow).
14389
14390 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14391
14392         * pt.c (instantiate_decl): Also do push_to_top_level before setting
14393         up DECL_INITIAL.
14394
14395         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14396         * pt.c (tsubst): Defer instantiation of default args.
14397         * call.c (build_over_call): Until here.
14398
14399 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14400
14401         * search.c (lookup_field): Make sure we have an
14402         IDENTIFIER_CLASS_VALUE before we try to return it.
14403
14404 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14405
14406         * call.c (build_method_call): Delete unused var PARM.
14407         (build_overload_call_real): Likewise.
14408         (build_object_call): Delete unused var P.
14409         (build_new_op): Likewise.
14410         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14411         var definitions, which are never used.
14412         (shadow_tag): Delete unused var FN.
14413         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14414         * init.c (build_new): Delete unused var ALLOC_TEMP.
14415         * method.c (hack_identifier): Delete unused var CONTEXT.
14416         (do_build_copy_constructor): Delete unused var NAME.
14417         (synthesize_method): Delete unused var BASE.
14418         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14419         * rtti.c (build_headof): Delete unused var VPTR.
14420         (get_typeid): Delete unused var T.
14421         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14422         and ORIG_OP2.
14423         (build_ptrmemfunc): Delete unused vars U and NINDEX.
14424         * typeck2.c (build_functional_cast): Delete unused var BINFO.
14425
14426 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14427
14428         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14429         things in a type being defined.
14430         * decl.c (finish_enum): Reverse the values so that they are in
14431         the correct order.
14432
14433         * pt.c (instantiate_class_template): Don't initialize
14434         BINFO_BASETYPES until the vector is filled out.
14435         (unify): Don't abort on conflicting bindings, just fail.
14436         (instantiate_decl): Do push_tinst_level before any tsubsting.
14437
14438         * method.c (build_overload_value): Handle getting a
14439         TEMPLATE_CONST_PARM for a pointer.
14440
14441 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
14442
14443         * init.c (expand_member_init): Don't give 'not a base' error for
14444         templates.
14445
14446         * pt.c (instantiate_decl): Call import_export_decl later.
14447
14448         * pt.c (instantiate_class_template): Return a value.
14449
14450         * parse.y (extension): New rule for __extension__.
14451         (extdef, unary_expr, decl, component_decl): Use it.
14452
14453 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
14454
14455         * class.c (base_binfo): Remove unused base_has_virtual member.
14456         (finish_base_struct): Likewise.
14457         (finish_struct_1): Likewise.
14458
14459 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
14460
14461         * search.c (expand_upcast_fixups): Fix bogus code generation
14462         problem where the generated code uses the wrong index into the
14463         runtime built vtable on the stack.  Old code could clobber random
14464         stack values.
14465
14466 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
14467
14468         * init.c (perform_member_init): Make sure the partial EH cleanups
14469         live on the function_obstack.
14470
14471 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
14472
14473         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14474         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14475
14476 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
14477
14478         * decl.c (grokvardecl): Avoid ANSI style initialization.
14479
14480 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
14481
14482         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14483
14484 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
14485
14486         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14487
14488 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14489
14490         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14491         arguments we compare against.  Start the count of I at 1, not 0,
14492         since argv[0] is still the command.
14493
14494 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
14495
14496         * lang-specs.h: Accept .cp as an C++ extension.
14497
14498 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14499
14500         * cp-tree.h (ptr_reasonably_similar): Add decl.
14501
14502 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14503
14504         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14505         pointer.  New local SPECBITS with the parm's value.
14506         (grokdeclarator): Pass &specbits down.
14507
14508         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14509         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14510
14511         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14512         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14513
14514         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14515         not an error_mark_node.
14516
14517 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
14518
14519         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14520         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14521
14522 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14523
14524         * decl.c (grokdeclarator): When giving an anonymous struct a name,
14525         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14526         not affected).
14527
14528         * typeck2.c (build_m_component_ref): If component is a pointer
14529         to data member, resolve the OFFSET_REF now.
14530
14531         * call.c (convert_like): Don't go into infinite recursion.
14532
14533         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14534
14535         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14536         * tree.c (layout_basetypes): And on the vbase ptr.
14537
14538 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14539
14540         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14541         CHAR_TYPE_SIZE so bool is always the same size as another type.
14542
14543         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14544
14545 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
14546
14547         * decl2.c (grok_x_components): Remove synthesized methods from
14548         TYPE_METHODS of an anonymous union, complain about member
14549         functions.
14550         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14551         anonymous unions.
14552         (finish_function): Just clear the DECL_RTL of our arguments.
14553
14554 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14555
14556         * decl2.c (finish_file): Emit DWARF debugging info for static data
14557         members.
14558
14559         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14560
14561 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
14562
14563         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14564         IDENTIFIER_NODE.
14565
14566 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14567
14568         * Make-lang.in (g++-cross$(exeext)): Fix typo.
14569
14570 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14571
14572         Make the g++ driver now be a standalone program, rather than one
14573         that tries to run the gcc driver after munging up the options.
14574         * Make-lang.in (g++.c, g++spec.o): New rules.
14575         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14576         added.
14577         (g++$(exeext)): New rule, based on xgcc rule.
14578         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14579         * g++spec.c: New file.
14580         * g++.c: Removed file.
14581
14582 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
14583
14584         * cvt.c (build_up_reference): Arrange for any temporary values
14585         that have been keep in registers until now to be put into memory.
14586
14587 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14588
14589         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14590         that make -j3 bootstrap works better.
14591
14592 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
14593
14594         * decl.c (pushtag): Do pushdecl for anon tags.
14595
14596 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14597
14598         * typeck.c (c_expand_return): Fix logic.
14599         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14600
14601 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
14602
14603         * g++.c (main): Make sure arglist has a final NULL entry.  Add
14604         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14605         stdin/stdout of the invoked program are redirected to
14606         nowheresville.
14607
14608 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14609
14610         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14611
14612 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
14613
14614         * init.c (resolve_offset_ref): Handle obj.vfn better.
14615         * typeck.c (build_component_ref): Set TREE_TYPE on result from
14616         build_vfn_ref.
14617
14618 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
14619
14620         * typeck.c (convert_for_assignment): Also handle anachronistic
14621         implicit conversions from (::*)() to cv void*.
14622         * cvt.c (cp_convert_to_pointer): Likewise.
14623
14624 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14625
14626         * lex.c (handle_cp_pragma): Fix bogus warning.
14627
14628 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
14629
14630         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14631         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14632
14633 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14634
14635         * class.c (finish_struct_1): Support DWARF2_DEBUG.
14636         * search.c (dfs_debug_mark): Likewise.
14637         * decl2.c (finish_vtable_vardecl): Likewise.
14638         * decl.c (pushtag, finish_enum): Likewise.
14639         * lex.c (check_newline): Use debug_* instead of calling *out
14640         functions directly.
14641
14642 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14643
14644         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14645         on some picky hosts.
14646
14647 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14648
14649         * class.c (finish_struct_1): A class has a non-trivial copy
14650         constructor if it has virtual functions.
14651
14652         * cvt.c (cp_convert): Always call a constructor.
14653
14654         * call.c (reference_binding): Still tack on a REF_BIND
14655         for bad conversions.
14656         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14657
14658         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14659         (c_expand_return): Likewise.
14660         * typeck2.c (digest_init): Likewise for { }.
14661         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14662         * cvt.c (cp_convert): Handle failure better.
14663
14664 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14665
14666         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14667         of GCC be path-relative.
14668
14669 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
14670
14671         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14672         it does need choose-temp.o and pexecute.o.
14673
14674 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14675
14676         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14677         that we still use it.
14678         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14679
14680 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
14681
14682         * init.c (expand_default_init): Avoid calling constructors to
14683         initialize reference temps.
14684
14685         * cvt.c (convert_to_reference): Fix.
14686
14687 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
14688
14689         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14690         (convert_to_reference): Likewise.
14691         * typeck.c (convert_for_initialization): Likewise.
14692         * init.c (expand_default_init): Likewise.
14693         (expand_aggr_init_1): Likewise.
14694         * cp-tree.h (CONV_NONCONVERTING): Lose.
14695         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14696         * *.c: Adjust.
14697         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14698
14699 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
14700
14701         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14702
14703 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14704
14705         * init.c (expand_aggr_init_1): Don't crash on non-constructor
14706         TARGET_EXPR.
14707
14708 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14709
14710         * g++.c: Include gansidecl.h.
14711         (VPROTO, PVPROTO, VA_START): Delete.
14712         (choose_temp_base_try, choose_temp_base, perror_exec,
14713         run_dos) [__MSDOS__]: Delete fns.
14714         (pfatal_with_name): Delete fn.
14715         (temp_filename): Declare like in gcc.c.
14716         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14717         (error_count, signal_count): Define.
14718         (error): Delete both definitions.
14719         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14720         (pfatal_pexecute): Add fn from gcc.c.
14721         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
14722         code to use the pexecute stuff also used by gcc.c.
14723         (MIN_FATAL_STATUS): Define.
14724         * Make-lang.in (g++): Add dependency on and linking with
14725         choose-temp.o and pexecute.o.
14726
14727         * cp-tree.h: Include gansidecl.h.
14728         (STDIO_PROTO): Delete #undef/#define.
14729         * cvt.c (NULL): Delete #undef/#define.
14730         * expr.c (NULL): Likewise.
14731         * init.c (NULL): Likewise.
14732         * rtti.c (NULL): Likewise.
14733         * xref.c (NULL): Likewise.
14734
14735         * cp-tree.h (build_user_type_conversion): Add prototype.
14736         * call.c (build_user_type_conversion): Delete prototype.  Correct
14737         decl of FLAGS arg to be an int.
14738         * cvt.c (build_user_type_conversion): Likewise.
14739
14740 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
14741
14742         * cp-tree.def: Add TRY_BLOCK and HANDLER.
14743         * except.c (expand_start_catch_block): Support templates.
14744         * parse.y (try_block, handler_seq): Likewise.
14745         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14746
14747 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
14748
14749         * pt.c (current_template_args): New fn.
14750         (push_template_decl): Use it.
14751         * decl.c (grokdeclarator): Use it.
14752
14753         * decl2.c (build_expr_from_tree): Dereference ref vars.
14754
14755         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14756         the decl-specifier-seq.
14757
14758         * decl.c (grok_op_properties): Don't force the type of a conversion
14759         op to be complete.  Don't warn about converting to the same type
14760         for template instantiations.
14761
14762         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14763         methods.
14764
14765 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
14766
14767         * typeck.c (get_delta_difference): Remove previous bogusness.
14768         Don't give errors if force is set.
14769
14770 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
14771
14772         * decl2.c (finish_file): Don't emit debug info.
14773         * decl.c (pushdecl): Lose obsolete code.
14774         (grokdeclarator): Still do the long long thing after complaining.
14775         * search.c (note_debug_info_needed): Don't do anything if we're in a
14776         template.
14777         * method.c (synthesize_method): For non-local classes,
14778         push_to_top_level first.
14779
14780 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
14781
14782         * typeck.c (get_delta_difference): Add no_error parameter.
14783         (build_ptrmemfunc): Call get_delta_difference with no_error set;
14784         we don't want error messages when converting unrelated
14785         pointer-to-member functions.
14786
14787 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
14788
14789         * error.c (dump_expr): Improve the wording on error messages that
14790         involve pointer to member functions.
14791
14792 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
14793
14794         * cvt.c (cp_convert_to_pointer): Move code for conversions from
14795         (::*)() to void* or (*)() up a bit, so that we can convert from
14796         METHOD_TYPEs as well.
14797
14798 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14799
14800         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14801         There are no 'member' types.
14802         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14803         (build_x_typeid): Handle errors.
14804
14805 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
14806
14807         * typeck.c (convert_for_assignment): Handle anachronistic implicit
14808         conversions from (::*)() to void* or (*)().
14809         * cvt.c (cp_convert_to_pointer): Likewise.
14810         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14811         conversions from here.
14812         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14813         * lang-options.h: Likewise.
14814         * decl2.c (warn_pmf2ptr): Define.
14815         * cp-tree.h: Declare it.
14816         * typeck2.c (digest_init): Allow pmfs down into
14817         convert_for_initialization.
14818
14819 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14820
14821         * typeck.c (c_expand_return): Fix for returning overloaded fn.
14822
14823 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
14824
14825         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14826         * decl.c (grok_reference_init): Pass DIRECT_BIND.
14827         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
14828         DIRECT_BIND.
14829         * call.c (convert_like): Don't pass INDIRECT_BIND.
14830         * typeck.c (convert_arguments): Likewise.
14831         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14832
14833 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
14834
14835         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14836         similar code in build_up_ref.
14837         * cvt.c (build_up_reference): Drastically simplify.
14838
14839 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
14840
14841         * typeck.c (signed_or_unsigned_type): If the given type already
14842         as the correct signedness, then just return it.
14843
14844         * typeck.c ({un,}signed_type): If can't do anything, call
14845         signed_or_unsigned_type.
14846
14847 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
14848
14849         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14850         current_class_type is NULL.
14851
14852 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
14853
14854         * class.c (finish_struct_1): Avoid empty structs by adding a field
14855         so layout_type gets the mode right.
14856
14857         * typeck.c (c_expand_return): Drastically simplify.
14858
14859 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
14860
14861         * typeck.c (decay_conversion): Handle overloaded methods.
14862
14863 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
14864
14865         * call.c (build_over_call): A TARGET_EXPR has side-effects.
14866
14867 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
14868
14869         * cvt.c (convert_to_pointer_force): Add code to support pointer to
14870         member function to pointer to function conversions.
14871         * init.c (resolve_offset_ref): Add code to allow faked up objects,
14872         ignoring them if they are not used, and giving an error, if they
14873         are needed.
14874         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14875         code, and so that we can give an error, if we needed an object,
14876         and one was not provided.
14877         (build_c_cast): Don't call default_conversion when we want to
14878         convert to pointer to function from a METHOD_TYPE.
14879
14880 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
14881
14882         * Make-lang.in (cplib2.ready): Fix logic.
14883
14884         * decl.c (shadow_tag): Only complain about non-artificial function
14885         members.
14886
14887         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14888
14889 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
14890
14891         * expr.c (cplus_expand_expr): Pre-tweak call_target like
14892         expand_inline_function would.
14893
14894         * pt.c (mark_decl_instantiated): If extern_p, call
14895         mark_inline_for_output.
14896
14897 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
14898
14899         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14900         pmd conversions.
14901
14902         * typeck.c (get_delta_difference): Fix wording, as we can be used
14903         for pointer to data members.
14904
14905 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
14906
14907         * pt.c (tsubst): If the function decl isn't a member of this
14908         template, return a copy of the decl (including copying the
14909         lang-specific part) so we don't hose ourselves later.
14910
14911 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
14912
14913         * class.c (finish_struct): Remove DWARF-specific tag handling.
14914         * decl.c (pushtag): Likewise.
14915         (finish_function): Always clear DECL_ARGUMENTS on function decls with
14916         no saved RTX.
14917         * decl2.c (finish_file): Emit DWARF debugging info for static data
14918         members.
14919
14920 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
14921
14922         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14923         isn't the same as the new one before we whack it.
14924
14925 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
14926
14927         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14928         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14929         warn_traditional and warn_strict_prototypes; remove ancient
14930         'overload' code; remove references to flag_traditional.
14931
14932 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
14933
14934         * input.c (sub_getch): Handle 8-bit characters in string literals.
14935
14936 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
14937
14938         * tree.c (mapcar): Handle CONSTRUCTORs.
14939         (copy_to_permanent): Handle expression_obstack properly.
14940
14941         * Make-lang.in (cplib2.txt): Also depend on the headers.
14942
14943         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14944         INT_TYPE_SIZE.
14945         (expand_class_desc): Use USItype for offset field.
14946         * tinfo.h (struct __class_type_info): Likewise.
14947
14948         * method.c (build_overload_int): TYPE_PRECISION should be applied
14949         to types.
14950
14951 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
14952
14953         * call.c (build_new_op): A COND_EXPR involving void must be a
14954         builtin.
14955
14956 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
14957
14958         * typeck.c (build_x_component_ref): New fn.
14959         (build_object_ref): Use it.
14960         * parse.y (primary): Use it.
14961         * decl2.c (build_expr_from_tree): Use it.
14962         * cp-tree.h: Declare it.
14963
14964         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
14965         * error.c (dump_type_suffix): Handle variable arrays.
14966
14967 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14968
14969         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
14970
14971 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
14972
14973         * decl.c (lookup_name_real): Don't try to look up anything in a
14974         TYPENAME_TYPE.
14975
14976         * tinfo2.cc (__throw_type_match_rtti): Oops.
14977
14978 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
14979
14980         * Make-lang.in (exception.o): Use -fno-PIC for now.
14981
14982 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
14983
14984         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
14985         calling them.
14986         (get_tinfo_fn_dynamic): Extracted from build_typeid.
14987         * tinfo2.cc (__dynamic_cast): Adjust.
14988
14989         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
14990         (build_x_typeid): Likewise.
14991
14992         * parse.y: Call build_x_typeid instead of build_typeid.
14993         * cp-tree.def: Add TYPEID_EXPR.
14994         * pt.c (tsubst_copy): Handle typeid.
14995         * decl2.c (build_expr_from_tree): Likewise.
14996         * rtti.c (build_x_typeid): Throw bad_typeid from here.
14997         (build_typeid): Not here.
14998         * cp-tree.h: Declare build_x_typeid.
14999
15000 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15001
15002         * call.c (convert_like): Pull out constant values.
15003
15004         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15005
15006 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15007
15008         * decl.c (init_decl_processing): Create short int types before
15009         creating size_t in case a machine description needs to use
15010         unsigned short for size_t.
15011
15012 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15013
15014         * Make-lang.in (exception.o): Turn off pic.
15015
15016         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15017         type, multi-level ptr conversions.
15018
15019         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15020         (throw_bad_cast): Use it.
15021         (throw_bad_typeid): New fn.
15022         (build_typeid): Throw bad_typeid as needed.
15023         Use build_call.
15024         (synthesize_tinfo_fn): Handle functions and arrays before checking
15025         for cv-quals.
15026
15027         * Remove .h from standard C++ headers, add new.h, move into inc
15028         subdirectory.
15029
15030         * exception*: Remove pointer from object, constructors.  Add
15031         default exception::what that uses type_info::name.  Add
15032         __throw_bad_typeid.
15033
15034         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15035
15036 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15037
15038         * Make-lang.in: Building C++ code depends on cc1plus.
15039
15040 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15041
15042         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15043         a HOST_WIDE_INT, not a tree.
15044
15045 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15046
15047         * exception.cc: Don't include <stdlib.h>.
15048
15049         * Make-lang.in (c++.clean): Remove cplib2.*.
15050
15051 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15052
15053         * parse.y (component_decl_1, component_costructor_declarator case):
15054         Pass attributes/prefix_attributes in tree list.
15055
15056 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15057
15058         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15059
15060 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15061
15062         * lex.c (do_identifier): Don't do deferred lookup in a template
15063         header.
15064
15065         * typeck2.c (store_init_value): Oops.
15066
15067         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15068         New files for C++ lang-support library.
15069         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15070         (CXX_LIB2FUNCS): Define.
15071         And rules for building the C++ lang-support code.
15072         * config-lang.in (headers): Define.
15073         (lib2funcs): Define.
15074
15075 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15076
15077         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15078         digest_init.
15079         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15080         * typeck2.c (store_init_value): Check for initializing pmf with { }
15081         here.
15082         (process_init_constructor): Not here.
15083
15084 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15085
15086         * pt.c (begin_template_parm_list): Increment
15087         processing_template_decl here.
15088         (end_template_parm_list): Not here.
15089         (process_template_parm): No need to add 1 to it now.
15090         * *.c: Use processing_template_decl instead of current_template_parms
15091         to check for being in a template.
15092
15093         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15094         (tsubst_copy): Handle CONSTRUCTOR.
15095         (instantiate_decl): Set up context properly for variables.
15096         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15097         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15098
15099 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15100
15101         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15102
15103 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15104
15105         * method.c (make_thunk): Call comdat_linkage before setting the
15106         TREE_CODE.
15107
15108         * decl2.c (comdat_linkage): Use make_decl_one_only.
15109         (import_export_decl): Likewise.
15110         * decl.c (init_decl_processing): Check supports_one_only instead of
15111         SUPPORTS_WEAK.
15112
15113 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15114
15115         * decl2.c (grokfield): Tighten checking for access decls.
15116
15117         * decl.c (make_typename_type): Resolve references to
15118         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15119         (lookup_name_real): Types that depend on a template parameter get
15120         an implicit 'typename' unless they're in the current scope.
15121         (start_decl_1): We don't care about incomplete types that depend
15122         on a template parm.
15123         (grokdeclarator): Resolve 'typename's in the type specifier that
15124         refer to members of the current scope.
15125
15126         * call.c (build_over_call): Remove 'inline called before
15127         definition' diagnostic.
15128         (build_method_call): Likewise.
15129         * decl.c (duplicate_decls): Downgrade 'used before declared
15130         inline' to a warning, only with -Winline.
15131
15132 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15133
15134         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15135
15136 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15137
15138         * call.c (build_method_call): When calling a signature
15139         default implementation, as in other cases, let instance_ptr simply
15140         be instance.
15141
15142 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15143
15144         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15145
15146 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15147
15148         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15149         works on hppa and SPARC.
15150
15151 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15152
15153         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15154
15155 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15156
15157         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15158         before testing whether it's a signature.
15159
15160 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15161
15162         * call.c (build_new_method_call): Don't complain about signature
15163         pointers and references not being an aggr type.
15164         (build_this): If a signature pointer or reference was passed in,
15165         just return it.
15166         (build_new_method_call): If instance is a signature pointer, set
15167         basetype to the signature type of instance.
15168         * sig.c (build_signature_method_call): Deleted basetype and
15169         instance parameters, they can be found as the DECL_CONTEXT of
15170         function and as the first argument passed in.
15171         * cp-tree.h: Changed declaration of build_signature_method_call.
15172         * call.c (build_method_call): Deleted first two arguments in call
15173         of build_signature_method_call.
15174         (build_over_call): Added call to build_signature_method_call.
15175
15176 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15177
15178         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15179         target_expr.
15180
15181 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15182
15183         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15184
15185 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15186
15187         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15188         (expand_end_try_stmts): Remove.
15189
15190         * init.c (perform_member_init): Use add_partial_entry () instead
15191         of directly manipulating lists.
15192         (emit_base_init): Likewise.
15193
15194 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15195
15196         * except.c (expand_exception_blocks): Always make sure USE and
15197         CLOBBER insns that came at the end still do, the backend relies
15198         upon this.
15199
15200 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15201
15202         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15203         right type.
15204
15205 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15206
15207         * cvt.c (convert_to_reference): Revert last change, don't complain
15208         about temp without target decl.
15209
15210 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15211
15212         * decl.c (grokdeclarator): Don't core dump when void() is given.
15213
15214 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15215
15216         * decl.c (copy_args_p): Don't crash.
15217
15218 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15219
15220         * pt.c (tsubst): And support template args inside the exception
15221         specification.
15222
15223         * pt.c (tsubst): Add support for exception specifications in
15224         template functions.
15225
15226 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15227
15228         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15229         fields now.
15230         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15231         (start_function): Likewise.
15232         (start_method): Likewise.
15233         (grokfield): Likewise.
15234         (make_call_declarator): Add throw spec parameter.
15235         (set_quals_and_spec): Add routine.
15236         * lex.c (set_quals_and_spec): Likewise.
15237         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15238         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15239         grokdeclarator.
15240         (groktypename): Likewise.
15241         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15242         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15243         field in DECL_STMT.
15244         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15245         (grokfndecl): Remove useless set of raises.
15246         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15247         the throw spec parameter to start_decl.  Pull the throw spec out
15248         of the call declarator.
15249         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15250         (start_function): Eliminate the throw spec parameter.  Eliminate
15251         the throw spec parameter to grokdeclarator.
15252         (start_method): Likewise.
15253         * decl2.c (grokfield): Likewise.
15254         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15255         (grokoptypename): Likewise.
15256         (finish_file): Eliminate the throw spec parameter to
15257         start_function.  Add throw spec to make_call_declarator.
15258         * except.c (init_exception_processing): Add throw spec to
15259         make_call_declarator.  Eliminate the throw spec parameter to
15260         start_decl.
15261         (expand_start_catch_block): Eliminate the throw spec parameter to
15262         grokdeclarator.
15263         (expand_builtin_throw): Add throw spec to make_call_declarator.
15264         Eliminate the throw spec parameter to start_function.
15265         (start_anon_func): Likewise.
15266         * lex.c (make_call_declarator): Add throw spec parameter.
15267         (set_quals_and_spec): New routine.
15268         (cons_up_default_function): Add throw spec to make_call_declarator.
15269         Eliminate the throw spec parameter to grokfield.
15270         * method.c (synthesize_method): Eliminate the throw spec parameter
15271         to start_function.
15272         * pt.c (process_template_parm): Eliminate the throw spec parameter
15273         to grokdeclarator.
15274         (tsubst): Add throw spec to make_call_declarator.
15275         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15276         (do_function_instantiation): Eliminate the throw spec parameter to
15277         grokdeclarator.  Eliminate the throw spec parameter to
15278         start_function.
15279         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15280         to start_function.
15281         * parse.y (datadef): Remove non-winning optimization.
15282         (decl): Likewise.
15283         (fndef): Remove ambiguous error productions uncovered by grammar
15284         fixing.
15285         (constructor_declarator): Add exception_specification_opt here.
15286         (component_constructor_declarator): Likewise.
15287         (direct_after_type_declarator): Likewise.
15288         (complex_direct_notype_declarator): Likewise.
15289         (direct_abstract_declarator): Likewise.
15290         (fn.def1): Remove exception_specification_opt.
15291         (fn.def2): Likewise.
15292         (condition): Likewise.
15293         (initdcl0): Likewise.
15294         (initdcl): Likewise.
15295         (notype_initdcl0): Likewise.
15296         (nomods_initdcl0): Likewise.
15297         (component_decl_1): Likewise.
15298         (component_declarator): Likewise.
15299         (after_type_component_declarator0): Likewise.
15300         (after_type_component_declarator): Likewise.
15301         (notype_component_declarator): Likewise.
15302
15303 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15304
15305         * call.c (build_over_call): Also use an INIT_EXPR when
15306         initializing anything from an rvalue.
15307
15308         * call.c (build_over_call): Call stabilize_reference when building
15309         an INIT_EXPR instead of calling the copy ctor.
15310
15311         * call.c (joust): Extend the previous change to all comparisons.
15312
15313         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15314         NO_LINKAGE_HEURISTICS.
15315
15316         * decl2.c (finish_file): Emit any statics that weren't already.
15317
15318         * typeck.c (build_static_cast): Implement.
15319         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15320         * decl.c (grokparms): Use can_convert_arg instead of
15321         implicit_conversion directly.
15322         (copy_args_p): New fn.
15323         * cvt.c (convert_to_reference): Don't complain about temp with
15324         static_cast.
15325         (build_up_reference): Handle TARGET_EXPRs.
15326         * call.c (build_over_call): Elide unnecessary temps.
15327         (can_convert*): Use new overloading code.
15328
15329 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
15330
15331         * call.c: Move TYPE_PTR*_MACROS ...
15332         * cp-tree.h: To here.
15333         * typeck.c (build_reinterpret_cast): Implement.
15334
15335         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15336         ptr_complete_ob.
15337         (joust): If we're comparing a function to a builtin and the worst
15338         conversion for the builtin is worse than the worst conversion for the
15339         function, take the function.
15340
15341         * typeck.c (build_const_cast): Implement.
15342         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15343         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15344
15345 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
15346
15347         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15348         too early.  Make sure we explode if exprtype turns out to be a
15349         NULL_TREE when it shouldn't be.
15350
15351 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
15352
15353         * cp-tree.h: New routine make_call_declarator.
15354         * lex.c (make_call_declarator): Define it.
15355         * except.c (init_exception_processing): Use it.
15356         (expand_builtin_throw): Likewise.
15357         (start_anon_func): Likewise.
15358         * decl2.c (finish_file): Likewise.
15359         * lex.c (cons_up_default_function): Likewise.
15360         * parse.y: Likewise.
15361         * pt.c (tsubst): Likewise.
15362
15363 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
15364
15365         * decl2.c (groktypefield): Remove unused code.
15366
15367 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
15368
15369         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15370         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
15371         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
15372         nonempty_cv_qualifiers.
15373         * hash.h: Rebuild.
15374
15375         * lex.c (make_pointer_declarator): Change type_quals into
15376         cv_qualifiers.
15377         (make_reference_declarator): Likewise.
15378
15379 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15380
15381         * decl.c (start_function): Only check interface_* for templates
15382         with flag_alt_external_templates.
15383
15384         * call.c (build_new_op): Check for comparison of different enum types.
15385         (build_over_call): Fix arg # output.
15386
15387         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15388
15389 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
15390
15391         * call.c (build_new_op): Check for erroneous args.
15392
15393         * call.c (build_new_method_call): Add missing args to cp_error.
15394
15395         * tree.c (error_type): Don't print reference-to-array.
15396
15397         * typeck.c (convert_for_assignment): Don't say contravariance for
15398         removing const.
15399
15400 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15401
15402         * call.c (build_over_call): Diagnose bad convs for `this'.
15403
15404         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15405         on _ctor_arg.
15406
15407         * call.c (convert_like): Handle bad convs.
15408         (build_over_call): Handle bad convs better.
15409
15410         * decl2.c: -fansi-overloading is now the default.
15411
15412         * call.c (build_new_method_call): Check for erroneous args.
15413
15414         * pt.c (instantiate_class_template): Propagate
15415         TYPE_USES_MULTIPLE_INHERITANCE.
15416
15417 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
15418
15419         * call.c (enforce_access): Add static to routine.
15420
15421 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15422
15423         * call.c (build_user_type_conversion_1): Fix bad handling.
15424         (compare_ics): Likewise.
15425
15426 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15427
15428         * call.c (standard_conversion): Oops.
15429
15430 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
15431
15432         * g++.c: Update test for win32 (&& ! cygwin32).
15433
15434 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15435
15436         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15437         (ptr_reasonably_similar): New fn.
15438         * call.c (BAD_RANK): New rank.
15439         (ICS_BAD_FLAG): New macro.
15440         (standard_conversion): Handle almost-right pointer conversions.
15441         (reference_binding): Handle bad rvalue bindings.
15442         (add_*_candidate): Stuff.
15443         (build_over_call): Pass bad conversions to convert_for_initialization.
15444         (compare_ics): Handle bad convs.
15445         (joust): Likewise.
15446
15447 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
15448
15449         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15450         integer_type_node when computing pointer offsets.
15451
15452 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
15453
15454         * tree.c (lvalue_type): New fn.
15455         (error_type): New fn.
15456         * call.c (op_error): Use error_type.
15457         (add_conv_candidate): Use lvalue_type.
15458         (add_builtin_candidates): Likewise.
15459         * error.c (args_as_string): Use error_type.
15460
15461 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15462
15463         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15464         (tsubst): Not here.
15465
15466         * decl.c (init_decl_processing): With -ansi, __null's type is the
15467         signed integral type with the same number of bits as a pointer.
15468         Introduce a new variable null_node for it.
15469         * cp-tree.h: Adjust.
15470         * call.c (null_ptr_cst_p): Adjust.
15471
15472 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
15473
15474         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15475         optimize.
15476
15477 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15478
15479         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15480         fns of classes without virtual functions.
15481
15482         * call.c (add_function_candidate): Handle `this' specially.
15483         (compare_ics): Likewise.
15484
15485 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
15486
15487         * typeck.c (build_conditional_expr): Fix handling of __null.
15488
15489         * decl2.c (comdat_linkage): New fn.
15490         (import_export_vtable): Use it.
15491         (import_export_decl): Use it.
15492         * method.c (make_thunk): Use it.
15493
15494 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15495
15496         * pt.c (end_template_decl): If we don't actually have parms, return.
15497         * parse.y (template_header): Accept 'template <>'.
15498
15499         * errfn.c: Allow 5 args.
15500
15501 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
15502
15503         * tree.c (make_temp_vec): New fn.
15504         * pt.c (push_template_decl): Handle partial specs.
15505         (instantiate_class_template): Likewise.
15506         (more_specialized): Use get_bindings.
15507         (more_specialized_class): New fn.
15508         (get_class_bindings): New fn.
15509         (most_specialized_class): New fn.
15510         (do_function_instantiation): List candidates for ambiguous case.
15511         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15512         (shadow_tag): Call push_template_decl for partial specializations.
15513         * parse.y: Likewise.
15514         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15515         DECL_TEMPLATE_MEMBERS.
15516         * call.c (print_z_candidates): Reduce duplication.
15517
15518 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15519
15520         * decl2.c (lang_decode_option): Allow -fansi-overloading.
15521
15522 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
15523
15524         * pt.c (get_bindings): New fn.
15525         (most_specialized): Likewise.
15526         (do_function_instantiation): Use them.
15527         (add_maybe_template): New fn.
15528         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15529         * call.c (build_new_op): Handle guiding decls.
15530         (build_new_function_call): Likewise.
15531         * decl2.c (finish_file): Likewise.
15532
15533         * decl2.c (mark_used): Do synthesis here.
15534         * call.c (build_method_call): Not here.
15535         (build_over_call): Or here.
15536         * typeck.c (build_function_call_real): Or here.
15537         * tree.c (bot_manip): Call mark_used on functions used in default
15538         args.
15539
15540 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15541
15542         * decl2.c (import_export_vtable): Delete code that disabled vtable
15543         heuristic on systems with ASM_OUTPUT_EXTERNAL.
15544
15545 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15546
15547         * typeck.c (build_x_function_call): Handle static call context
15548         better.
15549
15550         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15551         the function, not its outer block.
15552
15553         * call.c (build_field_call): Pass fields on to build_opfncall
15554         regardless of TYPE_OVERLOADS_CALL_EXPR.
15555         (build_method_call): Pass on to build_new_method_call sooner.
15556
15557         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15558         gives us.
15559         * class.c (instantiate_type): Don't put a POINTER_TYPE to
15560         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
15561         modifying it.
15562
15563 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
15564
15565         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15566         (add_builtin_candidate): Don't take enums for ++.
15567         (build_new_method_call): Handle non-aggregates and field calls.
15568         Move new overloading code from...
15569         * cvt.c: Here.
15570
15571         * decl.c (grokparms): Don't check default args in templates.
15572
15573 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15574
15575         * cvt.c (build_new_op): Fix args to build_unary_op.
15576         (add_builtin_candidates): Don't call type_promotes_to on float.
15577
15578         * decl.c (grokparms): Check the type of the default arg.
15579
15580         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15581         returning NULL_TREE.
15582
15583         * typeck.c (build_x_binary_op): Avoid doing extra work.
15584         (build_x_unary_op): Likewise.
15585         (build_x_conditional_expr): Likewise.
15586         * cvt.c (build_over_call): Return.
15587         (add_builtin_candidate): Fix MEMBER_REF.
15588         (build_new_op): Likewise.
15589
15590 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
15591
15592         * method.c (build_overload_name): Put bug fix into code but leave
15593         disabled for now so we can be bug compatible with older releases
15594         that do repeats incorrectly.  In the future, we can enable it.
15595
15596 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15597
15598         * cvt.c (convert_like): Don't call build_cplus_new twice.
15599
15600         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15601         Control new overloading code with -fansi-overloading.
15602
15603 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
15604
15605         * cvt.c (build_over_call): Call build_cplus_new.
15606         * call.c (build_method_call): Likewise.
15607         * typeck.c (build_function_call_real): Likewise.
15608         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15609         the COND_EXPR in a TARGET_EXPR so they use the same slot.
15610
15611         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15612         recursive calls.
15613         * typeck.c (complete_type): Propagate
15614         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15615
15616 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15617
15618         * cvt.c (joust): More ?: kludging.  Sigh.
15619         (build_over_call): Don't try to synthesize global fns.
15620
15621         * search.c (lookup_conversions): Use binfo marking.
15622
15623 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
15624
15625         * search.c (build_mi_matrix): Use the correct value of cid
15626         when determining the new mi_size.
15627
15628 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15629
15630         * cvt.c (add_builtin_candidates): Do consider type conversion ops
15631         for the first parms of += et al.
15632         (strip_top_quals): New fn.
15633         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15634         (implicit_conversion): Likewise.
15635         (add_builtin_candidates): Be careful about arrays.
15636         (build_new_method_call): Handle vtable optimization.
15637
15638 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
15639
15640         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15641         * cvt.c (reference_binding): Use it.
15642         (implicit_conversion): Use it.
15643         (add_builtin_candidate, COND_EXPR): Use it.
15644
15645         * cvt.c (build_new_function_call): Check for error args.
15646
15647         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15648
15649         * gxx.gperf: Add __null.
15650         * hash.h: Regenerate.
15651         * lex.h: Add RID_NULL.
15652         * lex.c (init_lex): Create null_pointer_node here, stick it in
15653         RID_NULL.
15654         * decl.c (init_decl_processing): Still set its type here.
15655         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15656         (convert_to_pointer_force): Likewise.
15657         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15658         if (! pedantic).
15659         * call.c (convert_harshness): Use null_ptr_cst_p.
15660         * typeck.c (convert_for_assignment): Likewise.  Don't produce
15661         null_pointer_node.
15662
15663         * error.c (args_as_string): Handle lists of actual args, too.
15664         * cvt.c (null_ptr_cst): Support (void*)0 for now.
15665         (build_user_type_conversion_1): Improve diagnostics.
15666         (build_new_function_call): Likewise.
15667         (build_object_call): Likewise.
15668         (build_new_method_call): Likewise.  Move call before def diagnostic...
15669         (build_over_call): Here.
15670
15671         * cvt.c (build_new_method_call): Don't complain about no match if
15672         LOOKUP_SPECULATIVELY.
15673         (build_over_call): Fix 'this' for virtual fn.
15674         (build_new_method_call): Add diagnostic.
15675
15676 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15677
15678         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15679         constructors to be passed in.
15680         (build_over_call): Likewise.
15681         (build_user_type_conversion_1): Pass them in.
15682         (convert_like): Likewise.
15683         (build_object_call): Handle overloaded conversions.
15684         (build_over_call): Pass the right args to build_vfn_ref.
15685         (standard_conversion): Fix pmf convs.
15686         (joust): Handle comparing statics and non-statics.
15687         (build_new_method_call): New fn.
15688         * call.c (build_method_call): Call it if NEW_OVER.
15689
15690 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
15691
15692         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15693         %D instead.
15694
15695 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
15696
15697         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15698         instead of just maybe_build_cleanup so that we deallocate the
15699         thrown object.
15700
15701 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15702
15703         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15704         * cp-tree.h (finish_prevtable_vardecl): Add decl.
15705
15706 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15707
15708         * pt.c (instantiate_class_template): Call complete_type.  Also, if
15709         we're at the end of the file and we just instantiated a template
15710         class with a vtable, call finish_prevtable_vardecl.
15711
15712         * error.c (dump_decl): Don't explode (or explode more gracefully
15713         as appropriate) if the object being dumped has a null type.
15714         (dump_expr): Likewise.
15715
15716         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15717         by counting the number of nodes that we'll need before allocating
15718         the array.
15719         (lookup_fnfields): Fix comment.
15720         (breadth_first_search): Fix comment.
15721
15722 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15723
15724         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15725         TYPE_ALIGN.
15726         * class.c (finish_struct): Call cplus_decl_attributes here.
15727         (finish_struct_1): Not here.
15728         * cp-tree.h: Adjust.
15729
15730         * pt.c (type_unification): New parameter STRICT.
15731         (unify): If STRICT, don't allow cv addition or base deduction.
15732         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15733
15734 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
15735
15736         * search.c (get_template_base{_recursive}): New fns.
15737         * pt.c (more_specialized): New fn.
15738         (do_function_instantiation): Use it.
15739         (unify): Handle base deduction.
15740         * cvt.c (joust): Use more_specialized.
15741         Don't arbitrarily choose between non-builtin candidates.
15742         (build_over_call): Call require_complete_type.
15743
15744         * decl.c (start_function): Statics are static even in a #pragma
15745         interface file.
15746
15747         * decl2.c (import_export_vtable): Disable vtable heuristic on
15748         systems with ASM_OUTPUT_EXTERNAL.
15749
15750         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15751         (standard_conversion): No std conv to enum type.
15752
15753         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15754         for ptm's.
15755
15756         * cvt.c (reference_binding): Bind directly to a base subobject of
15757         a class rvalue.
15758
15759         * cvt.c (build_new_op): Enforce access control.
15760
15761 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
15762
15763         * typeck2.c (process_init_constructor): When scanning the
15764         union for a named field, skip things that aren't FIELD_DECLs.
15765
15766         * method.c (synthesize_method): Don't scan fndecl's rtl if
15767         we're at the end of the file; just assume the function can't
15768         be inlined.
15769
15770 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15771
15772         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15773         it failed.
15774
15775         * cvt.c (build_user_type_conversion_1): Handle overloaded
15776         conversion ops.
15777
15778         * cvt.c (add_builtin_candidates): Don't consider type conversion
15779         operators for the first parameter of operator=.
15780
15781 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15782
15783         * typeck.c (complete_type): Only call layout_type if we're not
15784         expanding a template.
15785
15786 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
15787
15788         * cvt.c (compare_ics): Oops.
15789
15790         * cvt.c (op_error): Oops.
15791
15792         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15793         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
15794         (build_conv): Use them.
15795         (implicit_conversion): Use them.
15796         (convert_like): Handle them.
15797         (build_new_op): Handle builtin COND_EXPR again.
15798         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
15799         in lists of types for COND_EXPR.
15800         (add_builtin_candidate): Add enum candidates for COND_EXPR.
15801
15802 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
15803
15804         * typeck.c (build_modify_expr): Always attempt to build a call to
15805         the assignment operator, even if we're using a default one.
15806         (convert_for_initialization): Call complete_type.
15807
15808 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15809
15810         * cvt.c (reference_binding): A REF_BIND gets the reference type.
15811         (implicit_conversion): Likewise.
15812         (convert_like): Likewise.
15813         (compare_ics): Likewise.
15814         (compare_qual): Likewise.
15815         (print_z_candidates): Handle no candidates.
15816         (build_new_op): Don't handle builtin COND_EXPR for now.
15817
15818 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
15819
15820         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15821
15822 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15823
15824         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15825
15826         * cvt.c (build_builtin_candidate): Oops.
15827         (build_new_op): Oops.
15828
15829         * method.c (build_opfncall): Pass COND_EXPR on.
15830         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15831         (add_builtin_candidate{,s}): Likewise.
15832         (add_builtin_candidates): Likewise.
15833         (print_z_candidates, op_error, build_new_op): Likewise.
15834         (type_decays_to): New fn.
15835         * lex.c (init_lex): Just say ?: for COND_EXPR.
15836
15837 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
15838
15839         * typeck.c (complete_type): Call layout_type rather than building
15840         a new array type.
15841
15842         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15843         only use ptrdiff_t.
15844
15845 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
15846
15847         * cvt.c: Always compile the new overloading code (but don't use it).
15848         (implicit_conversion): Add a BASE_CONV when converting to
15849         the same class type.
15850         (convert_like): Handle BASE_CONV.
15851
15852 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15853
15854         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15855         (add_builtin_candidate): Likewise.
15856
15857         NEW_OVER changes:
15858         * typeck.c (build_x_function_call): Try an operator function
15859         whenever we call an object of class type.
15860         * method.c (build_opfncall): Pass CALL_EXPRs through.
15861         * cvt.c (implicit_conversion): Do const-ref case first.
15862         (add_conv_candidate, build_object_call, op_error): New fns.
15863         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15864         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15865         builtin candidates.
15866         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
15867         Fall back on preincrement handling.  Use op_error.
15868         Handle warn_synth.
15869         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
15870         an error_mark_node.
15871         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15872         properly.
15873
15874 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
15875
15876         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15877
15878 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
15879
15880         * typeck.c (build_component_ref_1): Use build_component_ref
15881         instead of open coding it here.
15882
15883 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
15884
15885         * g++.c (main): Don't link with -lg++.
15886
15887         NEW_OVER changes:
15888         * cvt.c (convert_to_reference): Don't use convert_from_reference on
15889         result of build_type_conversion.
15890         (cp_convert): Only call build_method_call for ctors if
15891         build_type_conversion failed.
15892         (ptr_complete_ob): New function.
15893         (TYPE_PTR{,OB,MEM}_P): New macros.
15894         ({add,build}_builtin_candidate{,s}): New functions.
15895         (print_z_candidates): Handle builtins.
15896         (build_user_type_conversion_1): Don't use conversion fns for
15897         converting to a base type.
15898         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15899         (build_user_type_conversion): Use convert_from_reference.
15900         (build_new_op): New function.
15901         (build_over_call): Fix handling of methods.
15902         (compare_ics): Handle AMBIG_CONV properly.
15903         * typeck2.c: Increment abort count.
15904         * method.c (build_opfncall): Forward most requests to build_new_op.
15905         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15906
15907 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15908
15909         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15910         invalid second argument to dump_expr_list.
15911
15912 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
15913
15914         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15915
15916 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
15917
15918         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15919         ASSEMBLE_EXTERNAL.
15920
15921 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
15922
15923         * typeck2.c (process_init_constructor): New pedwarn for using { }
15924         to initialize a pointer to member function.
15925         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15926         we can avoid the new error.
15927
15928 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
15929
15930         * typeck.c (build_ptrmemfunc1): New function to hide details of
15931         pointer to member functions better.
15932
15933 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
15934
15935         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15936         methods into the actual method, as we know the implied object is
15937         not used.
15938
15939 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15940
15941         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15942         inside a system header.
15943
15944 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
15945
15946         * call.c (build_method_call): Call complete_type on the
15947         instance type.
15948
15949 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
15950
15951         * typeck.c (build_component_ref): Always build up an OFFSET_REF
15952         for obj_ptr->func so that we can know which object to use in a
15953         method call.
15954
15955 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
15956
15957         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
15958         around things.  Also improve maintainability.
15959
15960 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
15961
15962         * decl.c (grokdeclarator): Check for overflow when evaluating an
15963         array dimension.
15964
15965 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
15966
15967         * cvt.c (cp_convert): Don't check for ambiguity with constructor
15968         if NEW_OVER.
15969
15970         * typeck.c (build_x_function_call): Pass function overload
15971         questions to new overloading code if NEW_OVER.
15972         * init.c (expand_aggr_init_1): Only check for type conversion ops
15973         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
15974         Don't check for ambiguity with constructor if NEW_OVER.
15975         * cvt.c (convert_to_reference): Dereference the result of a type
15976         conversion operator.
15977         (build_conv): Propagate ICS_USER_FLAG.
15978         (implicit_conversion): Call instantiate_type.
15979         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
15980         (add_function_candidate): Fix cv-quals on argtype.
15981         (print_z_candidates): New function.
15982         (build_new_function_call): Call it.
15983         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
15984         consider non-converting constructors.
15985         Call print_z_candidates.
15986         Return an AMBIG_CONV for an ambiguous conversion.
15987         (build_user_type_conversion): Handle AMBIG_CONV.
15988         (convert_like): Fix test for building TARGET_EXPR.
15989         Call instantiate_type.
15990         Handle AMBIG_CONV and LVALUE_CONV.
15991         (build_over_call): Handle 0 args and ellipsis.
15992         * cp-tree.def: Add AMBIG_CONV.
15993
15994 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
15995
15996         * decl.c (lookup_name_real): If we find mem in obj when parsing
15997         `obj->mem', make sure we return the right value.
15998
15999 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16000
16001         * search.c (get_base_distance): Call complete_type.
16002
16003 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16004
16005         * decl.c (store_bindings): Make static.
16006
16007 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16008
16009         * init.c (expand_aggr_init_1): Don't check type conversions if
16010         NEW_OVER.
16011
16012         * cvt.c (z_candidate): Put back template field.
16013         (add_function_candidate): Set it.
16014         (add_template_candidate): Likewise.
16015         (joust): Use it.
16016         (compare_qual): Handle references and pointers to members.
16017         (compare_ics): Handle reference bindings.
16018
16019         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16020
16021 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16022
16023         * call.c (compute_conversion_costs): Call complete_type.
16024
16025         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16026         pointers, so we can handle template parameters.
16027
16028 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16029
16030         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16031         here; let's make it explicit instead of a side effect of an
16032         error check.
16033
16034 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16035
16036         * cvt.c (z_candidate): Remove template field.
16037         (reference_binding): Handle binding to temporary.
16038         (implicit_conversion): Likewise.
16039         (add_function_candidate): Handle artificial constructor parms.
16040         Handle functions with too few parms.
16041         (add_template_candidate): New function.
16042         (build_user_type_conversion_1): Handle constructors.
16043         (convert_like): Likewise.
16044         (build_over_call): Likewise.
16045         (build_new_function_call): Support templates.
16046         (compare_ics): Fix reference, inheritance handling.
16047
16048 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16049
16050         * decl.c: Add signed_size_zero_node.
16051         (init_decl_processing): Build it.
16052         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16053         when we're trying to make a negative delta.
16054
16055 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16056
16057         Stop doing this damn index==strchr variable name confusion.
16058         * class.c (add_virtual_function): Change local var INDEX to be
16059         named IDX.
16060         (add_method): Likewise.
16061         * lex.c (print_parse_statistics): Likewise.
16062         * search.c (make_memoized_table_entry): Likewise.
16063         (lookup_fnfields_here): Likewise.
16064         (lookup_field): Likewise.
16065         (lookup_fnfields): Likewise.
16066         (get_baselinks): Likewise.
16067         * sig.c (build_signature_table_constructor): Likewise.
16068         (build_signature_method_call): Likewise.
16069         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16070         (get_member_function_from_ptrfunc): Likewise.
16071         (build_ptrmemfunc): Change local var INDEX to be IDX.
16072         (c_expand_start_case): Likewise.
16073
16074 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16075
16076         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16077         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16078         (convert_to_reference): Use build_type_conversion to convert to
16079         the reference type directly.
16080         (standard_conversion): Fix void* case, non-conversions.
16081         (reference_binding): Fix expr == 0 case, non-conversions.
16082         (convert_like): Support REF_BIND.
16083         (compare_qual): Split out from compare_ics.
16084         (compare_ics): Use it, handle icses with only a qual_conv.
16085
16086         * init.c (expand_vec_init): Don't crash if decl is NULL.
16087
16088 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16089
16090         * mpw-config.in: New file, configury for Mac MPW.
16091         * mpw-make.sed: New file, makefile editing for MPW.
16092
16093 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16094
16095         * pt.c (instantiate_class_template): Call repo_template_used.
16096
16097         * search.c (lookup_conversions): Only lookup conversions in
16098         complete types.
16099
16100 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16101
16102         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16103         gcc's tree.def.
16104         * cp-tree.h, lex.c: Include cp-tree.def.
16105         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16106
16107 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16108
16109         * init.c (build_vec_delete_1): Call complete_type.
16110
16111 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16112
16113         * except.c (start_anon_func): Make sure anonymous functions are
16114         never external.
16115
16116 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16117
16118         * decl.c (finish_function): If function_depth > 1, set nested.
16119
16120         * decl2.c (grokbitfield): Revert Bob's change.
16121         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16122
16123 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16124
16125         * pt.c (add_pending_template): Handle types.
16126         (lookup_template_class): With -fexternal-templates, just add the class
16127         to pending_templates instead of instantiating it now.
16128         * decl2.c (finish_file): Handle types in pending_templates.
16129
16130 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16131
16132         * decl2.c (grokbitfield): Handle constant decls appropriately.
16133         Give an appropriate error message now instead of spewing core
16134         later.
16135
16136 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16137
16138         * decl2.c: Don't turn on thunks by default for now.
16139
16140 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16141
16142         * typeck.c (complete_type): Handle error_mark_node.
16143         (common_type, OFFSET_TYPE): Handle template_type_parms.
16144
16145 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16146
16147         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16148         regardless of DECL_INLINE.
16149
16150         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16151
16152         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16153
16154         * rtti.c (build_dynamic_cast): Support templates.
16155         * tree.def: Support DYNAMIC_CAST_EXPR.
16156         * pt.c (tsubst_copy): Likewise.
16157         * decl2.c (build_expr_from_tree): Likewise.
16158
16159 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16160
16161         * typeck.c (build_static_cast): Support templates.
16162         (build_const_cast): Likewise.
16163         * tree.def: Support CONST/STATIC_CAST_EXPR.
16164         * pt.c (tsubst_copy): Likewise.
16165         * decl2.c (build_expr_from_tree): Likewise.
16166
16167 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16168
16169         * decl2.c (finish_vtable_vardecl): Don't trust
16170         TREE_SYMBOL_REFERENCED for vtables of local classes.
16171
16172 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16173
16174         * pt.c (tsubst_copy): Handle operator T.
16175
16176 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16177
16178         * init.c (build_delete): Move creation of PARMS inside test of
16179         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16180
16181 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16182
16183         * typeck.c (build_conditional_expr): Don't assume that
16184         the arguments to ?: are always pointers or records.
16185
16186 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16187
16188         * decl2.c (import_export_decl): Still emit static/weak/comdat
16189         copies of inline template functions with -fno-implicit-templates.
16190
16191 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16192
16193         * init.c (build_delete): Determine the complete basetype
16194         path to the destructor we're calling.
16195
16196 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16197
16198         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16199         initialize the enum, because we really and truly don't know where
16200         it came from.
16201         (start_enum): Don't copy integer_zero_node because
16202         build_enumerator will do it.
16203
16204 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16205
16206         * decl.c (finish_function): Do access control on base destructors.
16207
16208         * pt.c (tsubst, case FUNCTION_DECL): Set up
16209         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16210         hose us.
16211
16212 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16213
16214         * cvt.c (build_up_reference): If we have already extended the
16215         lifetime of the temporary, don't try it again.
16216         * typeck.c (c_expand_return): Don't try and convert the return
16217         value twice when we want a reference, once is enough.
16218
16219 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16220
16221         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16222         LOOKUP_ONLYCONVERTING at all for now.
16223
16224         * search.c (add_conversions): Put the conversion function in
16225         TREE_VALUE, the basetype in TREE_PURPOSE.
16226         * cvt.c (build_type_conversion): Adjust.
16227         * cvt.c (build_expr_type_conversion): Adjust.
16228         * call.c (user_harshness): Adjust.
16229
16230 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16231
16232         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16233         backend's benefit.
16234
16235 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16236
16237         * except.c (expand_start_catch_block): Add a dummy region, if we
16238         get an error, so that we can avoid core dumping later.
16239
16240 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16241
16242         * cp-tree.h (OFFSET_REF): Remove.
16243         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16244         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16245         * init.c (expand_aggr_init_1): Likewise.
16246         (build_new): Likewise.
16247         * typeck.c (expand_target_expr): Likewise.
16248
16249 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16250
16251         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16252         TARGET_EXPR.
16253
16254 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16255
16256         * cvt.c (build_up_reference): Redo how and when temporaries are
16257         created.
16258         * decl.c (grok_reference_init): Don't try and be smart about
16259         running cleanups.
16260
16261 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16262
16263         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16264         (TARGET_EXPR...), now that it has 4 arguments.
16265         * tree.c (build_cplus_new): Likewise.
16266
16267 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16268
16269         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16270
16271         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16272         * decl.c (struct saved_scope): Remove named_labels,
16273         {base,member}_init_list.
16274         (maybe_push_to_top_level): Don't set them.  Call
16275         push_cp_function_context if appropriate.
16276         (pop_from_top_level): Likewise.
16277
16278         * method.c (do_build_assign_ref): Remove obsolete check of
16279         TYPE_HAS_ASSIGN_REF (basetype).
16280
16281         * decl.c (grokfndecl): Diagnose user definition of
16282         implicitly-declared methods.
16283
16284 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16285
16286         * method.c (do_build_copy_constructor): Add code to give
16287         meaningful error messages instead of crashing.
16288         (do_build_assign_ref): Don't synthesize assignment operators for
16289         classes containing reference or const members.
16290
16291         * class.c (struct base_info): Remove cant_synth_copy_ctor
16292         and cant_synth_asn_ref.
16293         (finish_base_struct): Remove the code that tries to conditionalize
16294         synthesis of copy constructors & assignment operators based on
16295         access permissions.  Instead, let it fail when it tries to
16296         synthesize the copy constructor.  This will give meaningful error
16297         messages instead of silently generating code to perform a bitcopy.
16298
16299 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16300
16301         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16302         determining types for constant values.
16303
16304         * decl.c (struct named_label_list): Use instead of stuffing
16305         random items into a TREE_LIST node.
16306         (named_label_uses): Use the new struct.
16307         (poplevel): Likewise.
16308         (lookup_label): Likewise.
16309         (define_label): Add an error message to tell the user the line
16310         where the goto is located in addition to the destination of the
16311         goto.
16312         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16313         named_label_uses.
16314         (finish_function): Likewise.
16315
16316         (start_decl): Complain about defining a static data member
16317         in a different type from which it was declared.
16318
16319 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16320
16321         * cvt.c (build_expr_type_conversion): Adjust.
16322
16323 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16324
16325         * call.c (build_method_call): Always convert 'this' to the
16326         appropriate type.
16327
16328         * search.c (add_conversions): Put the conversion function in
16329         TREE_VALUE, the type in TREE_PURPOSE.
16330         * cvt.c (build_type_conversion): Adjust.
16331         * call.c (user_harshness): Adjust.
16332
16333         * method.c (emit_thunk): Call temporary_allocation and
16334         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16335
16336         * tree.c (build_cplus_array_type): Handle tweaking of
16337         TYPE_MAIN_VARIANT here.
16338         * typeck.c (common_type): Not here.
16339
16340         * typeck.c (complete_type): Only try to complete an array type if
16341         it has a domain.
16342
16343 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16344
16345         * decl.c (grokvardecl): Call complete_type.
16346         (grokdeclarator): Call complete_type for PARM_DECLs.
16347
16348 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16349
16350         * pt.c (instantiate_class_template): Re-set
16351         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16352
16353 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
16354
16355         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16356         smart enough to do it right.
16357         * tree.c (cp_expand_decl_cleanup): Likewise.
16358         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16359         cp_expand_decl_cleanup.
16360         (store_parm_decls): Likewise.
16361         (hack_incomplete_structures): Likewise.
16362         * except.c (push_eh_cleanup): Likewise.
16363
16364 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
16365
16366         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16367         frontend to the backend where it belongs.
16368         * tree.c (unsave_expr): Likewise.
16369         (unsave_expr_now): Likewise.
16370         * tree.def (UNSAVE_EXPR): Likewise.
16371         * cp-tree.h (unsave_expr): Likewise.
16372         (unsave_expr_now): Likewise.
16373
16374 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
16375
16376         * init.c (emit_base_init): Make sure the partial EH cleanups live
16377         on the function_obstack.
16378
16379 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
16380
16381         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16382         when checking for pointer types.
16383
16384 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16385
16386         * pt.c (instantiate_class_template): Remove obsolete check for
16387         access declarations.
16388
16389 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
16390
16391         * call.c (build_overload_call): Simplify calls to
16392         build_overload_call by removing last parameter.
16393         (build_method_call): Likewise.
16394         * cp-tree.h: Likewise.
16395         * method.c (build_opfncall): Likewise.
16396         * typeck.c (build_x_function_call): Likewise.
16397
16398 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
16399
16400         * call.c (default_parm_conversions): Factor out common code.
16401         (build_method_call): Use it.
16402         (build_overload_call_real): Use it.
16403
16404 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
16405
16406         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16407         but pedwarn as the code is bogus.
16408         * typeck.c (decay_conversion): Likewise.
16409         (build_function_call_real): Use build_addr_func instead of
16410         default_conversion.  Don't allow pointer-to-method functions down
16411         here.
16412         (build_unary_op): Use real pointer-to-member functions instead of
16413         fake ones.
16414         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16415         (convert_for_assignment): Removed some obsolete code.
16416         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16417         build_x_function_call instead of current_class_ptr.  Only call
16418         digest_init once on an initializer, we do this just checking
16419         TREE_TYPE.
16420         (build_expr_from_tree): Pass current_class_ref to
16421         build_x_function_call instead of current_class_ptr.
16422         * init.c (build_member_call): Likewise.
16423         * pase.y: Likewise.
16424         * error.c (dump_expr): Handle OFFSET_REFs better.
16425         * pt.c (unify): Handle pointer-to-member functions better.
16426         * decl.c (finish_function): Clear out current_class_ref just like
16427         we do for current_class_ptr.
16428
16429         * typeck.c (get_delta_difference): Handle virtual bases better.
16430
16431 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16432
16433         * sig.c (build_signature_table_constructor): Use the delta for
16434         the original basetype for this virtual function with thunks.
16435         (build_signature_method_call): We still need to adjust 'this'
16436         with thunks.
16437
16438 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
16439
16440         * call.c (build_addr_func): New routine.  Used to get the `real'
16441         address of a function or a method.  Needed to avoid getting a
16442         pointer-to-member function.
16443         (build_call): New routine to build CALL_EXPRs.
16444         (build_method_call): Use it.
16445         * cvt.c (convert_to_aggr): Likewise.
16446         * typeck.c (build_function_call_real): Likewise.
16447         * sig.c (build_signature_table_constructor): Use build_addr_func.
16448         * cp-tree.h (build_call, build_addr_func): Declare them.
16449
16450 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
16451
16452         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16453         * parse.y: Remove uses of LOOKUP_AGGR.
16454
16455 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
16456
16457         * *.[chy]: Rename current_class_decl to current_class_ptr, and
16458         C_C_D to current_class_ref.
16459
16460 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16461
16462         * call.c (convert_harshness): Tighten up pointer conversions.
16463
16464 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
16465
16466         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16467         (finish_file): Likewise.
16468
16469 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16470
16471         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16472
16473         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16474         code.
16475
16476 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16477
16478         * decl2.c: Turn on thunks by default where supported.
16479
16480 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
16481
16482         * cp-tree.h (build_overload_call_maybe): Removed.
16483         * call.c (build_overload_call_real): Invert meaning of last arg to
16484         be require_complete.
16485         (build_overload_call): Likewise.
16486         * typeck.c (build_x_function_call): Use build_overload_call_real
16487         instead of build_overload_call_maybe.
16488
16489 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16490
16491         * decl2.c (finish_file): Don't try to emit functions that haven't
16492         been compiled.
16493
16494 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16495
16496         * decl2.c (finish_vtable_vardecl): Oops.
16497
16498         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16499         Also store the bindings from previous_class_values.
16500         (pop_from_top_level): Restore them.
16501
16502 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16503
16504         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16505         symbol has been referenced.
16506         (finish_file): Re-join synthesis/vtable loop with inline emission
16507         loop, disable inlining when an inline is output.
16508
16509 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
16510
16511         * except.c (init_exception_processing): Setup saved_in_catch.
16512         (push_eh_cleanup): Reset __eh_in_catch.
16513         (expand_start_catch_block): Set __eh_in_catch.
16514
16515 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
16516
16517         * except.c (push_eh_cleanup): Add tracking for whether or not we
16518         have an active exception object.
16519         (expand_builtin_throw): Use it to make sure a rethrow without an
16520         exception object is caught.
16521
16522 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16523
16524         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16525         cache.
16526
16527 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16528
16529         * decl2.c (finish_file): Also use sentries for vars with
16530         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16531         created).
16532
16533         * lex.c (handle_cp_pragma): Disable #pragma
16534         interface/implementation if SUPPORTS_ONE_ONLY > 1.
16535
16536 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16537
16538         * method.c (emit_thunk): Wrap default case in
16539         temporary/permanent_allocation.
16540
16541         * method.c (make_thunk): Use DECL_ONE_ONLY.
16542         (emit_thunk): Call assemble_end_function.
16543
16544 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16545
16546         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16547         (import_export_decl): Likewise.
16548         (finish_prevtable_vardecl): Disable vtable hack if
16549         SUPPORTS_ONE_ONLY > 1.
16550
16551 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
16552
16553         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16554         PREDECREMENT_EXPRs take two arguments, not one.
16555
16556 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16557
16558         * class.c (build_vtable_entry): Don't build thunks for abstract
16559         virtuals.
16560
16561         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16562         frontend.
16563
16564 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
16565
16566         * class.c (set_rtti_entry): Use size_zero_node.
16567         (build_vtable): Likewise.
16568
16569 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
16570
16571         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16572         (prepare_fresh_vtable): Likewise.
16573
16574 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
16575
16576         * method.c (emit_thunk): Call mark_used on the target function.
16577
16578         * call.c (build_method_call): Don't warn about pending templates.
16579
16580 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16581
16582         * decl2.c (finish_file): Fix list walking logic.
16583
16584         * typeck2.c (check_for_new_type): Only warn if -pedantic.
16585
16586 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
16587
16588         * class.c (finish_struct_1): Remove old code for
16589         dont_allow_type_definitions.
16590         * cp-tree.h: Likewise.
16591         * spew.c: Make sure cp-tree.h is included before parse.h, so the
16592         definition of flagged_type_tree is found before it is used.
16593         * lex.c: Likewise.
16594         * parse.y: Added the ftype member to the type union, and changed a
16595         number of rules to use it instead of ttype.  Added calls to
16596         check_for_new_type() as appropriate.
16597         * typeck2.c (check_for_new_type): New function for checking
16598         if a newly defined type appears in the specified tree.
16599         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
16600         for check_for_new_type().
16601
16602 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16603
16604         * decl2.c (finish_file): Only use a sentry if the decl is public.
16605
16606         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16607         don't pass LOOKUP_ONLYCONVERTING.
16608
16609 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16610
16611         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16612         properly keeps track of const and volatile type modifiers.
16613
16614 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16615
16616         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16617         * pt.c (comp_template_args): Use it.
16618
16619         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16620         assemble_external for artificial function decls.
16621
16622         * decl.c (cp_finish_decl): Oops.
16623
16624 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16625
16626         * decl2.c (import_export_decl): Put static data member templates
16627         into common storage, or make them weak, depending on whether they
16628         are dynamically or statically initialized.
16629         (get_sentry): New function.
16630         (finish_file): Do import_export_decl for static data members before
16631         building the init/fini functions.  Don't init/fini a variable that's
16632         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
16633         push/pop_temp_slots.
16634         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16635         expand_static_init thang.
16636         * method.c (get_id_2): New function.
16637
16638 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
16639
16640         * parse.y (empty_parms): Make sure we use C++-style prototypes
16641         when we're declaring member functions.
16642
16643 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16644
16645         * Makefile.in (CONFLICTS): 16 s/r conflicts.
16646         * parse.y (self_template_type): New nonterminal.
16647
16648 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16649
16650         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16651         name.
16652         * parse.y (base_class.1): Allow 'typename foo::bar'.
16653
16654         * lex.c (check_newline): Remove #pragma code that plays with the
16655         input stream, since we now deal with tokens.  Clear nextchar when
16656         we're done.
16657         (handle_cp_pragma): Use real_yylex.
16658         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
16659         in one place.
16660
16661         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16662
16663         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16664
16665 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16666
16667         * parse.y: New token SELFNAME for potential constructor.
16668         * spew.c (yylex): Handle it.
16669         * lex.c (identifier_type): Produce it.
16670
16671         * parse.y (complete_type_name): In :: case, don't push class binding.
16672         (complex_type_name): Likewise.
16673
16674 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
16675
16676         * typeck.c (build_reinterpret_cast): Handle pointer to member
16677         functions.
16678
16679 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16680
16681         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16682         pragmas.
16683         (check_newline): Put the vtable/unit/implementation/interface pragma
16684         code into handle_cp_pragma, replacing it with a call.
16685         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16686         args.  Get the next token after handling the pragma token.
16687
16688 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
16689
16690         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16691         (convert_to_pointer_force): Likewise.
16692
16693         * init.c (build_new): Fix array new without -fcheck-new.
16694
16695 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16696
16697         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16698         tree.c: Lose TYPE_NESTED_NAME.
16699
16700         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16701         as identifiers.
16702
16703         * tree.def: Add VEC_INIT_EXPR.
16704         * expr.c (cplus_expand_expr): Handle it.
16705         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16706         the extra file-scope symbol nastiness.
16707
16708 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
16709
16710         * method.c (make_thunk): Thunks are static.
16711         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16712
16713         * decl2.c (mark_vtable_entries): Emit thunks as needed.
16714         (finish_file): Don't emit them here.
16715
16716 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16717
16718         * rtti.c (build_dynamic_cast): Handle null pointers.
16719         (ifnonnull): New function.
16720
16721 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
16722
16723         * call.c (build_method_call): Remember the original basetype we
16724         were called with.  Give an error message instead of trying
16725         (incorrectly) to call a non-static member function through a
16726         non-inherited class.
16727
16728         * search.c (expand_upcast_fixups): Mark the new fixup as
16729         DECL_ARTIFICIAL.
16730
16731 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16732
16733         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16734
16735         * class.c (set_rtti_entry): Fix for thunks.
16736
16737         * decl2.c (import_export_decl): Still emit typeinfo fns for
16738         cv-variants of builtin types.
16739
16740         * rtti.c (expand_class_desc): Set up base_info_type_node here.
16741         (init_rtti_processing): Instead of here.
16742
16743 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16744
16745         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16746         (build_typeid): Only complain about taking dynamic typeid without
16747         -frtti.
16748
16749         * decl2.c: flag_rtti defaults to 1.
16750
16751         * rtti.c (get_tinfo_var): The general class case is now smaller.
16752         (init_rtti_processing): Pack the latter three fields of base_info
16753         into 32 bits.
16754
16755 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
16756
16757         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16758
16759 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
16760
16761         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16762         (push_memoized_context): Split out code to undefer pop_type_level to
16763         (clear_memoized_cache): here.
16764         (pop_memoized_context): We can only handle one layer of deferral of
16765         pop_type_level so clear the cache, if there was a previous level.
16766
16767 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16768
16769         * rtti.c (init_rtti_processing): Build up base_info_type_node.
16770         (expand_class_desc): Use one pointer to an array of base_info
16771         structs, passed using a CONSTRUCTOR.
16772
16773 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
16774
16775         * class.c (build_vbase_path): Remove block extern for
16776         flag_assume_nonnull_objects here.
16777         (build_vfn_ref): Split out functionality into build_vtbl_ref.
16778         (build_vtbl_ref): New routine.
16779         (build_vtable): Set up rtti info here.
16780         (add_virtual_function): Note in CLASSTYPE_RTTI the best
16781         place where we can get the rtti pointers from to avoid having to
16782         search around for a place.
16783         (finish_base_struct): Likewise.
16784         (finish_struct_1): Likewise.  Never create totally new vtables
16785         with totally new vtable pointers for rtti.  Disable code to layout
16786         vtable pointers better until we want to break binary
16787         compatibility.
16788         * rtti.c (build_headof_sub): New routine to convert down to a
16789         sub-object that has an rtti pointer in the vtable.
16790         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
16791         maintainable.
16792         (build_dynamic_cast): Make sure we have saved it, if we need to.
16793         * search.c (dfs_init_vbase_pointers): Disable code that deals with
16794         a more efficient vtable layout, enable later.
16795         * call.c (flag_assume_nonnull_objects): Moved declaration to
16796         * cp-tree.h: here.  Declare build_vtbl_ref.
16797         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16798         function calls that want a tree.
16799
16800 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16801
16802         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16803         other X subobjects in the most derived type.  Ack.
16804
16805         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16806         get_typeid will do it for us.
16807         (get_typeid_1): Break out call-building for expand_*_desc to use.
16808         (get_typeid): Call it.
16809         (expand_*_desc): Likewise.
16810         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16811         and void *.
16812         (init_decl_processing): Lose builtin_type_tdescs lossage.
16813         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16814
16815 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16816
16817         * pt.c (tsubst): When calling set_nested_typename, use
16818         TYPE_NESTED_NAME (current_class_type) instead of
16819         current_class_name.
16820
16821         * decl.c (pushdecl): Likewise.
16822         (pushdecl_class_level): Likewise.
16823         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16824         set_nested_typename.
16825
16826 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16827
16828         * rtti.c (synthesize_tinfo_fn): Handle arrays.
16829
16830         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16831
16832 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
16833
16834         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16835         (init_rtti_processing): Lose bad_cast_type.
16836         (build_dynamic_cast): Use throw_bad_cast.
16837
16838         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16839
16840         * decl2.c (finish_file): Don't synthesize artificial functions
16841         that are external and not inline.
16842
16843         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16844
16845         * decl2.c (finish_file): Handle having new inlines added to
16846         saved_inlines by synthesis.
16847
16848         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16849
16850 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16851
16852         RTTI rewrite to initialize nodes as needed, not require that
16853         users #include <typeinfo>, complete functionality and reduce wasted
16854         space.
16855         * rtti.c (init_rtti_processing): New fn.
16856         (build_typeid): The vtable entry is now a function.
16857         (get_tinfo_var): New fn.
16858         (get_tinfo_fn): Likewise.
16859         (get_typeid): Use it.
16860         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16861         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16862         points __rtti_*.
16863         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16864         (synthesize_tinfo_fn): New fn.
16865         * method.c (build_t_desc_overload): Lose.
16866         (build_overload_with_type): More generic.
16867         * decl.c (init_decl_processing): Call init_rtti_processing.
16868         * class.c (set_rtti_entry): Use get_tinfo_fn.
16869         * decl2.c (mark_vtable_entries): Mark the rtti function.
16870         (finish_prevtable_vardecl): Don't build_t_desc.
16871         (import_export_decl): Handle tinfo functions.
16872         (finish_file): Likewise.
16873         * typeck.c (inline_conversion): New fn.
16874         (build_function_call_real): Use it.
16875         * cp-tree.h: Add decls.
16876
16877         * method.c (hack_identifier): Also convert component_refs from
16878         references.
16879
16880         * lex.c (cons_up_default_function): Use the type, not the name, in
16881         declspecs.
16882
16883         * decl2.c (import_export_vtable): Fix weak vtables.
16884
16885 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
16886
16887         * search.c (get_base_distance_recursive): Fix access checks for
16888         protected bases.
16889
16890 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16891
16892         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16893         cp-tree.h.
16894         (convert_harshness): Add prototypes wrapped by PROTO.
16895         * decl2.c (grok_function_init): Likewise.
16896         (do_toplevel_using_decl): Change to void return type.
16897         * class.c (build_vtable_entry): Remove decl of make_thunk.
16898         (merge_overrides): Fix order of arg definitions.
16899         (finish_vtbls): Likewise.
16900         (fixup_vtable_deltas): Likewise.
16901         (modify_all_direct_vtables): Likewise.
16902         (modify_all_indirect_vtables): Likewise.
16903         * search.c (get_base_distance_recursive): Likewise.
16904         (get_abstract_virtuals_1): Likewise.
16905         (fixup_virtual_upcast_offsets): Likewise.
16906         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16907         * init.c (perform_member_init): Fix order of arg definitions.
16908         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16909         * cp-tree.h (make_thunk): Add decl.
16910         (overload_template_name, push_template_decl): Add decls.
16911         (do_toplevel_using_decl): Change to void return type.
16912         (vec_binfo_member): Add decl.
16913
16914 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16915
16916         * typeck.c (mark_addressable, convert_for_assignment,
16917         convert_for_initialization, pointer_int_sum, pointer_diff,
16918         unary_complex_lvalue): Add prototypes wrapped by PROTO.
16919         (convert_sequence): #if 0 fn decl, since definition also is.
16920
16921 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
16922
16923         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16924         cast to pointer types for type searching.
16925
16926 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16927
16928         * typeck.c (get_delta_difference): Use cp_error, not error, in the
16929         case where BINFO == 0.
16930
16931 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
16932
16933         * call.c (build_method_call): Fix wording of error messages so
16934         constructors come out right.
16935
16936 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
16937
16938         * decl.c (push_overloaded_decl): Don't warn about hidden
16939         constructors when both the type and the function are declared
16940         in a system header file.
16941
16942 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16943
16944         * class.c (finish_struct_1): Propagate the TYPE_PACKED
16945         flag for the type to the type's fields.
16946
16947 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16948
16949         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
16950
16951 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
16952
16953         * class.c (base_info, finish_base_struct): Replace
16954         needs_virtual_dtor with base_has_virtual.
16955
16956         (finish_struct_1): Remove the old code that tried to make default
16957         destructors virtual.  Use base_has_virtual when checking if we need
16958         to add a vtable entry for the rtti code.
16959
16960 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16961
16962         * pt.c (push_template_decl): Complain about template decl with
16963         inappropriate declaration.
16964
16965 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
16966
16967         * typeck.c (build_x_unary_op): Remove bogus check for taking
16968         the address of a member function.
16969
16970 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16971
16972         * parse.y (constructor_declarator): Only push the class if
16973         we are not already in the class.
16974
16975 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
16976
16977         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
16978         Add additional argument to INIT_CUMULATIVE_ARGS.
16979
16980 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16981
16982         * decl.c (shadow_tag): Fix error about anon union with methods.
16983
16984         * parse.y (self_reference): Only generate a self-reference if this
16985         is a non-template class.
16986         (opt.component_decl_list): Only use it if it was generated.
16987
16988         * parse.y (component_decl_1): Use constructor_declarator.
16989         (fn.def2): Likewise.
16990         (notype_component_declarator0): Likewise.
16991
16992 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
16993
16994         * typeck.c (build_x_unary_op): Add checks for taking the address
16995         of a TARGET_EXPR or of a member function, and give appropriate
16996         warnings.
16997
16998 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16999
17000         * pt.c (process_template_parm): Allow template type parms to be
17001         used as types for template const parms.
17002
17003 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17004
17005         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17006         function_obstack.
17007
17008 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17009
17010         * decl.c (lookup_name_real): Be even more picky about the
17011         ambiguous lookup warning.
17012         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17013         * parse.y (constructor_declarator): Rather than here.
17014
17015         * parse.y (constructor_declarator): New nonterminal.
17016         (fn.def1): Use it.
17017         (explicit_instantiation): Likewise.
17018
17019 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17020
17021         Add implicit declaration of class name at class scope.
17022         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17023         * parse.y (self_reference): New nonterminal.
17024         (opt.component_decl_list): Use it.
17025         (fn.def1): Add nested_name_specifier type_name cases.
17026         * class.c (build_self_reference): New function.
17027         (finish_struct): Handle access_default later, move self-reference
17028         decl to the end.
17029         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17030         * cp-tree.h: Adjust.
17031
17032         * pt.c (do_function_instantiation): Separate handling of member
17033         functions and non-member functions properly.
17034
17035 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17036
17037         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17038
17039         * class.c (finish_struct_1): Check the right slot for destructors.
17040
17041         * decl.c (start_enum): Complain about enum templates.
17042
17043 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17044
17045         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17046         * typeck.c (unary_complex_lvalue): Likewise.
17047
17048 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17049
17050         * typeck.c (c_expand_return): Check for a returned local
17051         array name, similar to the check for an ADDR_EXPR.
17052
17053 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17054
17055         * decl.c (cp_finish_decl): Don't build cleanups for static
17056         variables here.
17057
17058 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17059
17060         * typeck.c (build_modify_expr): Fix error messages to be more
17061         accurate.
17062         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17063         assignment operators.
17064         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17065         assignment operators.
17066
17067 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17068
17069         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17070         give an error if initialized.  pedwarn about nested type with the
17071         same name as its enclosing class.
17072
17073         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17074
17075         * typeck.c (require_complete_type): Be sure to instantiate the
17076         MAIN_VARIANT of the type.
17077
17078         * decl2.c (finish_file): Instantiate pending templates before
17079         processing static constructors and destructors.
17080
17081         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17082         unless at_eof.
17083
17084 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17085
17086         * decl2.c (delete_sanity): If error_mark_node is passed
17087         in as an expression, quit while we're ahead.
17088
17089         * decl.c (grokdeclarator): Give an error message if `friend'
17090         is combined with any storage class specifiers.
17091
17092 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17093
17094         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17095         definition of nonexistent nested type.
17096
17097         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17098         not to say 'typedef'.
17099
17100 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17101
17102         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17103         * search.c (dfs_walk, dfs_init_vbase_pointers,
17104         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17105         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17106
17107 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17108
17109         * except.c (build_throw): Support minimal parse.
17110         * pt.c (tsubst_copy): Support THROW_EXPR.
17111         * decl2.c (build_expr_from_tree): Likewise.
17112
17113         * pt.c (mangle_class_name_for_template): Always allocate
17114         scratch_firstobj.
17115
17116 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17117
17118         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17119         when trying to cast from an incomplete type.
17120
17121 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17122
17123         * pt.c (instantiate_class_template): Don't bother setting up
17124         CLASSTYPE_TAGS explicitly, as the nested types will add
17125         themselves.
17126
17127 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17128
17129         * decl.c (shadow_tag): Remove old error check for usage of
17130         an enum without a previous declaration.
17131         (xref_tag): Add error message about usage of enums without a
17132         previous declaration.
17133
17134 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17135
17136         * lex.c (do_identifier): Only do name consistency check if we're
17137         parsing.
17138
17139         * pt.c (push_template_decl): Don't crash if we get a member defn
17140         that doesn't match.
17141
17142         * decl.c (xref_tag_from_type): New function to do an xref without
17143         always having to figure out code_type_node.
17144         * cp-tree.h: Declare it.
17145         * pt.c (instantiate_class_template): Use it for friend classes.
17146         (lookup_template_class): Use it.
17147
17148         * typeck2.c (build_functional_cast): Pull out a single parm before
17149         passing it to build_c_cast.
17150
17151 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17152
17153         * expr.c (do_case): Give an error message if a pointer is
17154         given as a case value.
17155
17156 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17157
17158         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17159         an overload list.
17160
17161         * lex.c (cons_up_default_function): Really, now, interface hackery
17162         does not apply to synthesized methods.
17163
17164 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17165
17166         * call.c (build_method_call): Ctors and dtors now have special names
17167         with respect to lookups.
17168         * class.c (add_method): Likewise.
17169         (grow_method): Likewise.
17170         (finish_struct_methods): Likewise.
17171         (warn_hidden): Likewise.
17172         (finish_struct_1): Likewise.
17173         * cvt.c (convert_to_reference): Likewise.
17174         (convert_to_aggr): Likewise.
17175         (cp_convert): Likewise.
17176         * decl2.c (check_classfn): Likewise.
17177         * init.c (expand_member_init): Likewise.
17178         (expand_default_init): Likewise.
17179         (expand_aggr_init_1): Likewise.
17180         (build_offset_ref): Likewise.
17181         (build_new): Likewise.
17182         (build_delete): Likewise.
17183         * lex.c (do_inline_function_hair): Likewise.
17184         * search.c (lookup_field_1): Likewise.
17185         (lookup_fnfields_here): Likewise.
17186         (lookup_field): Likewise.
17187         (lookup_fnfields): Likewise.
17188         (get_virtual_destructor): Likewise.
17189         (dfs_debug_mark): Likewise.
17190         (dfs_pushdecls): Likewise.
17191         (dfs_compress_decls): Likewise.
17192         * tree.c (layout_basetypes): Likewise.
17193         * typeck.c (build_component_ref): Likewise.
17194         (build_x_function_call): Likewise.
17195         (build_modify_expr): Likewise.
17196         (convert_for_initialization): Likewise.
17197         (build_functional_cast): Likewise.
17198         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17199         (CTOR_NAME): New.
17200         (DTOR_NAME): New.
17201         * decl.c (ctor_identifier): New.
17202         (dtor_identifier): New.
17203         (init_decl_processing): Set them.
17204
17205 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17206
17207         * typeck.c (build_component_ref): Don't get confused by fields whose
17208         context has no type name, like pointer to member functions.
17209
17210 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17211
17212         * decl.c (grokdeclarator): Handle typedef without declarator.
17213
17214         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17215
17216         * parse.y (bad_parm): Catch another case of missing `typename'.
17217
17218         * lex.c (yyprint): Handle TYPE_DECLs.
17219
17220         * decl.c (start_function): Don't try to be clever.
17221
17222         * lex.c: Lose compiler_error_with_decl.
17223         * typeck2.c: Lose error_with_aggr_type.
17224         (incomplete_type_error): Use cp_* instead of old functions.
17225         (readonly_error): Likewise.
17226         * typeck.c (convert_arguments): Likewise.
17227         * search.c (lookup_nested_field): Likewise.
17228         * method.c (make_thunk): Likewise.
17229         * decl.c (grokparms): Likewise.
17230         * cp-tree.h: Update.
17231
17232         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17233         and value.
17234
17235 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17236
17237         * method.c (build_opfncall): When deleting a pointer to an
17238         array, build a new pointer to the tree past any ARRAY_TYPE
17239         nodes.
17240
17241 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17242
17243         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17244
17245 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17246
17247         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17248         and ! DECL_INLINE.
17249
17250         * decl.c (finish_function): Don't set nested based on
17251         hack_decl_function_context.
17252         * parse.y (function_try_block): Check for nested function.
17253         (pending_inlines): Likewise.
17254
17255         * decl2.c (build_expr_from_tree): If a unary op already has a
17256         type, just return it.
17257
17258         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17259
17260         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17261         (finish_file): Check the return value of walk_vtables.
17262         (finish_prevtable_vardecl): Return int.
17263         (finish_vtable_vardecl): Likewise.
17264         (prune_vtable_vardecl): Likewise.
17265         * lex.c (set_vardecl_interface_info): Likewise.
17266         * cp-tree.h: Adjust return types.
17267
17268         * class.c (delete_duplicate_fields_1): Don't complain about
17269         duplicate nested types if they're the same type.
17270         (finish_struct): Remove check for duplicate.
17271         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17272
17273 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17274
17275         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17276
17277         * decl.c (grokdeclarator): Lose special handling of class-level
17278         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17279         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17280
17281         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17282
17283         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17284
17285         * search.c (compute_access): Fix handling of anonymous union
17286         members.
17287         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17288         from anonymous unions to their members.
17289
17290         * typeck.c (build_x_function_call): For static member functions,
17291         hand off to build_member_call.
17292
17293 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17294
17295         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17296
17297         * init.c (expand_vec_init): Fix init == 0 case.
17298
17299 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17300
17301         * init.c (build_new): pedwarn about init and array new.
17302         (expand_vec_init): Handle lists, use convert_for_initialization.
17303
17304         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17305         when converting to an aggregate type.
17306         * cvt.c (cp_convert): Pass it through.
17307
17308         * typeck.c (build_conditional_expr): Handle user-defined
17309         conversions to slightly different types.
17310
17311         * decl.c (grokdeclarator): Force an array type in a parm to be
17312         permanent.
17313
17314         * decl2.c (do_using_directive): Sorry.
17315         (do_namespace_alias): Likewise.
17316         * lex.c (real_yylex): Warn about using the `namespace' keyword.
17317
17318 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17319
17320         * parse.y (datadef): Move call to note_list_got_semicolon up.
17321
17322 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
17323
17324         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17325
17326 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
17327
17328         * decl.c (cp_finish_decl): The exception regions have to be
17329         nested, not overlapping.  We start the exception region for a
17330         decl, after it has been fully built, and all temporaries for it
17331         have been cleaned up.
17332
17333 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
17334
17335         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17336
17337 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17338
17339         * tree.def: Add RETURN_INIT.
17340         * pt.c (instantiate_decl): Handle RETURN_INIT.
17341         * decl.c (store_return_init): Handle minimal_parse_mode.
17342
17343         * tree.c (cp_build_type_variant): Just return an error_mark_node.
17344         * decl.c (make_typename_type): Don't try to get the file and line
17345         of an identifier.
17346         * typeck.c (comptypes): Handle TYPENAME_TYPE.
17347
17348 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
17349
17350         * decl.c (poplevel): Make sure we clear out and restore old local
17351         non-VAR_DECL values by default when they go out of scope.
17352
17353 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17354
17355         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17356         referring to addresses of variables and functions.
17357
17358         * error.c (dump_expr): Support SIZEOF_EXPR.
17359
17360         * init.c (do_friend): Use the return value of check_classfn.
17361
17362         * typeck.c (convert_arguments): Call complete_type.
17363
17364         * method.c (hack_identifier): After giving an error, set value to
17365         error_mark_node.
17366
17367 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17368
17369         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17370         lossage for local classes.
17371         * cp-tree.h: Declare it.
17372         * decl.c (lookup_name_real): Evil, painful hack for local classes.
17373         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17374         Use hack_decl_function_context.
17375         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17376         (start_function): Use hack_decl_function_context.
17377         (finish_function): Likewise.
17378         * method.c (synthesize_method): Likewise.
17379         * lex.c (process_next_inline): Likewise.
17380         (do_pending_inlines): Likewise.
17381         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17382         done with it.
17383
17384 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
17385
17386         * sig.c (build_signature_pointer_or_reference_type): Align
17387         signature pointers/references on 8-byte boundaries so they can be
17388         grabbed 2 words at a time on a Sparc.
17389
17390 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
17391
17392         * method.c (hack_identifier): Requiring a static chain is now a
17393         hard error.
17394         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17395         functions.
17396
17397 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17398
17399         * init.c (build_offset_ref): Call complete_type.
17400
17401         * decl.c (pop_from_top_level): Always pop previous_class_type.
17402
17403         * parse.y: Handle multiple decls in a for-init-statement.
17404         * pt.c (tsubst_expr): Likewise.
17405
17406         * pt.c (tsubst): Use tsubst_expr for the second operand of an
17407         ARRAY_REF.
17408
17409         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17410         (poplevel_class): Set it here.
17411         (pop_from_top_level): Pop it here if we're returning to class scope.
17412         * class.c (pushclass): Don't set it here.
17413
17414         * decl.c (maybe_push_to_top_level): Save current_template_parms,
17415         and clear it if !pseudo.
17416         (pop_from_top_level): Restore it.
17417
17418         * decl2.c (finish_file): Push the dummy each time we walk the list
17419         of vtables.
17420
17421         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17422         something for CAST_EXPR.
17423
17424 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17425
17426         * cvt.c (cp_convert): Warn about implicit conversion of the
17427         address of a function to bool, as it is always true.
17428
17429 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
17430
17431         * typeck.c (c_expand_return): Fix warning for local externs returned.
17432
17433 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17434
17435         * tree.c (mapcar): Propagate const and volatile properly.
17436
17437         * typeck.c (complete_type): Be sure to instantiate the
17438         MAIN_VARIANT of the type.
17439
17440         * method.c (synthesize_method): Class interface hackery does not
17441         apply to synthesized methods.
17442
17443 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17444
17445         * pt.c (comp_template_args): Use comptypes rather than just
17446         checking for TEMPLATE_TYPE_PARM equivalence.
17447
17448         * typeck.c (build_x_function_call): Call complete_type before
17449         checking TYPE_OVERLOADS_CALL_EXPR.
17450
17451 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
17452
17453         * g++.c (main): Check also for new define ALT_LIBM.
17454
17455 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17456
17457         * pt.c (instantiate_class_template): If we don't have a pattern
17458         yet, that's OK.
17459         (coerce_template_parms): If we see a local class, bail.
17460
17461         * decl.c (grok_reference_init): Make sure there's a type before
17462         checking its code.
17463
17464         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17465         (push_template_decl): Likewise.
17466
17467         * parse.y (named_class_head): Set
17468         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17469
17470         * decl.c (xref_tag): Diagnose redeclaration of template
17471         type-parameter name.
17472
17473         * error.c (dump_type): Handle anonymous template type parms.
17474
17475         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17476         TYPE_STUB_DECL.
17477         (coerce_template_parms): Likewise.
17478
17479 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
17480
17481         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17482         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17483
17484 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17485
17486         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17487         before trying to get its STUB_DECL.
17488         (coerce_template_parms): Likewise.
17489
17490         * parse.y (template_type_parm): If they didn't use 'class',
17491         pretend they did after giving an error.
17492
17493         * pt.c (coerce_template_parms): Diagnose use of local class.
17494
17495         * decl.c (grok_reference_init): Use instantiate_type.
17496
17497         * error.c (dump_expr): Handle TEMPLATE_DECLs.
17498
17499         * parse.y (named_class_head): Diagnose mismatching types and tags.
17500
17501         * decl.c (pushdecl): Type decls and class templates clash with
17502         artificial type decls, not hide them.
17503
17504         * decl.c (redeclaration_error_message): Diagnose redefinition of
17505         templates properly.
17506         (duplicate_decls): Diagnose disallowed overloads for template
17507         functions, too.
17508
17509         * decl.c (start_decl): Call complete_type before checking for a
17510         destructor.
17511
17512         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17513
17514         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17515
17516 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17517
17518         * decl.c (grok_op_properties): Don't check for operator++(int) in
17519         a template.
17520
17521         * tree.c (perm_manip): Return a copy of variable and function
17522         decls with external linkage.
17523
17524         * tree.def: Change some of the min tree codes to type "1".
17525         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17526         * method.c (build_overload_int): Emit something arbitrary for
17527         anything but an INTEGER_CST if we're in a template.
17528
17529         * decl.c (cp_finish_decl): Call complete_type before deciding
17530         whether or not to lay out the decl.
17531
17532         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17533
17534 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17535
17536         * typeck2.c (build_x_arrow): Call complete_type.
17537
17538         * pt.c (add_pending_template): Broken out.
17539         (lookup_template_class): If -fexternal-templates, call it for all
17540         the methods of implemented types.
17541         (instantiate_class_template): Instead of instantiating them here.
17542         (instantiate_decl): Handle -fexternal-templates earlier.
17543
17544 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17545
17546         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17547         memoized lookup stuff inside GATHER_STATISTICS.
17548
17549 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17550
17551         * decl.c (start_decl): Complain about array of incomplete type
17552         here.
17553         (grokdeclarator): Not here.
17554
17555         * parse.y (template_parm): Expand full_parm inline so we can set
17556         the rule's precedence.
17557
17558         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17559         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17560         * decl2.c (grokbitfield): Don't check for integer constant here.
17561         * class.c (finish_struct_1): Check here.
17562
17563         * decl.c (define_label): Make the min decl go on permanent_obstack.
17564
17565         * pt.c (unify): Don't handle CONST_DECLs.
17566         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17567         (tsubst_copy): Likewise.
17568
17569         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17570         CONST_DECL for a template parm.
17571
17572 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17573
17574         * decl.c (grokdeclarator): Complain about array of incomplete type
17575         here.
17576         (start_decl_1): Not here.
17577
17578         * pt.c (tsubst): Handle pointer-to-function declarators.
17579
17580         * method.c (hack_identifier): If pedantic, diagnose local class
17581         methods that require a static chain.
17582
17583         * decl.c (grok_op_properties): No longer static.
17584         * cp-tree.h: Declare it.
17585         * pt.c (tsubst): Call it for operators.
17586         Use tsubst_copy for TREE_VECs.
17587
17588         * parse.y (template_arg): The expr has precedence like '>'.
17589
17590 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17591
17592         * pt.c (coerce_template_parms): Don't coerce an expression using
17593         template parms.
17594         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17595         (tsubst): Don't use build_index_2_type if the max_value uses template
17596         parms.
17597         * method.c (build_overload_int): Emit something arbitrary for an
17598         expression using template parms.
17599
17600         * parse.y (template_close_bracket): New non-terminal to catch use
17601         of '>>' instead of '> >' in template class names.
17602         (template_type): Use it.
17603         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17604
17605         * tree.def: Add CAST_EXPR.
17606         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17607         CONVERT_EXPR for minimal_parse_mode.
17608         * typeck.c (build_c_cast): Likewise.
17609         * pt.c (tsubst_copy): Likewise.
17610         * decl2.c (build_expr_from_tree): Likewise.
17611         * error.c (dump_expr): Likewise.
17612
17613 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17614
17615         * except.c (SetTerminate, SetUnexpected): Put back global vars.
17616         (init_exception_processing): Put back decl/init of
17617         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17618         fns from libstdc++.
17619
17620         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17621         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17622         Delete unused fns.
17623         * cp-tree.h (declare_uninstantiated_type_level,
17624         uninstantiated_type_level_p): Delete prototypes.
17625
17626 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17627
17628         * pt.c (tsubst_expr): Add default return.
17629
17630 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17631
17632         * error.c (fndecl_as_string): Delete unused arg CNAME.
17633         * sig.c (build_signature_table_constructor,
17634         build_signature_method_call): Fix calls.
17635
17636         * class.c (the_null_vtable_entry): Delete var definition.
17637         (init_class_processing): Delete tree the_null_vtable_entry init.
17638         * decl.c (no_print_{functions, builtins}): Declare as static.
17639         (__tp_desc_type_node): #if 0 var definition.
17640         (init_type_desc): #if 0 init of __tp_desc_type_node.
17641         (vb_off_identifier): Move var decl into init_decl_processing.
17642         (current_function_assigns_this): Declare as static.
17643         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17644         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17645         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17646         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17647         * init.c (BI_header_type, BI_header_size): Declare as static.
17648         * pt.c (template_classes): Delete unused var.
17649         (add_pending_template): Delete decl for non-existent fn.
17650         (lookup_template_class): Delete vars CODE and TAG_CODE.
17651         (instantiate_template): Delete unused var TARGS.
17652         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17653         Delete decls.
17654         (__tp_desc_type_node): #if 0 var decl.
17655         (fndecl_as_string): Fix prototype.
17656
17657 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17658
17659         * tree.def: Add GOTO_STMT.
17660         * pt.c (tsubst_expr): Support goto and labels.
17661         * decl.c (define_label): Support minimal parsing.
17662         * parse.y (simple_stmt): Likewise.
17663
17664 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17665
17666         * xref.c (GNU_xref_member): Only define/set var I if
17667         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17668         used.
17669         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17670         (GNU_xref_end): Fix call.
17671         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17672         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17673
17674         * tree.c (build_exception_variant): Delete unused vars I, A, T,
17675         T2, and CNAME.
17676         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17677         (mapcar): Delete unused var CODE.
17678         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17679         (break_out_cleanups): Fix call.
17680         (bot_manip): Likewise.
17681         * call.c (build_method_call): Likewise.
17682         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17683         Likewise.
17684         * typeck.c (unary_complex_lvalue, build_modify_expr,
17685         convert_for_initialization): Likewise.
17686         * typeck2.c (build_functional_cast): Likewise.
17687         * cp-tree.h (build_cplus_new): Fix prototype.
17688
17689         * repo.c (open_repo_file): Delete unused var Q.
17690         (repo_compile_flags, repo_template_declared,
17691         repo_template_defined, repo_class_defined, repo_inline_used,
17692         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17693         (repo_get_id, repo_vtable_used): Declare as static.
17694         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17695         prototypes.
17696
17697 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17698
17699         * parse.y (pending_inlines): Add function_try_block case.
17700
17701         * pt.c (unify): Fix for template const parms.
17702
17703 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17704
17705         * lex.c (extract_interface_info): Delete forward decl.
17706         (default_copy_constructor_body, default_assign_ref_body): Delete
17707         decls for non-existent functions.
17708         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17709         (init_lex): Delete setting them.
17710         (cons_up_default_function): Delete unused vars FUNC_BUF,
17711         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
17712         #if 0'd synth code.
17713         (toplevel, expression_obstack): Delete unused extern decls.
17714         (tree_node_kind): Delete unused enum.
17715         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17716         GATHER_STATISTICS.
17717         (tree_node_kind_names): Delete unused extern decl.
17718         (synth_obstack): Delete unused var.
17719         (init_lex): Don't set it.
17720         (init_parse): Add decl before use.
17721         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17722         (current_unit_{name, language}): Delete unused vars.
17723         (check_newline): Don't bother setting them, just accept the #pragma.
17724         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17725         (current_unit_{name, language}): Delete decls.
17726
17727         * search.c: Wrap all of the memoized functions, macros, and
17728         variables inside #ifdef GATHER_STATISTICS.
17729         (lookup_field, lookup_fnfields): Likewise.
17730         (init_search_processing): Likewise.
17731         (reinit_search_statistics): Wrap whole function.
17732         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17733
17734         * decl.c (finish_function): Only call pop_memoized_context if
17735         GATHER_STATISTICS is defined.
17736         (start_function): Likewise for push_memoized_context.
17737         * class.c (pushclass, popclass): Likewise.
17738
17739         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17740         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17741
17742         * cvt.c (cp_convert): Delete unused local var FORM.
17743         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17744         prototypes.
17745
17746 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17747
17748         * pt.c (do_poplevel): Oops; really return what we get from
17749         poplevel this time.
17750
17751 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17752
17753         * cp-tree.h (is_aggr_type): Add prototype.
17754
17755         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17756         * method.c ({push,pop}_cp_function_context): Delete decls.
17757         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17758         (SetUnexpected, SetTerminate): Delete unused vars.
17759         (init_exception_processing): Don't set SetUnexpected or
17760         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17761         (output_exception_table_entry): Delete unused array LABEL.
17762         (expand_internal_throw): Delete unused var PARAMS.
17763         (expand_start_catch_block): Delete unused var CLEANUP.
17764         (emit_exception_table): Delete unused var EH_NODE_DECL.
17765         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17766         GOTO_UNWIND_AND_THROW.  Don't set them.
17767         (end_eh_unwinder): Add top decl.
17768         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17769         (exception_section, push_rtl_perm, do_function_call,
17770         lang_interim_eh, push_eh_cleanup, eh_outer_context,
17771         expand_end_eh_spec, end_eh_unwinder): Declare as static.
17772         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17773         throw_used): Likewise.
17774         * cp-tree.h (expand_end_eh_spec): Delete prototype.
17775
17776         * search.c (dfs_mark, dfs_mark_vtable_path,
17777         dfs_unmark_vtable_path, dfs_mark_new_vtable,
17778         dfs_unmark_new_vtable, dfs_clear_search_slot,
17779         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17780         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17781         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17782         functions.
17783         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17784         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17785         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17786         Only define #ifdef GATHER_STATISTICS.
17787         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17788         is defined.
17789         (vbase_decl): Delete var definition.
17790         (init_search): Delete old decl.
17791         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17792         never actually used.
17793         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17794         (get_base_distance_recursive): Delete unused fourth arg
17795         BASETYPE_PATH.  Fix call .
17796         (get_base_distance): Fix call.
17797         (push_class_decls): Delete unused var ID.
17798         (make_memoized_table_entry): Declare as static.
17799         (breadth_first_search): Declare as static.
17800         (tree_has_any_destructor_p): Declare as static.
17801         (pop_class_decls): Delete unused arg pop_class_decls.
17802         * class.c (popclass): Fix call to pop_class_decls.
17803         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17804         tree_has_any_destructor_p): Delete prototypes.
17805
17806         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17807         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
17808         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17809         (build_user_desc): Delete unused var T.
17810         (build_class_desc): Delete unused vars T and OFF.
17811         (build_t_desc): Delete unused var NAME_STRING.
17812         (build_headof): Make static.
17813         (get_bad_cast_node): Likewise.
17814         (get_def_to_follow): Likewise.
17815         * cp-tree.h (init_type_desc): Add prototype.
17816         (build_headof): Remove prototype.
17817
17818 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17819
17820         * pt.c (tsubst): Only look for matching decls at file scope for
17821         non-member functions.
17822
17823         * call.c (build_scoped_method_call): Handle scoped destructor
17824         calls in templates.
17825
17826         * decl.c (*_top_level): Also save previous_class_values.
17827
17828         * pt.c (tsubst_expr): Support do {} while loops.
17829         * parse.y (simple_stmt): Likewise.
17830         * tree.def: Likewise.
17831
17832         * method.c (build_overload_identifier): For a class nested in a
17833         template class, don't mangle in the template parms from our
17834         context.
17835
17836         * lex.c, cp-tree.h: Remove support for template instantiations in
17837         the pending_inlines code.
17838         * pt.c: Remove dead functions and unused arguments.
17839         (uses_template_parms): TYPENAME_TYPEs always use template parms.
17840         * parse.y: Stop passing anything to end_template_decl.
17841         * tree.c (print_lang_statistics): Only print tinst info #ifdef
17842         GATHER_STATISTICS.
17843
17844 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17845
17846         * init.c (expand_recursive_init{,_1}): Delete decls.
17847         (sort_member_init): Delete unused var INIT.
17848         (emit_base_init): Delete unused var X.
17849         (build_offset_ref): Delete unused var CNAME.
17850         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17851         (emit_base_init): Delete unused local var BASE.  Delete extern
17852         decl of IN_CHARGE_IDENTIFIER.
17853         (build_delete): Delete unused local var VIRTUAL_SIZE.
17854
17855         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17856         (build_delete): Fix call.
17857         * decl2.c (delete_sanity): Likewise.
17858         * cp-tree.h (build_vec_delete): Update prototype.
17859
17860         * typeck.c (common_base_type): Delete unused var TMP.
17861         (build_binary_op): Delete local var ARGS_SAVE.
17862         (build_array_ref): Delete unused var ITYPE.
17863         (c_expand_return): Delete unused var USE_TEMP.
17864
17865         * typeck.c (compexcepttypes): Delete unused arg STRICT.
17866         (comptypes): Fix calls.
17867         * decl.c (duplicate_decls): Likewise.
17868         * cp-tree.h (compexcepttypes): Delete extra arg.
17869
17870         * decl2.c (check_classfn): Delete unused second arg CNAME.
17871         * decl.c (start_decl, grokfndecl): Fix calls.
17872         * init.c (do_friend): Likewise.
17873         * cp-tree.h (check_classfn): Update prototype.
17874
17875         * cp-tree.h (signature_error, import_export_vtable,
17876         append_signature_fields, id_in_current_class, mark_used,
17877         copy_assignment_arg_p): Add decls.
17878         * decl2.c (mark_used): Delete decl.
17879
17880         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17881
17882         * class.c (get_vtable_entry): Disable unused function.
17883         (doing_hard_virtuals): Delete unused static global var.
17884         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17885         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17886         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17887         (modify_one_vtable): Delete unused var OLD_RTTI.
17888         (finish_struct_anon): Delete unused vars OFFSET and X.
17889         (finish_struct_bits): Delete unused var METHOD_VEC.
17890         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
17891         for-scope local variable METHODS.
17892
17893         * call.c (user_harshness): Delete unused/unneeded arg PARM.
17894         (ideal_candidate): Delete unused args BASETYPE and PARMS.
17895         (build_method_call): Delete unused args passed into ideal_candidate.
17896         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
17897         * cp-tree.h (synthesize_method): Add decl.
17898
17899         * decl.c (note_level_for_for): Give void return type.
17900         (pushdecl_nonclass_level): Likewise.
17901         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17902         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17903         (suspend_binding_level): Delete unused var LEVEL.
17904         (duplicate_decls): Delete unused var CTYPE.
17905         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17906         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17907         PTR_ENDLINK.
17908         (grokdeclarator): Delete unused var C.
17909         (grokdeclarator): Delete unused var SIZE_VARIES.
17910         (grokparms): Delete unused var SAW_VOID.
17911         (start_function): Delete unused var OLDDECL.
17912         (cplus_expand_expr_stmt): Delete unused var
17913         REMOVE_IMPLICIT_IMMEDIATELY.
17914
17915         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17916
17917         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17918
17919 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17920
17921         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17922         (build_min_nt): Likewise.
17923         * pt.c (do_pushlevel): Emit line note.
17924         (do_poplevel): Return what we get from poplevel.
17925         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17926         * parse.y: Use do_pushlevel and do_poplevel.
17927         * cp-tree.h: Declare do_poplevel.
17928
17929         * cp-tree.h: Declare at_eof.
17930         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17931         * decl2.c (import_export_decl): Renamed from import_export_inline.
17932         (finish_file): Call it to do interface handling for statics.
17933         * pt.c (tsubst_copy): Call mark_used on variables and functions
17934         used here.
17935
17936         * decl2.c (finish_file): Don't emit statics we can't generate.
17937         * pt.c (instantiate_decl): Don't set interface on instantiations
17938         we can't generate.
17939
17940         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17941         * tree.c (print_lang_statistics): Print max template depth.
17942         * pt.c (push_tinst_level): Dump entire instantiation context.
17943         (instantiate_class_template): Use it and pop_tinst_level.
17944         (instantiate_decl): Likewise.
17945
17946         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
17947         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
17948
17949 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
17950
17951         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
17952         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
17953         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
17954         the new template implementation.
17955
17956 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17957
17958         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
17959
17960 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
17961
17962         * decl.c (cp_finish_decl): Delay emitting the debug information for
17963         a typedef that has been installed as the canonical typedef, if the
17964         type has not yet been defined.
17965
17966 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17967
17968         * decl2.c (grokfield): Still call pop_nested_class for access decls.
17969
17970 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17971
17972         * decl.c (lookup_label): Call label_rtx.
17973
17974         * decl.c (make_binding_level): New function.
17975         (pushlevel, pushlevel_class): Call it instead of explicit
17976         duplicate calls to xmalloc.
17977
17978         * decl.c (init_decl_processing): Delete useless build_pointer_type
17979         call.
17980
17981         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
17982         (sizet_ftype_string): Delete variable.
17983         (init_decl_processing): Add built-in functions fabsf, fabsl,
17984         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
17985         variable strlen_ftype, used for strlen.
17986
17987 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17988
17989         * decl.c (push_to_top_level): Start from current_binding_level
17990         again for now; the stl hacks depend on g++ being broken in this
17991         way, and it'll be fixed in the template rewrite.
17992
17993         * tree.def: Add USING_DECL.
17994         * decl2.c (do_class_using_decl): Implement.
17995         (grokfield): Pass access decls off to do_class_using_decl instead of
17996         grokdeclarator.
17997         * error.c (dump_decl): Handle USING_DECLs.
17998         * decl.c (grokdeclarator): Remove code for handling access decls.
17999         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18000         as access decls for now.
18001         (finish_struct): Don't check USING_DECLs for other uses of the name.
18002
18003         * search.c (get_matching_virtual): Use cp_error_at.
18004
18005 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18006
18007         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18008         match c-typeck.c.
18009         (self_promoting_args_p): Move the check that TYPE is non-nil
18010         before trying to look at its main variant.
18011         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18012
18013         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18014         Delete macros.
18015         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18016         (do_friend): Delete call to xref_friend.
18017         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18018
18019         * typeck.c (convert_sequence): #if 0 unused function.
18020
18021         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18022         be in decl_in_memory_p.
18023         (decl_in_memory_p): Delete decl.
18024         * expr.c (decl_in_memory_p): Delete fn.
18025         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18026
18027         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18028
18029 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18030
18031         * class.c (finish_struct_1): Check for a pure-specifier on a
18032         non-virtual function here.
18033
18034         * decl2.c (grok_function_init): Don't check whether the function
18035         is virtual here.
18036         (grokfield): Don't call check_for_override here.
18037
18038         * decl.c (push_to_top_level): Start from inner_binding_level,
18039         check class_shadowed in class levels.
18040
18041 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18042
18043         * decl.c (resume_level): Ignore things that don't have names, instead
18044         of core dumping.
18045
18046 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18047
18048         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18049
18050 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18051
18052         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18053         synthesized dtor.
18054
18055         * parse.y (complete_type_name): Bind global_scope earlier.
18056         (complex_type_name): Likewise.
18057         (qualified_type_name): Remove.
18058
18059 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18060
18061         * decl.c (grokfndecl): Move code that looks for virtuals in base
18062         classes...
18063         * class.c (check_for_override): ... to a new function.
18064         (finish_struct_1): Call it.
18065
18066         * cp-tree.h: Declare warn_sign_compare.
18067
18068         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18069         rather than extra_warnings to decide whether to warn about
18070         comparison of signed and unsigned.
18071
18072         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18073         implies -Wsign-compare.  -Wall doesn't imply -W.
18074
18075 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18076
18077         * typeck.c (build_component_ref): Fix to handle anon unions in base
18078         classes as well.
18079
18080 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18081
18082         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18083         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18084         * cvt.c (build_up_reference): Likewise.
18085         * decl.c (grok_reference_init): Likewise.
18086         (cp_finish_decl): Likewise.
18087         * error.c (dump_expr): Likewise.
18088         * tree.c (real_lvalue_p): Likewise.
18089         (lvalue_p): Likewise.
18090         (build_cplus_new): Likewise.
18091         (unsave_expr_now): Likewise.
18092         * typeck.c (unary_complex_lvalue, build_modify_expr,
18093         c_expand_return): Likewise.
18094
18095 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18096
18097         Make the C++ front-end pay attention to attributes for structures.
18098         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18099         finish_struct_1.
18100         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18101         Take out old round_up_size use and setting the DECL_ALIGN possibly
18102         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18103         can override what the attribute set.
18104         * cp-tree.h (finish_struct): Update prototype.
18105         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18106         attributes to finish_struct.
18107         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18108         value down into finish_struct.
18109         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18110
18111 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18112
18113         * decl.c (poplevel):  Re-word dead for local handling.
18114         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18115         (cp_finish_decl):  If is_for_scope, check for duplicates so
18116         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18117
18118         * lex.c (do_identifier):  Use global binding in preference of
18119         dead for local variable.
18120
18121 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18122
18123         * init.c (initializing_context): Handle anon union changes, the
18124         context where fields of anon unions can be initialized now has to be
18125         found by walking up the TYPE_CONTEXT chain.
18126
18127 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18128
18129         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18130         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18131         (obscure_complex_init): If bss is supported, always set
18132         DECL_INITIAL to error_mark_node.
18133
18134 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18135
18136         * init.c (is_friend): Make sure there's a context before we see if
18137         it's an aggr type.
18138
18139 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18140
18141         * init.c (is_friend): Classes are not friendly with nested classes.
18142
18143 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18144
18145         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18146         and record its result.
18147
18148 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18149
18150         * class.c (finish_struct_anon): Switch around code to not move anon
18151         union elements around, nor mess up their contexts, nor offsets,
18152         instead we now build up the right number of COMPONENT_REFs for all
18153         the anon unions that may be present at build_component_ref time.
18154         * typeck.c (lookup_anon_field): New routine to handle field lookup
18155         on fields without names.  We find them, based upon their unique type
18156         instead.
18157         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18158         Handle finding components in anonymous unions, and ensure that a
18159         COMPONENT_REF is built for each level as necessary.
18160
18161 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18162
18163         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18164         code that ensures that copy ctors are used if appropriate.
18165
18166 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18167
18168         * init.c (build_vec_delete): Only give an error if base isn't an
18169         error_mark_node.
18170
18171 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18172
18173         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18174         (yylex): If we see `new', keep slurping.
18175
18176 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18177
18178         * class.c (finish_struct_1): Move code for handling anon unions...
18179         (finish_struct_anon): to here.  Fixup so that we do the offset
18180         calculations right, and so that the fields are physically moved to
18181         the containers's chain.
18182
18183 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18184
18185         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18186         identifier node.
18187
18188 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18189
18190         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18191         POINTER_SIZE to agree with expr.c.
18192
18193 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18194
18195         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18196         instead return NULL_TREE.
18197
18198 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18199
18200         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18201         about overloaded virtual functions.
18202         (warn_hidden): New routine to warn of virtual functions that are
18203         hidden by other virtual functions, that are not overridden.
18204         (get_basefndecls): New routine, used by warn_hidden.
18205         (mark_overriders): New routine, used by warn_hidden.
18206         * search.c (get_matching_virtual): Remove old warning that just
18207         isn't very useful.
18208
18209 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18210
18211         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18212
18213         * typeck.c (null_ptr_cst_p): Delete unused fn.
18214         (build_function_call_maybe): Delete unused fn.
18215
18216         * expr.c (extract_init): #if 0 the code after unconditional return 0
18217         for now.
18218
18219         Delete old cadillac code.
18220         * edsel.c: Remove file.
18221         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18222         * Makefile.in (CXX_OBJS): Delete edsel.o.
18223         (edsel.o): Delete rule.
18224         * cp-tree.h (flag_cadillac): Delete var decl.
18225         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18226         * decl2.c (flag_cadillac): Delete var definition.
18227         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18228         (grokfield): Delete code depending on flag_cadillac.
18229         (finish_anon_union): Likewise.
18230         * class.c (finish_struct_1): Likewise.
18231         (pushclass): Likewise.
18232         (popclass): Likewise.
18233         (push_lang_context): Likewise.
18234         (pop_lang_context): Likewise.
18235         * decl.c (init_decl_processing): Likewise.
18236         (start_decl): Likewise.
18237         (cp_finish_decl): Likewise.
18238         (xref_tag): Likewise.
18239         (finish_enum): Likewise.
18240         (start_function): Likewise.
18241         (finish_function): Likewise.
18242         (finish_stmt): Likewise.
18243         * lex.c (lang_init): Likewise.
18244         (check_newline): Likewise.
18245
18246         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18247
18248         Delete defunct, ancient garbage collection implementation.
18249         * rtti.c: New file with the RTTI stuff from gc.c.
18250         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18251         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18252         (rtti.o): New rule, replacing gc.o.
18253         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18254         * cp-tree.h: Delete gc-related fn decls.
18255         (DECL_GC_OFFSET): Delete macro.
18256         (flag_gc): Delete extern decl.
18257         * decl.c (current_function_obstack_index): Delete var decl.
18258         (current_function_obstack_usage): Delete var decl.
18259         (start_function): Delete clearing of current_function_obstack_index
18260         and current_function_obstack_usage.
18261         (init_decl_processing): Delete code relying on -fgc.
18262         Delete call to init_gc_processing.
18263         (cp_finish_decl): Delete calls to build_static_gc_entry and
18264         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18265         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18266         and to expand_expr of a __gc_main call.
18267         (maybe_gc_cleanup): Delete var decl.
18268         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18269         * decl2.c (flag_gc): Delete var decl.
18270         (lang_f_options): Delete offering of -fgc.
18271         (lang_decode_option): Delete -fgc and -fno-gc handling.
18272         (get_temp_regvar): Delete gc code.
18273         * init.c (build_new): Delete gc code.
18274         * lex.c (init_lex): Delete checking of flag_gc.
18275
18276         * typeck.c (convert_arguments): Delete gc code.
18277         (build_component_addr): Delete -fgc warning.
18278         (build_modify_expr): Delete gc code.
18279
18280         * decl2.c (build_push_scope): Delete fn.
18281         * cp-tree.h (build_push_scope): Delete decl.
18282
18283         * search.c (clear_search_slots): Delete fn.
18284         * cp-tree.h (clear_search_slots): Delete decl.
18285
18286         * search.c (tree_needs_constructor_p): Delete fn.
18287         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18288
18289         * tree.c (id_cmp): Delete fn.
18290
18291         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18292         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18293
18294         * tree.c (decl_value_member): Delete fn.
18295         * cp-tree.h (decl_value_member): Delete decl.
18296
18297         * tree.c (list_hash_lookup_or_cons): Delete fn.
18298         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18299
18300         * method.c (cplus_exception_name): Delete fn.
18301         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18302
18303         * spew.c (shift_tokens): Delete fn.
18304
18305 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18306
18307         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18308         to cp_finish_decl.
18309         * parse.y: Likewise.
18310
18311 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18312
18313         * tree.c (build_cplus_staticfn_type): Delete function definition;
18314         never used.
18315         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18316
18317         * tree.c (virtual_member): Delete function definition; never used.
18318         * cp-tree.h (virtual_member): Delete decl.
18319
18320 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
18321
18322         * typeck.c (build_component_ref): Handle getting vbase pointers
18323         out of complex multiple inheritance better.
18324
18325 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
18326
18327         * typeck.c (build_object_ref): Make sure we use the real type, not
18328         any reference type.
18329
18330 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
18331
18332         * tree.c (build_exception_variant): Don't create new types if we
18333         don't have to, also build new types on the right obstack.
18334
18335 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18336
18337         * decl.c (store_bindings): Split out from push_to_top_level.
18338         (push_to_top_level): Call it for b->type_shadowed on class binding
18339         levels.
18340
18341 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
18342
18343         * search.c (expand_upcast_fixups): Fix so that offsets stored in
18344         vbase_offsets are always right.  Fixes a problem where virtual base
18345         upcasting and downcasting could be wrong during conversions on this
18346         during virtual function dispatch at ctor/dtor time when dynamic
18347         vtable fixups for deltas are needed.  This only sounds easier than
18348         it is.  :-)
18349         (fixup_virtual_upcast_offsets): Change to reflect new calling
18350         convention for expand_upcast_fixups.
18351
18352 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18353
18354         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18355         check that it's usable as the bitfield width.
18356
18357 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18358
18359         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18360         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18361         only ever used for functions in it.
18362
18363 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18364
18365         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18366         (nested_type): Likewise.
18367         (nested_name_specifier): Use lastiddecl.
18368
18369         * decl.c (grokdeclarator): Adjust accordingly.
18370         * init.c (expand_member_init): Likewise.
18371         * parse.y (base_class): Likewise.
18372         * typeck2.c (build_functional_cast): Likewise.
18373
18374         * typeck2.c (build_functional_cast): Fill in name after we've
18375         checked for non-aggr type.
18376
18377 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
18378
18379         * decl2.c (warn_pointer_arith): Default to on.
18380
18381 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
18382
18383         * lex.c (is_rid): New function.
18384         * decl.c (grokdeclarator): Diagnose reserved words used as
18385         declarator-ids.
18386
18387 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18388
18389         * tree.c (get_decl_list): Don't lose cv-quals.
18390
18391         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18392         typespecs used as declarator-ids.
18393
18394 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
18395
18396         * decl.c (poplevel): When poping a level, don't give a warning for
18397         any subblocks that already exist.
18398
18399 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18400
18401         * typeck.c (build_object_ref): Finish what I started.
18402
18403         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18404
18405         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18406
18407         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18408         scope.
18409
18410 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18411
18412         * decl.c (xref_tag): Handle passing a type in directly.
18413
18414         * parse.y (qualified_type_name): Pull out the type.
18415         (nested_type): Likewise.
18416         Take types directly instead of as identifiers.
18417         * call.c (build_scoped_method_call): Take types directly instead of
18418         as identifiers.
18419         * decl.c (xref_basetypes): Likewise.
18420         * init.c (expand_member_init): Likewise.
18421         (build_member_call): Likewise.
18422         (build_offset_ref): Likewise.
18423         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18424         * method.c (do_build_assign_ref): Likewise.
18425         * decl.c (grokdeclarator): Handle a type appearing as the
18426         declarator-id for constructors.
18427         * method.c (do_build_copy_constructor): current_base_init_list now
18428         uses the types directly, not their names.
18429         * init.c (sort_base_init): Likewise.
18430         (expand_member_init): Likewise.
18431         * init.c (is_aggr_type): New function, like is_aggr_typedef.
18432
18433 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
18434
18435         * tree.c (layout_basetypes): Call build_lang_field_decl instead
18436         of build_lang_decl if first arg is a FIELD_DECL.
18437
18438 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18439
18440         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18441         non-empty.
18442         * except.c (expand_start_catch_block): Set TREE_USED to avoid
18443         warnings about the catch handler.
18444
18445 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
18446
18447         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18448         expand_target_expr.
18449
18450 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18451
18452         Fix access control to use trees rather than integers.
18453         * class.c (access_{default, public, protected, private,
18454         default_virtual, public_virtual, private_virtual}_node): Add
18455         definitions.
18456         (init_class_processing): Do creation of those nodes.
18457         * cp-tree.h (access_type): Delete enum decl.
18458         (access_{default, public, protected, private, default_virtual,
18459         public_virtual, private_virtual}_node): Add decls.
18460         (compute_access): Change return type.
18461         * search.c (compute_access): Have tree return type, instead of enum.
18462         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18463         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18464         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18465         * parse.y (VISSPEC): Make ttype rather than itype.
18466         (base_class_access_list): Likewise.
18467         * *.[cy]: Change all refs of `access_public' to `access_public_node',
18468         etc.
18469         * call.c (build_method_call): Make ACCESS be a tree.
18470         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18471         * cvt.c (convert_to_aggr): Likewise.
18472         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18473         Likewise.
18474         * method.c (hack_identifier): Likewise.
18475         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18476
18477 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
18478
18479         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18480         frontend, and make it more consistent with respect to
18481         warn_pointer_arith.
18482
18483 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18484
18485         * decl.c (pushdecl): Check for duplicate parameter names.
18486
18487 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
18488
18489         * decl.c (expand_static_init): Call assemble_external for atexit.
18490
18491 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
18492
18493         * except.c (do_unwind): Remove some generated dead code.
18494         (eh_outer_context): New routine, factor out some common code from
18495         expand_builtin_throw and end_eh_unwinder.  Add code to do return
18496         address masking for the PA.
18497         (expand_builtin_throw): Use eh_outer_context instead of open coding
18498         it here.
18499         (end_eh_unwinder): Likewise.
18500
18501 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
18502
18503         * except.c (expand_throw): Call assemble_external for __empty, if we
18504         use it.
18505
18506 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
18507
18508         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18509         NORMAL_RETURN_ADDR_OFFSET.
18510         (end_eh_unwinder): Likewise.
18511
18512 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
18513
18514         * gc.c (build_dynamic_cast): Make sure we don't cast away const
18515         when dealing with references, and make sure we handle dynamic
18516         casting to a cv qualified reference.
18517
18518 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
18519
18520         * except.c (struct eh_context): New structure top hold eh context
18521         information.
18522         (push_eh_context): New routine.
18523         (pop_eh_context): Likewise.
18524         * decl.c (push_cp_function_context): Use them.
18525         (pop_cp_function_context): Likewise.
18526
18527 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
18528
18529         * decl2.c (finish_file): Also prune uninteresting functions in the
18530         inline emission loop.
18531
18532 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
18533
18534         * sig.c (build_signature_table_constructor): Mark functions
18535         in the signature as referenced.
18536
18537 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
18538
18539         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18540         the inline emission stuff.
18541
18542 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
18543
18544         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18545         weak symbols.
18546         * lang-options.h: Add -f{no-,}weak.
18547         * decl.c (init_decl_processing): If the target does not support weak
18548         symbols, don't use them.
18549         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18550
18551 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18552
18553         * init.c (expand_member_init): warning for base init after members.
18554
18555 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
18556
18557         * cvt.c (build_expr_type_conversion): Don't convert to a reference
18558         type.
18559
18560 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
18561
18562         * method.c (report_type_mismatch): Improve wording for volatile
18563         mismatches.
18564
18565 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
18566
18567         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18568         expand_assignment, as the later doesn't handle things that have
18569         copy constructors well.  The compiler would do bitwise copying,
18570         instead of ctor calling in some cases.
18571
18572 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
18573
18574         * g++.c (my_strerror): Return "cannot access" if errno is 0.
18575         (pfatal_with_name, perror_exec): Don't assume that
18576         the returned value from my_strerror contains no '%'s.
18577         (concat): Remove.
18578         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18579
18580 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
18581
18582         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18583         TYPE_METHODS/TREE_CHAIN mean what they used to.
18584         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18585         instead of TYPE_METHODS.
18586         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18587         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18588         * cp-tree.h (CLASSTYPE_METHODS): Lose.
18589         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18590         TYPE_METHODS.
18591         (struct lang_decl): Lose next_method field.
18592         (DECL_NEXT_METHOD): Lose.
18593         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18594         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18595         anymore.
18596         (finish_struct_methods): Don't mess with the TREE_CHAINs in
18597         fn_fields.
18598
18599         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18600         vector.
18601
18602         * call.c (build_method_call): Synthesize here even when not inlining.
18603         * typeck.c (build_function_call_real): Likewise.
18604
18605 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
18606
18607         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18608         == DBX_DEBUG, call dbxout_start_new_source_file and
18609         dbxout_resume_previous_source_file when appropriate.
18610
18611 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
18612
18613         * except.c (start_anon_func): Push to the top level.
18614         (end_anon_func): Pop from the top level.
18615
18616 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
18617
18618         * cp-tree.h (build_cleanup): New routine to build cleanups.
18619         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18620         call at ctor time and use atexit to run it later.
18621         * decl2.c (build_cleanup): New routine, taken from finish_file.
18622         (finish_file): Use build_cleanup instead, and don't put function
18623         local statics in global dtor list.
18624
18625 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
18626
18627         * except.c (expand_throw): Ensure that we have cleanups, if we try
18628         and expand cleanups.
18629
18630 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
18631
18632         * except.c (expand_throw): Add logic to manage dynamic cleanups for
18633         the EH object.
18634         (expand_end_catch_block): Use the magic of expand_goto, instead of
18635         emit_jump so that we get the cleanup for any catch clause parameter
18636         and the cleanup for the exception object.  Update to reflect label
18637         changes.
18638         (push_eh_cleanup): New routine to register a cleanup for an
18639         exception object.
18640         (empty_fndecl): Used to default cleanup actions to
18641         nothing.
18642         (init_exception_processing): Setup empty_fndecl.  Setup
18643         saved_cleanup.
18644         (expand_start_catch_block): Update to reflect label changes.  Call
18645         push_eh_object to register the cleanup for the EH object.
18646         (start_anon_func): New routine to start building lambda expressions
18647         from trees.
18648         (end_anon_func): New routine to end them.
18649         (struct labelNode): Change so that we can use tree labels, or rtx
18650         labels.
18651         (saved_cleanup): Object to check for dynamic cleanups for the
18652         exception handling object.
18653         (push_label_entry): Change so that we can use tree labels, or rtx
18654         labels.
18655         (pop_label_entry): Likewise.
18656         (top_label_entry): Likewise.
18657         (expand_start_all_catch): Use tree label instead of rtx label, so
18658         that we can get the magic of expand_goto.
18659         (expand_end_all_catch): Update to reflect label changes.
18660
18661         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18662         use UNSAVE_EXPRs.
18663         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18664         building_cleanup logic, as we now use UNSAVE_EXPRs.
18665         * cp-tree.h (unsave_expr): Declare it.
18666         * decl.c (building_cleanup): Remove.
18667         (maybe_build_cleanup): Remove building_cleanup logic, and use
18668         UNSAVE_EXPR instead.
18669
18670 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
18671
18672         * gc.c (build_t_desc): Update error message to say <typeinfo>.
18673
18674 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18675
18676         * decl.c (pushdecl): Only warn about shadowing a local variable if
18677         warn_shadow is true.
18678
18679 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
18680
18681         * typeck.c (build_binary_op_nodefault): Added warning about
18682         comparisons between different enum types with -Wall, unless
18683         -fenum-int-equiv set.
18684
18685 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
18686
18687         * class.c (finish_struct_1): Skip down to the inner type in
18688         multidimensional arrays.  Ensures ctors will be made for types that
18689         need constructing.
18690
18691 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
18692
18693         * decl.c (last_dtor_insn): New to track the last compiler generated
18694         insn in a dtor.
18695         (store_parm_decls): Set it.
18696         (finish_function): Use it to see if the dtor is empty.  Avoid doing
18697         vtable setup all the time, if we can.
18698         (struct cp_function): Add last_dtor_insn.
18699         (push_cp_function_context): Save it.
18700         (pop_cp_function_context): Restore it.
18701
18702 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
18703
18704         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18705         warnings.
18706
18707 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
18708
18709         * typeck.c (expand_target_expr): Make sure targets get put into the
18710         current temp_slot_level, so that the free_temp_slots call will reuse
18711         them.
18712
18713 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
18714
18715         * class.c (finish_struct_1): Delay delta fixups for virtual bases
18716         until after we have done the hard virtuals, to avoid a bogus `every
18717         virtual function must have a unique final overrider' for virtual
18718         functions that are only overridden by hard virtuals.
18719
18720 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18721
18722         * pt.c (do_function_instantiation): Don't try to find a file-scope
18723         template for a member function.
18724
18725 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
18726
18727         * g++.c (main): Add handling of -nodefaultlibs.
18728
18729 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
18730
18731         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18732         distinguish between direct bindings of reference variables, and
18733         indirect bindings of reference variables.
18734         * cvt.c (build_up_reference): Use it.
18735         * typeck.c (convert_arguments): Use it to indicate this is an
18736         indirect binding.
18737         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18738         as they are unused.
18739         (expand_static_init): Likewise.
18740         (cplus_expand_expr_stmt): Likewise.
18741         * decl2.c (finish_file): Likewise.
18742         * init.c (perform_member_init): Likewise.
18743         (emit_base_init): Likewise.
18744         (expand_aggr_vbase_init_1): Likewise.
18745
18746 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18747
18748         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18749         get a DECL_LANG_SPECIFIC node.
18750         * cp-tree.h (lang_decl_flags): Add new member `level'.
18751         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18752         decl_flags level member.
18753
18754 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18755
18756         * call.c (build_method_call): Make sure instance has a
18757         TYPE_LANG_SPECIFIC node before we dive into it.
18758
18759 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
18760
18761         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18762
18763 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
18764
18765         * decl.c (duplicate_decls): When smashing decls, smash staticness in
18766         the usual way.
18767
18768 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
18769
18770         * decl.c (poplevel): Handle the merging of subblocks of cleanups
18771         when finishing blocks that have already been created (usually due to
18772         the fixup goto code).  Fixes bad debugging information.
18773
18774 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
18775
18776         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18777         that's not a list of overloaded functions.
18778
18779 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18780
18781         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18782         before trying to use DECL_ABSTRACT_VIRTUAL_P.
18783
18784 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
18785
18786         * decl2.c (mark_used): New function for hooking into setting of
18787         TREE_USED on decls.
18788         * call.c (build_method_call): Use it.
18789         * class.c (instantiate_type): Likewise.
18790         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
18791         for all like-named functions.
18792         * method.c (hack_identifier): Likewise.
18793         (emit_thunk): Don't call assemble_external.
18794         (make_thunk): Create thunk as a FUNCTION_DECL so that it
18795         gets the right mode and ENCODE_SECTION_INFO works.
18796
18797         * parse.y: Use mark_used.  Pass operator names to do_identifier.
18798         * lex.c (do_identifier): Handle operator names.
18799
18800         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18801
18802 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18803
18804         * errfn.c: Include stdio.h.
18805         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18806
18807 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
18808
18809         * typeck2.c (digest_init): Always convert initializers to the
18810         right type.
18811
18812 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
18813
18814         * init.c (member_init_ok_or_else): Don't allow member initializers
18815         for indirect members, as it is invalid.
18816
18817 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18818
18819         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18820
18821 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
18822
18823         * parse.y (for.init.statement): Catch compound statements inside for
18824         initializations, if we're being pedantic.
18825
18826 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
18827
18828         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18829         looking for.
18830
18831 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
18832
18833         * error.c (dump_expr): Don't core dump when a boolean expression is
18834         used as a default argument.
18835
18836 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
18837
18838         * class.c (finish_struct_bits): Check aggregate_value_p instead of
18839         RETURN_IN_MEMORY.
18840
18841 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
18842
18843         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18844         BLKmode type that would otherwise be returned in registers.
18845
18846 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18847
18848         * g++.c (WITHLIBC): New macro.
18849         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
18850         saw_libc and pass it at the end if it was set.
18851
18852 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
18853
18854         * parse.y (fn.def1): Call split_specs_attrs in
18855         declmods notype_declarator case.