3323506aba226428f8cf70c95c01adfbb8c0489a
[gcc.git] / gcc / cp / ChangeLog
1 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2
3 * ir.texi: Fix formatting errors and typos.
4
5 1999-09-22 Mark Mitchell <mark@codesourcery.com>
6
7 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
8
9 * decl.c (pushdecl): Do create a binding for extern "C" functions,
10 but not for their DECL_ASSEMBLER_NAMEs.
11 (lookup_name_current_level): Fix formatting.
12 (xref_tag): Likewise.
13 * decl2.c (start_objects): Mark static constructors and
14 destructors as used.
15
16 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
17
18 * decl.c (define_case_label): Don't crash if we're not in a switch.
19
20 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
21 * lang-options.h: Restore -fthis-is-variable. Remove help strings
22 for unsupported flags.
23
24 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
25
26 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
27 Accept and warn about -fthis-is-variable.
28
29 1999-09-21 Mark Mitchell <mark@codesourcery.com>
30
31 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
32 CLEANUP_STMT, and SCOPE_STMT.
33
34 * decl2.c (lang_decode_option): Adjust, in the wake of recent
35 changes to option processing.
36
37 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
38
39 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
40 function pointer from pmfs with no object given.
41 (convert_for_assignment): Do not return error when converting
42 pmfs.
43
44 1999-09-21 Alex Samuel <samuel@codesourcery.com>
45
46 * lex.c (internal_filename): New variable.
47 (INTERNAL_FILENAME): New macro.
48 (init_parse): Allocate internal_filename and mark as root. Use it
49 instead of a string constant.
50
51 1999-09-21 Nathan Sidwell <nathan@acm.org>
52
53 Reimplement dynamic cast and catch matching.
54 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
55 * search.c (dynamic_cast_base_recurse): New function.
56 (get_dynamic_cast_base_type): New function for dynamic cast.
57 * rtti.c (build_dynamic_cast_1): Determine source and target
58 class relationship. Call __dynamic_cast_2.
59 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
60 (__user_type_info::dyncast): New dynamic cast dispatcher.
61 (__user_type_info::sub_kind): New nested enumeration.
62 (__user_type_info::contained_p): sub_kind predicate.
63 (__user_type_info::contained_public_p): Likewise.
64 (__user_type_info::contained_nonpublic_p): Likewise.
65 (__user_type_info::contained_nonvirtual_p: Likewise.
66 (__user_type_info::upcast_result): New nested struct.
67 (__user_type_info::dyncast_result): New nested struct.
68 (*::do_upcast): New catch function.
69 (*::do_dyncast): New dynamic cast function.
70 (__user_type_info::find_public_subobj): New dynamic cast
71 helper dispatcher.
72 (*::do_find_public_subobj): New dynamic cast helper function.
73 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
74 (__user_type_info::dyncast): Define dynamic cast dispatcher.
75 (*::do_upcast): Define catch function.
76 (*::do_dyncast): Define dynamic cast function.
77 (*::do_find_public_subobj): Define dynamic cast helper function.
78 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
79 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
80 (__dynamic_cast_2): New dynamic cast runtime.
81
82 1999-09-20 Mark Mitchell <mark@codesourcery.com>
83
84 * cp-tree.h (finish_stmt_expr): Change prototype.
85 * expr.c (cplus_expand_expr): Adjust call accordingly.
86 * init.c (finish_init_stmts): Likewise.
87 * parse.y (primary): Likewise.
88 * pt.c (tsubst_copy): Likewise.
89 * semantics.c (finish_stmt_expr): Don't take two parameters.
90 Don't remove generated BLOCKs from the block-tree.
91
92 Remove support for assigning to `this'.
93 * NEWS: Note that fact.
94 * class.c (build_vbase_path): Don't check flag_this_is_variable.
95 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
96 (language_function): Remove assigns_this, just_assigned_this, and
97 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
98 (base_init_expr): Remove.
99 (current_vcalls_possible_p): New macro.
100 (vtbls_set_up_p): Likewise.
101 (emit_base_init): Change prototype.
102 * decl.c (finish_destructor_body): New function, split out from
103 finish_function.
104 (current_function_assigns_this): Remove.
105 (current_function_just_assigned_this): Likewise.
106 (start_function): Don't set them.
107 (finish_function): Don't check them. Don't emit
108 base-initialization code here. Generate code for destructors when
109 doing semantic analysis.
110 (finish_stmt): Don't check current_function_just_assigned_this.
111 * decl2.c (lang_f_options): Remove this-is-variable.
112 (lang_decode_option): Likewise.
113 (grokclassfn): Don't check flag_this_is_variable.
114 * init.c (emit_base_init): Return the expression generated.
115 (construct_virtual_bases): Don't push/pop obstacks. Fix
116 typo.
117 (build_new_1): Don't check flag_this_is_variable.
118 (get_temp_regvar): Don't set DECL_REGISTER.
119 (build_vec_init): Don't call use_variable.
120 * lang-options.h: Remove "-fthis-is-variable" and
121 "-fno-this-is-variable".
122 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
123 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
124 expand_expr_stmt.
125 * semantics.c (finish_expr_stmt_real): Rename to ...
126 (finish_expr_stmt): This. Remove assigned_this parameter.
127 (begin_if_stmt): Call do_pushlevel before starting the statement.
128 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
129 blocks.
130 (setup_vtbl_ptr): Emit initialization code for bases and members
131 at semantic-analysis time. Emit code to initialize vtables in
132 destructors here.
133 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
134 Don't handle CTOR_INITIALIZER any more.
135 * typeck.c (build_modify_expr): Don't check for assignments to
136 this.
137 (c_expand_return): Don't suggest assigning to `this'.
138
139 * Makefile.in (decl.o): Depend on RTL_H.
140 (decl2.o): Likewise.
141 (class.o): Likewise.
142 (call.o): Likewise.
143 (method.o): Likewise.
144 (search.o): Likewise.
145 (tree.o): Likewise.
146 (pt.o): Likewise.
147
148 * decl.c (duplicate_decls): When a builtin function is redeclared
149 as static, make sure it is mangled correctly.
150
151 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
152 detail about the statement-tree.
153
154 1999-09-20 Nathan Sidwell <nathan@acm.org>
155
156 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
157
158 1999-09-20 Nick Clifton <nickc@cygnus.com>
159
160 * decl2.c (lang_decode_option): Extend comment.
161
162 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
163
164 * typeck.c: Include "tm_p.h".
165
166 1999-09-19 Mark Mitchell <mark@codesourcery.com>
167
168 * ir.texi: New file.
169
170 1999-09-19 Paul Burchard <burchard@pobox.com>
171
172 * semantics.c (expand_stmt): Initialize return value.
173
174 1999-09-18 Paul Burchard <burchard@pobox.com>
175
176 * gxxint.texi: G++ now implements namespaces.
177
178 1999-09-18 Mark Mitchell <mark@codesourcery.com>
179
180 * decl.c (pop_label): Don't warn about unused labels more than
181 once.
182 * semantics.c (finish_goto_stmt): Always marked used labels as
183 used.
184
185 * decl.c (layout_var_decl): Change prototype. Call layout_decl
186 even when the declaration is external.
187 (cp_finish_decl): Adjust call to layout_var_decl.
188 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
189
190 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
191
192 * typeck.c (get_member_function_from_ptrfunc): Always consider
193 virtuality inside member pointer.
194
195 1999-09-17 Mark Mitchell <mark@codesourcery.com>
196
197 Turn on function-at-a-time processing.
198 * cp-tree.h (doing_semantic_analysis_p): New macro.
199 (SF_DEFAULT): Define to zero, not SF_EXPAND.
200 (start_handler_parms): Change prototype.
201 (expand_start_catch_block): Likewise.
202 (expand_end_catch_block): Likewise.
203 (expand_start_eh_spec): Likewise.
204 (expand_end_eh_spec): Declare.
205 (finish_handler_parms): Change prototype.
206 (begin_catch_block): Declare.
207 (finish_handler): Change prototype.
208 (do_pushlevel): Declare.
209 (do_poplevel): Likewise.
210 * decl.c (pushlevel): Don't create
211 binding levels when not doing semantic analysis.
212 (poplevel): Don't pop them.
213 (pushdecl): Assert that we are never called when not doing
214 semantic analysis.
215 (pushdecl_top_level): Use push_to_top_level.
216 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
217 label when expanding.
218 (cp_finish_decl): Only inject for-scope variables when doing
219 semantic analysis. Add comments.
220 (start_handler_parms): Return the handler parm.
221 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
222 already set. Reinitialize from saved function data if available.
223 Don't pushlevel when not doing semantic analysis.
224 (store_parm_decls): Only generate RTL when expanding. Only
225 pushdecl when doing semantic analysis. Set
226 current_eh_spec_try_block if appropriate.
227 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
228 Combine common code. Don't poplevel when not doing semantic
229 analysis.
230 (push_cp_function_context): Don't expand functions without an
231 explicit call to expand_body.
232 (mark_lang_function): Make eh_spec_try_block and
233 x_scope_stmt_stack.
234 * except.c (expand_end_eh_spec): Don't
235 declare.
236 (process_start_catch_block): Likewise.
237 (push_eh_cleanup): Use finish_decl_cleanup.
238 (initialize_handler_parm): New function.
239 (expand_start_catch_block): Use it.
240 (expand_end_catch_block): Use tree-generation functions, not
241 RTL-generation functions.
242 (expand_start_eh_spec): Likewise.
243 (expand_end_eh_spec): Likewise.
244 (expand_exception_blocks): Simplify.
245 (start_anon_func): Use do_pushlevel.
246 (end_anon_func): Use do_poplvel. Call expand_body for the
247 function.
248 * expr.c (do_case): Don't call define_case_label.
249 * init.c (create_temporary_var): Set DECL_CONTEXT for local
250 variables.
251 * method.c (emit_thunk): Call expand_body for the
252 thunk.
253 (sythesize_method): Likewise.
254 * parse.y (handler_args): Give it ttype.
255 (eat_saved_input): Call expand_body.
256 (base_init): Use do_pushlevel.
257 (pending_inline): Call expand_body.
258 (handler): Adjust calls to finish_handler_parms and
259 finish_handler.
260 (handler_args): Don't call expand_start_catch_block. Return the
261 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
262 * parse.c: Regenerated.
263 * rtti.c (synthesize_tinfo_fn): Call finish_function.
264 * semantics.c (do_pushlevel): Give it external linkage. Build
265 SCOPE_STMTs.
266 (do_poplevel): Likewise.
267 (finish_case_label): Call define_case_label when doing semantic
268 analysis.
269 (finish_goto_stmt): Create RTL for labels.
270 (finish_function_try_block): Set in_function_try_handler
271 unconditionally.
272 (finish_function_handler_sequence): Unset it.
273 (finish_handler_parms): Use expand_start_catch_block even when
274 building a statement-tree.
275 (begin_catch_block): New function.
276 (finish_handler): Move a little RTL-generation logic here.
277 (finish_decl_cleanup): Allow cleanups for empty declarations.
278 (finish_named_return_value): Don't pushdecl when not doing
279 semantic analysis.
280 (expand_stmt): Don't do semantic analysis for variable
281 declarations. Handle START_CATCH_STMT. Call expand_label
282 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
283 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
284 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
285 RETURN_INIT and function try blocks.
286
287 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
288 x_scope_stmt_stack. Add x_in_charge_parm.
289 (current_eh_spec_try_block): New macro.
290 (current_scope_stmt_stack): Likewise.
291 (current_in_charge_parm): Likewise.
292 * decl.c (start_function): Initialize current_in_charge_parm.
293 (finish_function): Use current_in_charge_parm rather than looking
294 up __in_chrg.
295 * search.c (expand_indirect_vtbls_init): Likewise.
296
297 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
298 (TRY_BLOCK): Likewise.
299 (HANDLER): Likewise.
300 (START_CATCH_STMT): New tree node.
301 (SCOPE_STMT): Likewise.
302 * cp-tree.h (SCOPE_BEGIN_P): New macro.
303 (SCOPE_NULLIFIED_P): Likewise.
304 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
305 (struct lang_decl): Add saved_language_function.
306 (DECL_PENDING_INLINE_INFO): Adjust documentation.
307 (DECL_PENDING_INLINE_P): New macro.
308 (TYPE_TI_ARGS): Fix typo in comment.
309 (DECL_SAVED_TREE): Add to documentation.
310 (DECL_SAVED_FUNCTION_DATA): New macro.
311 (START_CATCH_TYPE): Likewise.
312 (SCOPE_END_P): New macro.
313 (declare_parm_level): Don't declare.
314 * decl.c (mark_lang_function): New function, split out from
315 mark_cp_function_context.
316 (save_function_data): New function.
317 (declare_parm_level): Remove.
318 (finish_function): Use save_function_data to squirrel away
319 important stuff for later use.
320 (mark_cp_function_context): Use mark_function_data.
321 (lang_mark_tree): Likewise.
322 * lex.c (begin_definition_of_inclass_inline): Set
323 DECL_PENDING_INLINE_P.
324 (store_pending_inline): Clear it.
325 * pt.c (tsubst_decl): Likewise.
326
327 1999-09-17 Nathan Sidwell <nathan@acm.org>
328
329 * call.c (perform_implicit_conversion): Deal with error_mark_node.
330
331 1999-09-17 Mark Mitchell <mark@codesourcery.com>
332
333 * decl.c (warn_extern_redeclared_static): Don't get confused by
334 static member functions.
335 (duplicate_decls): Merge DECL_THIS_STATIC.
336
337 * decl.c (expand_static_init): Make sure assignments to local
338 statics actually occur.
339
340 1999-09-17 Mark Mitchell <mark@codesourcery.com>
341
342 * cp-tree.h (poplevel_class): Declare.
343 * class.c (popclass): Use poplevel_class, not poplevel.
344 * decl.c (poplevel_class): Don't make it static. Don't return a
345 value.
346 (poplevel): Don't call poplevel_class; abort in a class
347 binding level is seen.
348 * semantics.c (finish_translation_unit): Use pop_everything.
349 * parse.y (member_init): Allow errors.
350 (pending_inline): Call finish_function.
351 * parse.c: Regenerated.
352 * Makefile.in (CONFLICTS): Adjust.
353
354 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
355
356 * error.c: Reduce code duplication.
357 (dump_template_value): New function.
358 (dump_type_real): Use it.
359 (dump_decl): Likewise.
360 (dump_function_name): Likewise.
361 (dump_function_decl): Don't be too talkative about function return
362 type variety.
363
364 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
365
366 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
367
368 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
369
370 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
371
372 * decl2.c (finish_file): Also call check_global_declarations for
373 the pending_statics list.
374
375 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
376
377 * lex.c (cp_pragma_implementation): Allow #pragma implementation
378 in header files.
379
380 1999-09-15 Richard Henderson <rth@cygnus.com>
381
382 * lex.c (mark_impl_file_chain): Follow the next chain.
383
384 1999-09-15 Mark Mitchell <mark@codesourcery.com>
385
386 * decl.c (warn_extern_redeclared_static): Simplify. Catch
387 problems with extern "C" functions redeclared as static.
388 (duplicate_decls): When a builtin is redeclared static, make the
389 new function have internal linkage.
390
391 1999-09-15 Mark Mitchell <mark@codesourcery.com>
392
393 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
394 * pt.c (tsubst_copy): Likewise.
395 * tree.c (search_tree): Likewise.
396 (mapcar): Likewise.
397
398 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
399
400 * typeck2.c (ack): Don't declare progname.
401
402 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
403
404 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
405 filenames with ggc_alloc_string.
406
407 1999-09-14 Mark Mitchell <mark@codesourcery.com>
408
409 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
410 TARGET_EXPR.
411 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
412 the TARGET_EXPR.
413 * cvt.c (build_up_reference): Likewise.
414 * tree.c (build_cplus_new): Likewise.
415 (get_target_expr): Likewise.
416
417 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
418
419 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
420
421 1999-09-13 Mark Mitchell <mark@codesourcery.com>
422
423 * cp-tree.h (build_target_expr): New function.
424 * call.c (build_conditional_expr): Use build_target_expr.
425 (convert_like): Likewise.
426 (build_over_call): Likewise.
427 * cvt.c (build_up_reference): Likewise.
428 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
429 (destroy_local_var): Here.
430 (build_target_expr): New function.
431 * tree.c (build_cplus_new): Use it.
432 (get_target_expr): Likewise.
433
434 1999-09-13 Nathan Sidwell <nathan@acm.org>
435
436 * typeck.c (expr_sizeof): Don't decay arrays and functions.
437 Remove misleading comment.
438 (build_compound_expr): Don't decay arrays.
439
440 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
441
442 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
443 class rvalues again.
444
445 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
446
447 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
448
449 * g++spec.c: Include gcc.h.
450 (lang_specific_driver): Constify a char*. Call xcalloc, not
451 xmalloc/bzero. All calls to the function pointer parameter now
452 explicitly call `fatal'.
453
454 1999-09-12 Mark Mitchell <mark@codesourcery.com>
455
456 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
457 * cvt.c (ocp_convert): Complete the from and destination types.
458 Adjust warning about functions always being `true' in conditionals.
459 * decl.c (duplicate_decls): Don't play funny games with abort.
460 * error.c (dump_expr): Handle OVERLOADs.
461 * spew.c (probe_obstack): Remove.
462 * typeck.c (condition_conversion): Use perform_implicit_conversion.
463
464 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
465
466 * cp-tree.h (auto_function, define_function): Adjust prototypes.
467 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
468 changed.
469 (auto_function): Likewise, for CODE arg.
470 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
471 (builtin_function): ... here.
472
473 1999-09-11 Mark Mitchell <mark@codesourcery.com>
474
475 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
476 (init_decl_processing): Don't set TREE_PERMANENT for the
477 error_mark_node.
478 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
479 (grokdeclarator): Likewise.
480 (grokparms): Don't check TREE_PERMANENT when building up lists.
481 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
482 (mark_inline_for_output): Likewise.
483 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
484 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
485 * lex.c (check_newline): Don't check ggc_p; it is always one.
486 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
487 * spew.c (yylex): Don't copy_node or probe_obstacks for
488 non-permanent CONSTANTs and STRINGs.
489 * tree.c (build_cplus_array_type_1): Don't fuss with
490 TREE_PERMANENT on ARRAY_TYPEs.
491
492 * cp-tree.def (CLEANUP_STMT): New node.
493 * cp-tree.h (language_function): Add name_declared.
494 (current_function_name_declared): New macro.
495 (CLEANUP_DECL): New macro.
496 (CLEANUP_EXPR): Likewise.
497 (emit_local_var): Likewise.
498 (finish_decl_cleanup): New function.
499 * cvt.c (build_up_reference): Simplify.
500 (ocp_convert): Remove dead code.
501 * decl.c (start_decl): Remove call to add_decl_stmt.
502 (grok_reference_init): Adjust, to handle bindings temporaries to
503 references. Remove dead code.
504 (initialize_local_var): Don't generate RTL for
505 declarations here, or build cleanups here. Don't fuss with
506 obstacks. Replace expand_start_target_temps calls with explicit
507 setting of stms_are_full_exprs_p.
508 (destroy_local_var): New function.
509 (emit_local_var): Likewise.
510 (cp_finish_decl): Use them, as appropriate.
511 (start_function): Announce template functions.
512 (store_parm_decls): Don't call declare_function_name here.
513 (finish_stmt): Don't start emit base-initialization code when just
514 building the statement-tree.
515 * init.c (create_temporary_var): Move add_decl_stmt call ...
516 (get_temp_regvar): Here.
517 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
518 cp_finish_decl would expect. Don't call add_decl_stmt.
519 * semantics.c (begin_compound_stmt): Call declare_function_name,
520 if appropriate.
521 (finish_decl_cleanup): New function.
522 (expand_stmt): Use emit_local_var to output variables.
523 (expand_body): Set current_funtion_name_declared.
524
525 1999-09-10 Mark Mitchell <mark@codesourcery.com>
526
527 * cp-tree.h (finish_cleanup_try_block): New function.
528 * semantics.c (finish_cleanup_try_block): Add comment.
529
530 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
531
532 * cp-tree.h: Delete declarations for all tree nodes now moved to
533 global_trees.
534 * decl.c: Delete their definitions.
535 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
536 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
537 provide defaults.
538 (init_decl_processing): Call build_common_tree_nodes and
539 build_common_tree_nodes_2 instead of building their nodes here.
540 Don't add gc roots for them.
541
542 1999-09-10 Mark Mitchell <mark@codesourcery.com>
543
544 * cp-tree.h (language_function): Rename expanding_p to
545 x_expanding_p. Rename named_label_uses to x_named_label_uses.
546 (expanding_p): Adjust accordingly.
547 (TREE_VIA_PRIVATE): Fix typo in comment.
548 (DECL_REFERENCE_SLOT): Remove.
549 (SET_DECL_REFERENCE_SLOT): Likewise.
550 * decl.c (named_label_uses): Adjust. Remove chicken comment.
551 (push_overloaded_decl): Don't truncate the chain of bindings when
552 adding an overloaded function.
553 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
554 (initialize_local_var): Fix typo in comment.
555 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
556 * decl2.c (start_objects): Make the fact that we are expanding
557 the generated function right away explicit.
558 (start_static_storage_duration_function): Likewise.
559 (finish_file): Fix typo in comment.
560 * init.c (build_vec_init): Correct bugs in handling cleanups.
561 * semantics.c (maybe_convert_cond): New function.
562 (FINISH_COND): Always store the condition, even if there's
563 a declaration.
564 (finish_if_stmt_cond): Use maybe_convert_cond.
565 (finish_while_stmt_cond): Likewise.
566 (finish_do_stmt): Likewise.
567 (finish_for_cond): Likewise.
568 (expand_cond): Adjust.
569
570 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
571 * init.c (perform_member_init): Remove obstack machinations.
572 (expand_cleanup_for_base): Likewise.
573 (finish_init_stmts): Mark the statement-expression as used.
574 * method.c (emit_thunk): Use tree-generating functions, not
575 RTL.
576 (do_build_copy_constructor): Likewise.
577 (do_build_assign_ref): Likewise.
578 (synthesize_method): Likewise. Keep track of line numbers.
579 * pt.c (tsubst_expr): Handle various kinds of try blocks.
580 * semantics.c (expand_stmts): Remove.
581 (begin_function_try_block): Set FN_TRY_BLOCK_P.
582 (finish_function_try_block): Be careful rechaining
583 function try blocks.
584 (expand_stmt): Loop through all the statements at a given level.
585 (exapnd_body): Be careful with line-numbers here too. Prepare for
586 being called directly from the parser.
587
588 * cp-tree.h (finish_function): Adjust prototype.
589 * decl.c (finish_function): Return the function compiled.
590 * pt.c (instantiate_decl): Don't play games with obstacks.
591 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
592 (search_tree): Likewise.
593 * typeck.c: Fix typo in comment.
594 * typeck2.c (store_init_value): Add comment.
595
596 * cp-tree.h (CPTI_ATEXIT): New macro.
597 (atexit_node): Likewise.
598 * decl.c (destroy_local_static): New function, broken out from ...
599 (expand_static_init): Here.
600
601 * rtti.c (get_tinfo_var): These should always be global
602 (expand_si_desc): Use tree, not RTL, functions to generate code.
603 (expand_class_desc): Likewise.
604 (expand_ptr_desc): Likewise.
605 (expand_attr_desc): Likewise.
606 (expand_generic_desc): Likewise.
607 (synthesize_tinfo_fn): Likewise.
608
609 1999-09-09 Mark Mitchell <mark@codesourcery.com>
610
611 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
612 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
613 RECHAIN_STMTS.
614 (RECHAIN_STMST_FROM_CHAIN): Likewise.
615
616 * parse.y (simple_stmt): Fix typo in last change.
617
618 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
619 (STMT_IS_FULL_EXPR_P): Likewise.
620 (STMT_LINENO_FOR_FN_P): Likewise.
621 (prep_stmt): New function.
622 (building_stmt_tree): Tweak for safety.
623 * pt.c (tsubst_expr): Use prep_stmt throughout.
624 (add_tree): Move it to semantics.c
625 * semantics.c (add_tree): Move it here.
626 (finish_expr_stmt_real): New function.
627 (finish_expr_stmt): Use it.
628 (finish_if_stmt_cond): Use FINISH_COND.
629 (finish_while_stmt_cond): Likewise.
630 (finish_for_cond): Likewise.
631 (finish_stmt_tree): Tweak line-number handling.
632 (prep_stmt): New function.
633 (expand_stmt): Use it.
634
635 * cp-tree.h (begin_switch_stmt): Adjust prototype.
636 (finish_switch_cond): Likewise.
637 * parse.y (simple_stmt): Adjust accordingly.
638 * parse.c: Regenerated.
639 * pt.c (tsubst_expr): Adjust accordingly.
640 * semantics.c (expand_cond): New function.
641 (FINISH_COND): New macro.
642 (begin_switch_stmt): Build the SWITCH_STMT here.
643 (finish_switch_stmt_cond): Not here.
644 (expand_stmt): Adjust calls to begin_switch_stmt and
645 finish_switch_cond. Use expand_cond throughout.
646
647 * dump.c (dequeue_and_dump): Dump types for constants.
648 Describe DECL_ARG_TYPE more intuitively.
649 Handle ARRAY_REF.
650
651 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
652 (lang_cleanup_tree): Remove.
653 * lex.c (make_lang_type): Use ggc_alloc to allocate
654 TYPE_LANG_SPECIFIC.
655
656 Reorganize per-function data.
657 * cp-tree.h (saved_scope): Add function_decl, bindings.
658 (language_function): Rename binding_level to bindings.
659 (cp_function_chain): Use the current_function, not the
660 outer_function_chain.
661 (current_class_ptr): Make it work, even when there's no
662 current function.
663 (current_class_ref): Likewise.
664 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
665 macros.
666 (clear_temp_name): Remove.
667 * decl.c (check_function_type): New function, broken out from
668 start_function.
669 (current_binding_level): Adjust definition.
670 (pushlevel): Simplify.
671 (poplevel): Don't use named_label_uses when we're outside
672 a function scope.
673 (mark_saved_scope): Mark function_decl and bindings.
674 (maybe_push_to_top_level): Don't unconditionally push a new
675 function context. Save bindings and the current_function_decl.
676 Don't clear named_labels.
677 (pop_from_top_level): Pop function context if appropriate.
678 (init_decl_processing): Set init_lang_status and free_lang_status,
679 rather than save_lang_status and restore_lang_status.
680 (start_function): Take SF_* flags. Don't clear per-function data.
681 Reorder and simplify to use new per-function data code. Add
682 asserts.
683 (store_parm_decls): Don't call init_function_start here.
684 (finish_function): Adjust for new handling of per-function data.
685 (push_cp_function_context): Simplify.
686 (mark_cp_function_context): Change binding_level to bindings.
687 * decl2.c (clear_temp_name): Remove.
688 (start_objects): Use SF flags to start_function.
689 (start_static_storage_duration_function): Likewise.
690 * except.c (start_anon_func): Remove redundant calls to
691 push_function_context_to. Use SF flags to start function.
692 (end_anon_func): Remove redundant call to pop_function_context
693 from.
694 * lex.c (reinit_parse_for_function): Don't initialize per-function
695 data.
696 * method.c (emit_thunk): Clear current_function after calling
697 assemble_end_function. Use SF flags for start_function.
698 (synthesize_method): Use SF flags for start_function.
699 * parse.c: Regenerated.
700 * parse.y (fn.defpen): Likewise.
701 (pending_inline): Clear current_function, even if something goes
702 wrong.
703 * pt.c (instantiate_decl): Use SF flags to start_function.
704 Don't save and restore expanding_p.
705 (add_tree): Handle the case where we are outside any function.
706 (end_tree): Likewise.
707 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
708 * semantics.c (begin_function_definition): Likewise.
709 (expand_body): Likewise.
710
711 1999-09-09 Nathan Sidwell <nathan@acm.org>
712
713 * cp-tree.h (convert_to_void): Prototype new function.
714 (require_complete_type_in_void): Remove prototype.
715 * cvt.c (convert_to_void): New function.
716 (ocp_convert): Use convert_to_void.
717 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
718 expressions.
719 * typeck.c (require_complete_type_in_void): Remove function.
720 (build_compound_expr): Use convert_to_void.
721 (build_static_cast): Likewise.
722 (build_c_cast): Likewise.
723 * semantics.c (finish_expr_stmt): Do not decay full expressions.
724
725 * typeck.c (build_x_compound_expr): Add FIXME.
726
727 1999-09-08 Mark Mitchell <mark@codesourcery.com>
728
729 * cp-tree.h (scratch_tree_cons): Remove.
730 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
731 and perm_tree_cons with plain tree_cons.
732 * class.c: Likewise.
733 * decl.c: Likewise.
734 * decl2.c: Likewise.
735 * except.c: Likewise.
736 * expr.c: Likewise.
737 * init.c: Likewise.
738 * lex.c: Likewise.
739 * method.c: Likewise.
740 * parse.y: Likewise.
741 * pt.c: Likewise.
742 * repo.c: Likewise.
743 * rtti.c: Likewise.
744 * search.c: Likewise.
745 * typeck.c: Likewise.
746 * parse.c: Regenerated.
747 * tree.c (build_srcloc): Simplify.
748
749 1999-09-08 Mark Mitchell <mark@codesourcery.com>
750
751 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
752 Remove next.
753 (LANG_DECL_PERMANENT): Remove.
754 * decl.c (duplicate_decls): Don't mess about with obstacks trying
755 to free memory.
756 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
757 * lex.c (free_lang_decl_chain): Remove.
758 (build_lang_decl): Don't use obstacks.
759 (retrofit_lang_decl): Likewise.
760 (copy_lang_decl): Likewise.
761
762 * cp-tree.h (saved_scope): Remove old_binding_level and
763 function_decl. Tidy up.
764 * decl.c (mark_saved_scope): Don't set them.
765 (maybe_push_to_top_level): Clear memory.
766
767 * decl.c (layout_var_decl): Change prototype. Don't complete
768 types for external objects.
769 (check_initializer): Likewise. Tidy.
770 (initialize_local_var): Complete types here.
771 (cp_finish_decl): Not here. Reorganize a little.
772 (grokvardecl): Don't complete types here.
773
774 * decl.c (start_function): Clear last_dtor_insn and
775 last_parm_cleanup_insn.
776 (push_cp_function_context): Just copy over a little of
777 the old context, not all of it.
778
779 * cp-tree.h (copy_to_permanent): Remove.
780 (permanent_p): Likewise.
781 * decl.c (building_typename_type): Don't use copy_to_permanent.
782 (start_decl): Likewise.
783 (grok_reference_init): Likewise.
784 (cp_finish_decl): Likewise.
785 * init.c (build_new_1): Don't use mapcar.
786 (build_vec_delete_1): Don't use copy_to_permanent.
787 (build_vec_init): Likewise.
788 * parse.y (primary): Likewise.
789 * parse.c: Regenerated.
790 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
791 (lookup_template_class): Likewise.
792 (tsubst_friend_function): Likewise.
793 (instantiate_class_template): Likewise.
794 (tsubst_decl): Likewise.
795 (tsubst): Likewise.
796 (instantiate_template): Likewise.
797 (unify): Likewise.
798 * rtti.c (get_tinfo_fn): Likewise.
799 (build_dynamic_cast): Likewise.
800 * semantics.c (finish_if_stmt_cond): Likewise.
801 (finish_while_stmt_cond): Likewise.
802 (finish_do_stmt): Likewise.
803 (finish_for_cond): Likewise.
804 (finish_for_expr): Likewise.
805 (finish_cleanup): Likewise.
806 (add_decl_stmt): Likewise.
807 (finish_named_return_value): Likewise.
808 (finish_qualified_call_expr): Likewise.
809 * tree.c (perm_manip): Remove.
810 (build_exception_variant): Don't use copy_to_permanent.
811 (permanent_p): Remove.
812 (copy_to_permament): Remove.
813 (build_min_nt): Don't use copy_to_permanent.
814 (build_min): Likewise.
815 (min_tree_cons): Likewise.
816 * typeckc.c (build_static_cast): Likewise.
817 (build_reinterpret_cast): Likewise.
818 (build_const_cast): Likewise.
819
820 1999-09-07 Mark Mitchell <mark@codesourcery.com>
821
822 * decl.c (ggc_p): Set it to 1.
823 (mark_saved_scope): Add prototype.
824
825 1999-09-07 Richard Henderson <rth@cygnus.com>
826
827 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
828 * typeck.c (self_promoting_args_p): Delete.
829
830 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
831
832 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
833 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
834
835 1999-09-07 Mark Mitchell <mark@codesourcery.com>
836
837 * Makefile.in (tree.o): Depend on ggc.h.
838 * class.c (make_method_vec): Remove.
839 (free_method_vec): Likewise.
840 (free_method_vecs): Remove.
841 (add_method): Don't use them.
842 * cp-tree.def (PTRMEM_CST): Make it longer.
843 (TEMPLATE_PARM_INDEX): Make it shorter.
844 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
845 (template_parm_index): Remove RTL field.
846 (ptrmem_cst): Add RTL field.
847 (finish_function): Removed parameter.
848 (process_next_inline): Change prototype.
849 (init_cplus_unsave): Rename to init_tree.
850 (binding_init): Remove.
851 * decl.c (free_binding_nodes): Remove.
852 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
853 (pop_binding): Don't use free_binding_nodes.
854 (free_binding_vecs): Remove.
855 (store_bindings): Don't use them.
856 (pop_from_top_level): Likewise.
857 (lookup_namespace_name): Simplify.
858 (build_typename_type): Don't use obstack_free.
859 (unqualified_namespace_lookup): Simplify.
860 (lookup_name_real): Simplify.
861 (start_function): Remove comment about leaks.
862 (finish_function): Removed nested parameter. Call
863 expand_end_bindings even when building_stmt_tree.
864 Call ggc_push_context and ggc_pop_context around
865 rest_of_compilation, if necessary.
866 (mark_cp_function_context): Handle a NULL language-context.
867 (lang_mark_false_label_stack): Fix typo.
868 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
869 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
870 pointer to method types.
871 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
872 * decl2.c (finish_objects): Adjust call to finish_function.
873 (finish_static_store_duration_function): Likewise.
874 (do_nonmember_using_decl): Remove call to binding_init.
875 * except.c (end_anon_func): Adjust call to finish_function.
876 * lex.c (mark_impl_file_chain): New function.
877 (init_parse): Call init_tree, not init_cplus_unsave.
878 Add GC roots.
879 (cp_pramga_interface): Use xmalloc, not permalloc.
880 (cp_pragma_implementation): Likewise.
881 (begin_definition_of_inclass_inline): Simplify.
882 (process_next_inline): Adjust prototype.
883 (do_scoped_id): Don't call binding_init.
884 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
885 * method.c (emit_thunk): Adjust call to finish_function.
886 (synthesize_method): Likewise.
887 * parse.y (%union): Add a new `pi' variant.
888 (PRE_PARSED_FUNCTION_DECL): Use it.
889 (fn.defpen): Likewise.
890 (fndef): Adjust call to finish_function.
891 * pt.c (instantiate_decl): Likewise.
892 * rtti.c (syntheisze_tinfo_fn): Likewise.
893 * semantics.c (expand_body): Likewise.
894 * tree.c: Include ggc.h.
895 (mark_list_hash): New function.
896 (binding_init): Remove.
897 (init_cplus_unsave): Rename to ...
898 (init_tree): This. Add GC roots.
899
900 1999-09-05 Mark Mitchell <mark@codesourcery.com>
901
902 Get ready for garbage collection.
903 * Makefile.in (CXX_TREE_H): Add varray.h
904 (lex.o): Depend on ggc.h.
905 (decl.o): Likewise.
906 (decl2.o): Likewise.
907 (method.o): Likewise.
908 (search.o): Likewise.
909 (pt.o): Likewise.
910 (repo.o): Likewise.
911 * class.c: Include ggc.h.
912 (current_class_name): Remove.
913 (current_class_type): Likewise.
914 (current_access_specifier): Likewise.
915 (previous_class_type): Likewise.
916 (previous_class_values): Likewise.
917 (class_cache_firstobj): Likewise.
918 (current_lang_base): Likewise.
919 (current_lang_stack): Likewise.
920 (current_lang_stacksize): Likewise.
921 (lang_name_c): Likewise.
922 (lang_name_cplusplus): Likewise.
923 (lang_name_java): Likewise.
924 (current_lang_name): Likewise.
925 (base_layout_decl): Likewise.
926 (access_default_node): Likewise.
927 (access_public_node): Likewise.
928 (access_protected_node): Likewise.
929 (access_private_node): Likewise.
930 (access_default_virtual_node): Likewise.
931 (access_public_virtual_node): Likewise.
932 (access_protected_virtual_node): Likewise.
933 (access_private_virtual_node): Likewise.
934 (signed_zero_node): Likewise.
935 (init_class_processing): Don't build base_layout_decl.
936 (push_lang_context): Adjust now that current_lang_base is a varray.
937 (pop_lang_context): Likewise.
938 * cp-tree.h: Include varray.h.
939 (cp_global_trees): Add access_default, access_public,
940 access_protected, access_private, access_default_virtual,
941 access_public_virtual, access_protected_virtual,
942 access_private_virtual, ctor_identifier, delta2_identifier,
943 delta_identifier, dtor_identifier, in_charge_identifier,
944 index_identifier, nelts_identifier, this_identifier,
945 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
946 lang_name_c, lang_name_cplusplus, lang_name_java,
947 empty_except_spec, null, jclass, minus_one, terminate.
948 (saved_scope): Move here from decl.c. Define globals in terms of
949 saved_scope: current_namespace, current_class_name,
950 current_class_type, current_access_specifier, current_lang_stack,
951 current_lang_base, current_lang_name, current_function_parms,
952 current_template_parms, processing_template_decl,
953 processing_specialization, processing_explicit_instantiation,
954 previous_class_type, previous_class_values, class_cache_firstobj.
955 (scope_chain): New variable.
956 (init_pt): New function.
957 * decl.c (current_namespace): Remove.
958 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
959 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
960 (delta_identifier, delta2_identifier): Likewise.
961 (pfn_or_delta2_identifier, tag_identifier): Likewise
962 (vt_off_identifier, empty_except_spec, null_node): Likewise.
963 (current_function_parms, current_lang_base): Remove.
964 (current_lang_stack, previous_class_values): Remove.
965 (class_binding_level): Macroize.
966 (saved_scope): Remove.
967 (current_saved_scope): Rename to scope_chain.
968 (mark_saved_scope): Adjust for new scope structure.
969 (maybe_push_to_top_level): Likewise.
970 (pop_from_top_level): Likewise.
971 (duplicate_decls): Adjust now that current_lang_base is a varray.
972 (build_typename_type): Call ggc_add_tree_hash_table_root.
973 (init_decl_processing): Call init_pt. Call push_to_top_level to
974 set up globals. Add GC roots.
975 (xref_basetypes): Adjust now that current_lang_base is a varray.
976 * decl.h (this_identifier): Remove.
977 (in_charge_identifier): Likewise.
978 * decl2.c: Don't include varray.h.
979 (current_namespace): Remove.
980 (init_decl2): Add GC roots.
981 * except.c (Terminate): Remove.
982 (init_exception_processing): Use terminate_node instead.
983 (build_terminate_handler): Likewise.
984 * init.c (nc_nelts_field_id): Remove.
985 (minus_one): Likewise.
986 (init_init_processing): Use minus_one_node and nelts_identifier
987 instead. Add GC roots.
988 (jclass_node): Remove.
989 (build_new_1): Use nelts_identifier.
990 (build_vec_init): Likewise.
991 (build_vec_delete): Likewise.
992 * lex.c: Include ggc.h.
993 (defarg_fn): Move declaration early.
994 (defarg_parms): Likewise.
995 (init_parse): Add GC roots.
996 (handle_cp_pragma): Remove redundant declaration of
997 pending_vtables.
998 * method.c: Include ggc.h.
999 (btypelist): Make it a varray. All uses changed.
1000 (ktypelist): Likewise.
1001 (init_method): Add GC roots.
1002 * pt.c: Don't include varray.h. Include ggc.h.
1003 (current_template_parms): Remove.
1004 (processing_template_decl): Likewise.
1005 (processing_specialization): Likewise.
1006 (processing_explicit_instantiation): Likewise.
1007 (init_pt): New function.
1008 * repo.c: Include ggc.h.
1009 (init_repo): Add GC roots.
1010 * search.c: Don't include varray.h.
1011 (_vptr_name): Remove.
1012 (lookup_field_1): Use vtpr_identifier instead.
1013 (expand_indirect_vtbls_init): Remove redundant declaration of
1014 in_charge_identifier.
1015 (init_search_processing): Use vptr_identifier.
1016
1017 1999-09-05 Richard Henderson <rth@cygnus.com>
1018 Bernd Schmidt <bernds@cygnus.co.uk>
1019 Mark Mitchell <mark@codesourcery.com>
1020
1021 * Makefile.in (parse.o): Depend on ggc.h.
1022 (decl2.o): Depend on ggc.h.
1023 (init.o): Depend on ggc.h.
1024 * cp-tree.h (init_decl2): Declare.
1025 (cp_parse_init): Likewise.
1026 * decl.c (ggc_p): Define to zero.
1027 (mark_saved_scope): New function.
1028 (init_decl_processing): Call cp_parse_init, and cp_decl2.
1029 Register GC roots.
1030 (expand_static_init): Add GC roots.
1031 * decl2.c: Include ggc.h.
1032 (init_decl2): New function.
1033 * init.c: Include ggc.h.
1034 (init_init_processing): Add GC roots.
1035 * parse.y: Include ggc.h.
1036 (cp_parse_init): New function.
1037
1038 1999-09-04 Mark Mitchell <mark@codesourcery.com>
1039
1040 * decl.c (init_decl_processing): Set mark_lang_status.
1041 (lang_mark_false_label_stack): Adjust prototype.
1042 * decl2.c (grok_function_init): Remove extraneous declaration of
1043 abort_fndecl.
1044
1045 * Make-lang.in (cc1plus): Remove dependency on GGC.
1046 * Makefile.in (OBJS): Don't mention ggc-simple.o.
1047 (OBJDEPS): Don't mention ggc-simple.o.
1048
1049 * Make-lang.in (cc1plus): Depend on $(GGC).
1050 * Makefile.in (OBJS): Add ggc-simple.o.
1051 (OBJDEPS): Likewise.
1052 * cp-tree.h (language_function): Rename members to `x_' versions;
1053 we now have x_named_labels, x_ctor_label, x_dtor_label,
1054 x_base_init_list, x_member_init_list, x_base_init_expr,
1055 x_current_class_ptr, x_current_class_ref, x_last_tree,
1056 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1057 x_result_rtx.
1058 (dtor_label, ctor_label, current_base_init_list,
1059 current_member_init_list, base_init_expr, current_class_ptr,
1060 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1061 * decl.c: Include ggc.h.
1062 (last_dtor_insn): Adjust to use x_ names.
1063 (last_parm_cleanup_insn): Likewise.
1064 (original_result_rtx): Likewise.
1065 (named_labels): Likewise.
1066 (mark_binding_level): New function.
1067 (mark_cp_function_context): Likewise.
1068 (mark_false_label_stack): Likewise.
1069 (lang_mark_tree): Likewise.
1070 (lang_cleanup_tree): Likewise.
1071
1072 1999-09-03 Mark Mitchell <mark@codesourcery.com>
1073
1074 * Makefile.in (CXX_TREE_H): Include function.h.
1075 (decl.o): Don't depend on function.h.
1076 (decl2.o): Likewise.
1077 (typeck.o): Likewise.
1078 (init.o): Likewise.
1079 (method.o): Likewise.
1080 * cp-tree.h: Include function.h.
1081 (cp_function): Rename to language_function. Remove next.
1082 (cp_function_chain): Make it a macro, not a variable.
1083 (push_cp_function_context): Don't declare.
1084 (pop_cp_function_context): Likewise.
1085 * decl.c: Don't include function.h.
1086 (push_cp_function_context): Make it static. Make it suitable for
1087 a save_lang_status callback.
1088 (pop_cp_function_context): Likewise.
1089 (maybe_push_to_top_level): Call push_function_context_to, not
1090 push_cp_function_context.
1091 (pop_from_top_level): Call pop_function_context_from, not
1092 pop_cp_function_context.
1093 (init_decl_processing): Set save_lang_status and
1094 restore_lang_status. Call push_function_context_to, not
1095 push_cp_function_context.
1096 (cp_function_chain): Remove.
1097 * decl2.c: Don't include function.h.
1098 * except.c: Don't include function.h.
1099 (start_anon_func): Call push_function_context_to, not
1100 push_cp_function_context.
1101 (end_anon_func): Call pop_function_context_from, not
1102 pop_cp_function_context.
1103 * init.c: Don't include function.h.
1104 * lex.c (begin_definition_of_inclass_inline): Call
1105 push_function_context_to, not push_cp_function_context.
1106 (process_next_inline): Call pop_function_context_from, not
1107 pop_cp_function_context.
1108 * method.c: Don't include function.h.
1109 (synthesize_method): Call push_function_context_to, not
1110 push_cp_function_context. Call pop_function_context_from, not
1111 pop_cp_function_context.
1112 * typeck.c: Don't include function.h.
1113
1114 * decl.c (expand_static_init): Tweak handling of static
1115 initializations for objects without constructors.
1116
1117 1999-09-03 Nathan Sidwell <nathan@acm.org>
1118
1119 * typeck.c (build_indirect_ref): Reject dereference of pointer to
1120 void.
1121
1122 1999-09-02 Mark Mitchell <mark@codesourcery.com>
1123
1124 * cp-tree.h (cp_function): Move here, from decl.c.
1125 (cp_function_chain): Declare.
1126 (dtor_label): New macro, instead of variable.
1127 (ctor_label): Likewise.
1128 (current_base_init_list): Likewise.
1129 (current_member_init_list): Likewise.
1130 (base_init_expr): Likewise.
1131 (current_class_ptr): Likewise.
1132 (current_class_ref): Likewise.
1133 (last_tree): Likewise.
1134 (last_expr_type): Likewise.
1135 (current_function_returns_value): Likewise.
1136 (current_function_returns_null): Likewise.
1137 (current_function_just_assigned_this): Likewise.
1138 (current_function_parms_stored): Likewise.
1139 (temp_name_counter): Likewise.
1140 (static_labelno): Likewise.
1141 (expanding_p): Likewise.
1142 (stmts_are_full_exprs_p): Likewise.
1143 (in_function_try_handler): Likewise.
1144 (lang_type): Remove nested type_flags. All uses changed.
1145 * call.c (ctor_label): Remove.
1146 (dtor_label): Likewise.
1147 * class.c (current_class_ptr): Remove.
1148 (current_class_ref): Likewise.
1149 * decl.c (static_labelno): Remove.
1150 (dtor_label): Likewise.
1151 (last_dtor_insn): New macro, instead of variable.
1152 (last_parm_cleanup_insn): Likewise.
1153 (original_result_rtx): Likewise.
1154 (in_function_try_handler): Remove.
1155 (named_label_uses): New macro, instead of variable.
1156 (named_labels): Likewise.
1157 (current_function_returns_value): Remove.
1158 (current_function_returns_null): Likewise.
1159 (current_function_assigns_this): New macro, instead of variable.
1160 (current_function_just_assigned_this): Likewise.
1161 (current_binding_level): Likewise.
1162 (init_decl_processing): Call push_cp_function_context.
1163 (cp_function): Move to cp-tree.h
1164 (cp_function_chain): Make it global.
1165 (temp_name_counter): Remove.
1166 (push_cp_function_context): Simplify.
1167 (pop_cp_function_context): Likewise.
1168 * decl2.c (temp_name_counter): Remove.
1169 * init_c (current_base_init_list): Likewise.
1170 (current_member_init_list): Likewise.
1171 (base_init_expr): Likewise.
1172 * method.c (static_labelno): Likewise.
1173 * pt.c (last_tree): Likewise.
1174 * semantics.c (expanding_p): Likewise.
1175 (stmts_are_full_exprs_p): Likewise.
1176 (last_expr_type): Likewise.
1177 * typeck.c (dtor_label): Likewise.
1178 (ctor_label): Likewise.
1179
1180 1999-09-01 Alex Samuel <samuel@codesourcery.com>
1181
1182 * decl2.c (arg_assoc_template_arg): New prototype. New function.
1183 (arg_assoc_class): Use arg_assoc_template_arg for template
1184 arguments.
1185 (arg_assoc): Likewise.
1186 * pt.c (mangle_class_name_for_template): Allow member template
1187 template arguments.
1188
1189 1999-09-02 Nathan Sidwell <nathan@acm.org>
1190
1191 * call.c (build_conditional_expr): Warn on enum mismatches.
1192 (convert_arg_to_ellipsis): Move non-pod check to after
1193 conversion.
1194
1195 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1196
1197 * gxx.gperf (hash, is_reserved_word): Add prototypes.
1198
1199 * init.c (build_vec_init): Initialize variable `try_block'.
1200
1201 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1202 Likewise for bzero/memset.
1203 (token_getch, token_put_back): Add static prototypes. Remove
1204 `inline' from the definitions.
1205 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1206
1207 1999-09-01 Mark Mitchell <mark@codesourcery.com>
1208
1209 * cp-tree.h (lang_type): Move align into type_flags.
1210 (CLASSTYPE_ALIGN): Adjust accordingly.
1211 * call.c (direct_reference_binding): Remove misleading comment.
1212
1213 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1214
1215 * parse.y (language_string): Constify.
1216
1217 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1218
1219 * repo.c (getpwd): Don't prototype.
1220 * xref.c (getpwd): Likewise
1221
1222 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1223
1224 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1225 Remove hacks for stuff which now comes from libiberty.
1226
1227 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
1228
1229 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1230
1231 1999-08-30 Mark Mitchell <mark@codesourcery.com>
1232
1233 * cp-tree.h (begin_init_stmts): Declare.
1234 (finish_init_stmts): Likewise.
1235 * cvt.c (build_up_reference): Wrap the declaration of a temporary
1236 in a statement-expression so that we will see it when expanding
1237 tree structure later.
1238 * init.c (begin_init_stmts): Don't make it static.
1239 (finish_init_stmts): Likewise.
1240
1241 * cp-tree.h (start_handler_parms): New function.
1242 (expand_start_catch_block): Take only one parameter.
1243 (start_handler_parms): New function.
1244 * decl.c (start_handler_parms): Define it.
1245 * except.c (process_start_catch_block): Take only one parameter.
1246 Don't call grokdeclarator here.
1247 (expand_start_catch_block): Don't call grokdeclarator here,
1248 either.
1249 * parse.y (handler_args): Adjust call to
1250 expand_start_catch_block. Use start_handler_parms.
1251 * pt.c (push_template_decl_real): Make permanent lists have
1252 permanent elements.
1253 (tsubst_expr): Adjust calls to expand_start_catch_block
1254 appropriately.
1255 * semantics.c (expand_stmt): Likewise.
1256
1257 1999-08-29 Alex Samuel <samuel@codesourcery.com>
1258
1259 * pt.c (push_template_decl_real): Use template declaration from
1260 class type if it exists.
1261
1262 1999-08-29 Mark Mitchell <mark@codesourcery.com>
1263
1264 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1265 (maybe_inject_for_scope_var): Declare it.
1266 (initialize_local_var): Likewise.
1267 * decl.c (maybe_inject_for_scope_var): Make it global.
1268 (initialize_local_var): Likewise. Move cleanup handling here,
1269 from cp_finish_decl.
1270 (make_rtl_for_nonlocal_decl): Use
1271 push_obstacks_nochange/pop_obstacks, rather than
1272 end_temporary_allocation/resume_temporary_allocation.
1273 (cp_finish_decl): Try to complete the type of a variable when it
1274 is declared. Move cleanup-handling to initialize_local_var.
1275 (expand_static_init): Use tree-building code, rather than
1276 RTL-building code.
1277 * decl2.c (get_temp_name): Assert non-initializedness of
1278 temporaries.
1279 * init.c (create_temporary_var): Move RTL-assigning code to ...
1280 (get_temp_regvar): Here.
1281 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
1282 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
1283 call initialize_local_var to generate initialization code.
1284
1285 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1286
1287 * cp-tree.h (fndecl_as_string, type_as_string,
1288 type_as_string_real, args_as_string, decl_as_string,
1289 expr_as_string, code_as_string, language_as_string,
1290 parm_as_string, op_as_string, assop_as_string, cv_as_string,
1291 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1292
1293 * errfn.c (cp_printer): Likewise.
1294
1295 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1296 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1297 cp_file_of, code_as_string, language_as_string, parm_as_string,
1298 op_as_string, assop_as_string, args_as_string, cv_as_string):
1299 Likewise.
1300
1301 * tree.c (lang_printable_name): Likewise.
1302
1303 1999-08-28 Richard Henderson <rth@cygnus.com>
1304
1305 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1306
1307 1999-08-28 Mark Mitchell <mark@codesourcery.com>
1308
1309 * cp-tree.h (strip_array_types): New function.
1310 * decl.c (maybe_deduce_size_from_array_init): New function, split
1311 out from cp_finish_decl.
1312 (layout_var_decl): Likewise.
1313 (maybe_commonize_var): Likewise.
1314 (maybe_inject_for_scope_var): Likewise.
1315 (initialize_local_var): Likewise.
1316 (build_cleanup_on_safe_obstack): Likewise.
1317 (check_initializer): Likewise.
1318 (make_rtl_for_nonlocal_decl): Likewise.
1319 (cp_finish_decl): Use them.
1320 * typeck.c (strip_array_types): New function.
1321
1322 * cp-tree.def (LABEL_STMT): New tree node.
1323 * cp-tree.h (LABEL_STMT_LABEL): New macro.
1324 (shadow_label): Remove.
1325 (declare_local_label): New function.
1326 (finish_label_decl): Likewise.
1327 * decl.c (make_label_decl): New function, split out from
1328 lookup_label.
1329 (shadowed_labels): Remove.
1330 (binding_level): Add shadowed_labels.
1331 (clear_binding_level): Remove.
1332 (push_binding_level): Just bzero the new binding level.
1333 (pushlevel): Fix indentation.
1334 (pop_label): New function.
1335 (pop_labels): Likewise, split out from poplevel.
1336 (poplevel): Pop local labels. Use pop_labels.
1337 (maybe_push_to_top_level): Don't clear shadowed_labels.
1338 (lookup_label): Use make_label_decl.
1339 (shadow_label): Remove.
1340 (declare_local_label): New function.
1341 (define_label): Simplify.
1342 (start_function): Don't clear shadowed_labels.
1343 (cp_function): Remove shadowed_labels.
1344 (push_cp_function_context): Don't save shadowed_labels.
1345 (pop_cp_function_context): Don't restore it.
1346 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1347 * parse.y (label_decl): Use finish_label_decl.
1348 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1349 declarations.
1350 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1351 building_stmt_tree.
1352 (finish_label_decl): New function.
1353 (expand_stmt): Handle LABEL_STMTs and local label declarations.
1354
1355 1999-08-26 Mark Mitchell <mark@codesourcery.com>
1356
1357 * decl.c (lookup_label): Build labels on the permanent obstack
1358 when building statement trees. Don't build RTL for labels when
1359 building statement trees.
1360 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1361 building statement trees.
1362 (finish_label_stmt): Likewise.
1363 (expand_stmt): Adjust accordingly.
1364 * pt.c (tsubst_expr); Likewise.
1365 (do_decl_instantiation): Robustify.
1366
1367 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1368 * tree.c (build_cplus_new): Set it.
1369 * expr.c (cplus_expand_expr): Use it.
1370 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1371
1372 * decl.c (store_parm_decls): Reset immediate_size_expand.
1373 (finish_function): Likewise.
1374
1375 * tree.c (cplus_unsave_expr_now): Don't return a value.
1376
1377 * semantics.c (do_poplevel): Always initialize the return value.
1378
1379 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
1380
1381 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1382 * tree.h (cplus_unsave_expr_now) : Same.
1383
1384 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1385
1386 * decl.c (grokdeclarator): Amend comment.
1387 * except.c (expand_start_catch_block): Call push_template_decl for
1388 catch-block parameters.
1389 * method.c (synthesize_method): Build an empty compound statement
1390 for the body of a constructor.
1391
1392 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
1393
1394 * tree.c (cp_build_qualified_type_real): If we're asking for the
1395 same quals we already have, just return.
1396
1397 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1398
1399 * cp-tree.def (SUBOBJECT): New tree node.
1400 * cp-tree.h (CLEANUP_P): New macro.
1401 (SUBOBJECT_CLEANUP): Likewise.
1402 (keep_next_level): Add parameter.
1403 (get_temp_regvar): Don't declare.
1404 (emit_base_init): Remove parameter.
1405 (expand_aggr_init): Rename to build_aggr_init.
1406 (expand_vec_init): Rename to build_vec_init.
1407 (do_pushlevel): Remove.
1408 (do_poplevel): Likewise.
1409 (finish_cleanup): New function.
1410 (finish_subobject): Likewise.
1411 (stmts_are_full_exprs_p): New variable.
1412 * decl.c (keep_next_level): Add parameter.
1413 (cp_finish_decl): Use build_aggr_init, not
1414 expand_aggr_init. Use finish_expr_stmt to expand the code.
1415 (expand_static_init): Use tree-generating, not RTL-generating,
1416 functions to handle the initialization.
1417 (start_function): Remove dead code. Always have a momentary
1418 obstack inside the function, even before hitting the first curly
1419 brace.
1420 (cplus_expand_expr_stmt): Move calls to
1421 expand_{start,end}_target_temps into semantics.c.
1422 (cp_function): Add stmts_are_full_exprs_p.
1423 (push_cp_function_context): Save it.
1424 (pop_cp_function_context): Restore it.
1425 * decl2.c (get_temp_regvar): Move to init.c.
1426 (do_static_initialization): Use build_{aggr,vec}_init.
1427 (do_static_destruction): Fix typo in comment.
1428 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
1429 * except.c (expand_throw): Use create_temporary_var.
1430 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
1431 * init.c (expand_vec_init_try_block): Remove.
1432 (expand_vec_init_catch_clause): Likewise.
1433 (get_temp_regvar): New function.
1434 (begin_init_stmts): Likewise.
1435 (finish_init_stmts): Likewise.
1436 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1437 structure here.
1438 (emit_base_init): Likewise. Remove unused parameter.
1439 (expand_virtual_init): Likewise.
1440 (expand_cleanup_for_base): Use finish_subobject.
1441 (expand_aggr_vbase_init_1): Simplify.
1442 (construct_virtual_bases): Use tree-generating functions to build
1443 up initialization.
1444 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1445 (expand_default_init): Likewise.
1446 (expand_aggr_init_1): Likewise.
1447 (expand_vec_init): Rename to build_vec_init.
1448 * method.c (do_build_copy_constructor): Use tree-generating
1449 functions. Don't call clear_last_expr.
1450 (do_build_assign_ref): Likewise.
1451 (synthesize_method): Call clear_last_expr here.
1452 * parse.y (base_init): Don't call clear_last_expr here.
1453 (nodecls): Likewise.
1454 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1455 * semantics.c (do_pushlevel): Move to here.
1456 (do_poplevel): Likewise.
1457 (stmts_are_full_exprs_p): New variable.
1458 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1459 (finish_for_stmt): Use finish_expr_stmt.
1460 (finish_cleanup): New function.
1461 (finish_function_try_block): Fix indentation.
1462 (finish_subobject): New function.
1463 (setup_vtbl_ptr): Call keep_next_level here.
1464 (finish_stmt_expr): Handle a block with no scope inside the
1465 statement-expression.
1466 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1467 SUBOBJECT.
1468 * tree.c (search_tree): Handle INIT_EXPR.
1469 (mapcar): Likewise.
1470 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1471 * typeck2.c (store_init_value): Change expand_aggr_init to
1472 build_aggr_init in comment.
1473
1474 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1475
1476 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1477
1478 1999-08-25 Nathan Sidwell <nathan@acm.org>
1479
1480 * decl2.c (handle_class_head): Be graceful about additional
1481 scope qualifiers. Adjust comments to reflect reality.
1482
1483 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1484
1485 * call.c (build_conditional_expr): Fix typo.
1486 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1487 lvalue before trying to mess with the sides.
1488
1489 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1490
1491 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1492
1493 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1494
1495 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1496
1497 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1498 Return arbitrary pointer or NULL.
1499 (check_eh_spec): Call __throw_type_match_rtti_2.
1500 * tinfo.h (*::dcast): Return int. Add valp parm.
1501 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1502 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1503 (__throw_type_match_rtti): Now just a wrapper.
1504
1505 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1506 (init_exception_processing): Don't initialize them.
1507
1508 1999-08-23 Paul Burchard <burchard@pobox.com>
1509
1510 * decl.c (check_default_argument): Fix typo.
1511
1512 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1513
1514 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1515
1516 * dump.c (dump_next_stmt): New function.
1517 (dequeue_and_dump): Use it.
1518
1519 * pt.c (tsubst_copy): Make sure to initialize return value for a
1520 STMT_EXPR, even when processing_template_decl.
1521 * semantics.c (finish_stmt_expr): A statement-expression whose
1522 last statement is not an expression-statement has type `void'.
1523
1524 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1525
1526 * semantics.c (finish_stmt_expr): Fix typo in comment.
1527 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1528 (mapcar): Likewise.
1529 * init.c (build_vec_delete_1): Make the children of a permanent
1530 BIND_EXPR permanent.
1531 * pt.c (register_specialization): Don't register a specialization
1532 more than once.
1533
1534 1999-08-18 Andrew Haley <aph@cygnus.com>
1535
1536 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1537 for all integer parameter types larger than long long.
1538
1539 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1540
1541 * pt.c (redeclare_class_template): Merge default template
1542 arguments in both directions.
1543
1544 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1545 compiler_error message.
1546
1547 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1548
1549 * cp-tree.h: Declare flag_use_repository.
1550 * pt.c (do_decl_instantiation): Don't complain about duplicate
1551 instantiation with -frepo.
1552 (do_type_instantiation): Likewise.
1553
1554 * pt.c (push_template_decl_real): Complain about everything
1555 that isn't a valid template.
1556
1557 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1558 affect inlines.
1559
1560 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1561
1562 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1563 * decl2.c (build_expr_from_tree): Handle it.
1564 * error.c (dump_expr): Likewise.
1565 * pt.c (for_each_template_parm): Likewise.
1566 (tsubst_copy): Likewise.
1567 * tree.c (search_tree): Likewise.
1568 * semantics.c (finish_pseudo_destructor_call): Create it.
1569
1570 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1571
1572 * search.c (setup_class_bindings): Robustify.
1573 * typeck.c (common_type): Use same_type_p, not pointer equality,
1574 to compare types.
1575
1576 * cp-tree.h (build_lang_field_decl): Remove.
1577 * class.c (build_vtable): Replace calls to build_lang_field_decl
1578 with build_lang_decl.
1579 (prepare_fresh_vtable): Likewise.
1580 (finish_struct_1): Likewise.
1581 (init_class_processing): Likewise.
1582 * decl.c (push_using_decl): Likewise.
1583 (init_decl_processsing): Likewise.
1584 (grokvardecl): Likewise.
1585 (build_ptrmemfunc_type): Likewise.
1586 (grokdeclarator): Likewise.
1587 (build_enumerator): Likewise.
1588 * decl2.c (grok_x_components): Likewise.
1589 (do_class_using_decl): Likewise.
1590 * except.c (call_eh_info): Likewise.
1591 * init.c (init_init_processing): Likewise.
1592 * rtti.c (expand_class_decl): Likewise.
1593 * tree.c (build_base_fields): Likewise.
1594 (build_vbase_pointer_fields): Likewise.
1595 * lex.c (build_lang_decl): Build declarations on the permanent
1596 obstack if we're building statmeent trees.
1597 (retrofit_lang_decl): Handle both the full lang_decl and also the
1598 smaller lang_decl_flags here.
1599 (build_lang_field_decl): Remove.
1600 * pt.c (push_template_decl_real): Issue errors for variable
1601 declarations that are not static members.
1602
1603 1999-08-18 Richard Henderson <rth@cygnus.com>
1604
1605 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1606 (mapcar): Likewise.
1607
1608 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1609
1610 * cp-tree.h (back_end_hook): New variable.
1611 * decl2.c (back_end_hook): Define it.
1612 (finish_file): If it's non-NULL, call it.
1613
1614 * decl.c (add_decl_to_level): New function.
1615 (push_local_binding): Use it.
1616 (find_binding): Fix typo in comment.
1617 (pushdecl): Use add_decl_to_level. Put templates on the
1618 corresponding namespace-scope binding levels.
1619 * dump.c (dequeue_and_dump): Print the specializations of a
1620 template.
1621 * pt.c (push_template_decl_real): Don't push a template multiple
1622 times.
1623
1624 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1625
1626 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1627 (CALL_DECLARATOR_QUALS): Likewise.
1628 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1629 * decl.c (grokdeclarator): Adjust to use them.
1630 * decl2.c (grokfield): Likewise.
1631 (reparse_absdcl_as_casts): Likewise.
1632 * lex.c (make_call_declarator): Likewise.
1633 (set_quals_and_spec): Likewise.
1634 * pt.c (tsubst): Likewise.
1635 * tree.c (mapcar): Remove special hack to handle third operand of
1636 a CALL_EXPR.
1637
1638 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1639
1640 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1641 * class.c (build_vtable): Use build_lang_field_decl to build the
1642 VAR_DECLs for vtables.
1643 (prepare_fresh_vtable): Likewise.
1644 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1645 CAN_HAVE_FULL_LANG_DECL_P.
1646 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1647 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1648 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1649 (build_lang_field_decl): Likewise.
1650 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1651 to copy.
1652
1653 * cp-tree.def (STMT_EXPR): New tree node.
1654 * cp-tree.h (STMT_EXPR_STMT): New macro.
1655 (store_return_init): Change prototype.
1656 (finish_named_return_value): New function.
1657 (expand_stmt): Likewise.
1658 (expand_body): Likewise.
1659 (begin_stmt_tree): Likewise.
1660 (finish_stmt_tree): Likewise.
1661 (expanding_p): New variable.
1662 (last_expr_type): Likewise.
1663 (building_stmt_tree): New macro.
1664 * decl.c (start_function): Use building_stmt_tree, not
1665 processing_template_decl, where appropriate.
1666 (store_parm_decls): Likewise.
1667 (store_return_init): Move most of the body to semantics.c.
1668 (finish_function): Use building_stmt_tree.
1669 (finish_stmt): Clear last_expr_type here.
1670 (cp_function): Add expanding_p, last_tree, last_expr_type.
1671 (push_cp_function_context): Save them.
1672 (pop_cp_function_context): Restore them.
1673 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1674 * error.c (dump_expr): Handle STMT_EXPR.
1675 * except.c (expand_start_catch_block): Use building_stmt_tree.
1676 Use add_decl_stmt.
1677 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1678 (do_case): Move add_tree call to semantics.c.
1679 * parse.y (return_init): Use finish_named_return_value.
1680 (for.init.statement): Use finish_expr_stmt.
1681 * parse.c: Regenerated.
1682 * pt.c (do_pushlevel): Move to semantics.c.
1683 (do_poplevel): Likewise.
1684 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1685 (tsubst_expr): Don't expand all the way to RTL here. Handle
1686 RETURN_INIT and CTOR_INITIALIZER.
1687 (instantiate_decl): Call expand_body after tsubst'ing into
1688 DECL_SAVED_TREE.
1689 * semantics.c (expand_stmts): New function.
1690 (expanding_p): New variable.
1691 (last_expr_type): Likewise.
1692 (finish_expr_stmt): Use building_stmt_tree.
1693 (begin_if_stmt): Likewise.
1694 (finish_if_stmt_cond): Likewise.
1695 (finish_then_clause): Likewise.
1696 (begin_else_clause): Likewise.
1697 (finish_else_clause): Likewise.
1698 (begin_while_stmt): Likewise.
1699 (finish_while_stmt_cond): Likewise.
1700 (finish_while_stmt): Likewise.
1701 (finish_do_body): Likewise.
1702 (finish_do_stmt): Likewise.
1703 (finish_return_stmt): Likewise.
1704 (begin_for_stmt): Likewise.
1705 (fnish_for_init_stmt): Likewise.
1706 (finish_for_cond): Likewise.
1707 (finish_for_expr): Likewise.
1708 (finish_for_stmt): Likewise.
1709 (finish_break_stmt): Likewise.
1710 (finish_continue_stmt): Likewise.
1711 (finish_switch_cond): Likewise.
1712 (finish_switch_stmt): Likewise.
1713 (finish_case_label): Call add_tree here if necessary.
1714 (finish_goto_statement): Use building_stmt_tree.
1715 (begin_try_block): Likewise.
1716 (begin_function_try_block): Likewise.
1717 (finish_try_block): Likewise.
1718 (finish_function_try_block): Likewise.
1719 (finish_handler_sequence): Likewise.
1720 (finish_function_handler_sequence): Likewise.
1721 (begin_handler): Likewise.
1722 (finish_handler_parms): Likewise.
1723 (finish_handler): Likewise.
1724 (begin_compound_stmt): Likewise.
1725 (finish_compound_stmt): Likewise.
1726 (finish_asm_stmt): Likewise.
1727 (finish_label_stmt): Likewise.
1728 (finish_named_return_value): New function.
1729 (setup_vtbl_ptr): Moved here from decl2.c.
1730 (do_pushlevel): Moved here from pt.c.
1731 (do_poplevel): Likewise.
1732 (begin_stmt_expr): Use building_stmt_tree.
1733 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
1734 when building_stmt_tree.
1735 (begin_stmt_tree): New function.
1736 (finish_stmt_tree): Likewise.
1737 (expand_stmt): Likewise.
1738 (expand_body): Likewise.
1739 * tree.c (build_cplus_method_type): Make sure the argument types
1740 end up on the same obstack as the METHOD_TYPE.
1741 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1742 THROW_EXPR, STMT_EXPR.
1743 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
1744 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
1745 sorry, if an unsupported node is encountered.
1746 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1747 (c_expand_return): Don't call add_tree here.
1748
1749 1999-08-15 Mark Mitchell <mark@codesourcery.com>
1750
1751 * pt.c (check_default_tmpl_args): Don't check in local scopes.
1752 (tsubst_decl): Make sure the declaration is on a saveable
1753 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1754 variable.
1755 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1756
1757 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
1758
1759 Speed up Koenig lookup.
1760 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
1761 to return namespaces we've looked at.
1762 * decl2.c (lookup_using_namespace): Likewise.
1763 (add_function): Don't call ovl_member.
1764 (lookup_arg_dependent): Initialize k.namespaces to the list of
1765 namespaces seen in unqualified lookup.
1766 * call.c (equal_functions): Move here from tree.c.
1767 (joust): Use it to handle duplicate candidates.
1768 * tree.c (ovl_member): Use ==.
1769
1770 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1771
1772 * cp-tree.def (DECL_STMT): Make it smaller.
1773 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1774 (lang_decl): ... here. Add next.
1775 (DECL_SAVED_TREE): Adjust accordingly.
1776 (DECL_IMPLICIT_TYPEDEF_P): New macro.
1777 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1778 (DECL_STMT_DECL): Likewise.
1779 (create_implicit_typedef): New function.
1780 (maybe_push_decl): Likewise.
1781 (tsubst_default_argument): New function.
1782 (at_function_scope_p): Likewise.
1783 (add_decl_stmt): Likewise.
1784 (push_permanent_obstack): Likewise.
1785 * call.c (convert_default_arg): Use tsubst_default_argument.
1786 * class.c (add_method): Use push_permanent_obstack.
1787 (build_self_reference): Create a TEMPLATE_DECL for the
1788 self-reference, if necessary.
1789 * decl.c (pseudo_global_level_p): Only look at the current binding
1790 level.
1791 (push_binding): Use push_permanent_obstack.
1792 (create_implicit_typedef): New function.
1793 (pushtag): Use it.
1794 (duplicate_decls): Use push_permanent_obstack.
1795 (maybe_push_decl): New function.
1796 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
1797 (start_decl_1): Remove dead code.
1798 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
1799 pseudo_global_level_p.
1800 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1801 template.
1802 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
1803 pseudo_global_level_p.
1804 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1805 a template.
1806 (get_sentry): Use push_permanent_obstack.
1807 * dump.c (dequeue_and_dump): Enable DECL_STMT.
1808 * except.c (call_eh_info): Use push_permanent_obstack.
1809 (build_eh_type_ref): Likewise.
1810 (do_pop_exception): Likewise.
1811 (expand_eh_spec): Likewise.
1812 (alloc_eh_object): Likewise.
1813 (expand_throw): Likewise.
1814 * init.c (build_java_class_ref): Likewise.
1815 * lex.c (get_time_identifier): Likewise.
1816 (free_lang_decl_chain): Correct type.
1817 (retrofit_lang_decl): Adjust accordingly.
1818 (build_lang_field_decl): Likewise.
1819 * lex.h (free_lang_decl_chain): Likewise.
1820 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1821 * parse.c: Regenerated.
1822 * pt.c (tsubst_default_arguments): New function.
1823 (retrieve_local_specialization): Likewise.
1824 (register_local_specialization): Likewise.
1825 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
1826 pseudo_global_level_p to determine whether or not a template is
1827 primary.
1828 (lookup_template_class): Likewise. Use create_implicit_typedef.
1829 (instantiate_class_template): Call tsubst_default_arguments for
1830 member functions, if appropriate.
1831 (tsubst_default_argument): New function.
1832 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
1833 * search.c (at_function_scope_p): New function.
1834 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1835 (finish_label_stmt): Likewise.
1836 (add_decl_stmt): New function.
1837 (begin_class_definition): Likewise.
1838 (finish_typeof): Likewise.
1839 * tree.c (copy_template_template_parm): Likewise.
1840 (copy_to_permanent): Likewise.
1841 (push_permanent_obstack): Define.
1842 (mark_addressable): Use it.
1843 * typeck.c (mark_addressable): Likewise.
1844
1845 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
1846
1847 * cp-tree.h (init_cplus_unsave): New.
1848 (cplus_unsave_expr_now): New.
1849 * lex.c (init_parse): Call init_cplus_unsave.
1850 * tree.c (init_cplus_unsave): New.
1851 (cplus_unsave_expr_now): New.
1852
1853 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1854
1855 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
1856 decl_constant_value to simplify array bounds.
1857
1858 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
1859
1860 * lang-options.h: Add -fms-extensions.
1861 * cp-tree.h: Declare flag_ms_extensions.
1862 * decl2.c: Define it.
1863 * class.c (instantiate_type): Don't complain about taking the address
1864 of a bound member function if -fms-extensions.
1865 * typeck.c (build_unary_op): Likewise.
1866 * decl.c (grokdeclarator): Or about implicit int.
1867 * init.c (resolve_offset_ref): Or about implicit '&'.
1868
1869 1999-08-11 Mark Mitchell <mark@codesourcery.com>
1870
1871 * cp-tree.h (minimal_parse_mode): Remove.
1872 (finish_label_stmt): New function.
1873 * decl.c (saved_scope): Remove minimal parse mode.
1874 (maybe_push_to_top_level): Don't save it.
1875 (pop_from_top_level): Don't restore it.
1876 (define_label): Split out template-handling code to semantics.c.
1877 (start_decl): Don't use minimal_parse_mode.
1878 (cp_finish_decl): Likewise.
1879 (start_function): Don't increment it.
1880 (store_return_init): Don't use it.
1881 (finish_function): Don't decrement it.
1882 * parse.y (label_colon): Use finish_label_stmt throughout.
1883 * parse.c: Regenerated.
1884 * pt.c (minimal_parse_mode): Don't define it.
1885 (tsubst_expr): Use finish_label_stmt.
1886 * semantics.c (finish_label_stmt): New function.
1887
1888 * dump.c (queue): Be careful when computing bitmasks.
1889 (dequeue_and_dump): Describe binfos as binfos, not as
1890 vectors.
1891
1892 * parse.y (pedantic): Give it itype. Adjust usage accordingly
1893 throughout.
1894 * parse.c: Regenerated.
1895
1896 * Make-lang.in (CXX_SRCS): Remove sig.c.
1897 * Makefile.in (CXX_OBJS): Remove sig.o.
1898 (sig.o): Remove.
1899 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1900 (CPTI_SIGNATURE_TYPE): Likewise.
1901 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1902 (opaque_type_node): Likewise.
1903 (signature_type_node): Likewise.
1904 (sigtable_entry_type): Likewise.
1905 (flag_handle_signatures): Likewise.
1906 (lang_type): Remove is_signature, is_signature_pointer,
1907 is_signature_reference, has_opaque_typedecls,
1908 sigtables_has_been_generated. Adjust dummy. Remove signature,
1909 signature_pointer_to, signature_reference_to.
1910 (IS_SIGNATURE): Remove.
1911 (SET_SIGNATURE): Remove.
1912 (CLEAR_SIGNATURE): Remove.
1913 (IS_SIGNATURE_POINTER): Remove.
1914 (IS_SIGNATURE_REFERENCE): Remove.
1915 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1916 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1917 (CLASSTYPE_SIGNATURE): Remove.
1918 (SIGNATURE_TYPE): Remove.
1919 (SIGNATURE_METHOD_VEC): Remove.
1920 (SIGNATURE_POINTER_TO): Remove.
1921 (SIGNATURE_REFERENCE_TO): Remove.
1922 (lang_decl_flags): Remove is_default_implementation. Rename
1923 memfunc_pointer_to to saved_tree.
1924 (IS_DEFAULT_IMPLEMENTATION): Remove.
1925 (DECL_MEMFUNC_POINTER_TO): Remove.
1926 (DECL_MEMFUNC_POINTING_TO): Remove.
1927 (DECL_SAVED_TREE): Adjust definition.
1928 (tag_types): Remove signature_type_node.
1929 (SIGNATURE_FIELD_NAME): Remove.
1930 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1931 (SIGNATURE_OPTR_NAME): Likewise.
1932 (SIGNATURE_SPTR_NAME): Likewise.
1933 (SIGNATURE_POINTER_NAME): Likewise.
1934 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1935 (SIGNATURE_REFERENCE_NAME): Likewise.
1936 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1937 (SIGTABLE_PTR_TYPE): Likewise.
1938 (SIGTABLE_NAME_FORMAT): Likewise.
1939 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1940 (SIGTABLE_TAG_NAME): Likewise.
1941 (SIGTABLE_VB_OFF_NAME): Likewise.
1942 (SIGTABLE_VT_OFF_NAME): Likewise.
1943 (finish_base_specifiers): Change prototype.
1944 (build_signature_pointer_type): Remove.
1945 (build_signature_reference_type): Remove.
1946 (build_signature_pointer_constructor): Remove.
1947 (build_signature_method_call): Remove.
1948 (build_optr_ref): Likewise.
1949 (append_signature_fields): Likewise.
1950 (signature_error): Likewise.
1951 * call.c (build_this): Remove signature support.
1952 (build_over_call): Likewise.
1953 (build_new_method_call): Likewise.
1954 * class.c (add_implicitly_declared_members): Likewise.
1955 (finish_struct_1): Likewise.
1956 (finish_struct): Likewise.
1957 * cvt.c (cp_convert_to_pointer): Likewise.
1958 (convert_to_pointer_force): Likewise.
1959 (ocp_convert): Likewise.
1960 * decl.c (sigtable_decl_p): Remove.
1961 (init_decl_processing): Remove support for signatures.
1962 (cp_finish_decl): Likewise.
1963 (grokdeclarator): Likewise.
1964 (grokparms): Likewise.
1965 (xref_tag): Likewise.
1966 (start_function): Likewise.
1967 (start_method): Likewise.
1968 * decl2.c (finish_sigtable_vardecl): Remove.
1969 (flag_handle_signatures): Remove.
1970 (lang_f_options): Remove handle-signatures.
1971 (grokfield): Remove support for signatures.
1972 (grokbitfield): Likewise.
1973 (finish_file): Likewise.
1974 (reparse_absdcl_as_casts): Likewise.
1975 * error.c (dump_type_real): Likewise.
1976 (dump_function_decl): Likewise.
1977 * friend.c (make_friend_class): Likewise.
1978 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1979 * hash.h: Regenerated.
1980 * init.c (build_new_1): Remove support for signatures.
1981 * lang-options.h: Remove -fhandle-signatures,
1982 -fno-handle-signatures.
1983 * lex.c (init_parse): Remove support for signatures.
1984 (yyprint): Likewise.
1985 * lex.h (rid): Remove RID_SIGNATURE.
1986 * method.c (build_decl_overload_real): Remove support for
1987 signatures.
1988 (hack_identifier): Likewise.
1989 * parse.y (base_class): Likewise.
1990 (base_class.1): Likewise.
1991 (access_specifier): Likewise.
1992 * search.c (lookup_member): Likewise.
1993 * semantics.c (finish_qualified_object_call_expr): Likewise.
1994 (finish_template_type_parm): Likewise.
1995 (begin_class_definition): Likewise.
1996 (finish_base_specifier): Likewise.
1997 * sig.c: Remove.
1998 * tree.c (build_cplus_method_type): Remove support for signatures.
1999 * typeck.c (require_complete_type): Likewise.
2000 (c_sizeof): Likewise.
2001 (c_alignof): Likewise.
2002 (build_object_ref): Likewise.
2003 (build_component_ref): Likewise.
2004 (build_indirect_ref): Likewise.
2005 (build_c_cast): Likewise.
2006 (build_modify_expr): Likewise.
2007 (convert_for_initialization): Likewise.
2008 * typeck2.c (signature_error): Remove.
2009 (store_init_value): Remove support for signatures.
2010 (digest_init): Likewise.
2011 (build_x_arrow): Likewise.
2012 (build_functional_cast): Likewise.
2013 * xref.c (GNU_xref_decl): Likewise.
2014
2015 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2016
2017 * lex.c (do_identifier): Remove unnecessary lookup of class field.
2018
2019 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
2020
2021 * decl2.c (set_decl_namespace): Do not complain about non-matching
2022 decls if processing a template.
2023
2024 1999-08-09 Mark Mitchell <mark@codesourcery.com>
2025
2026 * decl.c (build_ptrmemfunc_type): Handle qualified
2027 pointer-to-member types here.
2028 * tree.c (cp_build_qualified_type_real): Simplify handling here.
2029
2030 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2031
2032 * lex.c (lang_identify): Likewise.
2033
2034 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
2035
2036 * Makefile.in: Update dependencies.
2037 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2038 NULL_RTX.
2039 * decl.c: Include "function.h"
2040 (cleanup_label, return_label): Delete declarations.
2041 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2042 (finish_function): Rename last_parm_insn variable to
2043 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
2044 * decl2.c: Include "function.h".
2045 (rtl_expr_chain): Delete declaration.
2046 * method.c: Include "function.h"
2047 * tree.c (build_vbase_pointer_fields): Don't initialize
2048 DECL_SAVED_INSNS with NULL_RTX.
2049 * typeck.c: Include "function.h"
2050
2051 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
2052
2053 * semantics.c (begin_function_try_block, finish_function_try_block,
2054 finish_function_handler_sequence): New fns.
2055 * parse.y (function_try_block): Use them.
2056 * pt.c (instantiate_decl): Likewise.
2057
2058 * cp-tree.h: Declare in_function_try_handler.
2059 * decl.c: Define it.
2060 (start_function): Clear it.
2061 (struct cp_function, push_cp_function_context): Save it.
2062 (pop_cp_function_context): Restore it.
2063 * parse.y (function_try_block): Set and clear it.
2064 * except.c (expand_end_catch_block): Rethrow if we reach the end
2065 of a function-try-block handler in a ctor or dtor.
2066 * typeck.c (c_expand_return): Complain about returning from a
2067 function-try-block handler of a ctor.
2068
2069 * parse.y (function_try_block): Call end_protect_partials
2070 before expand_start_all_catch.
2071
2072 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
2073
2074 * decl.c (struct binding_level): Add eh_region field.
2075 (push_binding_level): Set it.
2076 (define_label): Complain about jumping into an EH block.
2077
2078 * ptree.c (print_lang_type): Print the real type of a PMF.
2079 Print what exceptions a fn type throws.
2080
2081 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2082
2083 * class.c (count_fields, add_fields_to_vec): Add static prototype.
2084
2085 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2086 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2087 char*.
2088
2089 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2090 Constify a char*.
2091
2092 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2093 char*.
2094
2095 * dump.c (queue_and_dump_index, dump_int, dump_string,
2096 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2097 a char*.
2098 (dump_stmt): Add static prototype.
2099
2100 * errfn.c (cp_thing): Constify a char*.
2101
2102 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2103 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2104 dump_expr): Constify a char*.
2105
2106 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2107 read_line_number): Add static prototype.
2108 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2109 (real_yylex): Move label `letter' into the scope where it is used.
2110
2111 * method.c (build_mangled_template_parm_index, build_overload_int,
2112 build_decl_overload_real, get_id_2): Constify a char*.
2113
2114 * search.c (check_final_overrider): Make static.
2115
2116 * typeck.c (composite_pointer_type): Constify a char*.
2117
2118 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2119
2120 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2121 we're looking at a class.
2122
2123 * decl.c (lookup_name_real): Set the complain flag if we're
2124 looking for a namespace member.
2125
2126 * lex.c (real_yylex): We can have a number with no digits.
2127
2128 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2129
2130 * search.c (binfo_from_vbase): New fn.
2131 * cp-tree.h: Declare it.
2132 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2133 from pointer to member of virtual base.
2134 * typeck.c (get_delta_difference): Likewise.
2135
2136 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
2137
2138 * pt.c (tsubst): Use build_index_type to build in-template array
2139 index type. Fixes g++.oliva/dwarf1.C.
2140 * decl.c (grokdeclarator): Likewise, just for consistency, as it
2141 doesn't seem to trigger the bug without it.
2142
2143 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
2144
2145 * typeck2.c (add_exception_specifier): Use complete_type.
2146
2147 1999-08-06 Mark Mitchell <mark@codesourcery.com>
2148
2149 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2150 (dump_binary_op): Bulletproof.
2151 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2152 * tree.c (search_tree): Don't enumerate all the nodes of classes
2153 `1', `2', and `<'; handle them generically. Don't be sorry about
2154 "unrecognized tree codes"; just abort.
2155 (no_linkage_check): Don't do linkage checks for templates.
2156
2157 * tree.c (cp_build_qualified_type_real): Handle
2158 pointer-to-member-function types correctly.
2159
2160 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
2161
2162 * decl.c (pushdecl): Only give an error for shadowing a parm
2163 from *this* function.
2164
2165 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
2166
2167 * typeck2.c: Update URLs and mail addresses.
2168
2169 1999-08-04 Nathan Sidwell <nathan@acm.org>
2170
2171 * cp-tree.h (empty_except_spec): New global var.
2172 (compexcepttypes): Remove prototype.
2173 (comp_except_specs): Prototype new global function.
2174 (add_exception_specifier): Prototype new global function.
2175 * decl.c (empty_except_spec): Define new global var.
2176 (duplicate_decls): Use comp_except_specs, reword error message.
2177 (init_decl_processing): Initialize empty_except_spec.
2178 Adjust build_exception_variant calls.
2179 * parse.y (exception_specification_opt): Use empty_except_spec.
2180 (ansi_raise_identifier): Call check_for_new_type.
2181 (ansi_raise_identifiers): Use add_exception_specifier.
2182 * pt.c (tsubst): Use add_exception_specifier to build exception
2183 specifier.
2184 * search.c (check_final_overrider): New static function, broken
2185 out of get_matching_virtual. Check throw specifiers, reword
2186 diagnostics.
2187 (get_matching_virtual): Use check_final_overrider.
2188 * tree.c (build_exception_variant): Use comp_except_specs.
2189 * typeck.c (compexcepttypes): Remove.
2190 (comp_except_types): New static function, helper for
2191 comp_except_specs. Compare two types as exception specifiers.
2192 (comp_except_specs): New global function, compare two exception
2193 specifiers.
2194 (comptypes): Adjust for comp_except_specs.
2195 * typeck2.c (add_exception_specifier): New global function.
2196
2197 * class.c (check_for_override): Reword error message.
2198
2199 1999-08-03 Nathan Sidwell <nathan@acm.org>
2200
2201 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2202 * cp-tree.h (struct lang_type): Added non_pod_class flag.
2203 (CLASSTYPE_NON_POD_P): New macro to access it.
2204 * class.c (finish_struct_1): Determine non-PODness.
2205 Check for arrays of pointers (-Weffc++).
2206 Remove array inspection duplicated code.
2207 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2208 Use CLASSTYPE_NON_POD_P.
2209
2210 1999-08-03 Nathan Sidwell <nathan@acm.org>
2211
2212 * class.c (duplicate_tag_error): Preserve template information.
2213
2214 1999-08-03 Nathan Sidwell <nathan@acm.org>
2215
2216 * decl.c (start_enum): Show location of previous definition.
2217 * parse.y (enumlist_opt): New reduction.
2218 (structsp): Simplify enum rules to use enumlist_opt.
2219
2220 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
2221
2222 * lex.c (yyprint): Handle PFUNCNAME.
2223
2224 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2225 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2226
2227 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
2228
2229 * decl.c (start_decl): Set attributes before duplicate_decls call.
2230
2231 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2232
2233 * Make-lang.in (CXX_SRCS): Add dump.c.
2234 * Makefile.in (CXX_OBJS): Add dump.o.
2235 (dump.o): New target.
2236 * cp-tree.h (DECL_CONV_FN_P): Document.
2237 (DECL_OVERLOADED_OPERATOR_P): New function.
2238 (TYPE_PTRMEM_CLASS_TYPE): New macro.
2239 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2240 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2241 (ASM_VOLATILE_P): New macro.
2242 (STMT_LINENO): Likewise.
2243 (cp_namespace_decls): New function.
2244 (dump_node_to_file): New function.
2245 * decl.c (cp_namespace_decls): New function.
2246 (walk_namespaces_r): Use it.
2247 (wrapup_globals_for_namespace): Likewise.
2248 * decl2.c (flag_dump_translation_unit): New variable.
2249 (lang_decode_option): Handle -fdump-translation-unit.
2250 (finish_file): If flag_dump_translation_unit is set, dump the
2251 translation unit.
2252 * dump.c: New file.
2253 * lang-options.h: Add -fdump-translation-unit.
2254 * pt.c (tsubst_template_parms): Robustify.
2255 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2256 (tsubst_expr): Use STMT_LINENO.
2257 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
2258 for invalid cv-qualifiers even while building templates.
2259
2260 1999-08-02 Richard Henderson <rth@cygnus.com>
2261
2262 * call.c: Include defaults.h instead of expr.h.
2263 * decl.c: Likewise.
2264 * pt.c: Likewise.
2265 * typeck.c: Include defaults.h.
2266
2267 1999-08-02 Mark Mitchell <mark@codesourcery.com>
2268
2269 * lex.c (errorcount, sorrycount): Don't declare.
2270 * repo.c (errorcount, sorrycount): Likewise.
2271 * typeck2.c (errorcount, sorrycount): Likewise.
2272
2273 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
2274
2275 * call.c (convert_default_arg, build_over_call): Change all uses of
2276 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2277 Ensure expr.h is included.
2278 * decl.c (grokparams): Ditto.
2279 * pt.c (tsubst_decl): Ditto.
2280 * typeck.c (convert_arguments): Ditto.
2281
2282 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
2283
2284 * class.c (mark_overriders): Fix order of args to overrides.
2285 (warn_hidden): Likewise. Fix for having virtual and non-virtual
2286 functions with the same name.
2287
2288 1999-08-02 Richard Henderson <rth@cygnus.com>
2289
2290 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2291
2292 1999-08-01 Mark Mitchell <mark@codesourcery.com>
2293
2294 * call.c (build_conditional_expr): Fix typo in comment.
2295
2296 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
2297
2298 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2299 case_stack; use in_control_zone_p.
2300 * typeck.c (c_expand_return): Likewise.
2301
2302 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
2303
2304 * except.c (catch_clauses): Delete declaration.
2305
2306 1999-07-30 Mark Mitchell <mark@codesourcery.com>
2307
2308 * call.c (build_conditional_expr): Call convert_from_reference to
2309 avoid reference/non-reference type confusion. Fix typo.
2310
2311 1999-07-30 Richard Henderson <rth@cygnus.com>
2312
2313 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2314 * cp-tree.h (initializer_constant_valid_p): Remove.
2315
2316 1999-07-28 Mark Mitchell <mark@codesourcery.com>
2317
2318 * call.c (conditional_conversion): Don't build BASE_CONVs for
2319 conversions between things that have the same type.
2320 (build_conditional_expr): Tweak.
2321 (convert_like): Some BASE_CONVs really do require the generation
2322 of code.
2323
2324 * init.c (perform_member_init): Don't go through build_modify_expr
2325 for simple initializations.
2326
2327 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
2328
2329 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2330 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2331 virtual functions and MI. Simplify.
2332
2333 * method.c: Remove prototype for largest_union_member.
2334 * pt.c (determine_specialization): Fix uninitialized warning.
2335 * lex.c (real_yylex): Likewise.
2336
2337 1999-07-27 Mark Mitchell <mark@codesourcery.com>
2338
2339 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2340 here too.
2341
2342 * cp-tree.h (BINFO_VIRTUALS): Document new format.
2343 * class.c (modify_one_vtable): Change prototype accordingly.
2344 (modify_all_vtables): Likewise.
2345 (modify_all_direct_vtables): Likewise.
2346 (modify_all_indirect_vtables): Likewise.
2347 (build_vtable_entry_for_fn): New function.
2348 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2349 (modify_vtable_entry): Likewise.
2350 (add_virtual_function): Likewise.
2351 (build_vtbl_initializer): New function.
2352 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2353 (fixup_vtable_deltas1): Likewise.
2354 (fixup_vtable_deltas): Likewise.
2355 (override_one_vtable): Likewise.
2356 (finish_struct_1): Likewise.
2357
2358 * error.c (dump_expr): Likewise.
2359 * search.c (get_abstract_virtuals_1): Likewise.
2360 (get_abstract_virtuals): Likewise.
2361 (expand_upcast_fixups): Likewise.
2362 * tree.c (debug_binfo): Likewise.
2363 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2364 __pure_virtual here.
2365
2366 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2367
2368 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2369 as per 1999-07-26 change.
2370
2371 * typeck.c (c_sizeof): Don't allow non-static data members.
2372 (expr_sizeof): Likewise.
2373
2374 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
2375
2376 * input.c (feed_input): Only touch lineno and input_filename
2377 if !USE_CPPLIB. Save the old values before setting the new ones.
2378
2379 * input.c (feed_input): Add file, line parms.
2380 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2381 (real_yylex): Check linemode before input_redirected().
2382
2383 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2384 from op new to warning.
2385
2386 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2387
2388 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2389 * call.c: All uses changed.
2390 * typeck.c: Likewise.
2391
2392 1999-07-26 Nathan Sidwell <nathan@acm.org>
2393
2394 * exception.cc (__cplus_type_matcher): Match __eh_matcher
2395 prototype.
2396
2397 1999-07-26 Mark Mitchell <mark@codesourcery.com>
2398
2399 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
2400 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
2401 (strip_top_quals): Declare.
2402 (ncp_convert): Likewise.
2403 (type_after_usual_arithmetic_converions): Likewise.
2404 (composite_pointer_type): Likewise.
2405 * call.c (strip_top_quals): Don't make it static.
2406 (promoted_arithmetic_type_p): New function.
2407 (conditional_conversion): Likewise.
2408 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
2409 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
2410 for converting a type to itself.
2411 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
2412 (implicit_conversion): Make sure the from and to types are
2413 complete.
2414 (add_builtin_candidate): Correct handling of ?: operator.
2415 (add_builtin_candidates): Improve documentation.
2416 (build_conditional_expr): New function.
2417 (can_convert): Implement in terms of can_convert_arg.
2418 (ncp_convert): New function.
2419 * typeck.c (type_after_usual_arithmetic_conversions): New
2420 function, split out from common_type.
2421 (composite_pointer_type): New function, split out from
2422 build_conditional_expr.
2423 (common_type): Use type_after_usual_arithmetic_conversions.
2424 Remove redundant attribute merging.
2425 (comptypes): Tidy. Handle COMPLEX_TYPE.
2426 (build_binary_op_nodefault): Use null_ptr_cst_p.
2427 (build_conditional_expr): Remove.
2428 (convert_for_assignment): Use new conversion functions.
2429
2430 * cp-tree.h (abstract_virtuals_error): Change declaration.
2431 * typeck2.c (abstract_virtuals_error): Check to see if an error
2432 ocurred, and return a boolean value accordingly.
2433 (build_functional_cast): Adjust accordingly.
2434 * class.c (finish_struct_1): Likewise.
2435 * cvt.c (ocp_convert): Likewise.
2436 * decl.c (cp_finish_decl): Likewise.
2437 (grokparams): Likewise.
2438 (grok_op_properties): Likewise.
2439 (start_function): Likewise.
2440 * init.c (build_new_1): Likewise.
2441
2442 * pt.c (unify): Don't get confused by pointers-to-member functions.
2443
2444 * search.c (build_cplus_new): Robustify.
2445
2446 1999-07-24 Richard Henderson <rth@cygnus.com>
2447
2448 * gxx.gperf (__builtin_va_arg): New.
2449 * parse.y (VA_ARG): New token.
2450 (unary_expr): Recognize it.
2451
2452 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2453
2454 * g++FAQ.texi: Deleted per Joe Buck's request.
2455 * Makefile.in: Corresponding changes.
2456
2457 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2458
2459 * lex.c: Sync with C frontend.
2460 (whitespace_cr): New fn.
2461 (skip_white_space): Use it.
2462 (init_parse): Reorder.
2463 (yyprint): Support CONSTANT.
2464 (pragma_getc, pragma_ungetc): Bring back.
2465 (read_line_number): Change in_system_header directly.
2466 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2467 (parse_float): Update to C version.
2468 (yylex): Handle '$' under the letter case.
2469 Remove looking_for_typename handling.
2470 Support hex floating point constants.
2471 Follow C's lead for choosing type of integer constants.
2472 Rearrange stuff to match C frontend.
2473 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2474 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2475
2476 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2477
2478 * call.c (reference_binding): Tweak.
2479 (mayble_handle_implicit_object): Use direct_reference_binding to
2480 create the right implicit conversion sequence.
2481
2482 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2483
2484 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2485 if we're converting to a reference type.
2486
2487 * call.c (NEED_TEMPORARY_P): New macro.
2488 (standard_conversion): Set it, for derived-to-base conversions.
2489 (reference_related_p): New function.
2490 (reference_compatible_p): Likewise.
2491 (convert_class_to_reference): Likewise.
2492 (direct_reference_binding): Likewise.
2493 (reference_binding): Rework for standards-compliance.
2494 (convert_like): Adjust accordingly.
2495 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2496 are now built up in reference_binding.
2497 (initialize_reference): New function.
2498 * cp-tree.h (ICS_USER_FLAG): Document.
2499 (ICS_THIS_FLAG): Likewise.
2500 (ICS_BAD_FLAG): Likewise.
2501 (NEED_TEMPORARY_P): Likewise.
2502 (cp_lvalue_kind): New type.
2503 (real_lvalue_p): Return it.
2504 * error.c (dump_expr): Provide more accurate representation for
2505 AGGR_INIT_EXPRs.
2506 * init.c (expand_default_init): Do not try to perform implicit
2507 conversions for a brace-enclosed initializer.
2508 * search.c (lookup_conversions): Document.
2509 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2510 appropriately.
2511 (real_lvalue_p): Adjust accordingly.
2512 (lvalue_p): Likewise.
2513 (build_cplus_new): Don't allow the creation of an abstract class.
2514 * typeck.c (convert_for_initialization): Use initialize_reference.
2515
2516 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2517
2518 * lex.c (real_yylex) : Correct the test for overflow when lexing
2519 integer literals.
2520
2521 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2522
2523 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2524 not DECL_BUILT_IN, to determine if a function is internally declared.
2525 (duplicate_decls): Likewise. Improve handling of builtins.
2526 (push_overloaded_decl): Remove special handling of builtins.
2527
2528 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2529
2530 * decl.c (grokdeclarator): Pull out decl_constant_value in
2531 templates, too.
2532
2533 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2534 * cp-tree.h, pt.c, semantics.c: Adjust.
2535 * method.c (largest_union_member): Remove.
2536
2537 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2538
2539 * lex.c (token_getch, token_put_back): New fns.
2540 (real_yylex): Use them.
2541
2542 * lex.c (lang_init): Generalize.
2543 (lang_init_options): Tell cpplib this is C++.
2544 (nextchar): Remove. Replace uses with put_back.
2545 (skip_white_space): Handle linemode here. Optimize for cpplib.
2546 (extend_token_buffer_to): New fn.
2547 (extend_token_buffer): Use it.
2548 (read_line_number, check_newline): Just deal with tokens.
2549 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2550 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2551 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2552 * parse.y (PAREN_STAR_PAREN): Remove.
2553 * input.c: Don't use the putback machinery with cpplib.
2554 (sub_getch): Fold back into getch.
2555 (getch): Don't handle linemode here.
2556 (feed_input): Unget any text in the token buffer.
2557
2558 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2559 nextyychar, nextyylval): Remove.
2560
2561 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2562 Jason Merrill <jason@yorick.cygnus.com>
2563
2564 * lex.c (indent_level): New variable.
2565 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2566 (consume_string): Make this smart about USE_CPPLIB.
2567 (yyungetc): Use put_back function.
2568 (pragma_getc, pragma_ungetc): Functions deleted.
2569 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2570 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2571 pragma_ungetc.
2572 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2573 Also, clean up cases where we redundantly set token_buffer[0].
2574 (read_line_number): New fn.
2575 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2576 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2577 (sub_getch): Conditionalize out code that's not appropriate if
2578 USE_CPPLIB.
2579 (put_back): Rewrite in case USE_CPPLIB is defined.
2580 (input_redirected): Ditto.
2581
2582 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2583
2584 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2585 c_global_trees and accessor macros defined in c-common.h.
2586 (cp_tree_index): New enumeration.
2587 (cp_global_trees): Declare new array. Add accessor macros for it, and
2588 delete declarations of tree nodes replaced by it.
2589 (builtin_function): Delete macro, add declaration for new function.
2590 Include c-common.h.
2591 * decl.c: Delete definitions for tree nodes that were replaced by
2592 cp_global_trees and c_global_trees.
2593 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2594 to generate the common builtins here.
2595 (builtin_function): New function.
2596 * decl2.c (abort_fndecl): Delete declaration.
2597 * except.c (expand_builtin_return_address): Delete declaration.
2598 (builtin_return_address_fndecl): Delete variable.
2599 (const_ptr_type_node): Delete declaration.
2600 * lex.c (cons_up_default_function): Delete declaration of
2601 void_list_node.
2602 * parse.y (void_list_node): Delete declaration.
2603 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2604 Delete variables.
2605 (const_string_type_node): Delete declaration.
2606 * search.c (abort_fndecl): Delete declaration.
2607 * Makefile.in: Update dependencies.
2608
2609 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2610
2611 * pt.c (check_default_tmpl_args): Move test for missing default
2612 arguments here, from ...
2613 (end_template_parm_list): Here.
2614
2615 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2616
2617 * decl.c (lookup_nested_type): Remove.
2618 (pushtag): Don't call it.
2619
2620 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2621
2622 * Makefile.in (INTERFACE): Bump to 2.
2623
2624 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2625
2626 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2627 instructions to gcc.gnu.org. Removed e-mail address.
2628
2629 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2630
2631 * pt.c (determine_specialization): Tighten error-checking.
2632 (end_template_parm_list): Likewise.
2633
2634 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2635
2636 * pt.c (check_default_tmpl_args): Handle friends defined in the
2637 class just like member functions defined in the class.
2638
2639 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2640 Jason Merrill <jason@yorick.cygnus.com>
2641
2642 * cp-tree.h (struct lang_decl): Added field for storing sorted
2643 FIELD_DECLs (used in TYPE_DECLs).
2644 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2645 (DECL_SORTED_FIELDS): New macro.
2646 * class.c (method_name_cmp): New function.
2647 (finish_struct_methods): Modified to support sorting and searching
2648 methods.
2649 (finish_struct_anon): Changed code in inner loop to use ELT rather
2650 than UELT (which required an extra indirection for every reference).
2651 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2652 (finish_struct_1): Sort fields.
2653 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2654 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2655 Also, switch to using array indexing rather than a changing pointer.
2656 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2657 DECL_SORTED_FIELDS.
2658
2659 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2660
2661 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2662 casts in system headers or extern "C" blocks.
2663
2664 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2665 errors to pedwarn.
2666
2667 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2668
2669 * decl2.c (write_virtuals): Deleted declaration.
2670 * cp-tree.h (write_virtuals): Deleted extern declaration.
2671 * class.c (finish_struct_1): Removed #if 0'd code that mentions
2672 write_virtuals.
2673 * semantics.c (begin_class_definition): Rewrite code to not depend
2674 on write_virtuals.
2675
2676 * lex.c (cp_pragma_interface): New function.
2677 (cp_pragma_implementation): Likewise.
2678 (handle_cp_pragma): Call them.
2679
2680 * typeck.c (comptypes): Simplify C code in look_hard.
2681
2682 * xref.c (PALLOC): Use xcalloc, not calloc.
2683 (SALLOC): Use xmalloc, not malloc.
2684
2685 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2686
2687 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2688 is NO_DEBUG.
2689
2690 * decl.c (duplicate_decls): If a redeclaration doesn't match the
2691 initial declaration, then don't save the inline info and by all
2692 means don't mark the function as a builtin function.
2693
2694 * decl.c (lookup_name_real): Set NONCLASS to 1 if
2695 CURRENT_CLASS_TYPE is 0.
2696
2697 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2698 NULL_TREE.
2699
2700 * ptree.c (print_lang_type): Added vtable-needs-writing.
2701
2702 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
2703
2704 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2705
2706 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
2707
2708 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2709 Merged into c-common.
2710
2711 1999-07-05 Dave Brolley <brolley@cygnus.com>
2712
2713 * lex.c (errorcount): Declare it.
2714 (finish_parse): Update errorcount for when using CPPLIB.
2715
2716 1999-07-05 Mark Mitchell <mark@codesourcery.com>
2717
2718 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2719 parameters.
2720 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2721 * decl.c (push_class_binding): Use it.
2722 (lookup_name_real): Likewise.
2723
2724 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
2725
2726 * cp-tree.h (widest_integer_literal_type_node,
2727 widest_unsigned_literal_type) : New.
2728 * decl.c (widest_integer_literal_type_node,
2729 widest_unsigned_literal_type) : New.
2730 (init_decl_processing): Handle/use the two new types.
2731 * lex.c (real_yylex): Same.
2732 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2733 Same.
2734
2735 1999-07-01 Mark Mitchell <mark@codesourcery.com>
2736
2737 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2738 to anonymous cv-qualified types.
2739
2740 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
2741
2742 * lex.c (real_yylex) : Change integer literal overflow handling to
2743 be like c-lex.c.
2744
2745 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2746
2747 1999-06-28 Richard Henderson <rth@cygnus.com>
2748
2749 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2750
2751 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
2752
2753 * error.c (dump_type_real): Handle TREE_LIST again.
2754
2755 * typeck.c (comp_target_parms): Don't complain about
2756 converting from () to (...) if !flag_strict_prototype.
2757
2758 * decl.c (grokdeclarator): Update the names of all variants when
2759 de-anonymizing.
2760
2761 1999-06-21 Mark Mitchell <mark@codesourcery.com>
2762
2763 * init.c (expand_aggr_vbase_init): Rename to
2764 construct_virtual_bases. Conditionalize construction here,
2765 rather than ...
2766 (emit_base_init): Here.
2767
2768 1999-06-19 Mark Mitchell <mark@codesourcery.com>
2769
2770 * semantics.c (finish_asm_statement): Apply decay conversions to
2771 input operands.
2772
2773 * decl.c (expand_static_init): When building an anonymous function
2774 for use with atexit, compute its body before and after entering
2775 the function.
2776
2777 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2778 EXIT_EXPR.
2779
2780 1999-06-18 Mark Mitchell <mark@codesourcery.com>
2781
2782 * init.c (expand_aggr_vbase_init): Add flag parameter.
2783 (build_partial_cleanup_for): Remove, inlining into ..
2784 (expand_cleanup_for_base): ... here. Take flag parameter.
2785 (emit_base_init): Pass the in_chrg parameter to
2786 emit_aggr_vbase_init.
2787 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2788
2789 1999-06-16 Mark Mitchell <mark@codesourcery.com>
2790
2791 * decl2.c (import_export_decl): Use same_type_p, rather than
2792 relying on pointer-equality for types.
2793
2794 * method.c (do_build_copy_constructor): Simplify.
2795
2796 * call.c (build_method_call): Remove bogus code for two-argument
2797 delete.
2798 * init.c (build_new_1): Expand on comment, and remove dead code.
2799
2800 * init.c (expand_cleanup_for_base): New function, split out
2801 from ...
2802 (emit_base_init): Here.
2803 (expand_aggr_vbase_init): Use it.
2804
2805 1999-06-15 Mark Mitchell <mark@codesourcery.com>
2806
2807 * cp-tree.h (class_cache_firstobj): Declare.
2808 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2809 * class.c (permanent_obstack): Remove declaration.
2810 (class_cache_firstobj): Make it global.
2811 (add_method): Don't use permanent_obstack directly.
2812 (pushclass): Only free the class_cache_obstack if we know how far
2813 back to free it.
2814 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2815 * decl.c: Remove dead comment.
2816 (saved_scope): Add class_cache_firstobj.
2817 (push_to_top_level): Save it.
2818 (pop_from_top_level): Restore it.
2819 (push_class_level_binding): Use push_cache_obstack, not
2820 maybe_push_cache_obstack.
2821 * search.c (push_class_decls): Likewise.
2822
2823 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
2824
2825 * pt.c (tsubst_friend_function): Push into namespace of friend
2826 function before pushdecl'ing it.
2827
2828 1999-06-14 Nathan Sidwell <nathan@acm.org>
2829
2830 * call.c (build_new_op): Remove REF_BIND from all operands.
2831
2832 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
2833
2834 * init.c (build_new_1): Look up operator delete even if there was
2835 no explicit new placement.
2836
2837 1999-06-08 Nathan Sidwell <nathan@acm.org>
2838
2839 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2840 of ...
2841 (build_throw): ... here. Call it.
2842 (process_start_catch_block): Call it.
2843
2844 1999-06-07 Mark Mitchell <mark@codesourcery.com>
2845
2846 * search.c (convert_pointer_to_single_level): Reimplement without
2847 using get_binfo.
2848
2849 1999-06-06 Mark Mitchell <mark@codesourcery.com>
2850
2851 * method.c (is_back_referenceable_type): Back-reference bools when
2852 not squangling.
2853
2854 1999-06-07 Dave Brolley <brolley@cygnus.com>
2855
2856 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2857 * input.c (putback_buffer): New structure type.
2858 (putback): Replaces putback_char member.
2859 (putback): Replaces putback_char static variable.
2860 (feed_input): Use putback.
2861 (end_input): Use putback.
2862 (sub_getch): Use putback.
2863 (put_back): Use putback.
2864
2865 1999-06-05 Mark Mitchell <mark@codesourcery.com>
2866
2867 * decl.c (grokdeclarator): Fix typo in last change.
2868
2869 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
2870
2871 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2872 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2873
2874 1999-06-04 Nathan Sidwell <nathan@acm.org>
2875
2876 * except.c (build_throw): Check throw expression validity.
2877
2878 1999-06-03 Mark Mitchell <mark@codesourcery.com>
2879
2880 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2881 just because flag_signed_bitfields is false.
2882
2883 1999-06-03 Nathan Sidwell <nathan@acm.org>
2884
2885 * semantics.c (begin_class_definition): Update the struct's
2886 location here ...
2887 * class.c (finish_struct): ... rather than here.
2888
2889 * decl.c (make_typename_type): Don't rely on uninitialized
2890 variable.
2891
2892 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2893
2894 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2895
2896 1999-05-31 Mark Mitchell <mark@codesourcery.com>
2897
2898 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2899 and friends rather than messing with current_obstack directly.
2900 (cp_build_qualified_type_real): Rework ARRAY_TYPE
2901 allocation to match practice throughout the rest of the
2902 compiler.
2903
2904 1999-05-30 Mark Mitchell <mark@codesourcery.com>
2905
2906 * lex.c (make_lang_type): Create TYPE_BINFO for
2907 TEMPLATE_TYPE_PARMs just like for non-template types.
2908
2909 * decl.c (start_decl): Move checks on initialization to ...
2910 (cp_finish_decl): Here. Tidy formatting slightly.
2911
2912 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2913
2914 * decl.c (add_binding): Don't complain about a redeclaration of a
2915 semantically identical typedef in a local scope.
2916
2917 1999-05-28 Nathan Sidwell <nathan@acm.org>
2918
2919 * decl.c (complete_array_type): Allocate off same obstack. Fix
2920 DO_DEFAULT comment to match reality.
2921
2922 * friend.c (make_friend_class): Fix diagnostic typo.
2923
2924 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2925
2926 * decl.c (lookup_namespace_name): Handle getting a
2927 TEMPLATE_ID_EXPR.
2928 (expand_static_init): Don't call pushdecl for implicitly declared
2929 `atexit' used to register destructors.
2930
2931 1999-05-25 Mark Mitchell <mark@codesourcery.com>
2932
2933 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2934 intialize a vtable.
2935
2936 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2937 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
2938 by combining TEMPLATE_INFO and LEVEL into a single union.
2939 (DECL_TEMPLATE_INFO): Reformat.
2940 (DECL_SAVED_TREE): Document.
2941 (DECL_TEMPLATE_INJECT): Remove.
2942 * class.c (finish_struct): Remove code to deal with
2943 DECL_TEMPLATE_INJECT.
2944
2945 * decl.c (maybe_process_template_type_declaration): Handle all new
2946 types in templates uniformly.
2947 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2948 DECL_CONTEXT.
2949 * pt.c (lookup_template_class): Inject template instantiations of
2950 forward-declarations.
2951 (instantiate_class_template): Remove code processing
2952 DECL_TEMPLATE_INJECT.
2953
2954 * pt.c (lookup_template_class): Tweak lookup to find member
2955 templates.
2956
2957 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2958 ASM_CV_QUAL.
2959 * semantics.c (finish_asm_stmt): Make strings permanent if they're
2960 used in a template.
2961
2962 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
2963
2964 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2965 parts of pointer to data member types.
2966
2967 1999-05-24 Mark Mitchell <mark@codesourcery.com>
2968
2969 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2970 and then make it look like `abort'. Just use `abort' instead.
2971
2972 * typeck.c (build_static_cast): Don't allow static_casts that cast
2973 away constness.
2974 (casts_away_constness_r): New function.
2975 (casts_away_constness): Likewise.
2976
2977 * decl.c (lookup_tag): Remove code no longer needed after
2978 name-lookup improvements.
2979 * decl2.c (handle_class_head): Make error-recovery more robust.
2980 * friend.c (make_friend_class): Reject templated typename types.
2981 * lex.c (is_global): A template parameter isn't global.
2982 * parse.y (class_head): Robustify.
2983 * parse.c: Regenerated.
2984
2985 1999-05-22 Mark Mitchell <mark@codesourcery.com>
2986
2987 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2988 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
2989
2990 * cp-tree.h (push_nested_namespace): Declare.
2991 (pop_nested_namespace): Likewise.
2992 * decl.c (push_nested_namespace): New function.
2993 (pop_nested_namespace): Likewise.
2994 * pt.c (instantiate_class_template): Use them.
2995
2996 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2997
2998 * cp-tree.h (cplus_expand_constant): Declare.
2999 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3000 converted from one pointer-to-object type to another.
3001 * expr.c (cplus_expand_constant): Don't make it static.
3002 * typeck.c (build_component_ref): Don't crash when presented with
3003 a component which is a TEMPLATE_DECL.
3004 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
3005 cast from a pointer-to-member constant to its own type does not
3006 result in a valid non-type template argument.
3007
3008 1999-05-21 Mark Mitchell <mark@codesourcery.com>
3009 Nathan Sidwell <nathan@acm.org>
3010
3011 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3012 * cp-tree.h: Fix typo in documentation on pointers-to-members.
3013 (cp_build_qualified_type): Make it a macro.
3014 (cp_build_qualified_type_real): Declare.
3015 * decl.c (grokdeclarator): Remove misleading comment. Avoid
3016 problem with template parameters and restrict-qualification.
3017 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3018 * hash.h: Regenerated.
3019 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3020 the enumeration.
3021 (NORID): Remove definition.
3022 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3023 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
3024 (fn_type_unification): Check that the function type resulting from
3025 the deduction is legal.
3026 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3027 (unify): Use cp_build_qualified_type_real.
3028 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3029 (cp_build_qualified_type): Rename to ...
3030 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3031 and modify appropriately.
3032
3033 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3034 reveal optimization opportunities.
3035
3036 * pt.c (tsubst): Don't issue error messages when we're not
3037 complaining, even if we see a qualified function type.
3038 (check_cv_quals_for_unify): Don't allow a qualified function
3039 type.
3040
3041 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3042
3043 * class.c (instantiate_type): Downgrade errors for object-dependent
3044 memfn refs to pedwarn.
3045
3046 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3047
3048 * decl.c (grokdeclarator): Don't treat [] as indicating a
3049 zero-sized array in a typedef.
3050
3051 * call.c (build_object_call): Don't look at DECL_NAME for a type.
3052 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3053 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3054
3055 * pt.c (for_each_template_parm): Rework to match documentation.
3056 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3057
3058 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
3059
3060 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3061
3062 * class.c (finish_base_struct): Allow non-COM bases for COM classes
3063 except at the leftmost position.
3064 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3065 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3066 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3067
3068 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3069 (build_cplus_new): Make sure that what we return is of the right type.
3070
3071 1999-05-20 Mark Mitchell <mark@codesourcery.com>
3072
3073 * cp-tree.h (make_ptrmem_cst): New function.
3074 * expr.c (cplus_expand_constant): Split out from ...
3075 (cplus_expand_expr): Here. Use cplus_expand_constant.
3076 (init_cplus_expand): Set lang_expand_constant.
3077 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3078
3079 * tree.c (make_ptrmem_cst): Define.
3080 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3081 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3082
3083 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3084
3085 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3086
3087 * decl2.c (start_static_storage_duration_function): Fix comment.
3088 (finish_file): Create static storage duration functions lazily.
3089
3090 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3091
3092 Implement anonymous structs.
3093 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3094 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3095 * class.c (finish_struct_1): Remove redundant check for anon struct.
3096 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3097 (check_tag_decl): Check for anonymous struct here.
3098 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3099 * init.c (sort_member_init, emit_base_init): Handle getting fields
3100 as well as names in current_member_init_list.
3101 (perform_member_init): Handle getting an anon aggr.
3102 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3103 (do_build_copy_constructor): Likewise.
3104
3105 1999-05-19 Mark Mitchell <mark@codesourcery.com>
3106
3107 * tree.c (cp_build_qualified_type): Don't allow qualified function
3108 types.
3109
3110 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
3111
3112 * gxxint.texi: Fix typo.
3113
3114 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
3115
3116 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3117 * class.c (finish_struct_1): Use CLASS_TYPE_P.
3118 * ptree.c (print_lang_type): Likewise.
3119 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3120 IS_AGGR_TYPE_CODE.
3121 * typeck2.c (digest_init): Likewise.
3122
3123 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
3124
3125 * call.c (joust): Compare the types of the conv ops, not the
3126 target types of the conversions.
3127
3128 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
3129
3130 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3131 was not given.
3132
3133 1999-05-17 Mark Mitchell <mark@codesourcery.com>
3134
3135 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3136 * decl.c (grokfndecl): Don't allow inline declarations of friend
3137 template specializations, or friend template specializations with
3138 default arguments.
3139 * pt.c (tsubst): Handle substitution into array types that does
3140 not yield a fixed upper bound, even when not processing a
3141 template.
3142 (tsubst_copy): Deal with the fact that the second operand to a
3143 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3144 * search.c (marked_pushdecls_p): Don't descend into
3145 TEMPLATE_TYPE_PARMs and the like.
3146 (unmarked_pushdecls_p): Likewise.
3147
3148 * call.c (build_over_call): Don't throw away
3149 initializations/copies of empty classes; use MODIFY_EXPR and
3150 INIT_EXPR as for non-empty classes.
3151 * class.c (finish_struct_1): Put the padding byte for an empty
3152 class on the TYPE_NONCOPIED_PARTS list for the class.
3153
3154 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3155
3156 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3157 indicate a reference to a field that is a qualified name.
3158
3159 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
3160
3161 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3162 ASM_OUTPUT_CONSTRUCTOR.
3163
3164 * friend.c (do_friend): Add attrlist arg. Remove support for
3165 getting a non-decl as 'decl'.
3166 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
3167 rtl.
3168 (grokdeclarator): Adjust.
3169 * cp-tree.h: Adjust.
3170
3171 1999-05-16 Mark Mitchell <mark@codesourcery.com>
3172
3173 * cp-tree.h (permanent_p): New function.
3174 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3175 possibly complex tree node.
3176 * tree.c (mapcar): Adjust comments, and follow coding standards in
3177 conditional.
3178 (permanent_p): New function.
3179
3180 1999-05-13 Per Bothner <bothner@cygnus.com>
3181
3182 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
3183 primitive Java types, if we actually see `extern "Java"'.
3184
3185 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
3186
3187 * lang-specs.h: Pass -$ to the preprocessor.
3188
3189 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
3190
3191 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3192 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3193 (resolve_offset_ref): Don't handle a raw baselink.
3194 * cvt.c (build_expr_type_conversion): Likewise.
3195 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3196 convert_for_initialization): Likewise.
3197 * class.c (instantiate_type): Handle seeing a baselink under an
3198 OFFSET_REF.
3199 * error.c (dump_expr): Likewise.
3200 * pt.c (for_each_template_parm): Likewise.
3201 (resolve_overloaded_unification): Likewise.
3202 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3203 * typeck.c (expr_sizeof): Also complain about other permutations
3204 of overloaded functions.
3205
3206 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
3207
3208 * init.c (resolve_offset_ref): Don't return a raw method.
3209 Use BASELINK_P.
3210 * typeck.c (decay_conversion): Don't handle a raw method.
3211 Resolve all OFFSET_REFs.
3212 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3213 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
3214 same_type_p for pmf bits. Don't use build_binary_op to compare
3215 raw pointers to methods.
3216 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3217 to decide when to call resolve_offset_ref.
3218 (build_c_cast, convert_for_initialization): Likewise.
3219 * cvt.c (build_expr_type_conversion): Likewise.
3220
3221 1999-05-06 Nathan Sidwell <nathan@acm.org>
3222
3223 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3224
3225 1999-05-05 Mark Mitchell <mark@codesourcery.com>
3226
3227 * decl2.c (start_objects): Don't let static constructors and
3228 destructors get inlined.
3229
3230 * parse.y (nested_name_specifier): Make sure ordinary types are
3231 complete, just like template types.
3232 * parse.c: Regenerated.
3233
3234 * pt.c (check_explicit_specialization): Improve error messages.
3235
3236 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
3237
3238 * typeck.c (string_conv_p): Use same_type_p to check whether we
3239 try to convert between char and wchar_t.
3240
3241 1999-05-03 Mark Mitchell <mark@codesourcery.com>
3242
3243 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3244 lookup to error_mark_node here.
3245 (lookup_member): Revise documentation. Add comments. Don't set
3246 the TREE_TYPE to error_mark_node here, and don't build up an extra
3247 TREE_LIST for ambiguous lookups.
3248 (setup_class_bindings): Adjust accordingly.
3249 (push_class_decls): Revise out-of-date comments.
3250
3251 * typeck.c (build_const_cast): Tighten checks for legality.
3252
3253 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3254
3255 * init.c (build_member_call): Lookup names coming from
3256 namespace-scoped LOOKUP_EXPR.
3257
3258 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
3259
3260 * gxxint.texi: Add documentation for 'I'.
3261
3262 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
3263
3264 * tinfo.cc (operator==): Qualify type_info with std::.
3265
3266 1999-05-02 Mark Mitchell <mark@codesourcery.com>
3267
3268 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
3269 (DECL_COMDAT): Remove definition.
3270
3271 1999-05-01 Mark Mitchell <mark@codesourcery.com>
3272
3273 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3274 change.
3275
3276 1999-04-30 Mark Mitchell <mark@codesourcery.com>
3277
3278 * class.c (build_vtable): Use build_lang_decl when building
3279 vtables, not just build_decl.
3280 (prepare_fresh_vtable): Likewise.
3281 * decl.c (wrapup_globals_for_namespace): Mark vtables as
3282 DECL_EXTERNAL when calling wrapup_global_declarations.
3283 * decl2.c (priority_info_s): Add initializations_p and
3284 destructions_p members.
3285 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3286 when deciding what vtables to write out.
3287 (ssdf_decls): New variable.
3288 (ssdf_decls_used): Likewise.
3289 (start_static_storage_duration_function): Deal with being called
3290 multiple times. Avoid inlining this function.
3291 (generate_inits_for_priority): Deal with reuse of priority map.
3292 (get_priority_info): Clear initializations_p and destructions_p.
3293 (do_static_initialization): Tweak comment.
3294 (do_static_destruction): Likewise. Fix condition on sentries for
3295 destruction.
3296 (generate_ctor_or_dtor_function): Call all of the static storage
3297 duration functions.
3298 (generate_ctor_or_dtor_function_for_priority): Check
3299 initializations_p and destructions_p to see what priorities need
3300 initialization functions.
3301 (finish_file): Rework to generate multiple static storage duration
3302 functions, rather than just one.
3303
3304 * typeck.c (build_const_cast): Tweak last change to handle
3305 templates correctly.
3306
3307 * typeck.c (build_const_cast): Disallow use of const_cast to
3308 anything but a pointer or reference type.
3309
3310 1999-04-30 Nathan Sidwell <nathan@acm.org>
3311
3312 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3313 signature type.
3314
3315 1999-04-29 Mark Mitchell <mark@codesourcery.com>
3316
3317 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3318 (finish_file): Indent comments properly.
3319
3320 1999-04-29 Richard Henderson <rth@cygnus.com>
3321
3322 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3323 (do_static_destruction): Likewise.
3324
3325 1999-04-29 Nathan Sidwell <nathan@acm.org>
3326
3327 * cp-tree.h (TYPE_NOTHROW_P): New macro.
3328 * decl2.c (delete_sanity): Warn on deleting void *.
3329 * init.c (build_new_1): Use TYPE_NOTHROW_P.
3330 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3331 throwing operator new.
3332
3333 1999-04-28 Nathan Sidwell <nathan@acm.org>
3334
3335 * cp-tree.h (build_component_addr): Remove prototype.
3336 * typeck.c (build_component_addr): Make static. Remove MSG
3337 argument.
3338 (build_component_addr): Remove MSG parameter, clean up
3339 comment.
3340 (build_x_function_call): Use cp_error.
3341 (build_unary_op): Adjust call of build_component_addr.
3342
3343 1999-04-28 Mark Mitchell <mark@codesourcery.com>
3344
3345 * pt.c (tsubst_friend_class): Check for NULL.
3346
3347 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3348
3349 * search.c (binfo_for_vtable): Initialize bfvi.var.
3350
3351 1999-04-27 Nathan Sidwell <nathan@acm.org>
3352
3353 * rtti.c (build_x_typeid): Check rtti is enabled.
3354
3355 1999-04-26 Mark Mitchell <mark@codesourcery.com>
3356
3357 * search.c (is_subobject_of_p): Make sure we're looking at the
3358 right baseclasses.
3359
3360 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
3361
3362 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3363
3364 1999-04-23 Mark Mitchell <mark@codesourcery.com>
3365
3366 * decl2.c (finish_file): Tweak handling of extern inlines so that
3367 they are not unnecessarily put out.
3368
3369 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3370 such as base classes.
3371
3372 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
3373
3374 * tree.c (build_exception_variant): Fix typo: use the chain of U,
3375 not trying V, while cycling through U.
3376
3377 1999-04-22 Mark Mitchell <mark@codesourcery.com>
3378
3379 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3380 preserves_first_arg. Enlarge dummy accordingly.
3381 (DECL_TINFO_FN_P): New macro.
3382 (SET_DECL_TINFO_FN_P): Likeiwse.
3383 (DECL_RETURNS_FIRST_ARG): Remove.
3384 (DECL_PRESERVES_THIS): Likewise.
3385 (DECL_INIT_PRIORITY): New macro.
3386 (finish_struct_1): Change prototype.
3387 (cat_namespace_levels): Remove prototype.
3388 (vtable_decl_p): New prototype.
3389 (vtype_decl_p): Likewise.
3390 (sigtable_decl_p): Likewise.
3391 (walk_globals_pred): New typedef.
3392 (walk_globals_fn): Likewise.
3393 (walk_globals): New prototype.
3394 (walk_namespaces_fn): New typedef.
3395 (walk_namespaces): New prototype.
3396 (wrapup_globals_for_namespace): Likewise.
3397 (walk_vtables): Remove prototype.
3398 (walk_sigtables): Likewise.
3399 (instantiate_pending_templates): New prototype.
3400 * class.c (finish_struct_1): Don't return a value.
3401 * decl.h (pending_statics): Remove declaration.
3402 * decl.c (walk_namespaces_r): New function.
3403 (walk_globals_r): Likewise.
3404 (vtable_decl_p): Likewise.
3405 (vtype_decl_p): Likewise.
3406 (sigtable_decl_p): Likewise.
3407 (walk_namespaces): Likewise.
3408 (walk_globals_data): New type.
3409 (walk_globals): New function.
3410 (wrapup_globals_for_namespace): Likewise.
3411 (expand_static_init): Remove assertion. Remove redundancy in
3412 conditional. Don't put static data members in static_aggregates
3413 Tidy.
3414 (finish_function): Remove redundancy in conditional. Don't set
3415 DECL_RETURNS_FIRST_ARG.
3416 (cat_namespace_levels): Remove.
3417 * decl2.c: Include splay-tree.h and varray.h.
3418 (priority_info_s): New structure.
3419 (finish_vtable_vardecl): Change prototype. Adjust for new calling
3420 conventions.
3421 (prune_vtable_vardecl): Likewise.
3422 (finish_sigtable_vardecl): Likewise.
3423 (setup_initp): Remove.
3424 (do_dtors): Remove.
3425 (do_ctors): Remove.
3426 (start_static_storage_duration_function): New function.
3427 (generate_inits_for_priority): Likewise.
3428 (finish_static_storage_duration_function): Likewise.
3429 (get_priority_info): Likewise.
3430 (do_static_initialization): Likewise.
3431 (do_static_destruction): Likewise.
3432 (do_static_initialization_and_destruction): Likewise.
3433 (generate_ctor_or_dtor_function): Likewise.
3434 (generate_ctor_and_dtor_functions_for_priority): Likewise.
3435 (pending_statics): Make it a varray.
3436 (pending_statics_used): New variable.
3437 (saved_inlines): Make it a varray.
3438 (saved_inlines_used): New variable.
3439 (finish_static_data_member): Change method of updating
3440 pending_statics.
3441 (mark_inline_for_output): Remove #if 0'd code. Change method of
3442 updating saved_inlines.
3443 (walk_vtables): Remove.
3444 (walk_sigtables): Likewise.
3445 (import_export_decl): Use DECL_TINFO_FN_P.
3446 (pending_templates): Remove declaration.
3447 (maybe_templates): Likewise.
3448 (static_aggregates_initp): Likewise.
3449 (setup_initp): Likewise.
3450 (finish_objects): Simplify.
3451 (INITIALIZE_P_IDENTIFIER): New macro.
3452 (PRIORITY_IDENTIFIER): New macro.
3453 (SSDF_IDENTIFIER): New macro.
3454 (initialize_p_decl): New variable.
3455 (priority_decl): Likewise.
3456 (ssdf_decl): Likewise.
3457 (priority_info_map): Likewise.
3458 (finish_file): Recode output of static intializers and other
3459 file-scope finalization tasks.
3460 * error.c (OB_END_TEMPLATE_ID): New macro.
3461 (dump_type_real): Use it.
3462 (dump_decl): Likewise.
3463 (dump_function_name): Likewise.
3464 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3465 interface.
3466 (check_newline): Use walk_globals, not walk_vtables.
3467 * pt.c (pending_tempalte_expansions): Remove.
3468 (set_vardecl_interface_info): Likewise.
3469 (pending_templates): Make static.
3470 (maybe_templates): Likewise.
3471 (instantiate_class_template): Adjust call to finish_struct_1.
3472 (instantiate_pending_templates): New function.
3473 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3474 * tree.c (static_aggregates_initp): Remove.
3475 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3476 instead.
3477 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3478
3479 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3480 with the RTL code RETURN.
3481 * hash.h: Regenerated.
3482 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3483 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3484 * parse.c: Regenerated.
3485 * pt.c: Include varray.h. Include rtl.h since varray.h requires
3486 it.
3487 (inline_parm_levels): New variable.
3488 (inline_parm_levels_used): Likewise.
3489 (maybe_begin_member_template_processing): Update them.
3490 (maybe_end_member_template_processing): Use them, rather than
3491 guessing how many levels to pop.
3492
3493 * decl.c (make_typename_type): Tighten error-checking.
3494
3495 1999-04-20 Mark Mitchell <mark@codesourcery.com>
3496
3497 * cp-tree.h (build_binary_op): Remove unneeded parameter.
3498 * class.c (build_vrable_entry_ref): Adjust call to
3499 build_binary_op.
3500 * decl.c (expand_static_init): Likewise.
3501 (grokdeclarator): Likewise.
3502 (finish_function): Likewise.
3503 * decl2.c (delete_sanity): Likewise.
3504 (do_dtors): Likewise.
3505 (do_ctors): Likewise.
3506 * error.c (dump_type_suffix): Likewise.
3507 * expr.c (cplus_expand_expr): Likewise.
3508 * init.c (resolve_offset_ref): Likewise.
3509 (build_new): Likewise.
3510 (build_new_1): Likewise.
3511 (build_vec_delete_1): Likewise.
3512 (expand_vec_init_catch_clause): Likewise.
3513 (build_delete): Likewise.
3514 * pt.c (tsubst): Likewise.
3515 * rtti.c (synthesize_tinfo_fn): Likewise.
3516 * search.c (expand_upcast_fixups): Likewise.
3517 (expand_direct_vtbls_init): Likewise.
3518 * typeck.c (get_member_function_from_ptrfunc): Likewise.
3519 (build_binary_op_nodefault): Likewise.
3520 (point_int_sum): Likewise.
3521 (pointer_diff): Likewise.
3522 (build_unary_op): Likewise.
3523 (build_modify_expr): Likewise.
3524 (get_delta_difference): Likewise.
3525 (build_ptrmemfunc): Likewise.
3526 (expand_ptrmemfunc_cst): Likewise.
3527
3528 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
3529
3530 * decl.c (grokfndecl): Always call cplus_decl_attributes.
3531 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3532
3533 1999-04-19 Mark Mitchell <mark@codesourcery.com>
3534
3535 * cp-tree.h (finish_static_data_member_decl): New function.
3536 * decl2.c (finish_static_data_member_decl): Split out from ...
3537 (grokfield): Here.
3538 * pt.c (instantiate_class_template): Use it here instead of
3539 trying to fake it.
3540 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3541 finish_static_data_member_decl will do that. Explicit set
3542 DECL_EXTERNAL to match non-template processing.
3543
3544 1999-04-18 Mark Mitchell <mark@codesourcery.com>
3545
3546 * cp-tree.h (finish_class_definition): Add parameter.
3547 * parse.y (structsp): Use it. Don't call pop_scope here.
3548 * parse.c: Regenerated.
3549 * semantics.c (finish_class_definition): Pop it here.
3550
3551 1999-04-17 Mark Mitchell <mark@codesourcery.com>
3552
3553 * decl.c (xref_tag): Revise handling of nested template
3554 declarations.
3555 * pt.c (check_explicit_specialization): Tweak handling of friend
3556 templates in template classes.
3557 (tsubst_friend_class): Handle friend declarations for nested
3558 member template classes.
3559
3560 1999-04-16 Mark Mitchell <mark@codesourcery.com>
3561
3562 * class.c (finish_struct): Remove unused variable.
3563 (pushclass): Likewise.
3564 (invalidate_class_lookup_cache): Likewise.
3565 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3566 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3567 doesn't get obliterated.
3568 (make_typename_type): Handle template classes correctly.
3569
3570 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3571 (storetags): Declare.
3572 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3573 (pushclass): Likewise. Use storetags to install tag declarations,
3574 not pushtag.
3575 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3576 * decl.c (storetags): Make it global.
3577 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3578 implicit typename declaration.
3579 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
3580 * method.c (hack_identifier): Likewise.
3581 * search.c (lookup_member): Likewise.
3582
3583 * decl.c (warn_about_implicit_typename_lookup): New function.
3584 (lookup_name_real): Use it. Rework handling of implicit typename
3585 extension.
3586
3587 1999-04-15 Mark Mitchell <mark@codesourcery.com>
3588
3589 * cp-tree.h (lookup_nested_field): Remove.
3590 * class.c (push_nested_class): Handle UNION_TYPEs.
3591 (pop_nested_class): Likewise.
3592 * decl.c (lookup_name_real): Don't call lookup_nested_field.
3593 (start_decl): Use push_nested_class, not just pushclass.
3594 (cp_finish_decl): Use pop_nested_class, not just popclass.
3595 * search.c (lookup_nested_field): Remove.
3596
3597 * cp-tree.h (lang_type): Add documentation.
3598 * decl2.c (handle_class_head): Create template declarations here,
3599 as appropriate.
3600 * parse.y (class_head): Return whether or not we entered a new
3601 scope, as well as the type named.
3602 (named_class_head): Likewise.
3603 (named_complex_class_head_sans_basetype): Likewise.
3604 (structsp): Adjust accordingly. Pop scope when required.
3605 * parse.c: Regenerated.
3606 * pt.c (check_default_tmpl_args): Robustify.
3607 (redeclare_class_template): Likewise.
3608 (instantiate_class_template): An instantiation of an
3609 anonymous union is itself an anonymous union.
3610 * semantics.c (begin_class_definition): Don't create template
3611 declarations here.
3612
3613 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
3614
3615 * parse.y (after_type_declarator_intern): New nonterminal.
3616 (after_type_declarator): Use it.
3617 (direct_after_type_declarator): Likewise. Move above
3618 nonnested_type to fix reduce/reduce conflict resolution.
3619 (declmods): Reducing from just 'attributes' has EMPTY precedence.
3620 * Makefile.in (CONFLICTS): Update.
3621
3622 * decl.c (define_label): Downgrade error for jumping over a
3623 non-POD decl to pedwarn.
3624
3625 1999-04-14 Mark Mitchell <mark@codesourcery.com>
3626
3627 * cp-tree.h (popclass): Change declaration.
3628 (pop_nested_class): Likewise.
3629 (poplevel_class): Remove declaration.
3630 * call.c (convert_default_argument): Pass no arguments to
3631 popclass.
3632 * class.c (finish_struct_1): Likewise.
3633 (finish_struct): Likewise.
3634 (popclass): Remove argument. Simplify code accordingly.
3635 (pop_nested_class): Likewise.
3636 * decl.c (poplevel_class): Declare it here, and make it static.
3637 (poplevel): Handle class scopes.
3638 (poplevel_class): Don't take an rgument. Simplify.
3639 (pop_everything): Pass no arguments to pop_nested_class.
3640 (cp_finish_decl): Pass no arguments to popclass.
3641 (grokdeclarator): Pass no arguments to pop_nested_class.
3642 (finish_function): Likewise.
3643 * decl2.c (grokfield): Likewise.
3644 (pop_scope): Pass no arguments to popclass.
3645 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3646 * pt.c (instantiate_class_template): Move call to pushclass, and
3647 document. Pass no arguments to popclass.
3648 (regenerate_decl_from_template): Likewise.
3649
3650 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
3651
3652 * typeck.c (build_unary_op): Handle taking the address of a unique
3653 bound non-static member function.
3654
3655 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
3656
3657 * lang-options.h (-Wdeprecated): New flag.
3658 * decl2.c (warn_deprecated): New flag.
3659 (lang_decode_option): Deprecated this-is-variable,
3660 external-templates, alt-external-templates.
3661 Support -Wdeprecated.
3662 * errfn.c (cp_deprecated): New function.
3663
3664 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3665
3666 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3667 of the decls themselves.
3668
3669 * pt.c (tsubst_function_type): Copy attributes over.
3670
3671 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
3672 and com_interface.
3673 * cp-tree.h: Add prototype.
3674 * decl.c (init_decl_processing): Set valid_lang_attribute.
3675
3676 1999-04-13 Mark Mitchell <mark@codesourcery.com>
3677
3678 * class.c (finish_struct_1): Look at the const-ness of the field's
3679 type, not the TREE_READONLY-ness of the declaration.
3680 * method.c (synthesize_method): Likewise.
3681 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3682 creating new declarations.
3683
3684 1999-04-13 Mike Stump <mrs@wrs.com>
3685
3686 * decl2.c (import_export_decl): Because vtables always reference
3687 virtual functions, even if they are inlined, don't allow
3688 -fno-implement-inlines to not emit them, instead, emit them with
3689 the vtable.
3690 * decl.c (start_function): Likewise.
3691
3692 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
3693
3694 * cp-tree.h (struct lang_type): Add com_interface.
3695 (CLASSTYPE_COM_INTERFACE): New macro.
3696 * class.c (set_rtti_entry): COM interface classes have no RTTI
3697 entries in their vtables; adjust.
3698 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3699 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3700 finish_struct_1): Likewise.
3701 * decl2.c (mark_vtable_entries): Likewise.
3702 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3703 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3704 expand_upcast_fixups): Likewise.
3705 * tree.c (debug_binfo): Likewise.
3706
3707 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3708 * typeck.c (comptypes): If we get it, ignore attributes.
3709 * class.c (instantiate_type): Use BASELINK_P. Change complain
3710 parameter to flags; 2 means ignore attributes.
3711 * call.c (build_op_delete_call): Pass it.
3712
3713 * decl.c (xref_tag): Only complain once about using a typedef-name
3714 with 'struct'. Downgrade to pedwarn.
3715
3716 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3717
3718 * parse.y (absdcl_intern): New nonterminal.
3719 (absdcl, direct_abstract_declarator): Use it.
3720
3721 * pt.c (lookup_template_class): Look through implict typename.
3722
3723 1999-04-11 Mark Mitchell <mark@codesourcery.com>
3724
3725 * friend.c (add_friend): Deal gracefully with error_mark_node.
3726 * method.c (build_overload_value): Handle pointers-to-members as
3727 template parameters.
3728
3729 * decl.c (push_binding): Fix typo in comment.
3730
3731 1999-04-10 Mark Mitchell <mark@codesourcery.com>
3732
3733 * error.c (dump_type_real): If a typename is a template-id, put
3734 out the template arguments.
3735 (dump_expr): Handle TEMPLATE_ID_EXPR.
3736 * pt.c (lookup_template_class): Now that full arguments are
3737 available everywhere, remove code that tried to guess them.
3738
3739 1999-04-09 Mark Mitchell <mark@codesourcery.com>
3740
3741 * decl.c (make_typename_type): Complain if we don't find a type
3742 when trying to make a typename type for a non-template type.
3743
3744 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
3745
3746 * decl.c (start_decl): Pass attributes to grokdeclarator.
3747 (grokdeclarator): Handle attributes on constructor-syntax
3748 initializers.
3749
3750 1999-04-08 Mark Mitchell <mark@codesourcery.com>
3751
3752 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3753 don't have types.
3754
3755 * search.c (template_self_reference_p): Tweak.
3756
3757 1999-04-07 Mark Mitchell <mark@codesourcery.com>
3758
3759 * init.c (build_offset_ref): Don't build yet another weird data
3760 structure to describe overloaded functions.
3761
3762 1999-04-06 Mark Mitchell <mark@codesourcery.com>
3763
3764 * cp-tree.h (BASELINK_P): New macro.
3765 (SET_BASELINK_P): Likewise.
3766 * init.c (build_member_call): Remove needless assignment in if
3767 statement.
3768 * search.c (lookup_field_r): Fix handling when we are looking
3769 specifically for a type; these are not hidden by functions and
3770 variables.
3771 (lookup_member): Use SET_BASELINK_P.
3772 * tree.c (is_overloaded_fn): Use BASELINK_P.
3773 (really_overloaed_fn): Likewise.
3774 (get_first_fn): Likewise.
3775
3776 1999-04-05 Mark Mitchell <mark@codesourcery.com>
3777
3778 * decl.c (lookup_name_current_level): Tweak, and improve
3779 documentation.
3780
3781 * class.c (maybe_fixup_vptrs): Remove declaration.
3782 (build_class_init_list): Likewise.
3783 * decl.c (pushdecl_class_level): Call check_template_shadow here
3784 ...
3785 (push_class_level_binding): ... not here.
3786 * search.c (dfs_push_type_decls): Only avoid
3787 template-self-reference TYPE_DECLs if they are from base classes.
3788
3789 1999-04-04 Mark Mitchell <mark@codesourcery.com>
3790
3791 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3792 nodes. Tidy.
3793
3794 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
3795
3796 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3797 (finish_struct_1): Don't call build_class_init_list.
3798
3799 1999-04-02 Mark Mitchell <mark@codesourcery.com>
3800
3801 * tinfo.h (__class_type_info): Fix illegal declaration.
3802
3803 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3804 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3805 (IDENTIFIER_CLASS_VALUE): Improve documentation.
3806 (is_properly_derived_from): Declare.
3807 (invalidate_class_lookup_cache): Likewise.
3808 (maybe_maybe_note_name_used_in_class): Likewise.
3809 (note_name_declared_in_class): Likewise.
3810 (push_using_decl): Remove duplicate declaration.
3811 (id_in_current_class): Remove declaration.
3812 (push_class_binding): Change prototype.
3813 (clear_identitifer_class_values): Declare.
3814 * call.c (is_properly_derived_from): Make it global.
3815 (build_new_function_call): Be careful about updating candidates.
3816 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
3817 asked to make illegal calls.
3818 * class.c: Include splay-tree.h.
3819 (class_stack_node): Add names_used slot.
3820 (check_member_decl_is_same_in_complete_scope): Remove.
3821 (add_method): Fix comment. Push the declaration into class
3822 scope.
3823 (finish_struct_1): When popping the class, pop the bindings too.
3824 Remove check for data member/function member conflict.
3825 (finish_struct): Remove calls to
3826 check_member_decl_is_same_in_complete_scope. Change calls to
3827 popclass.
3828 (pushclass): Clear names_used in the class stack entry.
3829 Use invalidate_class_lookup_cache to remove cached entries, rather
3830 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
3831 before entering a new class. Remove dead code. Don't mess with
3832 current_function_decl when pushing declarations.
3833 (invalidate_class_lookup_cache): New function, split out from ...
3834 (popclass): Here. Clean up names_used on our way out.
3835 (instantiate_type): Adjust.
3836 (build_self_reference): Don't push the declaration here.
3837 (maybe_note_name_used_in_class): New function.
3838 (note_name_declared_in_class): Likewise.
3839 * decl.c (add_binding): Change prototype.
3840 (find_class_binding_level): New function.
3841 (innermost_nonclass_level): Likewise.
3842 (current_binding_level): Update documentation.
3843 (inner_binding_level): Remove. Replace with current_binding_level
3844 throughout.
3845 (push_binding_level): Remove special handling of
3846 class_binding_level.
3847 (pop_binding_level): Likewise. Use find_class_binding_level.
3848 (suspend_binding_level): Likewise.
3849 (global_bindings_p): Use innermost_nonclass_level.
3850 (toplevel_bindings_p): Likewise.
3851 (namespace_bindings_p): Likewise.
3852 (pseudo_global_level_p): Likewise.
3853 (push_binding): Clear INHERITED_VALUE_BINDING_P.
3854 (add_binding): Check for illegal multiple declarations. Return a
3855 value indicating whether or not the new binding was legal.
3856 (push_local_binding): Skip over class binding levels. Check
3857 return value from add_binding.
3858 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
3859 note_name_declared_in_class.
3860 (pushlevel_class): Remove "fake out the rest of the compiler"
3861 code.
3862 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3863 (clear_identifier_class_values): New function.
3864 (pop_from_top_level): Use it.
3865 (pop_everything): Tweak.
3866 (maybe_process_template_type_declaration): Don't push the
3867 declaration for the template here.
3868 (pushtag): Don't push tag declarations into class scope here.
3869 (pushdecl): Apply DeMorgan's law for readability.
3870 (pushdecl_class_level): Remove special-case code for
3871 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
3872 (push_class_level_bindng): Deal with inherited bindings.
3873 (lookup_name_real): Remove special-case code for
3874 TYPE_BEING_DEFINED, and some implicit typename magic.
3875 (grokdeclarator): Handle COMPONENT_REF for a template function.
3876 (build_enumerator): Don't call pushdecl_class_level here.
3877 (id_in_current_class): Remove.
3878 * decl2.c (grokfield): Don't call pushdecl_class_level or
3879 check_template_shadow.
3880 * errfn.c (cp_file_of): Don't declare.
3881 (cp_line_of): Likewise.
3882 * error.c (dump_decl): Handle an OVERLOAD.
3883 (cp_file_of): Likewise.
3884 (cp_line_of): Likewise.
3885 * init.c (build_member_call): Handle a COMPONENT_REF.
3886 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3887 pushdecl_class_level.
3888 * method.c (hack_identifier): Build COMPONENT_REFs for references
3889 to member templates as well as member functions. Remove dead
3890 code.
3891 * parse.y (left_curly): Remove.
3892 (nonnested_type): Call maybe_note_name_used_in_class, not
3893 pushdecl_class_level.
3894 * parse.c: Regenerated.
3895 (nested_name_specifier_1): Likewise.
3896 * pt.c (check_explicit_specialization): Adjust, for robustness.
3897 (check_template_shadow): Handle OVERLOADs.
3898 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3899 TEMPLATE_DECL, if appropriate.
3900 * search.c (envelope_add_decl): Remove.
3901 (dfs_pushdecls): Likewise.
3902 (dfs_compress_decls): Likewise.
3903 (dfs_push_decls): New function.
3904 (dfs_push_type_decls): Likewise.
3905 (setup_class_bindings): Likewise.
3906 (template_self_reference_p): Likewise.
3907 (lookup_field_r): Use it.
3908 (looup_member): Remove old comment. Deal with ambiguity.
3909 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3910 and remove envelope processing.
3911 * semantics.c (begin_class_definition): Let pushclass push
3912 declarations for base classes.
3913 (finish_member_declaration): Push declarations into class scope.
3914 * typeck.c (build_component_ref): Just put an OVERLOAD into the
3915 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3916 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
3917 * Makefile.in (class.o): Depend on splay-tree.h.
3918
3919 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
3920
3921 * cvt.c (convert_pointer_to_real): Use same_type_p.
3922 * typeck.c (comp_target_types): Use same_type_p.
3923
3924 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
3925
3926 * semantics.c (begin_inline_definitions,
3927 finish_inline_definitions): Rename from finish_default_args and
3928 begin_inline_definitions, respectively, to something that isn't a
3929 total lie. :)
3930 * parse.y (structsp): Adjust.
3931
3932 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3933 (list_hash_lookup): Likewise.
3934 (hash_tree_chain): Adjust.
3935 * pt.c (tsubst): Adjust.
3936 (tsubst_arg_types): Use plain hash_tree_cons.
3937 * cp-tree.h (hash_tree_cons_simple): Lose.
3938 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3939
3940 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3941
3942 * Makefile.in (hash.h): Generate using gperf language 'C', not
3943 'KR-C', so gperf uses the `const' keyword on strings.
3944
3945 * gxx.gperf (resword): Const-ify a char*.
3946
3947 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
3948
3949 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3950 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3951 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3952 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3953 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3954 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3955 tree.c: Adjust.
3956
3957 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
3958
3959 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3960
3961 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
3962
3963 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3964
3965 1999-03-27 Mark Mitchell <mark@codesourcery.com>
3966
3967 * cp-tree.h (add_friend): Declare.
3968 (add_friends): Likewise.
3969 * friend.c (add_friend): Make it global. Don't add to
3970 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3971 (add_friends): Make it global.
3972 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3973 befriending class is a template.
3974 * parse.y (component_decl_1): Fix typo in comment.
3975 * parse.c: Regenerated.
3976 * pt.c (instantiate_class_template): Use add_friend and
3977 add_friends rather that duplicating some of their functionality
3978 here.
3979
3980 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
3981
3982 * call.c (build_field_call): Unify 'this' and non-'this' cases.
3983
3984 * typeck.c (build_indirect_ref): Check for 'this' sooner.
3985
3986 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3987
3988 * call.c (op_error): Const-ify a char*.
3989 (add_candidate, source_type, add_warning): Add static prototype.
3990 (print_z_candidates): Const-ify a char*.
3991
3992 * class.c (resolve_address_of_overloaded_function,
3993 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3994 (get_vtable_name, finish_struct_1): Const-ify a char*.
3995
3996 * cvt.c (convert_to_reference): Likewise.
3997
3998 * decl.c (redeclaration_error_message, record_builtin_type,
3999 record_unknown_type, member_function_or_else, bad_specifiers):
4000 Likewise.
4001 (find_binding, select_decl, unqualified_namespace_lookup,
4002 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4003 Add static prototype.
4004 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4005 implicitly_declare, record_builtin_java_type, define_function,
4006 grok_op_properties, tag_name): Const-ify a char*.
4007
4008 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4009 (define_function, finish_builtin_type): Const-ify a char*.
4010 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4011 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4012 (file_name_nondirectory): Const-ify a char*.
4013 (init_filename_times): Don't prototype.
4014 (compiler_error): Prototype.
4015 (yyerror, init_repo): Const-ify a char*.
4016 (build_srcloc): Don't prototype.
4017 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4018 Const-ify a char*.
4019 (warn_for_assignment): Don't prototype.
4020 (convert_for_initialization, readonly_error, check_for_new_type,
4021 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4022 Const-ify a char*.
4023
4024 * decl2.c (acceptable_java_type, output_vtable_inherit,
4025 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4026 merge_functions, decl_namespace, validate_nonmember_using_decl,
4027 do_nonmember_using_decl): Add static prototype.
4028 (lang_f_options): Const-ify a char*.
4029 (finish_builtin_type): Likewise.
4030 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4031 prototype.
4032
4033 * errfn.c: Include cp-tree.h.
4034 (cp_thing): Add static prototype.
4035 (compiler_error): Don't protoptype.
4036 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4037 passing it to `cp_thing'.
4038
4039 * error.c (interesting_scope_p): Add static prototype.
4040
4041 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4042 a char*.
4043
4044 * init.c (compiler_error): Don't prototype.
4045 (member_init_ok_or_else): Const-ify a char*.
4046 (build_java_class_ref): Add static prototype.
4047
4048 * lex.c (compiler_error): Don't prototype.
4049 (get_time_identifier, interface_strcmp, extend_token_buffer,
4050 handle_cp_pragma): Const-ify a char*.
4051 (is_global, init_filename_times): Add static prototype.
4052 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4053 (compiler_error): Change from fixed args to variable args.
4054 (yyerror): Const-ify a char*.
4055
4056 * parse.y (cond_stmt_keyword): Const-ify a char*.
4057 (parse_decl): Add static prototype.
4058
4059 * pt.c (template_args_equal, print_template_context): Likewise.
4060 (print_candidates, check_default_tmpl_args): Const-ify a char*.
4061 (instantiate_class_template): Likewise.
4062
4063 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4064
4065 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4066 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4067
4068 * search.c (lookup_field_info, lookup_member): Likewise.
4069 (lookup_member): Cast the first argument of `bzero' to a PTR.
4070
4071 * sig.c (compiler_error): Don't prototype.
4072 (build_signature_pointer_or_reference_nam): Const-ify a char*.
4073 (get_sigtable_name, build_member_function_pointer): Likewise.
4074
4075 * tree.c (compiler_error): Don't prototype.
4076 (no_linkage_helper, build_srcloc): Add static prototype.
4077 (build_vbase_pointer_fields): Const-ify a char*.
4078 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4079
4080 * typeck.c (compiler_error): Don't prototype.
4081 (convert_for_assignment): Const-ify a char*.
4082 (comp_cv_target_types): Add static prototype.
4083 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4084 build_component_addr, build_unary_op, convert_for_initialization):
4085 Const-ify a char*.
4086
4087 * typeck2.c (ack): Add static prototype and change from fixed args
4088 to variable args.
4089 (readonly_error, check_for_new_type): Const-ify a char*.
4090
4091 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4092 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4093 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
4094 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4095 gen_assign, GNU_xref_member): Const-ify a char*.
4096
4097 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4098
4099 * gxxint.texi: Remove old discussion on copying virtual bases.
4100
4101 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
4102
4103 * Make-lang.in: Remove all references to g++.o/g++.c.
4104 Link g++ from gcc.o.
4105
4106 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4107
4108 * decl2.c (comdat_linkage): Treat vtables like functions.
4109
4110 1999-03-25 Mark Mitchell <mark@codesourcery.com>
4111
4112 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4113
4114 1999-03-25 Nathan Sidwell <nathan@acm.org>
4115
4116 * decl.c (init_decl_processing): Add `signed' type as a synonym
4117 for `int'.
4118
4119 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
4120
4121 * typeck.c (common_type): Handle cv-qual unification for pointers
4122 to members.
4123
4124 * decl.c (unqualified_namespace_lookup): Return error_mark_node
4125 on error.
4126 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4127 * lex.c (do_identifier): If we got error_mark_node, call
4128 lookup_name again.
4129
4130 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4131
4132 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4133 classes.
4134
4135 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
4136
4137 * decl.c (lookup_name_real): Do nested field lookup regardless of
4138 TYPE_BEING_DEFINED.
4139
4140 1999-03-24 Mark Mitchell <mark@codesourcery.com>
4141
4142 * cp-tree.h (lang_type): Remove has_assignment and
4143 has_real_assignment. Add befriending_classes.
4144 (TYPE_HAS_ASSIGNMENT): Remove.
4145 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4146 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4147 (lang_decl): Document.
4148 (DECL_BEFRIENDING_CLASSES): New macro.
4149 (FRIEND_NAME): Move declaration to more obvious location.
4150 (FRIEND_DECLS): Likewise.
4151 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4152 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4153 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4154 (grok_op_properties): Likewise.
4155 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4156 (add_friend): Likewise. Don't do weird things with assignment
4157 operators. Update DECL_BEFRIENDING_CLASSES.
4158 (add_friends): Don't do weird things with assignment operators.
4159 (make_friend_class): Likewise. Update
4160 CLASSTYPE_BEFRIENDING_CLASSES.
4161 * pt.c (instantiate_class_template): Don't set
4162 TYPE_HAS_ASSIGNMENT.
4163 (tsubst_copy): Substitute the TREE_TYPE for more unary
4164 expressions.
4165 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4166 * search.c (protected_accessible_p): New function.
4167 (friend_accessible_p): Likewise.
4168 (accessible_p): Use them.
4169
4170 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4171
4172 * pt.c (convert_nontype_argument): Don't create things that aren't
4173 PTRMEM_CSTs when applying a qualification conversion to a
4174 PTRMEM_CST.
4175
4176 1999-03-23 Mark Mitchell <mark@codesourcery.com>
4177
4178 * Makefile.in (OBJS): Don't mention hash.o.
4179 (OBJDEPS): Likewise.
4180
4181 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
4182
4183 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4184 * decl.c (expand_static_init): Make sure we don't add any after
4185 then.
4186
4187 * decl.c (cp_finish_decl): Move intelligence about handling
4188 DECL_COMDAT for variables from here...
4189 * decl2.c (comdat_linkage): ...to here.
4190 (maybe_make_one_only): Tweak.
4191 (import_export_decl): Call comdat_linkage for variables, too.
4192 (finish_file): Handle template statics properly.
4193
4194 1999-03-22 Mark Mitchell <mark@codesourcery.com>
4195
4196 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4197 Document internals of pointer-to-member-functions.
4198 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4199 (PFN_FROM_PTRMEMFUNC): Likewise.
4200 (build_type_conversion): Remove unused parameter.
4201 (build_ptrmemfunc1): Declare.
4202 (expand_ptrmemfunc_cst): New function.
4203 (delta2_from_ptrmemfunc): Likewise.
4204 (pfn_from_ptrmemfunc): Likewise.
4205 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4206 build_type_conversion. Use TYPE_PTRMEM_P for readability.
4207 (convert_to_reference): Remove unused parameter to
4208 build_type_conversion.
4209 (ocp_convert): Likewise.
4210 (build_user_type_conversion): Likewise.
4211 * error.c (dump_expr): Handle NULL pointer-to-member functions.
4212 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4213 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4214 open when handling pointer-to-member functions.
4215 * pt.c (convert_nontype_argument): Clean up error messages. Be
4216 more stringent with pointers-to-members.
4217 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
4218 (build_unary_op): Tidy ever-so-slightly.
4219 (build_conditional_expr): Remove extra parameter to
4220 build_type_conversion.
4221 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4222 we're using.
4223 (expand_ptrmemfunc_cst): Define.
4224 (delta2_from_ptrmemfunc): Likewise.
4225 (pfn_from_ptrmemfunc): Likewise.
4226
4227 1999-03-19 Mark Mitchell <mark@codesourcery.com>
4228
4229 * init.c (build_member_call): Handle template-id expressions
4230 correctly.
4231 * typeck.c (build_x_function_call): Likewise.
4232
4233 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
4234
4235 * friend.c (make_friend_class): Avoid core dump when
4236 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4237
4238 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
4239
4240 * decl.c (start_function): Suppress normal linkage heuristics
4241 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4242
4243 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
4244
4245 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4246 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4247
4248 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
4249
4250 * parse.y (named_complex_class_head_sans_basetype):
4251 Do not push a scope for error_mark_node.
4252 (maybe_base_class_list): Likewise.
4253
4254 * decl.c (start_decl): Check for error_mark_node as a type.
4255 Detected by g++.brendan/array-refs.C.
4256 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
4257 (maybe_build_cleanup_1): Likewise. Detected by
4258 g++.jason/incomplete1.C.
4259
4260 * tree.c (build_dummy_object): Use void_zero_node instead of the
4261 error_mark_node.
4262 (is_dummy_object): Check for such a node.
4263 Detected by g++.bob/inherit1.C
4264
4265 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
4266
4267 * method.c (old_backref_index): Split out...
4268 (flush_repeats): From here. Rename back from try_old_backref.
4269 (build_mangled_name): Put back some old-style repeat handling.
4270
4271 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4272
4273 * lex.c: Don't include setjmp.h.
4274 (parse_float): New static function.
4275 (pf_args): New struct.
4276 (real_yylex): Use them in call to `do_float_handler'.
4277
4278 1999-03-15 Mark Mitchell <mark@markmitchell.com>
4279
4280 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4281 * tree.c (layout_basetypes): Not here.
4282 * search.c (dfs_search): Remove; no longer used.
4283
4284 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4285
4286 * decl2.c (validate_nonmember_using_decl): Issue sensible
4287 error-messages on bogus qualifiers.
4288
4289 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
4290
4291 * call.c (add_function_candidate): Fix uninitialized variable.
4292
4293 * Makefile.in (search.o): Add dependency on varray.h.
4294
4295 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
4296
4297 * decl.c (duplicate_decls): Use same_type_p.
4298 * method.c (try_old_backref): Renamed from flush_repeats. Use
4299 same_type_p. Don't try to handle repeats. Return success.
4300 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
4301 calls from old-style code, too.
4302 (check_ktype): Use same_type_p.
4303 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
4304 (build_qualified_name): Simplify logic.
4305 (process_overload_item): Strip typedefs and quals at the top.
4306 (build_mangled_name_for_type_with_Gcode): Remove call to
4307 type_canonical_variant.
4308 (build_mangled_name): Likewise. Remove support for old-style
4309 repeats, which have been disabled since 2.7.2. Don't mess with
4310 TREE_USED.
4311 (build_decl_overload_real): Don't mess with TREE_USED.
4312
4313 1999-03-13 Nathan Sidwell <nathan@acm.org>
4314
4315 * error.c (cp_printers): Add 'F' escape character.
4316 (dump_type_real): Remove TREE_LIST (fnargs) printing.
4317 Functionality moved to dump_parameters.
4318 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4319 (dump_function_decl): Extend meaning of V parameter. Use
4320 dump_parameters and dump_exception_spec.
4321 (dump_parameters): New static function.
4322 (dump_exception_spec): New static function.
4323 (fndecl_as_string): Change argument semantics. Use
4324 dump_function_decl directly.
4325
4326 * sig.c (build_signature_table_constructor): Use cp_error.
4327
4328 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
4329
4330 * semantics.c (finish_switch_cond): Handle error cases gracefully.
4331 Detected by g++.law/enum5.C.
4332
4333 * typeck.c (build_modify_expr): Check for errors after resolving
4334 offsets. Detected by g++.brendan/static1.C.
4335
4336 * decl.c (complete_array_type): Ignore initial_value if it is an
4337 error. Detected by g++.benjamin/17930.C.
4338
4339 * typeck2.c (process_init_constructor): Return error if one argument
4340 is in error. Detected by g++.benjamin/13478.C.
4341
4342 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
4343
4344 * decl.c (select_decl): Allow class templates when we need types.
4345 * decl2.c (ambiguous_decl): Likewise.
4346
4347 1999-03-12 Mark Mitchell <mark@markmitchell.com>
4348
4349 * lex.c (do_identifier): Correct call to enforce_access.
4350 * search.c (accessible_p): Tweak comment.
4351
4352 1999-03-10 Mark Mitchell <mark@markmitchell.com>
4353
4354 * semantics.c (begin_class_definition): Call build_self_reference.
4355 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4356
4357 * search.c (assert_canonical_unmarked): Fix typo in prototype.
4358
4359 * search.c (dfs_canonical_queue): New function.
4360 (dfs_assert_unmarked_p): Likewise.
4361 (assert_canonical_unmarked): Likewise.
4362 (access_in_type): Use it.
4363 (accessible_p): Likewise. Walk the whole tree when umarking.
4364
4365 * sig.c (build_signature_table_constructor): Use accessible_p
4366 instead of compute_access.
4367
4368 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4369
4370 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4371
4372 1999-03-09 Mark Mitchell <mark@markmitchell.com>
4373
4374 * cp-tree.h (flag_access_control): Declare.
4375 (TREE_VIA_PPUBLIC): Document.
4376 (DECL_NONSTATIC_MEMBER_P): New macro.
4377 (enforce_access): Return an indication of whether or not access
4378 was permitted.
4379 (build_self_reference): Change prototype.
4380 (compute_access): Replace with ...
4381 (accessible_p): New function.
4382 (dfs_walk): Change prototype.
4383 (dfs_unmark): Likewise.
4384 (markedp): Likewise.
4385 * call.c (enforce_access): Use accessible_p.
4386 * class.c (build_self_reference): Insert the declaration into the
4387 list of members for this type, and make it public.
4388 * decl.c (xref_basetypes): Avoid ill-timed recursion.
4389 * init.c (build_offset_ref): Use lookup_member, not three separate
4390 name-lookups. Call enforce_access rather than checking for
4391 illegal accesses here.
4392 (resolve_offset_ref): Likewise.
4393 * lex.c (do_identifier): Likewise.
4394 * method.c (hack_identifier): Likewise.
4395 * parse.y (self_reference): Remove.
4396 (opt_component_decl_list): Don't use it.
4397 * parse.c: Regenerated.
4398 * pt.c (print_candidates): Generalize to handle lists of
4399 overloaded functions.
4400 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
4401 not set.
4402 (get_template_base): Use new calling convention for dfs_walk.
4403 * search.c: Include varray.h. Add prototypes.
4404 (dfs_walk): Accept a data pointer to pass to the work functions.
4405 All callers changed. All work functions changed.
4406 (breadth_first_search): Rename to bfs_walk, and make consistent
4407 with dfs_walk.
4408 (dfs_walk_real): New function.
4409 (canonical_binfo): New function.
4410 (context_for_name_lookup): Likewise.
4411 (shared_marked_p): Likewise.
4412 (shared_unmarked_p): Likewise.
4413 (lokup_field_queue_p): Likewise.
4414 (lookup_field_r): Generalize to handle both functions and fields.
4415 (lookup_field): Just call lookup_member.
4416 (lookup_fnfields): Likewise.
4417 (lookup_member): Move body of lookup_field here and generalize.
4418 (dfs_accessible_queue_p): Likewise.
4419 (dfs_accessible_p): Likewise.
4420 (dfs_access_in_type): Likewise.
4421 (access_in_type): Likewise.
4422 (compute_access): Remove, and replace with ...
4423 (accessible_p): New function.
4424 (vbase_types): Remove.
4425 (vbase_decl_ptr_intermediate): Likewise.
4426 (vbase_decl_ptr): Likewise.
4427 (vbase_init_result): Likewise.
4428 (closed_envelopes): Likewise.
4429 (bvtable): Likewise.
4430
4431 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4432
4433 * call.c (add_function_candidate): Check for proper number of args
4434 before checking the validity of those args.
4435
4436 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
4437
4438 * cp-tree.h (struct lang_type): Add anon_union field.
4439 (ANON_UNION_TYPE_P): Use it instead of examining type.
4440 (SET_ANON_UNION_TYPE_P): New macro.
4441 * decl.c (check_tag_decl): Use it.
4442
4443 * search.c (compute_access): Handle non-type contexts earlier, and
4444 handle NULL_TREE.
4445
4446 * tree.c (build_exception_variant): Use copy_to_permanent.
4447
4448 * decl2.c (setup_initp): Give statics with no priority the default
4449 priority here.
4450 (do_dtors, do_ctors, finish_file): Remove special handling of
4451 non-prioritized statics.
4452
4453 1999-03-05 Mark Mitchell <mark@markmitchell.com>
4454
4455 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4456 * decl.c (make_typename_type): Don't issue an error if an
4457 immediate lookup fails; it migt be resolved later.
4458 * friend.c (is_friend): Add comment.
4459 * search.c (breadth_first_search): Add POSTFN and DATA
4460 parameters. Tidy. All callers changed.
4461 (lookup_field_queue_p): New function.
4462 (lookup_field_r): Likewise.
4463 (lookup_field_post): Likewise.
4464 (lookup_field): Use them, via breadth_first_search, instead of
4465 duplicating logic.
4466 (compute_access): Robustify.
4467 (lookup_fnfield_info): New structure.
4468
4469 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
4470
4471 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4472
4473 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
4474
4475 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4476 cc happy.
4477
4478 * decl2.c (import_export_class): Also return if
4479 CLASSTYPE_INTERFACE_ONLY is set.
4480
4481 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
4482
4483 * decl.c (push_overloaded_decl): Only overwrite the old binding if
4484 there was one.
4485 * decl2.c (do_local_using_decl): Fix loop termination.
4486
4487 1999-03-02 Mark Mitchell <mark@markmitchell.com>
4488
4489 * cp-tree.h (determine_specialization): Don't declare.
4490 * pt.c (determine_specialization): Make it static. Eliminate
4491 complain parameter. Note that decl is always non-NULL now, and
4492 simplify accordingly.
4493
4494 * decl.c (maybe_push_to_top_level): Always call
4495 push_cp_function_context.
4496 (pop_from_top_level): Always call pop_cp_function_context.
4497
4498 1999-02-26 Nathan Sidwell <nathan@acm.org>
4499
4500 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4501 diagnostics.
4502 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4503 * init.c (build_new_1): Extra arg to complete_type_or_else.
4504 (build_delete): Likewise.
4505 * typeck.c (require_complete_type): Likewise.
4506 (pointer_int_sum): Likewise.
4507 (pointer_diff): Likewise.
4508 (build_component_ref): Likewise.
4509
4510 * typeck2.c (incomplete_type_error): Always use cp_error.
4511 Show declaration of undefined type, if appropriate.
4512 Deal with UNKNOWN_TYPE nodes.
4513
4514 * typeck.c (require_complete_type): Use TYPE_SIZE as
4515 size_zero_node to mean incomplete type.
4516 (require_complete_type_in_void): New function.
4517 (build_compound_expr): Call complete_type_in_void for LHS.
4518 (build_c_cast): Call complete_type_in_void for void cast.
4519 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4520 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4521 require_complete_type_in_void. Call it.
4522 * cp-tree.h (require_complete_type_in_void): Prototype new function.
4523
4524 * typeck.c (convert_arguments): Use alternative format for
4525 function decls. Don't require_complete_type here. Simplify
4526 diagnostic printing.
4527 (convert_for_initialization): Don't require_complete_type on RHS yet.
4528 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4529
4530 * call.c (build_over_call): Cope with qualified void return type.
4531 * semantics.c (finish_call_expr): Likewise.
4532 * typeck.c (build_function_call_real): Likewise.
4533 (c_expand_return): Likewise.
4534 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4535
4536 * call.c (print_z_candidates): Use alternate print format, to be
4537 consistent with (pt.c) print_candidates.
4538 * method.c (hack_identifier): List candidate members.
4539 * search.c (lookup_field): Build ambiguous list, and show it, if
4540 ambiguous.
4541
4542 1999-02-26 Mark Mitchell <mark@markmitchell.com>
4543
4544 * typeck.c (decay_conversion): Don't confuse constant array
4545 variables with their initializers.
4546
4547 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4548 merging decls.
4549 * pt.c (regenerate_decl_from_template): Tweak for clarity.
4550 (instantiate_decl): Mark a decl instantiated before regenerating
4551 it to avoid recursion.
4552 * tree.c (mapcar): Don't call decl_constant_value unless we know
4553 something is TREE_READONLY_DECL_P.
4554
4555 * class.c (check_for_override): Don't stop checking when we find
4556 the first overridden function. Delete #if 0'd code.
4557 * search.c (get_matching_virtual): Likewise.
4558
4559 1999-02-25 Richard Henderson <rth@cygnus.com>
4560
4561 * lang-specs.h: Define __FAST_MATH__ when appropriate.
4562
4563 1999-02-24 Mike Stump <mrs@wrs.com>
4564
4565 * typeck.c (convert_for_assignment): Allow boolean integral constant
4566 expressions to convert to null pointer.
4567
4568 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
4569
4570 * decl.c (lookup_namespace_name): Resolve namespace aliases.
4571
4572 * class.c (push_nested_class): Allow namespaces.
4573
4574 * decl2.c (set_decl_namespace): Add friendp parameter.
4575 * decl.c (grokfndecl): Pass it.
4576 (grokvardecl): Likewise.
4577 * cp-tree.h: Change declaration.
4578
4579 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
4580
4581 * pt.c (tsubst): Allow an array of explicit size zero.
4582
4583 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
4584
4585 * errfn.c: Change varargs code to look like toplev.c.
4586
4587 * method.c (process_modifiers): Don't prepend 'U' for char or
4588 wchar_t.
4589
4590 1999-02-20 Craig Burley <craig@jcb-sc.com>
4591
4592 * Make-lang.in (cplib2.ready): Don't consider updating
4593 cplib2 stuff if the current directory isn't writable, as
4594 it won't work (such as during a `make install').
4595
4596 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
4597
4598 * decl2.c (start_objects): Make file scope constructors and
4599 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4600 ASM_OUTPUT_DESTRUCTOR are defined.
4601
4602 1999-02-19 Mark Mitchell <mark@markmitchell.com>
4603
4604 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4605 (fn_type_unification): Adjust prototype.
4606 (lookup_fnfields_1): Declare.
4607 * call.c (add_template_candidate_real): Adjust call to
4608 fn_type_unification.
4609 * class.c (add_method): Don't allow duplicate declarations of
4610 constructors or destructors.
4611 (resolve_address_of_overloaded_function): Remove unused variable.
4612 Adjust call to fn_type_unification.
4613 * decl.c (grokfndecl): Be more robust in the face of illegal
4614 specializations.
4615 * decl2.c (check_classfn): Remove hokey handling of member
4616 templates.
4617 * pt.c (determine_specialization): Improve comments. Adjust to
4618 handle template argument deduction as per the standard.
4619 (check_explicit_specialization): Fix comment spacing. Handle
4620 type-conversion operators correctly. Improve error-recovery.
4621 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4622 (get_bindings_real): Simplify handling of static members.
4623 * search.c (lookup_fnfields_1): Make it have external linkage.
4624 * typeck.c (compparms): Fix comment.
4625 (build_unary_op): Don't try to figure out which template
4626 specialization is being referred to when when the address-of
4627 operator is used with a template function.
4628
4629 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4630
4631 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4632 keyword to match an analogous change at the top level.
4633
4634 * tree.c (lvalue_or_else): Likewise.
4635
4636 1999-02-17 Mark Mitchell <mark@markmitchell.com>
4637
4638 * decl.c (xref_basetypes): Comment.
4639 * pt.c (instantiate_class_template): Use xref_basetypes.
4640
4641 1999-02-16 Mark Mitchell <mark@markmitchell.com>
4642
4643 * cp-tree.h (tsubst): Change prototype.
4644 (tsubst_expr): Likewise.
4645 (tsubst_copy): Likewise.
4646 (type_unification): Remove prototype.
4647 * call.c (convert_default_arg): Adjust call to tsubst_expr.
4648 * class.c (resolve_address_of_overloaded_function): Just use
4649 fn_type_unification.
4650 * decl.c (grokdeclarator): Adjust call to tsubst.
4651 * method.c (build_template_parm_names): Likewise.
4652 * pt.c (GTB_VIA_VIRTUAL): New macro.
4653 (GTB_IGNORE_TYPE): Likewise.
4654 (resolve_overloaded_unification): Add `complain' parameter.
4655 (try_one_overload): Likewise.
4656 (tsubst_template_arg_vector): Likewise.
4657 (tsubst_template_parms): Likewise.
4658 (tsubst_aggr_type): Likewise.
4659 (tsubst_arg_types): Likewise.
4660 (tsubst_call_declarator_parms): Likewise.
4661 (unify): Remove explicit_mask.
4662 (type_unification_real): Likewise.
4663 (get_template_base_recursive): Likewise.
4664 (coerce_template_template_parms): Provide prototype.
4665 (tsubst_function_type): Likewise.
4666 (try_class_unification): New function.
4667 All callers changed to use new complain parameter.
4668 (get_template_base): Use try_class_unification.
4669 (unify): Adjust handling of classes derived from template types.
4670 (fn_type_unification): Substitute explicit arguments before
4671 unification.
4672
4673 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4674
4675 * decl.c (pushdecl): Remove dead code.
4676
4677 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
4678
4679 * decl2.c (finish_objects): Fix code I missed in previous change.
4680
4681 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
4682
4683 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4684 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4685
4686 * pt.c (maybe_process_partial_specialization): Complain about
4687 'template <>' on non-specialization.
4688
4689 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
4690
4691 * decl.c (grokdeclarator): Catch wierd declarators.
4692 * decl2.c (finish_file): Don't abort because of namespace parsing
4693 failure.
4694 (check_decl_namespace): Remove.
4695
4696 1999-02-09 Mark Mitchell <mark@markmitchell.com>
4697
4698 * cp-tree.h (get_template_base): Don't declare.
4699 (dfs_walk): Declare.
4700 (dfs_unmark): Likewise.
4701 (markedp): Likewise.
4702 * pt.c (unify): Remove duplicate declaration. Pass tparms and
4703 targs to get_template_base.
4704 (get_template_base_recursive): Move here from search.c. Check to
4705 see that the base found can be instantiated to form the desired
4706 type.
4707 (get_template_base): Likewise.
4708 (get_class_bindings): Simplify.
4709 * search.c (get_template_base_recursive): Move to pt.c.
4710 (get_template_base): Likewise.
4711 (markedp): Make it global.
4712 (dfs_walk): Likewise.
4713 (dfs_unmark): Likewise.
4714
4715 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
4716
4717 * pt.c (maybe_process_partial_specialization): Complain about
4718 specialization in wrong namespace.
4719 * tree.c (decl_namespace_context): New fn.
4720
4721 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4722
4723 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4724 * pt.c (coerce_template_template_parms): Handle nested
4725 template template parameters.
4726
4727 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
4728
4729 * typeck2.c: Update email addresses.
4730
4731 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4732
4733 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4734 turned off.
4735
4736 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
4737
4738 * lex.c (retrofit_lang_decl): Split out...
4739 (build_lang_decl): From here.
4740 * decl.c (pushdecl): Call it for functions generated by the middle
4741 end that don't have DECL_LANG_SPECIFIC.
4742 * cp-tree.h: Declare it.
4743
4744 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
4745 (start_objects, finish_objects): Only use special
4746 init_priority code if the user specified a priority.
4747 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4748 objects.
4749
4750 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
4751
4752 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4753 mkstemp.o. Get them from libiberty now.
4754 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4755
4756 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4757
4758 * decl2.c (lang_decode_option): Use read_integral_parameter.
4759
4760 1999-02-01 Mark Mitchell <mark@markmitchell.com>
4761
4762 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4763 before calling complete_type_or_else.
4764
4765 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4766
4767 * input.c (inline): Don't define, its handled by system.h.
4768
4769 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
4770
4771 * decl2.c: Don't define flag_no_ident here. Don't process
4772 -f(no-)ident here.
4773 * cp-tree.h: Don't declare flag_no_ident here.
4774 * lang-specs.h: Map -Qn to -fno-ident.
4775
4776 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
4777
4778 * cp-tree.h (struct tree_binding): Replace scope field with a union.
4779 (BINDING_SCOPE): Adjust.
4780 * decl.c (BINDING_LEVEL): Adjust.
4781
4782 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
4783
4784 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4785 member constants.
4786
4787 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4788 a ctor initializer.
4789
4790 * tree.c (equal_functions): Fix name in prototype.
4791
4792 * decl.c (push_local_binding): Add FLAGS argument.
4793 (pushdecl, push_overloaded_decl): Pass it.
4794 * decl2.c (do_local_using_decl): Likewise.
4795 * cp-tree.h: Adjust prototype.
4796 * decl.c (poplevel): Fix logic.
4797
4798 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4799 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
4800 (cat_namespace_levels): Don't loop forever.
4801
4802 1999-01-25 Richard Henderson <rth@cygnus.com>
4803
4804 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4805
4806 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
4807
4808 * class.c (resolve_address_of_overloaded_function): Mark the
4809 chosen function used.
4810
4811 * call.c (build_call): Make sure that a function coming in has
4812 been marked used already.
4813 * decl.c (expand_static_init): Call mark_used instead of
4814 assemble_external.
4815 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4816 alloc_eh_object, expand_throw): Likewise.
4817 * init.c (build_builtin_delete_call): Likewise.
4818 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4819 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4820 expand_generic_desc): Likewise.
4821
4822 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4823
4824 * tree.c (equal_functions): New function.
4825 (ovl_member): Call it.
4826
4827 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4828
4829 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4830
4831 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
4832
4833 * decl.c (decls_match): Return 1 if old and new are identical.
4834 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4835
4836 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4837
4838 * decl.c (start_function): Make member functions one_only on windows.
4839 * decl2.c (import_export_decl): Likewise.
4840
4841 * decl.c (grokdeclarator): Don't complain about implicit int in
4842 a system header. Change same-name field check to not complain in
4843 a system header instead of within extern "C".
4844
4845 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4846
4847 * cp-tree.h (PUSH_GLOBAL): New macro.
4848 (PUSH_LOCAL): Likewise.
4849 (PUSH_USING): Likewise.
4850 (namespace_bindings_p): Declare.
4851 (push_overloaded_decl): Likewise.
4852 * decl.c (push_overloaded_decl): Don't make it static. Check for
4853 illegal declarations after using declarations here.
4854 (namespace_bindings_p): Likewise.
4855 (duplicate_decls): Don't consider declarations from different
4856 namespaces to be the same.
4857 (pushdecl): Use symbolic PUSH_ constants in calls to
4858 push_overloaded_decl.
4859 (push_overloaded_decl_1): Likewise.
4860 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4861 (do_nonmember_using_decl): Check for illegal using declarations
4862 after ordinary declarations here.
4863 (do_local_using_decl): Call pushdecl to insert declarations.
4864
4865 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
4866
4867 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4868
4869 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4870
4871 * tree.c (build_cplus_array_type_1): Don't call build_array_type
4872 for types involving template parameters.
4873
4874 * cp-tree.h (PARM_DECL_EXPR): Delete.
4875 (convert_default_arg): Change prototype.
4876 (check_default_argument): Declare.
4877 (search_tree): Likewise.
4878 * call.c (convert_default_arg): Take the function to which the
4879 default argument belongs as a parameter, and do any necessary
4880 instantiation here, instead of ...
4881 (build_over_call): Here.
4882 * decl.c (local_variable_p): New function.
4883 (check_default_argument): Likewise, split out and tidied from ...
4884 (grokparms): Here.
4885 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4886 * pt.c (tsubst_call_declarator_parms): New function.
4887 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
4888 with CALL_EXPRs, rather than trying to be clever.
4889 (tsubst): Use tsubst_call_declarator_parms.
4890 * tree.c (search_tree): Don't make it static.
4891 * typeck.c (convert_arguments): Use new interface to
4892 convert_default_arg.
4893
4894 1999-01-20 Mark Mitchell <mark@markmitchell.com>
4895
4896 * error.c (dump_function_decl): Don't print the argument types for
4897 a function when the verbosity level is negative.
4898
4899 * call.c (build_over_call): Check format attributes at call-time.
4900
4901 * pt.c (tsubst_copy): Fix comment.
4902 (unify): Don't allow unification with variable-sized arrays.
4903
4904 * semantics.c (finish_stmt_expr): When processing a template make
4905 the BIND_EXPR long-lived.
4906
4907 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
4908
4909 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4910 (import_export_vtable): Not here.
4911
4912 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4913
4914 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4915 non-static member function.
4916
4917 1999-01-18 Nathan Sidwell <nathan@acm.org>
4918
4919 * class.c (instantiate_type): Only diagnose illegal address of member
4920 function if complaining.
4921
4922 * decl.c (lookup_name_real): Remove duplicate code.
4923
4924 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4925
4926 * tree.c (copy_template_template_parm): Use permanent_obstack.
4927
4928 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4929
4930 * pt.c (unify): Remove restrictions on deduction of argument
4931 of template template parameters.
4932
4933 1999-01-18 Nathan Sidwell <nathan@acm.org>
4934
4935 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4936
4937 * class.c (resolve_address_of_overloaded_function): Show list of
4938 all candidates, when none of them match.
4939
4940 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
4941
4942 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4943 definition of 'casting away const' in reinterpret_cast<>.
4944
4945 1999-01-18 Graham <grahams@rcp.co.uk>
4946
4947 * cvt.c: Add include for decl.h, remove extern for
4948 static_aggregates which is now provided by decl.h.
4949
4950 * Makefile.in (cvt.o): Add dependency for decl.h and missing
4951 dependencies for convert.h and flags.h.
4952
4953 1999-01-18 Nathan Sidwell <nathan@acm.org>
4954
4955 * decl2.c (do_dtors): Set current location to that of the
4956 decl, for sensible diagnostics and debugging.
4957 (check_classfn): Issue `incomplete type' error, if
4958 class is not defined.
4959
4960 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4961
4962 * cp-tree.h: Add prototype for bound_pmf_p.
4963
4964 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4965 Manfred Hollstein <manfred@s-direktnet.de>
4966
4967 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4968 -Wreturn-type.
4969
4970 1999-01-16 Nathan Sidwell <nathan@acm.org>
4971
4972 * cp-tree.h (struct lang_type): Added has_mutable flag.
4973 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4974 (TYPE_HAS_MUTABLE_P): New macro to read it.
4975 (cp_has_mutable_p): Prototype for new function.
4976 * class.c (finish_struct_1): Set has_mutable from members.
4977 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4978 it contains a mutable.
4979 * typeck.c (cp_has_mutable_p): New function.
4980
4981 1999-01-15 Mark Mitchell <mark@markmitchell.com>
4982
4983 * pt.c (process_template_parm): Ignore top-level qualifiers on
4984 non-type parameters.
4985
4986 * decl.c (start_function): Use current_function_parms in the call
4987 to require_complete_type_for_parms, not the probably empty
4988 DECL_ARGUMENTS.
4989
4990 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
4991
4992 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4993
4994 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4995 that we don't suppress the other copies.
4996 * lex.c (handle_cp_pragma): Likewise.
4997
4998 1999-01-13 Mark Mitchell <mark@markmitchell.com>
4999
5000 * decl.c (grokdeclarator): Undo 1998-12-14 change.
5001 * tree.c (build_cplus_array_type_1): Likewise.
5002 * pt.c (instantiate_class_template): Remove misleading comment.
5003 (tsubst_aggr_type): Substitute if there are template parameters,
5004 regardless of whether or not they use template arguments.
5005 (unify): Likewise, but for unification.
5006
5007 1999-01-12 Richard Henderson <rth@cygnus.com>
5008
5009 * cp-tree.h (flag_permissive): Declare extern.
5010
5011 1999-01-06 Mark Mitchell <mark@markmitchell.com>
5012
5013 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5014 here.
5015 (lang_type): Add is_partial_instantiation. Decrease width of
5016 dummy.
5017 (PARTIAL_INSTANTIATION_P): New macro.
5018 (OPERATOR_TYPENAME_P): Remove.
5019 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5020 OPERATOR_TYPENAME_P.
5021 (grok_op_properties): Likewise.
5022 * friend.c (do_friend): Handle friends that are member functions
5023 correctly.
5024 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5025 * pt.c (instantiate_class_template): Rework for clarity. Avoid
5026 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
5027 any more partial instantiation than is absolutely necessary for
5028 implicit typename. Set PARTIAL_INSTANTIATION_P.
5029 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5030 * semantics.c (begin_class_definition): Handle partial
5031 specializations of a type that was previously partially
5032 instantiated.
5033
5034 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
5035
5036 * g++spec.c (LIBSTDCXX): Provide default definition.
5037 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5038
5039 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5040
5041 * Make-lang.in (g++.o): Depend on prefix.h.
5042
5043 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
5044
5045 * tree.c (bound_pmf_p): New fn.
5046 * typeck.c (build_c_cast): Use it.
5047
5048 * decl.c (grok_op_properties): Use same_type_p.
5049
5050 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5051
5052 * Makefile.in (cvt.o): Depend on toplev.h.
5053
5054 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5055
5056 * cvt.c: Include toplev.h.
5057
5058 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5059 definitions.
5060
5061 * init.c (expand_vec_init): Initialize variable `itype'.
5062
5063 * lex.c (yyerror): Cast the argument passed to a ctype function to
5064 an unsigned char.
5065
5066 * method.c (build_mangled_C9x_name): Wrap prototype and definition
5067 in "HOST_BITS_PER_WIDE_INT >= 64".
5068
5069 * typeck.c (build_binary_op): Mark parameter `convert_p' with
5070 ATTRIBUTE_UNUSED.
5071
5072 1998-12-22 Mark Mitchell <mark@markmitchell.com>
5073
5074 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5075 * tree.c (build_exception_variant): Don't crash on empty throw
5076 specs.
5077
5078 1998-12-18 DJ Delorie <dj@cygnus.com>
5079
5080 * cvt.c (convert_to_reference): Check for both error_mark_node
5081 and NULL_NODE after call to convert_for_initialization.
5082
5083 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
5084
5085 * error.c (interesting_scope_p): New fn.
5086 (dump_simple_decl): Use it.
5087 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5088 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5089
5090 1998-12-16 Mark Mitchell <mark@markmitchell.com>
5091
5092 * class.c (resolve_address_of_overloaded_function): Do conversion
5093 to correct type here, rather than ...
5094 (instantiate_type): Here.
5095
5096 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5097 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5098 (decl_template_parm_p): Remove.
5099 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5100 parameter.
5101 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5102 * pt.c (push_inline_template_parms_recursive): Set it.
5103 (decl_template_parm_p): Remove.
5104 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5105 (process_template_parm): Set it.
5106
5107 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
5108
5109 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5110 if configured with cpplib.
5111
5112 1998-12-15 Mark Mitchell <mark@markmitchell.com>
5113
5114 * decl.c (poplevel): Make sure ns_binding is initialized.
5115
5116 * decl.c (finish_function): Undo inadvertent change in previous
5117 patch.
5118
5119 1998-12-14 Mark Mitchell <mark@markmitchell.com>
5120
5121 * class.c (pushclass): Tweak handling of class-level bindings.
5122 (resolve_address_of_overloaded_function): Update pointer-to-member
5123 handling.
5124 (instantiate_type): Likewise.
5125 * cvt.c (cp_convert_to_pointer): Likewise.
5126 * decl.c (pop_binding): Take the DECL to pop, not just the name.
5127 Deal with `struct stat' hack.
5128 (binding_level): Add to documentation.
5129 (push_binding): Clear BINDING_TYPE.
5130 (add_binding): New function.
5131 (push_local_binding): Use it.
5132 (push_class_binding): Likewise.
5133 (poplevel): Adjust calls to pop_binding.
5134 (poplevel_class): Likewise.
5135 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5136 declarations to current binding level.
5137 (push_class_level_binding): Likewise.
5138 (push_overloaded_decl): Adjust handling of OVERLOADs in local
5139 bindings.
5140 (lookup_namespace_name): Don't crash when confronted with a
5141 TEMPLATE_DECL.
5142 (lookup_name_real): Do `struct stat' hack in local binding
5143 contexts.
5144 (build_ptrmemfunc_type): Adjust documentation.
5145 (grokdeclarator): Don't avoid building real array types when
5146 processing templates unless really necessary.
5147 (finish_method): Adjust calls to pop_binding.
5148 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5149 not reparse_decl_as_expr.
5150 (build_expr_from_tree): Deal with a template-id as the function to
5151 call in a METHOD_CALL_EXPR.
5152 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5153 (maybe_adjust_types_For_deduction): Don't do peculiar things with
5154 METHOD_TYPEs here.
5155 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
5156 pointer-to-member types where necessary.
5157 * tree.c (build_cplus_array_type_1): Don't avoid building real
5158 array types when processing templates unless really necessary.
5159 (build_exception_variant): Compare the exception lists correctly.
5160
5161 1998-12-13 Mark Mitchell <mark@markmitchell.com>
5162
5163 * cp-tree.def (CPLUS_BINDING): Update documentation.
5164 * cp-tree.h (LOCAL_BINDING_P): New macro.
5165 (lang_identifier): Rename local_value to bindings.
5166 (tree_binding): Make `scope' of type `void*', not `tree'.
5167 (BINDING_SCOPE): Update documentation.
5168 (IDENTIFIER_LOCAL_VALUE): Remove.
5169 (IDENTIFIER_CLASS_VALUE): Document.
5170 (IDENTIFIER_BINDING): New macro.
5171 (IDENTIFIER_VALUE): Likewise.
5172 (TIME_IDENTIFIER_TIME): Likewise.
5173 (TIME_IDENTIFIER_FILEINFO): Likewise.
5174 (IMPLICIT_TYPENAME_P): Likewise.
5175 (set_identifier_local_value): Remove.
5176 (push_local_binding): New function.
5177 (push_class_binding): Likewise.
5178 * class.c (pushclass): Update comments; use push_class_binding.
5179 * decl.c (set_identifier_local_value_with_scope): Remove.
5180 (set_identifier_local_value): Likewise.
5181 (push_binding): New function.
5182 (pop_binding): Likewise.
5183 (binding_level): Update documentation. Remove shadowed.
5184 (BINDING_LEVEL): New macro.
5185 (free_binding_nodes): New variable.
5186 (poplevel): Adjust for new name-lookup scheme. Don't mess up
5187 BLOCK_VARs when doing for-scope extension. Remove effectively
5188 dead code.
5189 (pushlevel_class): Tweak formatting.
5190 (poplevel_class): Adjust for new name-lookup scheme.
5191 (print_binding_level): Likewise.
5192 (store_bindings): Likewise.
5193 (pushdecl): Likewise.
5194 (pushdecl_class_level): Likewise.
5195 (push_class_level_binding): Likewise.
5196 (push_overloaded_decl): Update comments. Adjust for new
5197 name-lookup scheme.
5198 (lookup_name_real): Likewise.
5199 (lookup_name_current_level): Likewise.
5200 (cp_finish_decl): Likewise.
5201 (require_complete_types_for_parms): Likewise. Remove misleading
5202 #if 0'd code.
5203 (grok_parms): Likewise. Don't call
5204 require_complete_types_for_parms here.
5205 (grok_ctor_properties): Don't treat templates as copy
5206 constructors.
5207 (grop_op_properties): Or as assignment operators.
5208 (start_function): Document. Adjust for new name-lookup scheme.
5209 (finish_function): Likewise.
5210 * decl2.c (do_local_using_decl): Use push_local_binding.
5211 * lex.c (begin_definition_of_inclass_inline): New function, split
5212 out from ...
5213 (do_pending_inlines): Here, and ...
5214 (process_next_inline): Here.
5215 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5216 (init_filename_times): Likewise.
5217 (extract_interface_info): Likewise.
5218 (ste_typedecl_interface_info): Likewise.
5219 (check_newline): Likewise.
5220 (dump_time_statistics): Likewise.
5221 (handle_cp_pragma): Likewise.
5222 (do_identifier): Adjust for new name-lookup scheme.
5223 * parse.y (function_try_block): Return ctor_initializer_opt value.
5224 (fndef): Use it.
5225 (fn.defpen): Pass appropriate values to start_function.
5226 (pending_inline): Use functor_try_block value, and pass
5227 appropriate values to finish_function.
5228 * pt.c (is_member_template): Update documentation; remove handling
5229 of FUNCTION_DECLs. As per name, this function should deal only in
5230 TEMPLATE_DECLs.
5231 (decl_template_parm_p): Change name of olddecl parameter to decl.
5232 (check_template_shadow): Adjust for new name-lookup scheme.
5233 (lookup_template_class): Likewise.
5234 (tsubst_decl): Tweak so as not to confuse member templates with
5235 copy constructors and assignment operators.
5236 (unify): Handle UNION_TYPEs.
5237 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5238 (lang_print_xnode): Adjust for new name-lookup scheme.
5239 * typeck.c (mark_addressable): Likewise.
5240 (c_expand_return): Likewise.
5241
5242 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
5243
5244 * decl.c (grokdeclarator): Allow field with same name as class
5245 in extern "C".
5246
5247 * decl.c (lookup_name_real): Don't limit field lookup to types.
5248 * class.c (check_member_decl_is_same_in_complete_scope): No error
5249 if icv and x are the same.
5250 * lex.c (do_identifier): Tweak error message.
5251
5252 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5253
5254 * decl.c (start_enum): Use push_obstacks, not
5255 end_temporary_allocation.
5256 (finish_enum): Call pop_obstacks.
5257
5258 1998-12-10 Mark Mitchell <mark@markmitchell.com>
5259
5260 * class.c (instantiate_type): Return error_mark_node rather than
5261 junk.
5262
5263 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5264
5265 * cp-tree.h (most_specialized_instantiation): New function.
5266 (print_candidates): Likewise.
5267 * class.c (validate_lhs): Remove.
5268 (resolve_address_of_overloaded_function): New function, split out
5269 and then substantially reworked, from ...
5270 (instantiate_type): Use it. Simplify.
5271 * cvt.c (convert_to_reference): Complain when caller has indicated
5272 that's the right thing to do. Don't crash if instantiate_type
5273 fails.
5274 * pt.c: Substitute `parameters' for `paramters' throughout.
5275 (print_candidates): Don't make it static.
5276 (most_specialized_instantiation): Split out from ...
5277 (most_specialized): Here.
5278
5279 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
5280
5281 * lex.c (lang_init_options): Initialize cpplib.
5282 * decl2.c (parse_options,cpp_initialized): Removed.
5283 (lang_decode_option): Move initialization of cpplib to
5284 lang_init_options.
5285
5286 1998-12-09 Mark Mitchell <mark@markmitchell.com>
5287
5288 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5289 well as the TYPE_DECL, when a typedef name is assigned to a
5290 previously anonymous type.
5291
5292 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
5293
5294 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5295 __cp_eh_info for getting the eh info pointer. Add table_index to
5296 field list.
5297 (push_eh_cleanup): Don't increment 'handlers' data field.
5298 (process_start_catch_block): Don't set the 'caught' field.
5299
5300 * cp/exception.cc (CP_EH_INFO): New macro for getting the
5301 exception info pointer within library routines.
5302 (__cp_eh_info): Use CP_EH_INFO.
5303 (__start_cp_handler): Get exception info pointer, set caught field,
5304 and increment the handlers field. Avoids this being done by handlers.
5305 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5306 (uncaught_exception): Use CP_EH_INFO macro.
5307
5308 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
5309
5310 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5311
5312 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
5313
5314 * lex.c (check_newline): Add support for \ as `natural'
5315 characters in file names in #line to be consistent with #include
5316 handling. We support escape processing in the # 1 "..." version of
5317 the command. See also support in cp/lex.c.
5318
5319 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
5320
5321 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5322 structure.
5323
5324 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
5325
5326 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5327
5328 * error.c (dump_simple_decl): Also print namespace context.
5329 (dump_function_decl): Likewise.
5330
5331 * decl2.c (ambiguous_decl): Don't print old value if it's
5332 error_mark_node.
5333
5334 * decl.c (lookup_name_real): Fix handling of local types shadowed
5335 by a non-type decl. Remove obsolete code.
5336 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5337
5338 * lang-options.h: Add -fpermissive.
5339 * decl2.c: Likewise.
5340 * cp-tree.h: Add flag_permissive.
5341 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5342 were specified, set flag_pedantic_errors.
5343 * call.c (build_over_call): Turn dropped qualifier messages
5344 back into pedwarns.
5345 * cvt.c (convert_to_reference): Likewise.
5346 * typeck.c (convert_for_assignment): Likewise.
5347
5348 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
5349
5350 * decl2.c (coerce_new_type): Use same_type_p.
5351 (coerce_delete_type): Likewise.
5352
5353 * call.c (check_dtor_name): Return 1, not error_mark_node.
5354
5355 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
5356
5357 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5358 if MULTIPLE_SYMBOL_SPACES.
5359
5360 * pt.c (check_template_shadow): New fn.
5361 * decl2.c (grokfield): Use it.
5362 * decl.c (pushdecl): Likewise.
5363 (pushdecl_class_level): Likewise.
5364 (start_method): Likewise.
5365 (xref_tag): Don't try to use 't' if we're defining.
5366
5367 * call.c (check_dtor_name): Just return an error_mark_node.
5368 * pt.c (lookup_template_class): Complain about using non-template here.
5369 * parse.y (apparent_template_type): Not here.
5370
5371 * pt.c (check_explicit_specialization): Complain about specialization
5372 with C linkage.
5373
5374 * lang-options.h: Add -f{no-,}implicit-inline-templates.
5375
5376 * pt.c (convert_nontype_argument): Don't assume that any integer
5377 argument is intended to be a constant-expression.
5378
5379 1998-12-03 Mark Mitchell <mark@markmitchell.com>
5380
5381 * class.c (handle_using_decl): Fix comment. Don't lookup
5382 constructors in base classes.
5383 (validate_lhs): Fix typo in comment.
5384 * search.c (lookup_field_1): Don't return a USING_DECL.
5385
5386 * cp-tree.h (DECL_ACCESS): Improve documentation.
5387
5388 * decl.c (expand_static_init): Don't set the initialization-done
5389 flag until the initialization is done.
5390
5391 1998-12-02 Mark Mitchell <mark@markmitchell.com>
5392
5393 * decl2.c (validate_nonmember_using_decl): Complain about using
5394 declarations for class members.
5395
5396 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
5397
5398 * typeck2.c (process_init_constructor): Use same_type_p.
5399
5400 * decl.c (check_tag_decl): Don't warn about null decl inside a
5401 class.
5402
5403 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
5404 UNIFY_ALLOW_NONE.
5405 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
5406 (resolve_overloaded_unification): Strip baselinks.
5407
5408 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5409
5410 * g++spec.c: Don't prototype xmalloc.
5411
5412 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
5413
5414 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
5415
5416 * decl.c (check_tag_decl): Do complain about null friend decl at
5417 file scope.
5418
5419 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5420
5421 * lex.c (make_lang_type): Clear the whole struct lang_type, not
5422 only the first multiple of sizeof (int).
5423
5424 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5425
5426 * decl.c (start_decl): An explicit specialization of a static data
5427 member is only a definition if it has an initializer.
5428
5429 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
5430 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
5431 cp_finish_decl.
5432 * init.c (expand_default_init): Check for DIRECT_BIND instead of
5433 DECL_ARTIFICIAL.
5434
5435 * call.c (build_over_call): Use build_decl.
5436
5437 * except.c (expand_throw): Just use convert, not
5438 build_reinterpret_cast.
5439
5440 * lex.c (handle_generic_pragma): Use token_buffer.
5441
5442 * decl.c (check_tag_decl): Don't complain about null friend decl.
5443
5444 1998-11-24 Dave Pitts <dpitts@cozx.com>
5445
5446 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5447 first position.
5448 * lex.c (check_newline): Use ISALPHA.
5449 (readescape): Use ISGRAPH.
5450 (yyerror): Use ISGRAPH.
5451
5452 1998-11-24 Nathan Sidwell <nathan@acm.org>
5453
5454 * search.c (get_abstract_virtuals): Do not use initial
5455 CLASSTYPE_ABSTRACT_VIRTUALS.
5456 * typeck2.c (abstract_virtuals_error): Show location of abstract
5457 declaration.
5458 * call.c (build_new_method_call): Use
5459 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5460 * class.c (finish_struct_bits): Don't bother working out whether
5461 get_abstract_virtuals will do anything, just do it.
5462
5463 1998-11-24 Graham <grahams@rcp.co.uk>
5464
5465 * typeck.c (build_component_ref): Remove unused statement.
5466
5467 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5468
5469 * class.c (add_method): Catch invalid overloads.
5470
5471 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5472 * search.c (lookup_conversions): Handle getting real OVERLOADs.
5473 (add_conversions): Likewise. Revert last change.
5474 * call.c (add_conv_candidate): Pass totype to add_candidate instead
5475 of fn. Don't add a new candidate if the last one was for the same
5476 type.
5477 (print_z_candidates): Handle getting a type as a function.
5478 (joust): If we got two conversion candidates to the same type,
5479 just pick one.
5480 (build_object_call): Lose 'templates'.
5481 (build_user_type_conversion_1): Handle getting real OVERLOADs.
5482
5483 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5484
5485 * typeck2.c (process_init_constructor): If there are elements
5486 that don't have initializers and they need to have constructors
5487 run, supply them with initializers.
5488
5489 * class.c (finish_struct_1): A class with a 0-width bitfield is
5490 still empty.
5491
5492 1998-11-23 Mark Mitchell <mark@markmitchell.com>
5493
5494 * pt.c (instantiate_class_template): Don't try to figure out what
5495 specialization to use for a partial instantiation. Correct
5496 typos in a couple of comments. Avoid calling uses_template_parms
5497 multiple times.
5498
5499 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
5500
5501 * method.c (process_overload_item): Add call to
5502 build_mangled_C9x_name for intTI_type_nodes.
5503 (build_mangled_C9x_name): Add prototype, define.
5504 * decl.c (init_decl_processing): Add names for
5505 TImode_type_node.
5506
5507 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5508
5509 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5510
5511 * class.c (finish_struct_1): Set things up for 0-width bitfields
5512 like we do for others.
5513
5514 * decl.c (check_tag_decl): New fn.
5515 (shadow_tag): Split out from here.
5516 * decl2.c (grok_x_components): Call it.
5517
5518 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
5519
5520 * decl.c: Lose warn_about_return_type.
5521 (grokdeclarator): Always complain about implicit int, except for
5522 `main () { ... }'.
5523
5524 * decl.c (tag_name): New fn.
5525 (xref_tag): Complain about using typedef-name after class-key.
5526
5527 * init.c (expand_vec_init): Also keep going if from_array.
5528
5529 * tree.c (is_overloaded_fn): Also handle the output of
5530 build_offset_ref.
5531
5532 * decl.c (grokdeclarator): Use constructor_name when comparing
5533 field name against enclosing class.
5534 * class.c (finish_struct_anon): Likewise.
5535
5536 1998-11-22 Mark Mitchell <mark@markmitchell.com>
5537
5538 * decl.c (poplevel): Remove code to handle KEEP == 2.
5539 (finish_function): Don't confuse BLOCK-order when
5540 processing a destructor.
5541
5542 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5543
5544 * decl.c (require_complete_types_for_parms): Call layout_decl
5545 after we've completed the type.
5546
5547 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
5548
5549 * decl2.c (validate_nonmember_using_decl): Allow using templates
5550 from the global namespace.
5551
5552 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5553
5554 Handle specifying template args to member function templates.
5555 * tree.c (build_overload): Always create an OVERLOAD for a template.
5556 * search.c (add_conversions): Handle finding an OVERLOAD.
5557 * decl2.c (check_classfn): Likewise.
5558 * lex.c (identifier_type): See through a baselink.
5559 * parse.y (do_id): Don't call do_identifier if we got a baselink.
5560 * class.c (instantiate_type, case TREE_LIST): Recurse.
5561
5562 * decl.c (grokdeclarator): Allow a boolean constant for array
5563 bounds, odd as that sounds.
5564
5565 * pt.c (unify): Be more strict about non-type parms, except for
5566 array bounds.
5567 (UNIFY_ALLOW_INTEGER): New macro.
5568
5569 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
5570
5571 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5572
5573 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
5574
5575 * semantics.c (begin_class_definition): Call
5576 maybe_process_partial_specialization before push_template_decl.
5577 Don't call push_template_decl for a specialization.
5578 * search.c (lookup_field): Do return a member template class.
5579 * decl2.c (handle_class_head): Handle member template classes.
5580
5581 * decl.c (grokdeclarator): A parm type need not be complete.
5582
5583 * pt.c (convert_nontype_argument): Fix thinko.
5584
5585 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5586
5587 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5588 (global_delete_fndecl): New variable.
5589 * decl.c (global_delete_fndecl): Define it.
5590 (init_decl_processing): Set it.
5591 * init.c (build_builtin_delete_call): Use it.
5592 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5593 nodes.
5594
5595 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5596
5597 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5598 type.
5599
5600 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5601 * call.c (build_object_call): Also support references to functions.
5602 * typeck.c (convert_for_initialization): Don't decay a function
5603 if the target is a reference to function.
5604
5605 * search.c (add_conversions): Get all the overloads from a class.
5606
5607 * decl.c (grok_ctor_properties): Complain about any constructor
5608 that will take a single arg of the class type by value.
5609
5610 * typeck2.c (build_functional_cast): Can't create objects of
5611 abstract classes this way.
5612 * cvt.c (ocp_convert): Likewise.
5613
5614 * decl.c (grokfndecl): Member functions of local classes are not
5615 public.
5616
5617 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5618
5619 * Make-lang.in (cc1plus): Add dependency on hash.o.
5620
5621 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5622
5623 * search.c (get_abstract_virtuals): Complain about virtuals with
5624 no final overrider.
5625 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5626 with no final overrider.
5627 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5628 on virtuals with no final overrider.
5629
5630 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5631
5632 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5633 after layout_type.
5634
5635 * friend.c (do_friend): Don't set_mangled_name_for_decl.
5636
5637 * class.c (finish_struct_anon): Complain about non-fields.
5638 * decl2.c (build_anon_union_vars): Likewise.
5639
5640 * decl.c (grokdeclarator): Normal data members can't have the same
5641 name as the class, either.
5642 * class.c (finish_struct_anon): Neither can members of an
5643 anonymous union.
5644
5645 1998-11-17 Mark Mitchell <mark@markmitchell.com>
5646
5647 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5648 (TYPE_BINFO): Likewise.
5649 (IS_AGGR_TYPE): Tweak.
5650 (SET_IS_AGGR_TYPE): New macro.
5651 (CLASS_TYPE_P): Tweak.
5652 (lang_type): Group mark bitfields together. Remove linenum.
5653 (CLASSTYPE_SOURCE_LINE): Remove macro.
5654 (CLASSTYPE_MARKED_N): New macro.
5655 (SET_CLASSTYPE_MARKED_N): Likewise.
5656 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5657 (CLASS_TYPE_MARKED_*): Use them.
5658 (SET_CLASSTYPE_MARKED_*): Likewise.
5659 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5660 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5661 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5662 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5663 * class.c (class_cache_obstack): New variable.
5664 (class_cache_firstobj): Likewise.
5665 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5666 (pushclass): Free the cache, when appropriate.
5667 (popclass): Tidy.
5668 (maybe_push_cache_obstack): Use class_cache_obstack.
5669 * decl.c (include hash.h).
5670 (typename_hash): New function.
5671 (typename_compare): Likewise.
5672 (build_typename_type): Check the hash table to avoid creating
5673 duplicates.
5674 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5675 (grokdeclarator): Use CLASS_TYPE_P.
5676 (xref_basetypes): Likewise.
5677 (start_function): Likewise. Don't put current_class_ref on the
5678 permanent obstack.
5679 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5680 and TYPE_TI_ARGS.
5681 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5682 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5683 fields for types other than class types. Do clear TYPE_ALIAS_SET
5684 for types other than class types, though.
5685 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5686 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5687 * pt.c (process_template_parm): Don't set
5688 CLASSTYPE_GOT_SEMICOLON.
5689 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5690 Coerce arguments on the momentary obstack.
5691 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5692 (instantiate_class_template): Calculate template arguments on the
5693 momentary obstack. Tidy.
5694 (tsubst_template_arg_vector): Use make_temp_vec.
5695 (tsubst_aggr_type): Put template arguments on the momentary
5696 obstack.
5697 (tsubst_decl): Likewise.
5698 (tsubst): Copy the array bounds index to the permanent obstack
5699 before building index types. Use new macros.
5700 (unify): Use new macros.
5701 (do_type_instantiation): Likewise.
5702 * search.c (lookup_fnfields_1): Use new macros.
5703 (dfs_pushdecls): Build envelopes on the cache obstack.
5704 (dfs_compress_decls): Use new macros.
5705 (push_class_decls): Build on the cache obstack.
5706 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5707 * sign.c (build_signature_pointer_or_reference_type): Use
5708 SET_IS_AGGR_TYPE.
5709 * tree.c (make_binfo): Check CLASS_TYPE_P.
5710 (copy_template_template_parm): Adjust.
5711 (make_temp_vec): Use push_expression_obstack.
5712 * typeck.c (complete_type): Use new macros.
5713 (comptypes): Likewise.
5714
5715 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
5716
5717 * pt.c (tsubst): Add diagnostics for invalid array, reference
5718 and pointer to member types.
5719
5720 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5721
5722 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5723
5724 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5725 Simplify.
5726
5727 * parse.y (structsp): Fix cut-and-paste error.
5728
5729 * init.c (build_new): Complain about non-integral size.
5730
5731 * parse.y (unary_expr): Complain about defining types in sizeof.
5732
5733 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5734
5735 * rtti.c (build_x_typeid): Complain about typeid without
5736 including <typeinfo>.
5737 (get_typeid): Likewise. Complain about typeid of incomplete type.
5738 (get_tinfo_fn_dynamic): Likewise.
5739 (get_typeid_1): Not static anymore.
5740 * except.c (build_eh_type_type): Use get_typeid_1.
5741
5742 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5743 ambiguous or private bases. Fix warning for reference cast.
5744
5745 1998-11-16 Mark Mitchell <mark@markmitchell.com>
5746
5747 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5748 * decl.c (duplicate_decls): Remove special-case code to deal with
5749 template friends, and just do the obvious thing.
5750 * pt.c (register_specialization): Tweak for clarity, and also to
5751 clear DECL_INITIAL for an instantiation before it is merged with a
5752 specialization.
5753 (check_explicit_specialization): Fix indentation.
5754 (tsubst_friend_function): Handle both definitions in friend
5755 declaration and outside friend declarations.
5756 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5757 (regenerate_decl_from_template): Tweak accordingly.
5758 (instantiate_decl): Likewise.
5759
5760 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5761
5762 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5763 member function reference to error.
5764 * cvt.c (ocp_convert): Complain about converting an overloaded
5765 function to void.
5766
5767 * init.c (build_offset_ref): Just return a lone static member
5768 function.
5769
5770 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5771 not internal ones.
5772
5773 * typeck.c (build_binary_op_nodefault): Improve error handling.
5774
5775 * decl.c (grokfndecl): Complain about making 'main' a template.
5776
5777 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5778
5779 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5780 TYPE_DECL in a template.
5781
5782 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
5783
5784 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5785
5786 * decl.c (struct cp_function): Add named_label_uses.
5787 (push_cp_function_context): Save it.
5788 (pop_cp_function_context): Restore it.
5789 (define_label): Also complain about jumping into the scope of
5790 non-POD objects that don't have constructors.
5791 * tree.c (pod_type_p): New fn.
5792
5793 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5794 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5795 (get_tinfo_fn): Not here.
5796 * repo.c (repo_get_id): Abort if we get called for an incomplete
5797 type.
5798
5799 1998-11-13 Mark Mitchell <mark@markmitchell.com>
5800
5801 * except.c (expand_throw): Make sure first argument to
5802 __cp_push_exception is of type `void*' to avoid spurious error
5803 messages.
5804
5805 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
5806
5807 * pt.c (try_one_overload): Take orig_targs again. Only check for
5808 mismatches against them; we don't care what a previous call found.
5809 (resolve_overloaded_unification): Adjust.
5810
5811 * search.c (lookup_field): Don't return anything for a non-type
5812 field from a dependent type.
5813 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5814 in an array declarator.
5815 (start_decl): Push into the class before looking for the field.
5816
5817 1998-11-08 Mark Mitchell <mark@markmitchell.com>
5818
5819 * method.c (build_overload_value): Handle REFERENCE_TYPE.
5820
5821 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5822
5823 * decl.c (grokdeclarator): Allow namespace-scoped members if they
5824 are friends.
5825
5826 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
5827
5828 * pt.c (tsubst_decl): Don't mess with the global value of an
5829 un-mangled DECL_ASSEMBLER_NAME.
5830
5831 1998-11-03 Christopher Faylor <cgf@cygnus.com>
5832
5833 * decl.c (init_decl_processing): Remove CYGWIN conditional
5834 since CYGWIN is now able to deal with trapping signals.
5835
5836 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5837
5838 * cp-tree.h: Don't include gansidecl.h.
5839 * exception.cc: Include gansidecl.h (since we don't include config.h)
5840 * g++spec.c: Don't include gansidecl.h.
5841
5842 1998-11-06 Mark Mitchell <mark@markmitchell.com>
5843
5844 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
5845 size of dummy.
5846 (DECL_DEFINED_IN_CLASS_P): New macro.
5847 (TEMPLATE_PARMS_FOR_INLINE): Document.
5848 (check_static_variable_definition): New function.
5849 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5850 appropriate.
5851 (check_static_variable_definition): Split out from ...
5852 (grokdeclarator): Here.
5853 * pt.c (check_default_tmpl_args): New function, split out from ...
5854 (push_template_decl_real): Here.
5855 (instantiate_template): Fix comment.
5856
5857 1998-11-04 Mark Mitchell <mark@markmitchell.com>
5858
5859 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5860 (CP_TYPE_VOLATILE_P): Likewise.
5861 (CP_TYPE_RESTRICT_P): Likewise.
5862
5863 1998-11-03 Mark Mitchell <mark@markmitchell.com>
5864
5865 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5866
5867 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
5868
5869 * class.c (instantiate_type): Be more helpful.
5870
5871 * decl2.c (import_export_decl): Call import_export_class.
5872
5873 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5874 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5875 * pt.c (tsubst_copy): Likewise.
5876
5877 1998-11-02 Mark Mitchell <mark@markmitchell.com>
5878
5879 * init.c (expand_vec_init): Fix off-by-one error.
5880
5881 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
5882
5883 * parse.y (apparent_template_type): New type.
5884 (named_complex_class_head_sans_basetype): Use it.
5885 * Makefile.in (CONFLICTS): One new conflict.
5886 * parse.c: Regenerated.
5887
5888 1998-11-01 Mark Mitchell <mark@markmitchell.com>
5889
5890 * cp-tree.h (COMPARE_STRICT): New macro.
5891 (COMPARE_BASE): Likewise.
5892 (COMPARE_RELAXED): Likewise.
5893 (COMPARE_REDECLARATION): Likewise.
5894 (same_type_p): Likewise.
5895 (same_or_base_type_p): Likewise.
5896 * call.c (standard_conversion): Use them, in place of comptypes
5897 with numeric arguments.
5898 (reference_binding): Likewise.
5899 (convert_like): Likewise.
5900 (build_over_call): Likewise.
5901 (is_subseq): Likewise.
5902 (is_properly_derived_from): Likewise.
5903 (compare_ics): Likewise.
5904 (joust): Likewise.
5905 * class.c (delete_duplicate_fields_1): Likewise.
5906 (resolves_to_fixed_type_p): Likewise.
5907 (instantiate_type): Likewise. Remove #if 0'd code.
5908 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
5909 (pushdecl): Likewise.
5910 (lookup_name_real): Likewise.
5911 (grokdeclarator): Likewise. Check for illegal array declarations.
5912 (grokparms): Likewise.
5913 (grok_op_properties): Likewise.
5914 * decl2.c (check_classfn): Likewise.
5915 * friend.c (is_friend): Likewise.
5916 (make_friend_class): Likewise.
5917 * init.c (expand_aggr_init): Likewise.
5918 (expand_vec_init): Likewise.
5919 * pt.c (is_member_template_class): Remove declaration.
5920 (is_specialization_of): Use COMPARE_* and new macros.
5921 (comp_template_parms): Likewise.
5922 (convert_nontype_argument): Likewise.
5923 (coerce_template_template_parms): Likewise.
5924 (template_args_equal): Likewise.
5925 (lookup_template_class): Likewise.
5926 (type_unification_real): Likewise.
5927 (unify): Likewise.
5928 (get_bindings_real): Likewise.
5929 * search.c (covariant_return_p): Likewise.
5930 (get_matching_virtual): Likewise.
5931 * sig.c (match_method_types): Likewise.
5932 * tree.c (vec_binfo_member): Likewise.
5933 (cp_tree_equal): Likewise.
5934 * typeck.c (common_type): Likewise.
5935 (comp_array_types): Likewise. Get issues involving unknown array
5936 bounds right.
5937 (comptypes): Update comments. Use new flags.
5938 (comp_target_types): Use new macros.
5939 (compparms): Likewise.
5940 (comp_target_parms): Likewise.
5941 (string_conv_p): Likewise.
5942 (build_component_ref): Likewise.
5943 (build_indirect_ref): Likewise.
5944 (build_conditional_expr): Likewise.
5945 (build_static_cast): Likewise.
5946 (build_reinterpret_cast): Likewise.
5947 (build_const_cast): Likewise.
5948 (build_modify_expr): Likewise.
5949 (convert_for_assignment): Likewise.
5950 (comp_ptr_ttypes_real): Likewise.
5951 (ptr_reasonably_similar): Likewise.
5952 (comp_ptr_ttypes_const): Likewise.
5953
5954 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
5955
5956 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5957
5958 1998-10-30 Mark Mitchell <mark@markmitchell.com>
5959
5960 * decl2.c (delete_sanity): Pass integer_zero_node, not
5961 integer_two_node, to build_vec_delete.
5962 * init.c (build_array_eh_cleanup): Remove.
5963 (expand_vec_init_try_block): New function.
5964 (expand_vec_init_catch_clause): Likewise.
5965 (build_vec_delete_1): Don't deal with case that auto_delete_vec
5966 might be integer_two_node anymore.
5967 (expand_vec_init): Rework for initialization-correctness and
5968 exception-correctness.
5969 * typeck2.c (process_init_constructor): Make mutual exclusivity
5970 of cases more obvious.
5971
5972 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
5973
5974 * decl.c (lookup_name_real): OK, only warn if not lexing.
5975 Simplify suggested fix.
5976
5977 * cp-tree.h (IDENTIFIER_MARKED): New macro.
5978 * search.c (lookup_conversions): Use breadth_first_search.
5979 (add_conversions): Avoid adding two conversions to the same type.
5980 (breadth_first_search): Work with base binfos, rather
5981 than binfos and base indices.
5982 (get_virtual_destructor): Adjust.
5983 (tree_has_any_destructor_p): Adjust.
5984 (get_matching_virtual): Adjust.
5985
5986 * pt.c (push_template_decl_real): Generalize check for incorrect
5987 number of template parms.
5988 (is_member_template_class): #if 0.
5989
5990 1998-10-29 Richard Henderson <rth@cygnus.com>
5991
5992 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5993 last.
5994
5995 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
5996
5997 * lex.c: Call check_newline from lang_init always. After
5998 calling cpp_start_read, set yy_cur and yy_lim to read from the
5999 cpplib token buffer.
6000
6001 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
6002
6003 * class.c (instantiate_type): Don't consider templates for a normal
6004 match.
6005
6006 * class.c (finish_struct_1): Don't complain about non-copy
6007 assignment ops in union members.
6008
6009 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6010 (prepare_fresh_vtable): Likewise.
6011 (finish_struct_1): Don't call import_export_class.
6012 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6013 (finish_prevtable_vardecl): Lose.
6014 (finish_file): Don't call it.
6015 * pt.c (instantiate_class_template): Likewise.
6016 * cp-tree.h: Remove it.
6017
6018 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6019 * decl.c (finish_function): Not here.
6020 (start_function): Do set DECL_INITIAL.
6021
6022 * pt.c (push_template_decl_real): Complain about default template
6023 args for enclosing classes.
6024
6025 * call.c (add_function_candidate): Treat conversion functions
6026 as coming from the argument's class.
6027 * cp-tree.h (DECL_CONV_FN_P): New fn.
6028 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6029 * class.c (add_method): Use DECL_CONV_FN_P.
6030 * decl2.c (check_classfn): Likewise.
6031 * error.c (dump_function_name): Likewise.
6032 (dump_function_decl): Likewise.
6033 * pt.c (fn_type_unification): Likewise.
6034 * search.c (add_conversions): Likewise.
6035
6036 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6037
6038 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6039 * method.c (hack_identifier): Also check for using RESULT_DECL
6040 from outer context.
6041
6042 1998-10-27 Mark Mitchell <mark@markmitchell.com>
6043
6044 * decl.c (grokdeclarator): Use type_quals, rather than constp,
6045 consistently.
6046
6047 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
6048
6049 * call.c (standard_conversion): instantiate_type here.
6050 (reference_binding): And here.
6051 (implicit_conversion): Not here.
6052 (build_op_delete_call): No need to cons up an OVERLOAD.
6053 * cvt.c (cp_convert_to_pointer): instantiate_type here.
6054 (convert_to_reference): And here.
6055 * decl.c (grok_reference_init): Not here.
6056 (grokparms): Or here.
6057 * typeck2.c (digest_init): Or here.
6058 * typeck.c (decay_conversion): Take the address of overloaded
6059 functions, too.
6060 (require_instantiated_type): Lose.
6061 (convert_arguments): Don't handle unknown types here.
6062 (build_c_cast): Likewise.
6063 (build_binary_op): Gut.
6064 (build_conditional_expr): Don't require_instantiated_type.
6065 (build_modify_expr): Likewise.
6066 (build_static_cast): Don't instantiate_type.
6067 (build_reinterpret_cast): Likewise.
6068 (build_const_cast): Likewise.
6069 (convert_for_initialization): Likewise.
6070 (build_ptrmemfunc): Use type_unknown_p.
6071 (convert_for_assignment): Also do default_conversion on overloaded
6072 functions. Hand them off to ocp_convert.
6073
6074 1998-10-26 Mark Mitchell <mark@markmitchell.com>
6075
6076 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6077 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
6078
6079 * class.c (finish_struct_1): Use build_cplus_array_type to build
6080 array types.
6081 * decl.c (init_decl_processing): Likewise.
6082 * except.c (expand_end_eh_spec): Likewise.
6083 * search.c (expand_upcast_fixups): Simplify very slightly.
6084
6085 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6086
6087 * decl.c (grokdeclarator): Complain about a variable using
6088 constructor syntax coming back null from start_decl.
6089
6090 * friend.c (make_friend_class): Complain about trying to make
6091 a non-class type a friend.
6092
6093 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6094 (start_function): Not here.
6095
6096 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
6097
6098 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6099
6100 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6101
6102 * typeck2.c (process_init_constructor): Only skip anonymous fields
6103 if they are bitfields.
6104
6105 * cp-tree.def (TYPEOF_TYPE): New code.
6106 * error.c (dump_type_real): Handle it.
6107 * pt.c (tsubst): Likewise.
6108 * tree.c (search_tree): Likewise.
6109 * semantics.c (finish_typeof): New fn.
6110 * parse.y (typespec): Use it.
6111 * cp-tree.h: Declare it.
6112
6113 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
6114
6115 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6116
6117 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
6118
6119 * typeck.c (convert_arguments): Don't handle pmf references
6120 specially.
6121
6122 * init.c (build_member_call): Don't try to convert to the base type
6123 if it's ambiguous or pedantic.
6124
6125 * typeck2.c (check_for_new_type): Only depend on pedantic for
6126 C-style casts.
6127
6128 1998-10-25 Mark Mitchell <mark@markmitchell.com>
6129
6130 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6131 non-converting constructors.
6132
6133 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6134
6135 * gxxint.texi: Correct documentation for n, N, Q, and B.
6136
6137 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
6138
6139 * parse.y (condition): Convert VAR_DECL from reference to indirect
6140 reference.
6141
6142 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
6143
6144 * exception.cc (__cp_pop_exception): Free the original exception
6145 value, not the potentially coerced one.
6146
6147 1998-10-23 Mark Mitchell <mark@markmitchell.com>
6148
6149 * Makefile.in (hash.h): Run gperf when necessary.
6150
6151 * cp-tree.h (CP_TYPE_READONLY): Remove.
6152 (CP_TYPE_VOLATILE): Likewise.
6153 (CP_TYPE_QUALS): New macro.
6154 (CP_TYPE_CONST_P): Likewise.
6155 (CP_TYPE_VOLATILE_P): Likewise.
6156 (CP_TYPE_RESTRICT_P): Likewise.
6157 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6158 (cp_build_type_variant): Rename to ...
6159 (cp_build_qualified_type): New function.
6160 (c_apply_type_quals_to_decl): Declare.
6161 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6162 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6163 (cp_type_qual_from_rid): New function.
6164 (compparms): Remove unused parameter. All callers changed.
6165 (cp_type_quals): New function.
6166 (at_least_as_qualified_p): Likewise.
6167 (more_qualified_p): Likewise.
6168
6169 * call.c (standard_conversion): Replace calls to
6170 cp_build_type_variant with cp_build_qualified_type. Use
6171 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6172 compare them. Use CP_TYPE_* macros to check qualifiers.
6173 (reference_binding): Likewise.
6174 (implicit_conversion): Likewise.
6175 (add_builtin_candidates): Likewise.
6176 (build_over_call): Likewise.
6177 * class.c (overrides): Compare all qualifiers, not just `const',
6178 on method declarations.
6179 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6180 (convert_pointer_to_real): Likewise.
6181 (type_promotes_to): Likewise.
6182 * decl.c (check_for_uninitialized_const_var): New function.
6183 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6184 (cp_finish_decl): Use check_for_uninitialized_const_var.
6185 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
6186 handle `restrict'.
6187 (grok_ctor_properties): Likewise.
6188 (grok_op_properties): Likewise.
6189 (start_function): Likewise.
6190 (rever_static_member_fn): Likewise.
6191 * decl2.c (grok_method_quals): Likewise.
6192 (grokfield): Likewise.
6193 * error.c (dump_readonly_or_volatile): Rename to ...
6194 (dump_qualifiers): New function. Handle `restrict'.
6195 (dump_type_real): Use it.
6196 (dump_aggr_type): Likewise.
6197 (dump_type_prefix): Likewise.
6198 (dump_type_suffix): Likewise.
6199 (dump_function_decl): Likewise.
6200 (cv_as_string): Likewise.
6201 * gxx.gperf: Add __restrict and __restrict__.
6202 * gxxint.texi: Document `u' as used for `__restrict', and a few
6203 other previously undocumented codes.
6204 * hash.h: Regenerated.
6205 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6206 (build_member_call): Likewise.
6207 (build_new_1): Likewise.
6208 * lex.c (init_parse): Add entry for RID_RESTRICT.
6209 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6210 (cp_type_qual_from_rid): Define.
6211 * lex.h (enum rid): Add RID_RESTRICT.
6212 * method.c (process_modifiers): Deal with `restrict'.
6213 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6214 * parse.c: Regenerated.
6215 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6216 (tsubst_aggr_type): Likewise.
6217 (tsubst): Likewise.
6218 (check_cv_quals_for_unify): Likewise.
6219 (unify): Likewise.
6220 * rtti.c (init_rtti_processing): Likewise.
6221 (build_headof): Likewise.
6222 (get_tinfo_var): Likewise.
6223 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
6224 (expand_class_desc): Likewise.
6225 (expand_attr_desc): Likewise.
6226 (synthesize_tinfo_fn): Likewise.
6227 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
6228 (get_matching_virtual): Likewise.
6229 (expand_upcast_fixups): Likewise.
6230 * sig.c (build_signature_pointer_or_reference_name): Take
6231 type_quals, not constp and volatilep.
6232 (build_signature_pointer_or_reference_type): Likewise.
6233 (match_method_types): More CP_TYPE_QUALS conversion, etc.
6234 (build_signature_pointer_constructor): Likewise.
6235 (build_signature_method_call): Likewise.
6236 * tree.c (build_cplus_array_type): Likewise.
6237 (cp_build_type_variant): Rename to ...
6238 (cp_build_qualified_type): New function. Deal with `__restrict'.
6239 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6240 (build_exception_variant): Likewise.
6241 (mapcar): Likewise.
6242 * typeck.c (qualif_type): Likewise.
6243 (common_type): Likewise.
6244 (comptypes): Likewise.
6245 (comp_cv_target_types): Likewise.
6246 (at_least_as_qualified_p): Define.
6247 (more_qualified_p): Likewise.
6248 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6249 (compparms): Likewise.
6250 (inline_conversion): Likewise.
6251 (string_conv_p): Likewise.
6252 (build_component_ref): Likewise.
6253 (build_indirect_ref): Likewise.
6254 (build_array_ref): Likewise.
6255 (build_unary_op): Likewise.
6256 (build_conditional_expr): Likewise.
6257 (build_static_cast): Likewise.
6258 (build_c_cast): Likewise.
6259 (build_modify_expr): Likewise.
6260 (convert_For_assignment): Likewise.
6261 (comp_ptr_ttypes_real): Likewise.
6262 (cp_type_quals): New function.
6263
6264 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
6265
6266 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6267 (CP_TYPE_VOLATILE): Likewise.
6268 * decl.c (grokdeclarator): Use them.
6269 * tree.c (canonical_type_variant): Likewise.
6270
6271 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
6272
6273 * parse.y (named_class_head): Push into class while parsing the
6274 base class list.
6275 * decl2.c (push_scope, pop_scope): New functions.
6276 * cp-tree.h: Declare them.
6277 * init.c (build_new_1): Delay cleanup until end of full expression.
6278
6279 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
6280
6281 * typeck.c (build_component_ref): Use of a type here is an error.
6282
6283 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
6284
6285 Revamp references to member functions.
6286 * method.c (hack_identifier): Call build_component_ref for a
6287 reference to a member function.
6288 * typeck.c (build_component_ref): Only return a single function
6289 if it's static. Otherwise, return a COMPONENT_REF.
6290 (build_x_function_call): Handle a COMPONENT_REF.
6291 (build_unary_op): Handle all unknown-type things.
6292 * decl2.c (arg_assoc): Handle COMPONENT_REF.
6293 * class.c (instantiate_type): Complain if the function we get is a
6294 nonstatic member function. Remove code for finding "compatible"
6295 functions.
6296 * pt.c (tsubst_copy): Handle NOP_EXPR.
6297 * tree.c (build_dummy_object): New fn.
6298 (maybe_dummy_object): New fn.
6299 (is_dummy_object): New fn.
6300 * cp-tree.h: Declare them.
6301 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6302 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6303 * init.c (build_member_call): Use maybe_dummy_object and
6304 is_dummy_object.
6305 (build_offset_ref): Use maybe_dummy_object.
6306 (resolve_offset_ref): Use is_dummy_object.
6307 * typeck.c (build_x_function_call): Call build_dummy_object.
6308 (unary_complex_lvalue): Call is_dummy_object.
6309
6310 * typeck.c (build_component_addr): Make sure field is a field.
6311
6312 * call.c (build_new_op): Delete obsolete code.
6313
6314 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6315
6316 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
6317
6318 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6319 std if std is ignored.
6320
6321 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
6322
6323 * decl.c (grokvardecl): Fix thinko.
6324
6325 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6326 not the left.
6327
6328 * parse.y (fn.def2): Fix 'attrs' format.
6329
6330 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6331
6332 * Makefile.in (CONFLICTS): Update.
6333 * parse.y (expr_or_declarator_intern): New rule.
6334 (expr_or_declarator, direct_notype_declarator, primary,
6335 functional_cast): Use it.
6336 (notype_declarator_intern): New rule.
6337 (notype_declarator, complex_notype_declarator): Use it.
6338
6339 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
6340
6341 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6342 (grokvardecl): Likewise.
6343
6344 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6345
6346 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6347 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6348
6349 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6350
6351 * pt.c (process_partial_specialization): Cast 1st argument of
6352 `bzero' to (PTR).
6353
6354 * tree.c (build_base_fields): Cast `base_align' to (int) when
6355 comparing against one.
6356
6357 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6358
6359 * decl.c (lookup_name_real): Handle template parameters for member
6360 templates where said parameters have the same name as the
6361 surrounding class.
6362
6363 * decl.c (expand_static_init): Build cleanups before entering the
6364 anonymous function used to do them to avoid access-checking
6365 confusion.
6366
6367 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6368 accidentally removed by previous change, and make DECL_RTL here.
6369 * class.c (add_method): Don't make DECL_RTL here.
6370
6371 * pt.c (for_each_template_parm): Don't examine uninstantiated
6372 default arguments.
6373
6374 1998-10-16 Dave Brolley <brolley@cygnus.com>
6375
6376 * lex.c (real_yylex): Fix unaligned access of wchar_t.
6377
6378 1998-10-16 Mark Mitchell <mark@markmitchell.com>
6379
6380 * class.c (add_method): Fix documentation to reflect previous
6381 changes. Check for duplicate method declarations here.
6382 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6383 correctly; such things never match.
6384 (grokfndecl): Don't look for duplicate methods here.
6385 * decl2.c (check_classfn): Don't assume names are mangled.
6386 Don't add bogus member function declarations to a class before the
6387 class type is complete.
6388 (grokfield): Reformat error message.
6389 * method.c (set_mangled_name_for_decl): Don't mangle names while
6390 processing_template_decl.
6391
6392 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
6393
6394 * typeck.c (build_indirect_ref): Complain about a pointer to data
6395 member, too.
6396 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
6397 data member.
6398 * init.c (resolve_offset_ref): Don't undo the above.
6399
6400 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
6401 (struct lang_decl_flags): Add `bitfield'.
6402 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
6403 DECL_BIT_FIELD.
6404 * decl2.c (grokbitfield, grok_alignof): Likewise.
6405 * init.c (build_offset_ref): Likewise.
6406 * typeck.c (build_component_addr, expr_sizeof): Likewise.
6407 * cvt.c (build_up_reference): Don't crash if taking the address
6408 returns error_mark_node.
6409
6410 * decl.c (grokfndecl): Also check ctype when checking for ::main().
6411
6412 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
6413
6414 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
6415 Do mangling here.
6416 (grokdeclarator): Instead of here.
6417 * friend.c (do_friend): Lose special handling of ::main and
6418 __builtin_*.
6419 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
6420
6421 * spew.c (yylex): Clear looking_for_typename if we got
6422 'enum { ... };'.
6423
6424 1998-10-15 Mark Mitchell <mark@markmitchell.com>
6425
6426 * class.c (maybe_warn_about_overly_private_class): Improve error
6427 messages for class with only private constructors.
6428
6429 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
6430 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
6431 (build_typename_type): New function.
6432 * decl.c (build_typename_type): Broken out from ...
6433 (make_typename_type): Use it.
6434 * search.c (lookup_field): Likewise.
6435
6436 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6437
6438 * pt.c (convert_nontype_argument): Check against type_referred_to.
6439 * decl.c (grokvardecl): Check for declarator name before building
6440 DECL_ASSEMBLER_NAME.
6441
6442 1998-10-14 Mark Mitchell <mark@markmitchell.com>
6443
6444 * pt.c (lookup_template_class): Add comment.
6445 (instantiate_class_template): Don't mark the _TYPE node for
6446 member class templates as an instantiation.
6447
6448 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
6449
6450 * decl.c (grokfndecl): Fix my thinko.
6451
6452 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
6453
6454 * tinfo2.cc (fast_compare): Remove.
6455 (before): Just use strcmp.
6456 * tinfo.cc (operator==): Just use strcmp.
6457
6458 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6459
6460 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6461 declarations.
6462
6463 1998-10-13 Mark Mitchell <mark@markmitchell.com>
6464
6465 * cp-tree.h (specializations_of_same_template_p): Remove.
6466 * search.c (get_template_base): Don't use it.
6467 (get_template_base_recursive): Likewise.
6468 * pt.c (specializations_of_same_template_p): Remove.
6469 (unify): Don't use it.
6470 (lookup_template_class): Find the correct parent when setting
6471 CLASSTYPE_TI_TEMPLATE.
6472
6473 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6474
6475 * tinfo.cc (operator==): Always compare names.
6476
6477 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6478
6479 * decl.c (start_function): Fix cut-and-paste error.
6480
6481 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6482
6483 * inc/typeinfo: Add #pragma interface.
6484 (operator!=): Just call operator==.
6485 * tinfo.cc: Add #pragma implementation.
6486 (operator==): Move from inc/typeinfo and tinfo2.cc.
6487 Check __COMMON_UNRELIABLE instead of _WIN32.
6488
6489 * typeck2.c (my_friendly_abort): Add URL.
6490
6491 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6492
6493 * decl.c (start_method): Added extra parameter for attributes.
6494 * cp-tree.h (start_method): Update prototype.
6495 * parse.y (fn.def2): Update start_method parameter list.
6496
6497 1998-10-11 Mark Mitchell <mark@markmitchell.com>
6498
6499 * cp-tree.h (specializations_of_same_template_p): Declare.
6500 * pt.c (specializations_of_same_template_p): New function.
6501 (unify): Use it.
6502 * search.c (get_template_base): Use it.
6503 (get_template_base_recursive): Likewise.
6504
6505 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
6506
6507 * decl2.c (start_objects): Add new variable `joiner' and
6508 initialize it properly.
6509
6510 1998-10-09 Mark Mitchell <mark@markmitchell.com>
6511
6512 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6513 change to vtable types.
6514
6515 * cvt.c (ocp_convert): Avoid infinite recursion caused by
6516 1998-10-03 change.
6517
6518 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
6519
6520 * pt.c (resolve_overloaded_unification): New fn.
6521 (try_one_overload): Likewise.
6522 (unify): Don't fail on unknown type.
6523 (type_unification_real): Likewise. Use resolve_overloaded_unification
6524 to handle an overloaded argument.
6525 (template_args_equal): Split out...
6526 (comp_template_args): From here.
6527 (determine_specialization): Also allow a template with more
6528 parms than were explicitly specified.
6529 * cp-tree.h: Add template_args_equal.
6530 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6531
6532 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
6533
6534 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6535 change.
6536
6537 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
6538
6539 * typeck.c (unsigned_type): Only return TItype nodes when
6540 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6541 (signed_type): Likewise.
6542 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6543 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6544 (init_decl_processing): Only create TItype nodes when
6545 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6546 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6547 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6548
6549 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6550
6551 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6552 (gxx.gperf): Update comments describing invocation flags.
6553 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6554
6555 1998-10-07 Mark Mitchell <mark@markmitchell.com>
6556
6557 * class.c (finish_struct_1): Add commentary on previous change.
6558
6559 * cp-tree.h (vtbl_ptr_type_node): New variable.
6560 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6561 already of the right type.
6562 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6563 Simplify code to grow vtable.
6564 * decl.c (vtbl_ptr_type_node): Define.
6565 (init_decl_processing): Initialize it.
6566
6567 1998-10-06 Mark Mitchell <mark@markmitchell.com>
6568
6569 * cp-tree.def (PTRMEM_CST): New tree node.
6570 * cp-tree.h (ptrmem_cst): New type.
6571 (lang_type): Remove local_typedecls.
6572 (dummy): Increase to 12 bits from 11.
6573 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6574 (PTRMEM_CST_CLASS): New macro.
6575 (PTRMEM_CST_MEMBER): Likewise.
6576 (current_access_specifier): New variable.
6577 (current_class_type): Remove duplicate declaration.
6578 (finish_struct): Change prototype.
6579 (unreverse_member_declarations): New function.
6580 (pushdecl_class_level): Change prototype.
6581 (grok_enum_decls): Remove.
6582 (fixup_anonymous_union): New function.
6583 (grok_x_components): Change prototype.
6584 (tsubst_chain): Remove.
6585 (finish_member_template_decl): Likewise.
6586 (check_explicit_specialization): Fix indentation.
6587 (finish_class_definition): Change prototype.
6588 (finish_member_class_template): Likewise.
6589 (finish_member_declaration): New function.
6590 (check_multiple_declarators): Likewise.
6591 * class.c (class_stack_node_t): New type.
6592 (current_class_base): Remove.
6593 (current_class_stack): Change type.
6594 (current_access_specifier): New variable.
6595 (grow_method): Remove.
6596 (check_member_decl_is_same_in_complete_scope): Break out from
6597 finish_struct.
6598 (make_method_vec): New function.
6599 (free_method_vec): Likewise.
6600 (add_implicitly_declared_members): Break out from finish_struct_1.
6601 (free_method_vecs): New variable.
6602 (add_method): Rework for direct use from parser.
6603 (handle_using_decl): Watch for NULL_TREE while iterating through
6604 CLASSTYPE_METHOD_VEC.
6605 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6606 just do some error-checking.
6607 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6608 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
6609 (finish_struct): Change prototype. Simplify; fields and methods
6610 are already set up at this point.
6611 (init_class_processing): Set up current_class_stack.
6612 (pushclass): Save current_access_specifier.
6613 (popclass): Restore it.
6614 (currently_open_class): Simplify.
6615 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6616 * decl.c (saved_scope): Add access_specifier.
6617 (maybe_push_to_top_level): Save it.
6618 (pop_from_top_level): Restore it.
6619 (maybe_process_template_type_declaration): Use
6620 finish_member_declaration.
6621 (pushtag): Likewise.
6622 (pushdecl_class_level): Don't return a value.
6623 (fixup_anonymous_union): Break out from grok_x_components.
6624 (shadow_tag): Use it.
6625 (xref_tag): Complain about using an elaborated type specifier to
6626 reference a template type parameter or typedef name.
6627 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6628 (current_local_enum): Remove.
6629 (build_enumerator): Call finish_member_declaration.
6630 (grok_enum_decls): Remove.
6631 * decl2.c (grok_x_components): Simplify.
6632 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6633 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6634 (merge_functions): Add to comment.
6635 (arg_assoc_type): Prototype.
6636 (arg_assoc): Pass as many arguments as there are parameters.
6637 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
6638 OFFSET_REF.
6639 * expr.c (cpls_expand_expr): Remove dead code. Handle
6640 PTRMEM_CST.
6641 * friend.c (do_friend): Lookup friends when in nested classes.
6642 Change comments.
6643 * init.c (build_offset_ref): Do lookup even for classes that are
6644 only partially defined.
6645 (decl_constant_value): Remove dead code.
6646 * method.c (build_overload_value): Remove hack where by TYPE was
6647 not a TYPE. Handle PTRMEM_CST.
6648 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6649 should go.
6650 * parse.y (components, notype_components, component_decl,
6651 component_decl_1, component_declarator, component_declarator0):
6652 Now all are itype rather than ttype. Rework to add members to
6653 classes on the fly.
6654 (typesqpecqual_reserved): Use check_multiple_declarators.
6655 (structsp): Update class to finish_class_definition.
6656 (do_xref_defn): Unsplit into named_class_head.
6657 (access_specifier): Set current_access_specifier.
6658 * pt.c (set_current_access_from_decl): New function.
6659 (finish_member_template_decl): Don't take the parameters.
6660 (comp_template_args): Make more robust.
6661 (lookup_template_class): Don't use current_local_enum.
6662 (for_each_template_parm): Handle PTRMEM_CST.
6663 (instantiate_class_template): Use set_current_access_from_decl,
6664 finish_member_declaration and unreverse_member_declarations. Set
6665 lineno/input_filename before generating implicit member functions.
6666 (type_unification_real): Don't assume back-unification happens
6667 only for the last argument.
6668 (regenerate_decl_from_template): Call pushclass a bit earlier.
6669 (tsubst_chain): Remove.
6670 (tsubst_enum): Use set_current_access_from_decl.
6671 (set_mangled_name_for_template_decl): Fix indentation.
6672 * search.c (lookup_fnfields_1): Change iteration through
6673 CLASSTYPE_METHOD_VEC.
6674 (dfs_pushdecls): Likewise.
6675 (dfs_compress_decls): Likewise.
6676 (add_conversions): Likewise.
6677 * semantics.c (finish_class_definition): Don't take components.
6678 Change call to finish_struct.
6679 (finish_member_declaration): New function.
6680 (finish_member_class_template): Don't take template parameters.
6681 Change call to grok_x_components. Call finish_member_template_decl.
6682 (check_multiple_declarators): New function.
6683 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6684 a passed in fieldlist.
6685 * tree.c (search_tree): Handle PTRMEM_CST.
6686 (mapcar): Likewise.
6687 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6688 INTEGER_CSTs, for pointer-to-data members.
6689
6690 * call.c (resolve_args): Resolve template specializations, if
6691 possible.
6692
6693 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6694
6695 * Makefile.in (spew.o): Depend on toplev.h.
6696
6697 * call.c (compare_ics): Initialize variables `deref_from_type2',
6698 `deref_to_type1' and `deref_to_type2'.
6699
6700 * except.c (get_eh_type): Hide prototype and definition.
6701 (process_start_catch_block_old): Remove unused static prototype.
6702
6703 * pt.c (tsubst_decl): Initialize variable `argvec'.
6704
6705 * spew.c: Include toplev.h.
6706
6707 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
6708
6709 * pt.c (instantiate_decl): Do save and restore file position.
6710
6711 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
6712
6713 * method.c (build_decl_overload_real): Clear
6714 numeric_output_need_bar after __.
6715
6716 1998-10-05 Nathan Sidwell <nathan@acm.org>
6717
6718 * call.c (build_new_method_call): Issue 'incomplete type' error,
6719 if class is not defined.
6720
6721 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6722
6723 * call.c (build_object_call): Move declaration of variable
6724 `fn' into the scope where it is used. Don't access variable
6725 `fn' when it is uninitialized, instead use `fns'.
6726
6727 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6728
6729 * errfn.c (cp_thing): Print buf as a string not as a printf format
6730 to avoid problems with the operator%. Consequently, `%%' sequences
6731 in format are copied as `%' in buf.
6732
6733 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
6734
6735 * pt.c (pop_tinst_level): Call extract_interface_info.
6736 (instantiate_decl): Don't save and restore file position.
6737
6738 * decl.c (cp_finish_decl): Make statics in extern inlines and
6739 templates common, if possible and the target doesn't support weak
6740 symbols.
6741
6742 * decl.c (grokdeclarator): Remove redundant calls to
6743 build_type_variant and some duplicated code.
6744 * sig.c (build_signature_reference_type): Only take the type parm.
6745 (build_signature_pointer_type): Likewise.
6746 * tree.c (build_cplus_method_type): Adjust.
6747 * cp-tree.h: Update.
6748
6749 1998-10-04 Mark Mitchell <mark@markmitchell.com>
6750
6751 * call.c (build_over_call): Make pedwarns about dropped qualifiers
6752 into full-fledged errors.
6753 * cvt.c (convert_to_reference): Likewise.
6754 * typeck.c (convert_for_assignment): Likewise.
6755
6756 * search.c (expand_upcast_vtables): In addition to unsetting
6757 TREE_READONLY, remove top-level const type qualifier.
6758
6759 1998-10-03 Mark Mitchell <mark@markmitchell.com>
6760
6761 * class.c (current_class_ptr, current_class_ref): Clarify
6762 documentation.
6763 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6764 NOP type conversions.
6765 * decl.c (decls_match): Use comptypes directly; ignore
6766 qualifiers on the DECL.
6767 (duplicate_decls): Remove qualifier checks on DECL.
6768 (grokdeclarator): Make the type built up include top-level
6769 qualifiers.
6770 * decl2.c (do_dtors): Fix spelling error.
6771 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6772 when printing type information.
6773 * init.c (build_new_1): Add documentation. Deal with the fact
6774 that type of allocated memory now contains qualifiers.
6775 * lex.c (is_global): Improve error-recovery.
6776 * sig.c (build_member_function_pointer): Don't cast away const
6777 on fields of sigtable_entry_type.
6778 * tree.c (lvalue_type): Don't look at top-level qualifiers on
6779 expressions.
6780 * typeck.c (decay_conversion): Likewise.
6781 (build_component_ref): Make sure the type of the COMPONENT_REF
6782 contains top-level qualifiers, as appropriate. Improve
6783 error-handling.
6784 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
6785 (build_array_ref): Likewise.
6786 (build_unary_op): Improve error-recovery.
6787 (unary_complex_lvalue): Make taking the address a bound member
6788 function an error, not a sorry.
6789 (build_conditional_expr): Look at the type qualifiers, not the
6790 qualifiers on the expression itself.
6791
6792 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
6793
6794 * decl2.c (merge_functions): Remove duplicates.
6795
6796 * decl2.c: Add -f{no-,}implicit-inline-templates.
6797 (import_export_decl): Check it.
6798
6799 * decl.c (lookup_name_real): Template parms also take precedence
6800 over implicit typename. Only warn if yylex.
6801
6802 * typeck.c (build_conditional_expr): Only fold if ifexp is an
6803 INTEGER_CST.
6804
6805 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6806 instead of linkage.
6807
6808 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
6809
6810 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6811 * class.c (build_vbase_pointer): Use it.
6812 * rtti.c (expand_class_desc): Likewise.
6813 * tree.c (build_vbase_pointer_fields): Likewise.
6814
6815 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
6816
6817 * decl.c (start_decl): Add invocation of
6818 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6819 (start_function): Add invocation of
6820 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6821
6822 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6823 HANDLE_GENERIC_PRAGMAS.
6824
6825 1998-09-28 Anthony Green <green@cygnus.com>
6826
6827 * semantics.c (finish_asm_stmt): Always permit volatile asms.
6828
6829 1998-09-28 Mark Mitchell <mark@markmitchell.com>
6830
6831 * decl.c (grokdeclarator): Tighten checks for invalid
6832 destructors. Improve error-messages and error-recovery.
6833 * decl2.c (check_classfn): Don't assume that mangled destructor
6834 names contain type information.
6835
6836 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
6837
6838 * search.c (get_base_distance): Remove assert.
6839
6840 * decl2.c (build_anon_union_vars): Don't process a field with no
6841 name.
6842 (finish_anon_union): Also complain about local anon unions with no
6843 members.
6844
6845 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6846
6847 * decl.c (lookup_namespace_name): If the name is a namespace,
6848 return it immediately.
6849
6850 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6851
6852 * cp-tree.h (define_case_label): Remove unused parameter.
6853 (check_java_method): Likewise.
6854 (grokclassfn): Likewise.
6855 (expand_aggr_init): Likewise.
6856 (build_x_delete): Likewise.
6857 (maybe_end_member_template_processing): Likewise.
6858 (unshare_base_binfos): Add prototype.
6859 (string_conv_p): Likewise.
6860 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6861
6862 * cvt.c (build_up_reference): Remove unused parameter
6863 `checkconst', all callers changed.
6864 (build_type_conversion): Mark parameter `code' with
6865 ATTRIBUTE_UNUSED.
6866 (build_expr_type_conversion): Initialize variable `conv'.
6867
6868 * decl.c (push_namespace): Initialize variable `d'.
6869 (define_case_label): Remove unused parameter `decl', all callers
6870 changed.
6871
6872 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6873 `argc' with ATTRIBUTE_UNUSED.
6874 (grokclassfn): Remove unused parameter `cname', all callers
6875 changed.
6876 (check_java_method): Likewise for parameter `ctype'.
6877 (copy_assignment_arg_p): Mark parameter `virtualp' with
6878 ATTRIBUTE_UNUSED.
6879 (finish_prevtable_vardecl): Likewise for parameter `prev'.
6880
6881 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6882
6883 * init.c (expand_aggr_init_1): Remove unused parameter
6884 `alias_this', all callers changed.
6885 (expand_aggr_init): Likewise.
6886 (expand_default_init): Likewise.
6887 (build_new_1): Initialize variable `susp'.
6888 (build_x_delete): Remove unused parameter `type', all callers
6889 changed.
6890
6891 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6892 ATTRIBUTE_UNUSED.
6893 (readescape): Use (unsigned) value in shift.
6894 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
6895 comparing to a signed quantity.
6896
6897 * pt.c (maybe_end_member_template_processing): Remove unused
6898 parameter `decl', all callers changed.
6899 (check_explicit_specialization): Add braces around empty body in
6900 an else-statement.
6901 (current_template_args): Initialize variable `args'.
6902 (lookup_template_class): Likewise for variable `prev_local_enum'.
6903 (tsubst_decl): Likewise for variable `r'.
6904 (set_mangled_name_for_template_decl): Initialize variable
6905 `context'.
6906
6907 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6908 Likewise for variable `i'.
6909 (yylex): Initialize variable `trrr'.
6910
6911 * typeck.c (compparms): Mark variable `strict' with
6912 ATTRIBUTE_UNUSED.
6913
6914 * xref.c (simplify_type): Cast argument of ctype function to
6915 `unsigned char'.
6916
6917 1998-09-24 Mark Mitchell <mark@markmitchell.com>
6918
6919 * cp-tree.h (language_lvalue_valid): Remove.
6920 * decl.c (grokdeclarator): Don't disallow references to functions.
6921 * tree.c (lvalue_p_1): New function, combining duplicated
6922 code from ...
6923 (lvalue_p): Use it.
6924 (real_lvalue_p): Likewise.
6925 * typeck.c (language_lvalue_valid): Remove.
6926 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6927 they don't have TREE_READONLY set.
6928 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6929
6930 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
6931
6932 * spew.c (yylex): Give diagnostic.
6933 * hash.h (is_reserved_word): Add export.
6934 * gxx.gperf: Likewise.
6935 * lex.h (rid): Add RID_EXPORT.
6936 * lex.c (init_parse): Likewise.
6937
6938 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6939
6940 * friend.c (do_friend): Make warning a full sentence.
6941
6942 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6943
6944 * parse.y (component_decl_list): Improve error-recovery.
6945
6946 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
6947
6948 * decl.c (make_typename_type): Move error to point where name
6949 variable can be used by dump_type.
6950
6951 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6952
6953 * decl.c (grokfndecl): Improve error-recovery.
6954 * decl2.c (grokfield): Likewise.
6955 * pt.c (finish_member_template_decl): Likewise.
6956
6957 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
6958
6959 * method.c (hack_identifier): Finding multiple members is always
6960 an error.
6961
6962 1998-09-21 Per Bothner <bothner@cygnus.com>
6963
6964 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
6965
6966 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
6967
6968 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6969
6970 1998-09-20 Mark Mitchell <mark@markmitchell.com>
6971
6972 * class.c (maybe_warn_about_overly_private_class): Reformat.
6973
6974 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
6975
6976 * exception.cc (__cplus_type_matcher): Realign some code.
6977
6978 1998-09-16 Mark Mitchell <mark@markmitchell.com>
6979
6980 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6981 (tinfo2.o): Likewise.
6982 (exception.o): Likewise.
6983 (new.o): Likewise.
6984 (opnew.o): Likewise.
6985 (opnewnt.o): Likewise.
6986 (opvnew.o): Likewise.
6987 (opvnewnt.o): Likewise.
6988 (opdel.o): Likewise.
6989 (opdelnt.o): Likewise.
6990 (opvdel.o): Likewise.
6991 (opvdelnt.o): Likewise.
6992
6993 1998-09-16 Richard Henderson <rth@cygnus.com>
6994
6995 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6996
6997 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
6998
6999 * call.c (build_field_call): Handle static data members too.
7000
7001 * typeck.c (comptypes): When comparing pointer types, check
7002 whether referred types match even in strictest modes.
7003
7004 1998-09-15 Mark Mitchell <mark@markmitchell.com>
7005
7006 * cp-tree.h: Revert previous change.
7007 (finish_struct_methods): Remove declaration.
7008 * class.c: Revert previous change.
7009 (maybe_warn_about_overly_private_class): New function.
7010 (finish_struct_methods): Declare here, and make static. Remove
7011 unnecessary parameters. Tidy slightly. Use
7012 maybe_warn_about_overly_private_class.
7013 (finish_struct_1): Adjust. Remove check for private constructors,
7014 now done elsewhere.
7015 (finish_struct): Adjust.
7016
7017 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7018
7019 * except.c (expand_start_catch_block): No need to check for new
7020 exception model.
7021 (process_start_catch_block_old): Deleted.
7022 (process_start_catch_block): Add call to start_decl_1().
7023 (expand_end_catch_block): Add call to end_catch_handler().
7024 * exception.cc (__cplus_type_matcher): Only check the exception
7025 language if there is an exception table.
7026
7027 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
7028
7029 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7030 as used to prevent conflicts with virtual function tables.
7031
7032 1998-09-14 Mark Mitchell <mark@markmitchell.com>
7033
7034 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7035 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7036 * class.c (maybe_class_too_private_p): New function.
7037 (finish_struct_methods): Use it.
7038 (finish_struct_1): Likewise.
7039 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7040 appropriate.
7041
7042 * pt.c (check_specialization_scope): Fix spelling error.
7043 (check_explicit_specialization): Remove code to handle explicit
7044 specializations in class scope; they are now correctly diagnosed
7045 as errors.
7046
7047 1998-09-10 Mark Mitchell <mark@markmitchell.com>
7048
7049 * decl.c (pushdecl): Don't copy types if the
7050 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7051 type.
7052
7053 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7054
7055 * class.c (get_enclosing_class): New function.
7056 (is_base_of_enclosing_class): Likewise.
7057 * cp-tree.h (get_enclosing_class): Declare.
7058 (is_base_of_enclosing_class): Likewise.
7059 * pt.c (coerce_template_parms): Use them.
7060
7061 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
7062
7063 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7064 null to decide whether to use it.
7065
7066 * error.c (dump_type_real): Handle NAMESPACE_DECL.
7067 * parse.y (base_class.1): Avoid crash on error.
7068
7069 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
7070
7071 * decl.c (make_typename_type): If context is a namespace, the code
7072 is in error.
7073
7074 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
7075
7076 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7077
7078 1998-09-08 Mark Mitchell <mark@markmitchell.com>
7079
7080 * cp-tree.h (anonymous_namespace_name): Declare.
7081 * decl.c: Define it.
7082 (push_namespace): Use anonymous_namespace_name, rather than local
7083 static anon_name.
7084 * error.c (dump_decl): If a namespace is named
7085 anonymous_namespace_name, call it {anonymous}.
7086
7087 * decl.c (grokparms): Distinguish between references and pointers
7088 in error message.
7089
7090 1998-09-08 Richard Henderson <rth@cygnus.com>
7091 Mark Mitchell <mark@markmitchell.com>
7092
7093 * pt.c (process_partial_specialization): Consistently allocate
7094 and zero tpd.parms based on ntparms. Use tpd2.parms, not
7095 tpd.parms, where appropriate.
7096
7097 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
7098
7099 * Makefile.in (INCLUDES): Update after recent toplevel gcc
7100 reorganizations.
7101
7102 1998-09-05 Mark Mitchell <mark@markmitchell.com>
7103
7104 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7105 * class.c (finish_struct): Remove hackery to deal with explicit
7106 specializations in class scope.
7107 * decl.c (grokfndecl): Improve error-recovery.
7108 * decl2.c (grokfield): Likewise.
7109 * pt.c (check_specialization_scope): New function.
7110 (begin_specialization): Call it.
7111 (process_partial_specialization): New function, split out from
7112 push_template_decl. Check partial specializations more
7113 stringently.
7114 (push_template_decl): Call it.
7115 (check_explicit_specialization): Don't attempt to handle explicit
7116 specializations in class scope.
7117 (template_parm_data): Document. Add current_arg and
7118 arg_uses_template_parms.
7119 (mark_template_parm): Set it.
7120 (tsubst_arg_types): Remove unused variable.
7121 * semantics.c (begin_class_definition): Tweak.
7122
7123 1998-09-04 Mark Mitchell <mark@markmitchell.com>
7124
7125 * inc/typeinfo (type_info::type_info(const char*)): Make
7126 `explicit'.
7127
7128 * cp-tree.h (hash_tree_cons_simple): New macro.
7129 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
7130 (coerce_template_parms): Use make_temp_vec, instead of
7131 make_tree_vec. Document this behavior.
7132 (lookup_template_class): Likewise.
7133 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7134 Remove dead code (and add assertion to check its deadness). Fix
7135 bug w.r.t. exception specifications.
7136
7137 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
7138
7139 * decl2.c (import_export_vtable): Always make artificials comdat.
7140 (import_export_decl): Likewise.
7141 * pt.c (mark_decl_instantiated): Likewise.
7142
7143 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7144
7145 * cp-tree.h (finish_globally_qualified_member_call_expr):
7146 Rename to ...
7147 (finish_qualified_call_expr).
7148 * semantics.c: Likewise.
7149 * parse.y (primary): Use it.
7150 * method.c (hack_identifier): Remove redundant code.
7151
7152 * init.c (resolve_offset_ref): Call convert_from_reference to
7153 handle members of reference type. Improve error recovery.
7154
7155 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
7156
7157 * cp-tree.h: Declare warn_nontemplate_friend.
7158 * decl2.c (lang_decode_option): Set.
7159 * lang-options.h: Add -Wnon-template-friend.
7160 * friend.c (do_friend): Use to toggle non-template function warning.
7161
7162 1998-09-03 Mark Mitchell <mark@markmitchell.com>
7163
7164 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7165 corresponding INTEGER_CSTs when processing_template_decl.
7166 * pt.c (tsubst_enum): Tweak accordingly.
7167
7168 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7169
7170 * decl.c (pushdecl_class_level): Add warning here.
7171 (pushdecl): Tweak.
7172
7173 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
7174
7175 * cvt.c (convert_pointer_to_real): Tidy.
7176 * search.c (get_base_distance_recursive): Simplify.
7177 (get_base_distance): Likewise.
7178
7179 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7180 parms.
7181
7182 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
7183
7184 * lex.c (check_newline): Call HANDLE_PRAGMA before
7185 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
7186 if unknown pragmas are encountered.
7187 (handle_sysv_pragma): Interpret return code from
7188 handle_pragma_token (). Return success/failure indication rather
7189 than next unprocessed character.
7190 (pragma_getc): New function: retrieves characters from the
7191 input stream. Defined when HANDLE_PRAGMA is defined.
7192 (pragma_ungetc): New function: replaces characters back into the
7193 input stream. Defined when HANDLE_PRAGMA is defined.
7194
7195 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7196
7197 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7198 * class.c (build_vtable_entry_ref): Likewise.
7199
7200 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7201
7202 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7203 * decl2.c (import_export_decl): Likewise.
7204 * pt.c (instantiate_decl): Use it.
7205
7206 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
7207
7208 * decl.c (lookup_name_real): Also do implicit typename thing for
7209 artificial TYPE_DECLs.
7210 * search.c (lookup_field): Likewise.
7211 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7212 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7213 (enter_scope_of): Extract type from implicit typename.
7214 (begin_class_definition): Likewise.
7215 * lex.c (identifier_type): Handle implicit typename when checking
7216 for SELFNAME.
7217
7218 * cp-tree.h: Declare flag_strict_prototype.
7219 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7220 -fstrict-prototype.
7221 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7222 specified, set it to the value of pedantic.
7223
7224 1998-09-01 Mark Mitchell <mark@markmitchell.com>
7225
7226 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7227
7228 1998-08-31 Mark Mitchell <mark@markmitchell.com>
7229
7230 * decl.c (finish_enum): Handle member enums of classes declared in
7231 template functions.
7232
7233 * decl2.c (grok_x_components): Strip attributes before calling
7234 groktypename.
7235
7236 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
7237
7238 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7239 -fenum-int-equivalence and -fno-nonnull-objects.
7240 * class.c (check_for_override): Remove support for -fall-virtual.
7241 (finish_struct_1): Likewise.
7242 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7243 * typeck.c (build_binary_op_nodefault): Likewise.
7244 * cvt.c (ocp_convert): Likewise.
7245 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7246 * class.c (build_vbase_path): Likewise.
7247
7248 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
7249
7250 * Makefile.in (INTERFACE): New, set to 1.
7251
7252 1998-08-30 Mark Mitchell <mark@markmitchell.com>
7253
7254 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7255 comparing with global_namespace.
7256 (dump_aggr_type): Likewise.
7257
7258 * decl.c (grokfndecl): Issue error on declaration of friend
7259 templates with explicit template arguments.
7260
7261 * pt.c (convert_template_argument): New function, split out
7262 from...
7263 (coerce_template_parms): Here.
7264 (tsubst): Attempt better error-recovery.
7265
7266 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
7267
7268 * pt.c (decl_template_parm_p): Add checks for
7269 TEMPLATE_TEMPLATE_PARM.
7270
7271 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7272
7273 * lex.c (do_identifier): Fix thinko in previous change.
7274
7275 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
7276
7277 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7278 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7279
7280 1998-08-28 Richard Henderson <rth@cygnus.com>
7281
7282 Add support for discarding unused virtual functions.
7283 * lang-options.h: Add -fvtable-gc.
7284 * cp-tree.h: Add flag_vtable_gc.
7285 * decl2.c (output_vtable_inherit): New fn.
7286 (finish_vtable_vardecl): Call it.
7287 * class.c (build_vtable_entry_ref): New fn.
7288 (build_vtbl_ref): Call it.
7289
7290 1998-08-28 Mark Mitchell <mark@markmitchell.com>
7291
7292 * cp-tree.h (build_enumerator): Take the enumeration type as a
7293 parameter.
7294 * decl.c (finish_enum): Don't set the TREE_TYPE for the
7295 enumeration constant values if we're processing_template_decls.
7296 Don't set the type for the CONST_DECLs either; that's done in
7297 build_enumerator.
7298 (build_enumerator): Take the enumeration type as a
7299 parameter.
7300 * lex.c (do_identifier): Don't resolve enumeration constants while
7301 processing template declarations, even if they happen to be
7302 TEMPLATE_PARM_INDEXs.
7303
7304 * parse.y (current_enum_type): New variable.
7305 (primary): Don't allow statement-expression in local classes just
7306 as we don't in global classes.
7307 (structsp): Use current_enum_type.
7308 (enum_list): Likewise.
7309 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7310 finish_enum; they no longer occur.
7311
7312 * cp-tree.h (finish_base_specifier): New function.
7313 * parse.y (base_class): Use it.
7314 * semantics.c (finish_base_specifier): Define it.
7315
7316 * parse.y (structsp): Warn on use of typename outside of template
7317 declarations.
7318
7319 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7320
7321 * lex.c (handle_cp_pragma): Remove #pragma vtable.
7322 * lang-options.h: Remove +e options.
7323 * decl2.c (lang_decode_option): Likewise.
7324 (import_export_vtable): Don't check write_virtuals.
7325 (finish_vtable_vardecl, finish_file): Likewise.
7326 * search.c (dfs_debug_mark): Likewise.
7327 * semantics.c (begin_class_definition): Likewise.
7328 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7329
7330 * call.c (build_over_call): Check flag_elide_constructors.
7331 * decl2.c: flag_elide_constructors defaults to 1.
7332 * typeck.c (convert_arguments): Remove return_loc parm.
7333 (build_function_call_real): Adjust.
7334
7335 * search.c: Tear out all mi_matrix and memoize code.
7336 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7337 * lang-options.h: Remove documentation for -fhandle-exceptions,
7338 -fmemoize-lookups and -fsave-memoized.
7339 * cp-tree.h: Lose mi_matrix and memoize support.
7340 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7341 * class.c: Lose struct class_level.
7342 (pushclass, popclass): Lose memoize support.
7343 * init.c (build_offset_ref): Likewise.
7344
7345 Never change BINFO_INHERITANCE_CHAIN.
7346 * init.c (emit_base_init): Change modification of
7347 BINFO_INHERITANCE_CHAIN to an assert.
7348 * search.c (get_base_distance_recursive): Likewise.
7349 (get_base_distance): Likewise.
7350 (lookup_member): Likewise.
7351 (convert_pointer_to_single_level): Likewise.
7352 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
7353 (lookup_fnfields): Likewise.
7354 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7355 (unshare_base_binfos): Don't call propagate_binfo_offsets.
7356 (layout_basetypes): Call propagate_binfo_offsets instead of
7357 unshare_base_binfos.
7358 * decl.c (xref_basetypes): Call unshare_base_binfos.
7359 * pt.c (instantiate_class_template): Likewise.
7360 * tree.c (reverse_path): Remove 'copy' parm; always make a
7361 temporary copy.
7362 * class.c (build_vbase_path): Just call it.
7363 * search.c (compute_access): Likewise. Don't re-reverse.
7364
7365 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7366
7367 * class.c (build_vbase_path): Use reverse_path.
7368 (finish_base_struct): Move warnings for inaccessible bases to
7369 layout_basetypes.
7370 (modify_one_vtable): Remove check of TREE_USED (binfo).
7371 (fixup_vtable_deltas1): Likewise.
7372 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7373 (xref_tag): Remove binfos parameter.
7374 (make_binfo): Remove chain parameter.
7375 (reverse_path): Add copy parameter.
7376 * decl.c (init_decl_processing): Change calls to xref_tag.
7377 (xref_tag): Remove binfos parameter.
7378 (xref_basetypes): Change calls to make_binfo.
7379 * decl2.c (grok_x_components): Change calls to xref_tag.
7380 (handle_class_head): Likewise.
7381 * friend.c (do_friend): Likewise.
7382 * lex.c (make_lang_type): Change calls to make_binfo.
7383 * parse.y (structsp): Change calls to xref_tag.
7384 (named_complex_class_head_sans_basetype): Likewise.
7385 (named_class_head): Likewise.
7386 * rtti.c (init_rtti_processing): Likewise.
7387 * search.c (compute_access): Change calls to reverse_path.
7388 (dfs_get_vbase_types): Change calls to make_binfo.
7389 (get_vbase_types): Remove dead code.
7390 * tree.c (unshare_base_binfos): Change calls to make_binfo.
7391 (layout_basetypes): Warn here about inaccessible bases.
7392 (make_binfo): Remove chain parameter.
7393 (reverse_path): Add copy parameter.
7394
7395 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
7396
7397 * class.c: #if 0 complete_type_p.
7398 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
7399 * method.c (process_overload_item): Likewise.
7400 * typeck.c (comp_target_types): Likewise.
7401
7402 Stop sharing binfos for indirect virtual bases.
7403 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
7404 (layout_basetypes): Likewise.
7405 (unshare_base_binfos): Copy vbases, too.
7406 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
7407 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
7408 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
7409 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
7410 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
7411 reference to BINFO_VIA_PUBLIC.
7412 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
7413 (push_class_decls): Use them.
7414 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
7415 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
7416
7417 1998-08-27 Mark Mitchell <mark@markmitchell.com>
7418
7419 * decl.c (build_enumerator): Set DECL_CONTEXT for the
7420 CONST_DECLs.
7421
7422 1998-08-26 Mark Mitchell <mark@markmitchell.com>
7423
7424 * cp-tree.h (finish_enum): Change prototype.
7425 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
7426 VALUES parameter. Don't try to compute mins/maxs if
7427 processing_template_decl.
7428 * parse.y (structsp): Use new calling sequence for finish_enum.
7429 * pt.c (tsubst_enum): Likewise. Take the new type as input.
7430 (lookup_template_class): Remove unused variables. Tweak.
7431 Register enums on instantiation list before substituting
7432 enumeration constants.
7433 (tsubst_decl): Remove unused variables.
7434 (regenerate_decl_from_template): Likewise.
7435
7436 * decl.c (duplicate_decls): Don't obliterate the
7437 DECL_TEMPLATE_INFO for a template if we're not replacing it with
7438 anything.
7439
7440 * lex.c (do_identifier): Fix typo in comment.
7441
7442 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7443
7444 * errfn.c: Remove stdarg.h/varargs.h.
7445 * tree.c: Likewise.
7446
7447 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
7448
7449 * pt.c (tsubst_copy): Only do typename overloading on an
7450 IDENTIFIER_NODE that happens to look like a typename if it actually
7451 has a type for us to use.
7452
7453 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7454
7455 * typeck.c (comp_cv_target_types): Split out...
7456 (comp_target_types): From here. Don't allow cv-qual changes under
7457 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
7458 (build_ptrmemfunc): Pass 1 to nptrs.
7459 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7460
7461 1998-08-25 Mark Mitchell <mark@markmitchell.com>
7462
7463 * search.c (dependent_base_p): Don't compare a binfo to
7464 current_class_type; use the TREE_TYPE of the binfo instead.
7465
7466 * cp-tree.h (CLASS_TYPE_P): Revise definition.
7467
7468 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7469
7470 * decl.c (duplicate_decls): Don't complain about different
7471 exceptions from an internal decl even if pedantic.
7472
7473 * typeck.c (convert_for_assignment): Converting from pm of vbase
7474 to derived is an error, not a sorry.
7475
7476 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7477 * class.c (fixed_type_or_null): Rename from
7478 resolves_to_fixed_type_p. Return the dynamic type of the
7479 expression, if fixed, or null.
7480 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
7481 does not match the static type.
7482 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
7483 resolves_to_fixed_type_p again.
7484
7485 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7486
7487 * pt.c (tsubst_decl): Move special case code for dealing with
7488 tricky friend templates here from ...
7489 (regenerate_decl_from_template): Here.
7490
7491 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7492
7493 * decl.c (start_decl): Remove redundant linkage check.
7494
7495 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
7496
7497 * typeck.c (c_expand_return): Handle the case that valtype
7498 is wider than the functions return type.
7499
7500 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7501
7502 * cp-tree.h (CLASS_TYPE_P): New macro.
7503 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7504 * pt.c (process_template_parm): Undo previous change.
7505
7506 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
7507
7508 * cp-tree.h: Declare.
7509 * pt.c (decl_template_parm_p): New function.
7510 * decl.c (pushdecl): Check decls for redeclaring template parms.
7511 (xref_tag): Make redeclaration an error, print decl.
7512 * decl2.c (grokfield): Check field_decls for redeclaration as well.
7513
7514 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7515
7516 * parse.y (primary): Fix up the type of string constants.
7517
7518 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7519
7520 * typeck.c (convert_for_initialization): Move check for odd uses
7521 of NULL to avoid duplicate warnings.
7522
7523 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7524
7525 * tree.c (lvalue_type): Fix for arrays.
7526 * typeck.c (string_conv_p): New fn.
7527 (convert_for_assignment): Use it.
7528 (build_unary_op): Use lvalue_type.
7529 * call.c (standard_conversion, convert_like): Use string_conv_p.
7530 (add_function_candidate): Use lvalue_type.
7531 * cvt.c (convert_to_reference): Likewise.
7532 * decl2.c (lang_decode_option): Ignore -traditional.
7533 * decl.c (init_decl_processing): flag_writable_strings inhibits
7534 flag_const_strings.
7535
7536 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
7537
7538 * lang-options.h (lang_options): Add fconst-strings to the list
7539 of valid options.
7540 * decl2.c (lang_f_options, lang_decode_option): Likewise.
7541
7542 1998-08-24 Nathan Sidwell <nathan@acm.org>
7543
7544 * lex.c (real_yylex): Don't warn about long long constants if
7545 we're allowing long long.
7546
7547 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7548
7549 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7550 accessing bindings directly.
7551
7552 * search.c (my_tree_cons): Reimplement.
7553
7554 * lang-specs.h: Remove __HONOR_STD.
7555 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7556
7557 1998-08-23 Mark Mitchell <mark@markmitchell.com>
7558
7559 * decl.c (grokdeclarator): Complain about in-class initialization
7560 of aggregates and/or references.
7561 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7562 TEMPLATE_TYPE_PARMs.
7563
7564 * decl2.c (grok_array_decl): Add comment.
7565 (mark_used): Don't instantiate an explicit instantiation.
7566 * friend.c (make_friend_class): Remove bogus comment. Fix check
7567 for partial specializations.
7568 * pt.c (check_explicit_specialization): Don't
7569 SET_DECL_EXPLICIT_INSTANTIATION here.
7570 (mark_decl_instantiated): Or here.
7571 (do_decl_instantiation): Do it here, instead. Add checks for
7572 duplicate explicit instantiations, etc. Tidy.
7573 (do_type_instantiation): Likewise.
7574 (instantiate_decl): Improve comments. Complain about explicit
7575 instantiations where no definition is available.
7576
7577 * cp-tree.h (ansi_null_node): Remove.
7578 * call.c (build_over_call): Warn about converting NULL to an
7579 arithmetic type.
7580 * cvt.c (build_expr_type_conversion): Likewise. Use
7581 null_ptr_cst_p instead of expanding it inline.
7582 * decl.c (ansi_null_node): Remove.
7583 (init_decl_processing): Make null_node always have integral type.
7584 * except.c (build_throw): Warn about converting NULL to an
7585 arithmetic type.
7586 * lex.c (init_parse): Remove handling of ansi_null_node.
7587 * pt.c (type_unification_real): Don't convert NULL to void* type.
7588 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7589 (convert_for_assignment): Warn about converting NULL to an
7590 arithmetic type.
7591 (convert_for_initialization): Likewise.
7592
7593 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7594
7595 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7596 * pt.c (coerce_template_parms): Use no_linkage_check.
7597 * decl.c (grokvardecl): Likewise.
7598 (grokfndecl): Likewise. Members of anonymous types have no linkage.
7599
7600 * method.c (process_overload_item): Remove useless code.
7601
7602 1998-08-20 Per Bothner <bothner@cygnus.com>
7603
7604 Handle new'ing of Java classes.
7605 * init.c (build_class_classref): New function.
7606 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
7607 constructor does not return this; don't need to exception-protect.
7608
7609 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
7610 * decl2.c (acceptable_java_type): Handle template-derived types.
7611
7612 1998-08-20 Per Bothner <bothner@cygnus.com>
7613
7614 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
7615
7616 1998-08-20 Mark Mitchell <mark@markmitchell.com>
7617
7618 * decl.c (duplicate_decls): Always merge the old and new patterns
7619 for templates, regardless of whether or not the new one has
7620 DECL_INITIAL. Don't throw away specializations. Merge
7621 DECL_SAVED_TREE.
7622 * pt.c (tsubst_decl): Use the right pattern when calculating the
7623 complete args for a new template instance.
7624 (do_decl_instantiation): Fix typo in comment.
7625 (regenerate_decl_from_template): Deal with tricky friend template
7626 case.
7627 (instantiate_decl): Likewise.
7628
7629 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
7630
7631 * init.c (build_builtin_delete_call): Add missing assemble_external
7632 call.
7633
7634 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7635
7636 * parse.y (notype_unqualified_id): Also accept ~A<int>.
7637
7638 1998-08-19 Mark Mitchell <mark@markmitchell.com>
7639
7640 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7641 arithmetic.
7642 * except.c (build_throw): Warn when NULL is thrown, even with
7643 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
7644 thrown expression.
7645
7646 * cp-tree.h (ansi_null_node): New variable.
7647 * decl.c (ansi_null_node): New variable.
7648 (init_decl_processing): Initialize its type.
7649 * lex.c (init_parse): Initialize its value. Use ansi_null_node
7650 for null_node in non-ANSI mode.
7651 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7652 place of null_node to avoid spurious errors.
7653
7654 1998-08-17 Mark Mitchell <mark@markmitchell.com>
7655
7656 * cp-tree.h (enter_scope_of): New function.
7657 * parse.y (complex_direct_notype_declarator): Use it.
7658 * semantics.c (enter_scope_of): New function.
7659
7660 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
7661
7662 * decl.c (grokparms): No, here.
7663
7664 * decl.c (grokdeclarator): Catch parm with pointer to array of
7665 unknown bound here...
7666 * method.c (process_overload_item): ...not here.
7667
7668 * gxxint.texi: Remove obsolete documentation of overloading code.
7669
7670 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7671 * class.c (finish_struct_bits): Likewise.
7672
7673 * tree.c (lvalue_type): Fix for arrays.
7674 * typeck.c (build_unary_op): Use lvalue_type.
7675 * call.c (add_function_candidate): Likewise.
7676 * cvt.c (convert_to_reference): Likewise.
7677
7678 * decl2.c (lang_decode_option): Ignore -traditional.
7679
7680 * init.c (build_offset_ref): Don't mess with error_mark_node.
7681 * lex.c (do_scoped_id): Use cp_error.
7682
7683 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7684
7685 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
7686
7687 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7688
7689 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
7690
7691 * cp-tree.h (set_identifier_local_value): Provide prototype.
7692
7693 * decl2.c (do_namespace_alias): Remove unused variables `binding'
7694 and `old'.
7695
7696 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
7697
7698 * Makefile.in: Rename BBISON to BISON so that it can be properly
7699 inherited from the parent makefile.
7700
7701 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7702
7703 * lang-options.h: Add -finit-priority.
7704 * decl2.c: Likewise. Check flag_init_priority instead of
7705 USE_INIT_PRIORITY.
7706
7707 * decl2.c (setup_initp): New fn.
7708 (start_objects, finish_objects, do_ctors): Handle init_priority.
7709 (do_dtors, finish_file): Likewise.
7710
7711 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7712
7713 * pt.c (tsubst_copy): Hush warning.
7714
7715 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7716
7717 1998-08-12 Mark Mitchell <mark@markmitchell.com>
7718
7719 * pt.c (print_template_context): Don't abort when instantiating a
7720 synthesized method.
7721
7722 * decl.c (grokdeclarator): Issue errors on namespace qualified
7723 declarators in parameter lists or in class scope.
7724
7725 1998-08-09 Mark Mitchell <mark@markmitchell.com>
7726
7727 * pt.c (check_explicit_specialization): Don't abort on bogus
7728 explicit instantiations.
7729
7730 1998-08-07 Mark Mitchell <mark@markmitchell.com>
7731
7732 * typeck.c (require_complete_type): Use complete_type_or_else.
7733 (complete_type_or_else): Always return NULL_TREE on failure, as
7734 documented.
7735
7736 * pt.c (tsubst_aggr_type): Prototype.
7737 (tsubst_decl): New function, split out from tsubst. Set
7738 input_filename and lineno as appropriate.
7739 (pop_tinst_level): Restore the file and line number saved in
7740 push_tinst_level.
7741 (instantiate_class_template): Set input_filename and lineno as
7742 appropriate.
7743 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
7744 context for a TYPENAME_TYPE is complete.
7745
7746 * decl2.c (grokbitfield): Issue errors on bitfields declared with
7747 function type.
7748 (do_dtors): As in do_ctors, pretend to be a member of the same
7749 class as a static data member while generating a call to its
7750 destructor.
7751
7752 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7753 conversions, even in complex virtual base class hierarchies.
7754
7755 1998-08-06 Mark Mitchell <mark@markmitchell.com>
7756
7757 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7758 (TYPE_TEMPLATE_INFO): Likewise.
7759 (SET_TYPE_TEMPLATE_INFO): Likewise.
7760 (ENUM_TI_TEMPLATE): Likewise.
7761 (ENUM_TI_ARGS): Likewise.
7762 (lookup_nested_type_by_name): Remove.
7763 * decl.c (maybe_process_template_type_declaration): Handle enums.
7764 (start_enum): Don't check for primary-template enum declarations
7765 here.
7766 (finish_enum): Clean up, document. Make sure template enum
7767 constants get the correct type.
7768 (build_enumerator): Copy initializers for template enumerations,
7769 too.
7770 (grok_enum_decls): Document.
7771 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7772 better. Build LOOKUP_EXPRs for local variables, even if they are
7773 TREE_PERMANENT.
7774 * pt.c (tsubst_enum): Remove field_chain parameter.
7775 (template_class_depth): Include the depth of surrounding function
7776 contexts.
7777 (push_template_decl): Check for primary-template enum declarations
7778 here. Deal with enumeration templates.
7779 (lookup_template_class): Likewise.
7780 (for_each_template_parm): Likewise.
7781 (instantiate_class_template): Don't call tsubst_enum directly,
7782 call tsubst instead, to instantiate enums. Deal with all
7783 field_chain issues here, not in tsubst_enum.
7784 (lookup_nested_type_by_name): Remove.
7785 (tsubst_aggr_type): Revise handling of enumeration types.
7786 (tsubst): Likewise.
7787 (tsubst_copy): Likewise.
7788 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7789
7790 1998-08-04 Mark Mitchell <mark@markmitchell.com>
7791
7792 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7793 uses template parameters.
7794 * method.c (build_template_parm_names): Use the full set of
7795 template arguments for tsubst'ing.
7796 (build_overload_identifier): Pass the full set of template
7797 arguments to build_template_parm_names, not just the
7798 innermost_args.
7799 * pt.c (TMPL_ARGS_DEPTH): Define using
7800 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7801 (NUM_TMPL_ARGS): New macro.
7802 (add_outermost_template_args): Deal with the case where the outer
7803 args will be completely discarded.
7804 (coerce_template_parms): Use the full set of template arguments
7805 for tsubst'ing. Simplify. Add some asserts. Improve
7806 error messages.
7807 (lookup_template_class): Pass the full set of template arguments
7808 to coerce_template_parms.
7809 (tsubst): Add assertion.
7810 (do_type_instantiation): Don't instantiate member template
7811 classes.
7812
7813 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7814 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7815
7816 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
7817
7818 * method.c (set_mangled_name_for_decl): Change return type to void.
7819
7820 * decl.c (lookup_name_real): A namespace-level decl takes priority
7821 over implicit typename. Avoid doing the same lookup twice.
7822
7823 * search.c (dependent_base_p): New fn.
7824 (dfs_pushdecls, dfs_compress_decls): Use it.
7825
7826 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7827 virtual functions if the type doesn't have any.
7828
7829 1998-08-03 Mark Mitchell <mark@markmitchell.com>
7830
7831 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7832 uses template parameters.
7833
7834 1998-08-02 Mark Mitchell <mark@markmitchell.com>
7835
7836 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
7837 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7838 * lex.c (do_identifier): Don't use a second argument, or a type,
7839 when building LOOKUP_EXPRs.
7840 (do_identifier): Likewise.
7841 (do_scoped_id): Likewise.
7842 * method.c (hack_identifier): Improve error message.
7843 * pt.c (lookup_template_function): Don't needlessly call
7844 copy_to_permanent or build_min.
7845 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
7846 necessary.
7847 (do_decl_instantiation): Improve error message.
7848 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7849 (build_min): Copy the type to the permanent obstack, too.
7850
7851 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
7852
7853 * init.c (init_init_processing): Remove BI* handling.
7854 (build_builtin_call): Remove.
7855 (build_builtin_delete_call): New fn.
7856 (build_delete): Use it.
7857
7858 1998-07-31 Mark Mitchell <mark@markmitchell.com>
7859
7860 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7861 (maybe_check_template_type): New function.
7862 * decl.c (maybe_process_template_type_declaration): New function,
7863 split out from pushtag Call maybe_check_template_type.
7864 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
7865 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7866 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7867 * pt.c (template_class_depth_real): Generalization of ...
7868 (template_class_depth): Use it.
7869 (register_specialization): Use duplicate_decls for duplicate
7870 declarations of specializations.
7871 (maybe_check_template_type): New function.
7872 (push_template_decl_real): Fix comment.
7873 (convert_nontype_argument): Likewise.
7874 (lookup_template_class): Likewise. Avoid an infinite loop on
7875 erroneous code.
7876 (tsubst_friend_function): Fix comment.
7877 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7878 an IDENTIFIER_NODE.
7879 * semantics.c (begin_function_definition): Use
7880 reset_specialization to note that template headers don't apply
7881 directly to declarations after the opening curly for a function.
7882
7883 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
7884
7885 * decl.c (push_overloaded_decl): Use current_namespace instead of
7886 DECL_CONTEXT (decl) to determine where we go.
7887
7888 * decl.c (lookup_name_real): Fix typo.
7889
7890 1998-07-28 Mark Mitchell <mark@markmitchell.com>
7891
7892 * friend.c (is_friend): Be lenient with member functions to deal
7893 with nested friends.
7894
7895 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
7896
7897 * class.c (finish_struct_1): Convert integer_zero_node to
7898 ssizetype before passing it to set_rtti_entry.
7899 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7900 of any size to a pointer.
7901
7902 1998-07-27 Mark Mitchell <mark@markmitchell.com>
7903
7904 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7905 (build_template_decl_overload): Remove.
7906 (set_mangled_name_for_decl): New function.
7907 (innermost_args): Remove is_spec parameter.
7908 (most_specialized, most_specialized_class): Remove declarations.
7909 (lookup_template_class): Add entering_scope parameter.
7910 (maybe_process_partial_specialization): New function.
7911 (finish_template_decl): Likewise.
7912 (finish_template_type): Likewise.
7913 * class.c (finish_struct): Clean up processing of member template
7914 specializations.
7915 * decl.c (pushtag): Fix formatting.
7916 (lookup_tag): Improve handling of pseudo-global levels.
7917 (make_typename_type): Adjust call to lookup_template_class.
7918 (shadow_tag): Use maybe_process_partial_specialization.
7919 (xref_tag): Improve handling of member friends.
7920 (start_function): Call push_nested_class before
7921 push_template_decl. Don't call push_template_decl for
7922 specializations.
7923 * decl2.c (grok_x_components): Don't call xref_tag for
7924 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
7925 (grokclassfn): Use set_mangled_name_for_decl.
7926 (arg_assoc_class): Adjust call to innermost_args.
7927 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7928 * error.c (dump_function_name): Improve printing of template
7929 function names.
7930 * friend.c (is_friend): Don't compare types of decls to determine
7931 friendship, unless flag_guiding_decls.
7932 (make_friend_class): Partial specializations cannot be friends.
7933 (do_friend): Use set_mangled_name_for_decl. Call
7934 push_template_decl_real instead of push_template_decl.
7935 * method.c (build_decl_overload_real): Remove prototype. Give it
7936 external linkage.
7937 (build_overload_identififer): Adjust call to innermost_args.
7938 (build_template_decl_overload): Remove.
7939 (set_mangled_name_for_decl): New function.
7940 * parse.y (.finish_template_type): New non-terminal.
7941 (template_def): Use finish_template_decl. Use template_extdef
7942 instead of extdef.
7943 (template_extdef, template_datadef): New non-terminals, containing
7944 only those rules for things which can be templates.
7945 (datadef): Tidy.
7946 (template_type, self_template_type): Use .finish_template_type.
7947 (named_class_head): Use maybe_process_partial_specialization.
7948 * pt.c (mangle_class_name_for_template): Remove context parameter.
7949 (get_class_bindings): Remove outer_args parameter.
7950 (complete_template_args): Remove.
7951 (add_outermost_template_args): New function.
7952 (register_specialization): Return the specialization.
7953 (unregister_specialization): New function.
7954 (tsubst_template_parms): Likewise.
7955 (most_specialized, most_specialized_class): Prototype here as
7956 static.
7957 (original_template): Rename to most_general_template.
7958 (tsubst_template_parms): New function.
7959 (set_mangled_name_for_template_decl): Likewise.
7960 (TMPL_ARGS_DEPTH): New macro.
7961 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7962 (TMPL_ARGS_LEVEL): New macro.
7963 (SET_TMPL_ARGS_LEVEL): Likewise.
7964 (TMPL_ARG): Likewise.
7965 (SET_TMPL_ARG): Likewise.
7966 (TMPL_ARGS_DEPTH): Likewise.
7967 (finish_member_template_decl): Use finish_template_decl.
7968 (maybe_process_partial_specialization): New function, split out
7969 from tsubst.
7970 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7971 (maybe_begin_member_template_processing): Use new macros.
7972 (is_member_template): Likewise.
7973 (is_member_template_class): Likewise.
7974 (add_to_template_args): Likewise. Deal with multiple levels of
7975 args.
7976 (maybe_process_partial_specialization): New function.
7977 (retrieve_specialization): Add consistency check.
7978 (determine_specialization): Return full argument list.
7979 (check_explicit_specialization): Tweak friend handling. Use full
7980 argument lists. Simplify.
7981 (current_template_args): Use new macros.
7982 (push_template_decl_real): Change ill-named mainargs to specargs.
7983 Check that a partial specialization actually specializes at least
7984 one parameter. Improve friend handling. Modify for full
7985 template arguments.
7986 (classtype_mangled_name): Don't mangle the names of
7987 specializations.
7988 (lookup_template_class): Add entering_scope parameter. Use it to
7989 avoid finding a template type when an instantiation is required.
7990 Simplify. Use full template arguments.
7991 (tsubst_friend_function): Use unregister_specialization. Use new
7992 macros. Use full template arguments.
7993 (tsubst_friend_class): Substitute, using tsubst_template_parms,
7994 into the template parameters before passing them to
7995 redeclare_class_template.
7996 (instantiate_class_template): Simplify. Use full template
7997 arguments. Adjust calls to get_class_bindings. Use
7998 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
7999 (innermost_args): Use new macros.
8000 (tsubst_aggr_type): New function, split out from tsubst.
8001 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8002 conventions for lookup_template_class. Refine handling of partial
8003 instantiations. Remove calls to complete_template_args.
8004 Simplify. Add consistency checks. Use set_mangled_name_for_decl
8005 and set_mangled_name_for_template_decl.
8006 (tsubst_copy): Use tsubst_aggr_type.
8007 (instantiate_template): Use full template arguments.
8008 (more_specialized): Improve formatting.
8009 (more_specialized_class): Adjust calls to get_class_bindings.
8010 (get_bindings_real): Don't call complete_template_args.
8011 (most_specialized): Don't overwrite input; create a new list.
8012 (most_specialized_class): Use most_general_template.
8013 (regenerate_decl_from_template): Use unregister_specialization.
8014 Use full template arguments.
8015 (instantiate_decl): Use full template arguments.
8016 (set_mangled_name_for_template_decl): New function.
8017 * semantics.c (begin_class_definition): Use
8018 maybe_process_partial_specialization.
8019 (finish_member_class_template): New function.
8020 (finish_template_decl): Likewise.
8021 (finish_template_type): Likewise.
8022 (typeck.c): Don't crash after issuing a compiler_error.
8023 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8024
8025 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
8026
8027 * typeck2.c (build_functional_cast): Handle default-initialization.
8028
8029 * call.c (build_over_call): Pass 1 to popclass.
8030
8031 * parse.y (direct_notype_declarator): Add precedence declaration
8032 to notype_unqualified_id case.
8033 * Makefile.in (EXPECT): Adjust.
8034
8035 * tree.c (ovl_member): Fix for single function in OVL.
8036
8037 1998-07-27 Dave Brolley <brolley@cygnus.com>
8038
8039 * c-lex.c (yylex): Fix boundary conditions in character literal and
8040 string literal loops.
8041
8042 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
8043
8044 * decl.c (lookup_name_real): OK, do return the from_obj value
8045 unless got_object depends on template parms.
8046
8047 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8048
8049 * pt.c (coerce_template_parms): Also complain about local enums.
8050
8051 * cp-tree.h: Add prototype for set_identifier_local_value.
8052 * decl.c (set_identifier_local_value_with_scope): Make static,
8053 prototype.
8054 * search.c (covariant_return_p): Likewise.
8055 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8056
8057 * call.c (build_method_call): Only pull out the type of a destructor
8058 if it's a template type parm.
8059 * decl.c (lookup_name_real): Never return the from_obj value.
8060
8061 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8062
8063 * except.c (process_start_catch_block_old): Call start_decl_1 for
8064 catch parm.
8065 * decl.c (start_decl_1): Avoid duplicate error.
8066
8067 * init.c (expand_default_init): Only perform the initialization if
8068 it will do something.
8069
8070 1998-07-23 H.J. Lu (hjl@gnu.org)
8071
8072 * parse.y (base_class): Check for invalid base class.
8073
8074 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
8075
8076 * decl2.c (import_export_template): Fold in...
8077 (import_export_class): ...to here. Handle dllimport/export.
8078
8079 * class.c (build_vtable): Pass at_eof to import_export_vtable.
8080 (prepare_fresh_vtable): Likewise.
8081 * decl2.c (import_export_class): Split out...
8082 (finish_prevtable_vardecl): From here.
8083 * class.c (finish_struct_1): Call import_export_class if at_eof.
8084
8085 * decl.c (start_function): #if 0 mysterious code I wrote and have
8086 forgotten why.
8087 * rtti.c (get_tinfo_fn): If this is for a class type, set
8088 DECL_CONTEXT.
8089
8090 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
8091
8092 * inc/exception: Change terminate and unexpected to ().
8093
8094 * parse.y (named_class_head_sans_basetype_defn): A
8095 named_class_head_sans_basetype followed by '{' or ':' is a defn.
8096
8097 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
8098
8099 * tree.c (canonical_type_variant): New fn to handle arrays.
8100 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8101 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
8102 * method.c (process_overload_item): Use build_overload_value for
8103 arrays.
8104
8105 1998-07-20 Dave Brolley <brolley@cygnus.com>
8106
8107 * lex.c (mbchar.h): #include it.
8108 (GET_ENVIRONMENT): New macro.
8109 (init_parse): Set character set based on LANG environment variable.
8110 (real_yylex): Handle multibyte characters in character literals.
8111 (real_yylex): Handle multibyte characters in string literals.
8112
8113 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
8114
8115 * lex.c (do_identifier): Look for class value even if we don't
8116 have a global value. Do implicit declaration if parsing is 2.
8117 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8118 lookup.
8119
8120 1998-07-19 Mark Mitchell <mark@markmitchell.com>
8121
8122 * decl.c (pushtag): Revert previous change.
8123 * pt.c (lookup_template_class): Don't put out debugging
8124 information for types that use template parameters.
8125
8126 * decl.c (pushtag): Don't put out debugging information for
8127 compiler-generated typedefs.
8128
8129 * error.c (dump_type_real): Don't crash when presented with
8130 intQI_type_node or the like.
8131
8132 * semantics.c (finish_translation_unit): Fix spelling error in
8133 comment.
8134
8135 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
8136
8137 * decl.c (lookup_name_real): Pull out single function here.
8138 (select_decl): Not here.
8139 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8140
8141 * decl.c (qualify_lookup): Tweak again.
8142
8143 * pt.c (lookup_template_class): Don't mess with the context of the
8144 instantiation.
8145 * decl2.c (current_decl_namespace): Remove special handling for
8146 templates.
8147
8148 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8149 a member template specialization.
8150
8151 * tree.c (ovl_member): Use decls_match to compare functions.
8152 * decl.c (decls_match): Check the context of a function.
8153
8154 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8155 in Koenig lookup support rules.
8156 * semantics.c (finish_call_expr): Handle the new cases.
8157
8158 * typeck.c (build_x_function_call): Handle overloaded methods.
8159
8160 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8161
8162 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8163
8164 * semantics.c (finish_object_call_expr): Revert previous change.
8165 * call.c (build_new_method_call): Likewise. Instead, convert
8166 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8167
8168 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8169
8170 * decl.c (qualify_lookup): Handle templates.
8171
8172 * decl2.c (do_using_directive): Don't pass ancestor.
8173 * decl.c (push_using_directive): Calculate ancestor.
8174
8175 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8176 * decl.c (pushdecl): Move type shadowing handling from here...
8177 (duplicate_decls): ...to here.
8178 * decl.c (set_identifier_local_value_with_scope): New fn.
8179 (pushdecl): Use it.
8180 (set_identifier_local_value, lookup_type_current_level): New fns.
8181 * decl2.c (do_local_using_decl): Handle types and binding level
8182 stuff properly.
8183
8184 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8185 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8186 (lookup_namespace_name): Likewise.
8187 * typeck.c (build_unary_op): Not here anymore.
8188
8189 * decl2.c (do_class_using_decl): Make sure we get an identifier.
8190 * class.c (handle_using_decl): Ignore TYPE_DECLs.
8191
8192 * decl.c (qualify_lookup): New fn.
8193 (lookup_name_real): Use it.
8194
8195 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8196
8197 * decl2.c (add_using_namespace): When directly using a namespace
8198 that was indirect before, promote it.
8199
8200 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8201 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8202 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8203 * decl.c (select_decl): Replace two flag parameters by one.
8204 (unqualified_namespace_lookup): Likewise, pass flag.
8205 (lookup_flags): New function.
8206 (lookup_name_real): Compute flags, pass them.
8207 (lookup_namespace_name): Call with zero-flag.
8208 * decl2.c (ambiguous_decl): Add flag parameter, complain only
8209 according to flags.
8210 (lookup_using_namespace, qualified_lookup_using_namespace):
8211 Add flag parameter, pass them through.
8212 * lex.c (do_scoped_id): Call with zero-flag.
8213
8214 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
8215
8216 * typeck.c (convert_for_assignment): Use comptypes.
8217
8218 1998-07-16 Mark Mitchell <mark@markmitchell.com>
8219
8220 * semantics.c (finish_object_call_expr): Move test for the
8221 function called being a TYPE_DECL to ...
8222 * call.c (build_new_method_call): Here.
8223
8224 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8225
8226 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8227 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8228
8229 * lex.c (looking_for_typename): Don't initialize.
8230
8231 * decl2.c (ambiguous_decl): Clarify error message.
8232
8233 * decl.c (push_using_directive): Iterate over namespaces used
8234 indirectly.
8235
8236 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8237
8238 * decl2.c (add_using_namespace): Iterate over namespaces used
8239 indirectly.
8240
8241 * decl.c (lookup_name_real): Accept namespace aliases as locals.
8242 (cat_namespace_levels): Ignore aliases.
8243 (duplicate_decls): Ignore duplicate aliases.
8244 * decl2.c (do_namespace_alias): Process block level namespace
8245 aliases. Store alias with pushdecl. Remove odr errors.
8246 * parse.y (namespace_alias): New non-terminal.
8247 (extdef): Use it.
8248
8249 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
8250
8251 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8252 Handle TEMPLATE_TYPE_PARM.
8253 (arg_assoc): Rewrite.
8254
8255 * pt.c (complete_template_args): Don't look at the context unless
8256 we have to.
8257
8258 * method.c (build_decl_overload_real): Fix namespace handling.
8259
8260 * typeck.c (build_unary_op): Extract a lone function from an
8261 OVERLOAD.
8262
8263 * call.c (build_scoped_method_call): Handle getting a namespace
8264 for basetype in a destructor call.
8265 (check_dtor_name): Handle enums.
8266
8267 * parse.y (using_directive): New nonterminal.
8268 (extdef, simple_stmt): Use it.
8269
8270 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8271
8272 * decl2.c (add_function): Move error message ...
8273 (arg_assoc_namespace): ... from here.
8274
8275 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8276
8277 * parse.y (namespace_qualifier): Fix multiple level handling.
8278 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8279 (arg_assoc): Don't skip the first argument of a function.
8280
8281 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
8282
8283 * search.c (my_tree_cons): Clean up.
8284
8285 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
8286
8287 * call.c (joust): Don't warn about "confusing" conversions to the
8288 same type.
8289
8290 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8291
8292 * class.c (push_nested_class): Complain about namespaces.
8293 * decl.c (start_decl): Enter the object's namespace.
8294 (cp_finish_decl): Leave it.
8295 (grokdeclarator): Likewise.
8296 * decl2.c (check_decl_namespace): New function.
8297 (finish_file): Call it.
8298 * parse.y (complex_direct_notype_declarator): Set complexity
8299 of namespace-qualified ids to -1, enter the namespace.
8300
8301 * method.c (build_template_decl_overload): Expect _DECL as first
8302 parameter. Put context temporarily into current_namespace.
8303 * pt.c (check_explicit_specialization): Change caller.
8304 (tsubst): Likewise.
8305
8306 * init.c (build_offset_ref): Call mark_used and
8307 convert_from_reference for namespace members.
8308
8309 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
8310
8311 * search.c (my_tree_cons): The bitfield is at index 2.
8312
8313 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
8314
8315 * lang-options.h: Format changed to work with new --help support
8316 in gcc/toplev.c
8317
8318 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
8319
8320 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8321 Do Koenig lookup in CALL_EXPR.
8322 (arg_assoc): Handle error_mark.
8323 * lex.c (is_global): New function.
8324 (do_identifier): Expect arguments for Koenig lookup.
8325 * parse.y (primary): Add rules for calls of unqualified function calls.
8326 (do_id): Change call of do_identifier.
8327 * pt.c (finish_stmt_expr): Likewise.
8328 * semantics.c (finish_id_expr): Likewise.
8329 (finish_call_expr): Add integer parameter to indicate
8330 argument-dependent lookup.
8331
8332 * decl.c (struct binding_level): New field using_directives.
8333 (push_using_decl): Not sorry anymore.
8334 (push_using_directive): New function.
8335 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8336 (unqualified_namespace_lookup): New function, code from ...
8337 (lookup_name_real): ... here.
8338 * decl2.c (lookup_using_namespace): Pass using list instead of
8339 initial scope.
8340 (validate_nonmember_using_decl): New function.
8341 (do_nonmember_using_decl): New function.
8342 (do_toplevel_using_decl): Use them.
8343 (do_local_using_decl): New function.
8344 (do_using_directive): Support block-level directives.
8345 * parse.y (simple_stmt): Support using declarations and
8346 directives.
8347 (namespace_qualifier, namespace_using_decl): New non-terminals.
8348
8349 * xref.c (classname): New function.
8350 (GNU_xref_hier): Change class and base parameters to tree.
8351 * decl.c (xref_baseypes): Change caller.
8352 * friend.c (make_friend_class): Likewise.
8353
8354 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8355
8356 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8357 comparison.
8358
8359 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8360 template template parameter, record its use.
8361 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8362 its template arguments if exists.
8363
8364 * pt.c (coerce_template_template_parms): New function equivalent
8365 to coerce_template_parms when IS_TMPL_PARM is true.
8366 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
8367 all callers changed.
8368
8369 (coerce_template_parms): Access ARGLIST properly when creating a
8370 new vector. Only accept implicit TYPE_DECL as valid argument for
8371 a template template parameter when it is a base class of
8372 current_class_type. Don't display error message when COMPLAIN is
8373 false.
8374
8375 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
8376
8377 * repo.c (get_base_filename): Use file_name_nondirectory.
8378 (open_repo_file): Likewise.
8379 * cp-tree.h (file_name_nondirectory): Add prototype.
8380
8381 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
8382
8383 * friend.c (do_friend): Pull the identifier out of declarator.
8384 Use cp_error and friends.
8385 * decl2.c (qualified_lookup_using_namespace): Fix call to
8386 purpose_member.
8387 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8388 (grokvardecl): Use DECL_CLASS_SCOPE_P.
8389 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8390 * class.c (warn_hidden): Fix for OVERLOAD.
8391 From grahams@rcp.co.uk:
8392 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
8393 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
8394
8395 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
8396
8397 * g++.1 (-traditional): Remove duplicated documentation.
8398
8399 1998-07-11 Mark Mitchell <mark@markmitchell.com>
8400
8401 * method.c (flush_repeats): Add nrepeats parameter.
8402 (issue_nrepeats): Likewise.
8403 (is_back_referenceable_type): New function. Don't back-reference
8404 TEMPLATE_TYPE_PARMs as well as simple types like integers.
8405 (build_mangled_name_for_type): Likewise.
8406 (build_mangled_name_for_type_with_Gcode): Likewise.
8407 (lasttype): Remove.
8408 (nrepeats): Likewise.
8409 (Nrepeats): Likewise.
8410 (start_squangling): Don't clear the variables removed above.
8411 (end_squangling): Likewise.
8412 (flush_repeats): Tidy. Use nrepeats parameter rather than
8413 Nrepeats global.
8414 (issue_nrepeats): Likewise, but with nrepeats global. Use
8415 is_backreferenceable_type.
8416 (build_overload_nested_name): Tidy. Add comment. Use
8417 build_mangled_name_for_type.
8418 (build_underscore_int): Comment.
8419 (build_overload_scope_ref): Use build_mangled_name_for_type.
8420 (build_overload_int): Likewise.
8421 (build_template_template_parm_names): Tidy.
8422 (build_template_parm_names): Use build_mangled_name_for_type.
8423 (build_overload_identifier): Add comments.
8424 (build_mangled_name_for_type_with_Gcode): Split out from
8425 build_mangled_name.
8426 (build_mangled_name_for_type): Use it.
8427 (build_mangled_name): Rework to use build_mangled_name_for_type
8428 and to not use global nrepeats/Nrepeats. Tidy.
8429 (process_modifiers): Tidy.
8430 (check_btype): Use is_backreferenceable_type. Add comment.
8431 Rename `node' to `type'.
8432 (process_overload_item): Set numeric_output_need_bar here.
8433 Use build_mangled_name_for_type. Tidy.
8434 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
8435 build_mangled_name_for_type.
8436
8437 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8438 for TYPE_DECLs.
8439
8440 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
8441
8442 * cp-tree.h (warn_long_long): Define.
8443 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8444 warning "ANSI C++ does not support `long long'".
8445 * decl2.c (warn_long_long): Define.
8446 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8447
8448 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
8449
8450 * decl.c (xref_tag): Handle attributes between 'class' and name.
8451 * parse.y (aggr): Likewise.
8452 * semantics.c (finish_class_definition): Likewise.
8453 * Makefile.in (EXPECTED): Adjust.
8454
8455 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8456 * decl2.c: Define them.
8457 (lang_decode_option): Handle them.
8458 * lang-options.h: Add -foptional-diags.
8459 * class.c (finish_struct): Don't complain about multiple meanings of
8460 name if -fno-optional-diags.
8461 * decl.c (pushdecl_class_level): Likewise.
8462 * lex.c (real_yylex): Check warn_multichar.
8463
8464 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
8465
8466 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8467
8468 * tree.c (make_binfo): Fix length.
8469
8470 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
8471
8472 * decl2.c (lang_decode_option): Remove warn_template_debugging.
8473 * lang-options.h: Likewise.
8474
8475 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8476
8477 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8478 (process_start_catch_block): Likewise for variables
8479 `false_label_rtx', `call_rtx' and `return_value_rtx'.
8480
8481 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
8482
8483 * tree.c (build_srcloc): Make sure we allocate this node on the
8484 permanent obstack.
8485
8486 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
8487
8488 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8489 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8490 (lang_specific_driver): Only add -lm automatically if need_math is
8491 nonzero.
8492
8493 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
8494
8495 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
8496
8497 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8498
8499 * Makefile.in (EXPR_H): New dependency variable.
8500 (decl2.o): Depend on $(EXPR_H).
8501 (typeck.o): Likewise.
8502 (init.o): Likewise.
8503 (expr.o): Likewise.
8504
8505 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
8506
8507 * decl.c (start_enum): Put local enums on permanent_obstack.
8508
8509 1998-06-25 Mark Mitchell <mark@markmitchell.com>
8510
8511 * cp-tree.h (c_get_alias_set): Declare.
8512 * decl.c (init_decl_processing): Set lang_get_alias_set.
8513
8514 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
8515
8516 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8517 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8518 flag for all function decls which are in the exception table.
8519 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8520 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8521 code is emitted for any referenced rtti function.
8522
8523 1998-06-25 Dave Brolley <brolley@cygnus.com>
8524
8525 * lang-specs.h: Use new | syntax to eliminate
8526 string concatenation.
8527
8528 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
8529
8530 * cp-tree.h (CP_DECL_CONTEXT): New macro.
8531 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8532 * method.c (build_overload_nested_name): Likewise.
8533 * sig.c (build_signature_pointer_or_reference_type): Don't set
8534 DECL_CONTEXT.
8535
8536 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8537
8538 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8539 * cp-tree.h (FROB_CONTEXT): New macro.
8540 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8541 * decl.c (namespace_binding): Replace NULL_TREE with
8542 global_namespace.
8543 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8544 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8545 Likewise.
8546 * decl.c (pushtag): Use FROB_CONTEXT.
8547 (pushdecl, make_typename_type, define_function, grokdeclarator):
8548 Likewise.
8549 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8550 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8551 Likewise.
8552 * decl2.c (decl_namespace): Return global_namespace if no context.
8553 * method.c (build_overload_nested_name): Expect null as context.
8554 * pt.c (mangle_class_name_for_template): Do nothing for null
8555 contexts.
8556 (lookup_template_class): Allow for null id_context.
8557
8558 1998-06-25 Richard Henderson <rth@cygnus.com>
8559
8560 * method.c (emit_thunk): Set current_function_is_thunk for the
8561 ASM_OUTPUT_MI_THUNK case as well.
8562
8563 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8564
8565 * exception.cc (__cplus_type_matcher): Get a match_info pointer
8566 instead of an exception table entry as a parameter.
8567
8568 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8569
8570 * parse.y (function_try_block): Don't call start_catch_handler.
8571 * except.c (call_eh_info): Remove coerced field from declaration.
8572 (build_eh_type_type_ref): New function to create an address of a
8573 rtti function for the new style exception tables.
8574 (expand_start_catch_block): Split function, this contains the
8575 common part.
8576 (process_start_catch_block_old): New function to perform the rest
8577 of expand_start_catch_block under old style exceptions.
8578 (process_start_catch_block_old): New function to perform the rest
8579 of expand_start_catch_block under new style exceptions.
8580 (expand_end_catch_block): Only pop the false label off the stack under
8581 the old style of exceptions.
8582 * semantics.c (finish_try_block): Don't call start_catch_handler.
8583 * exception.cc (struct cp_eh_info): Add original_value field.
8584 (__cplus_type_matcher): Perform type matching on the original exception
8585 value, and if we have a match, set the current value.
8586 (__cp_push_exception): Set the original exception value.
8587
8588 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
8589
8590 * call.c (joust): Fix confusing conversion warning.
8591
8592 * call.c (build_op_delete_call): Add placement parm. Check
8593 LOOKUP_SPECULATIVELY.
8594 * cp-tree.h, decl2.c, init.c: Adjust.
8595 * decl.c (finish_function): Use it.
8596
8597 * pt.c (tsubst): Diagnose creating void fields or variables.
8598
8599 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8600
8601 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8602
8603 * cp-tree.h (check_dtor_name): Add prototype.
8604
8605 * init.c (expand_member_init): Remove unused variables
8606 `ptr_type_node', `parm' and `rval'.
8607
8608 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8609 in call to fprintf.
8610 (lang_print_xnode): Likewise.
8611
8612 * typeck2.c (enum_name_string): Cast argument to sprintf to long
8613 and use %ld specifier.
8614
8615 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8616 specifier in call to fprintf.
8617 (GNU_xref_member): Cast argument to sprintf to int.
8618
8619 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8620
8621 * typeck2.c (pop_init_level): Warn about implicit zero initialization
8622 of struct members.
8623
8624 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8625
8626 * cp-tree.h: Prototype function `check_java_method'.
8627
8628 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8629
8630 * class.c (finish_struct): Make conflicting use of id a pedwarn.
8631 * decl.c (pushdecl_class_level): Likewise.
8632
8633 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8634
8635 * pt.c (convert_nontype_argument): Issue an error when presented
8636 with an integer (real) constant that cannot be simplified to an
8637 INT_CST (REAL_CST).
8638
8639 * cp-tree.h (c_get_alias_set): Remove declaration added in
8640 1998-06-13 change that should never have been checked in.
8641
8642 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8643
8644 * typeck.c (build_binary_op_nodefault): Change % in format strings
8645 to %%.
8646
8647 * decl.c (grokvardecl): Don't build_static_name for decls that
8648 aren't at namespace scope.
8649
8650 * init.c (perform_member_init): Catch default-initialization of
8651 references.
8652
8653 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8654
8655 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8656
8657 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8658
8659 * method.c (hack_identifier): Complain about getting a namespace
8660 or class template.
8661 * typeck.c (decay_conversion): Remove check for namespaces.
8662 * typeck2.c (incomplete_type_error): Likewise.
8663 * parse.y (template_arg): Add PTYPENAME expansion.
8664
8665 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
8666
8667 * decl.c (grokvardecl): Don't build external assembler names for
8668 TYPENAMEs in other namespaces as there is no declarator.
8669 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8670 info from DECL_CONTEXT if it is NULL.
8671
8672 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
8673
8674 * call.c (check_dtor_name): Split out.
8675 (build_scoped_method_call): Use it.
8676 (build_method_call): Use it.
8677 * init.c (build_offset_ref): Use it.
8678
8679 * typeck.c (build_static_cast): Fix handling of pointers to members.
8680
8681 * decl.c (finish_function): Just return nothing from a constructor.
8682 * typeck.c (c_expand_return): Complain about returning a void
8683 expression from a destructor.
8684
8685 1998-06-13 Mark Mitchell <mark@markmitchell.com>
8686
8687 * class.c (alter_access): Accept a BINFO explaining how to get
8688 from the entity whose accessed is being altered to the type doing
8689 the altering.
8690 (handle_using_decl): New function containing code split out from ...
8691 (finish_struct_1): Here.
8692
8693 * cp-tree.h (complete_type_or_else): Declare.
8694 * init.c (build_new_1, build_delete): Use it.
8695 * typeck.c (require_complete_type): Use complete_type, rather than
8696 expanding it inline.
8697 (complete_type_or_else): New function.
8698 (build_component_ref): Use it.
8699 (pointer_int_sum): Make sure the type pointed to is complete.
8700 (pointer_diff): Likewise.
8701
8702 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8703 types.
8704
8705 * search.c (get_matching_virtual): Note that member templates
8706 cannot override virtual functions.
8707
8708 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
8709
8710 * pt.c (check_explicit_specialization): If DECLARATOR turned into
8711 an error_mark_node from lookup_template_function, return the same.
8712 (determine_specialization): Also make sure TEMPLATE_ID isn't an
8713 error_mark_node, before we try to read its operands.
8714 * decl.c (grokdeclarator): If we got an error_mark_node from
8715 check_explicit_specialization, just return it right back.
8716
8717 1998-06-12 Mark Mitchell <mark@markmitchell.com>
8718
8719 * class.c (instantiate_type): Don't treat template-ids that don't
8720 specify any template arguments as equivalent to ordinary
8721 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
8722 pointer-to-members for member templates. Tidy slightly.
8723 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8724 * init.c (build_offset_ref): Handle template-ids like ordinary
8725 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8726 offset part of the OFFSET_REF.
8727 * typeck.c (build_unary_op): Change check for unknown types to
8728 look for OFFSET_REFs, not SCOPE_REFs.
8729
8730 1998-06-11 Mark Mitchell <mark@markmitchell.com>
8731
8732 * pt.c (is_member_template_class): New function.
8733 (push_template_decl_real): Use it.
8734
8735 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
8736
8737 * friend.c (do_friend): Add support for nested classes using
8738 member functions of the enclosing class as friends.
8739
8740 1998-06-10 Mark Mitchell <mark@markmitchell.com>
8741
8742 * call.c (convert_default_arg): Make global, not static.
8743 (convert_arg_for_ellipsis): Split out from ...
8744 (build_over_call): Here.
8745 * cp-tree.h (convert_default_arg); Declare.
8746 (convert_arg_to_ellipsis): Likewise.
8747 (do_member_init): Remove.
8748 * init.c (do_member_init): Remove; this code is dead.
8749 (expand_member_init): Remove much of this code; it is dead.
8750 * typeck.c (convert_arguments): Use convert_default_arg and
8751 convert_arg_for_ellipsis, rather than duplicating here.
8752
8753 * call.c (convert_like): Don't fail silently if
8754 build_user_type_conversion fails. Always return error_mark_node
8755 for failure.
8756
8757 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8758
8759 * search.c (covariant_return_p): Complain about ambiguous base.
8760
8761 * typeck.c (build_component_ref): Diagnose ref to nested type.
8762
8763 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8764
8765 * decl.c (grokparms): Check that INIT isn't an error_mark_node
8766 before giving error about invalid type for default arg.
8767
8768 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8769
8770 * call.c (build_method_call): Fix thinko.
8771
8772 1998-06-10 Dave Brolley <brolley@cygnus.com>
8773
8774 * decl2.c (lang_decode_option): New argc/argv interface.
8775 * cp-tree.h (lang_decode_option): New argc/argv interface.
8776 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8777 specified for cpplib-enabled compilers.
8778 * lex.c (lang_init): Don't check_newline for cpplib.
8779 (init_parse): Don't initialize cpplib here.
8780
8781 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8782
8783 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8784 piece before checking DECL_MUTABLE_P.
8785
8786 1998-06-10 John Carr <jfc@mit.edu>
8787
8788 * tree.c (debug_binfo): Make printf format match arguments.
8789
8790 * error.c (OB_PUTI): Make printf format match arguments.
8791
8792 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8793
8794 * init.c (perform_member_init): Handle default-initialization.
8795
8796 * except.c (build_throw): Handle throwing NULL.
8797
8798 * typeck.c (build_x_function_call): Use resolve_offset_ref.
8799
8800 * search.c (compute_access): Only strip an anonymous union
8801 for a FIELD_DECL.
8802
8803 * call.c (add_builtin_candidates): Tweak.
8804
8805 * cvt.c (build_expr_type_conversion): Restore code for conversion
8806 from class types.
8807 * decl2.c (delete_sanity): Use it. Clean up.
8808
8809 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8810
8811 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
8812
8813 * typeck.c (c_expand_return): Don't warn about void expressions on
8814 return statements in functions returning void.
8815
8816 1998-06-09 Mark Mitchell <mark@markmitchell.com>
8817
8818 * pt.c (fn_type_unification): Revise documentation. Tidy.
8819 (type_unification): Likewise.
8820
8821 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
8822
8823 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8824 expand_end_catch.
8825 * parse.y (function_try_block): Rename expand_start_catch, and delete
8826 expand_end_catch.
8827 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8828 expand_end_catch.
8829
8830 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
8831
8832 * search.c (lookup_member): New fn.
8833 * class.c (finish_struct_1): Use it.
8834 * decl.c (lookup_name_real): Use it.
8835
8836 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8837
8838 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8839
8840 * cp-tree.h: Add prototype for `maybe_print_template_context' and
8841 `maybe_make_one_only'.
8842
8843 * decl.c (auto_function): Remove unused variable `decl'.
8844
8845 * decl2.c: Include dwarf2out.h and dwarfout.h.
8846
8847 * lex.c: Remove redundant declarations of `set_float_handler' and
8848 `asm_out_file'.
8849
8850 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
8851
8852 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8853 time flag. Call __cp_eh_info instead of __cp_exception_info.
8854 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8855 (__cp_exception_info): Return offset into cp_eh_info structure to
8856 match what use to be the start of this structure.
8857 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8858 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8859 compile time flag.
8860 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8861 __cp_eh_info instead of __cp_exception_info.
8862
8863 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
8864
8865 * decl.c (cp_finish_decl): Disable inlining of extern inlines
8866 with static variables.
8867
8868 1998-06-08 Mark Mitchell <mark@markmitchell.com>
8869
8870 * init.c (build_offset_ref): Correct previous change to use build,
8871 not build_min.
8872
8873 1998-06-07 Mark Mitchell <mark@markmitchell.com>
8874
8875 * class.c (instantiate_type): Handle pointer-to-members where the
8876 member is a template.
8877 * init.c (build_offset_ref): Likewise.
8878 * typeck.c (build_unary_op): Likewise.
8879
8880 1998-06-07 Richard Henderson <rth@cygnus.com>
8881
8882 * lex.c (lang_init_options): New function.
8883 (lang_init): Remove flag_exceptions == 2 hack.
8884
8885 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8886
8887 * search.c (envelope_add_decl): Tweak for implicit typename.
8888
8889 * call.c (joust): Also warn about confusing conversion op/constructor
8890 overload resolution.
8891
8892 * spew.c (yylex): Also return the TYPE_DECL if got_object.
8893 Don't clear got_object after '~'.
8894 * call.c (build_scoped_method_call): Tweak destructor handling.
8895 (build_method_call): Likewise.
8896 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8897 TYPE_MAIN_VARIANT for destructors.
8898 * semantics.c (finish_object_call_expr): Complain about calling a
8899 TYPE_DECL.
8900
8901 1998-06-05 Per Bothner <bothner@cygnus.com>
8902
8903 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8904 Define - update needed by gcc.c change.
8905
8906 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8907
8908 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8909
8910 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8911
8912 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8913 * decl.c (lookup_name_real): Add namespaces_only parameter.
8914 If set, return only NAMESPACE_DECLs.
8915 (select_decl): Likewise.
8916 (identifier_type_value): Give additional parameter.
8917 (lookup_name_nonclass): Likewise.
8918 (lookup_name): Likewise.
8919 (find_binding): Skip namespace aliases.
8920 (binding_for_name): Likewise.
8921 (push_namespace): Check for namespace aliases.
8922 (lookup_name_namespace_only): New function.
8923 (begin_only_namespace_names, end_only_namespace_names): New functions.
8924 * decl2.c (set_decl_namespace): Skip namespace aliases.
8925 (do_using_directive): Likewise.
8926 (do_namespace_alias): Produce namespace aliases, fix alias
8927 redeclaration.
8928 * error.c (dump_decl): Support SCOPE_REF.
8929 * parse.y (extdef): Wrap lookup with namespace_only for namespace
8930 aliases and using declarations.
8931
8932 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
8933
8934 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8935
8936 * error.c (dump_expr): Clean up NEW_EXPR case.
8937
8938 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8939
8940 Suggested by Brendan Kehoe
8941 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8942 treat it as using ::decl.
8943
8944 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8945
8946 * tree.c (mapcar): Support NEW_EXPR.
8947
8948 * error.c (dump_expr): Support NEW_EXPR.
8949
8950 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
8951
8952 * method.c (make_thunk): Use overload machinery to make name.
8953 * search.c (covariant_return_p): New fn.
8954 (get_matching_virtual): Use it.
8955
8956 * init.c (build_new_1): Fix check for void.
8957
8958 1998-06-01 Per Bothner <bothner@cygnus.com>
8959
8960 * cp-tree.h (TYPE_FOR_JAVA): New macro.
8961 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8962 java_int_type_node, java_long_type_node, java_float_type_node,
8963 java_double_type_node, java_char_type_node, java_boolean_type_node):
8964 New "primitive" types, with predefined names __java_byte etc.
8965 (record_builtin_java_type): New function.
8966 (init_decl_processing): Make Java types with record_builtin_java_type.
8967 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
8968 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
8969 (grokfndecl): Call check_java_method for Java classes.
8970 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
8971 (process_overload_item): Match types against specific
8972 java_XX_type_node types, rather than using is_java_type.
8973 * class.c (finish_struct_1): Don't add default copy constructor
8974 or operator= if TYPE_FOR_JAVA.
8975 (pop_lang_conext): Restore strict_prototyp proper if Java.
8976 * decl2.c (acceptable_java_type, check_java_method): New functions.
8977 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
8978 (tsubst): Move common statement after if statement.
8979 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
8980
8981 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
8982
8983 * pt.c (for_each_template_parm): Use first_rtl_op.
8984
8985 * tree.c (build_cplus_array_type_1): Also check index_type for
8986 template parms.
8987
8988 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
8989
8990 * pt.c (tsubst): Always copy BINFO_BASETYPES.
8991
8992 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
8993
8994 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8995 TYPE_SIZE_UNIT too.
8996
8997 1998-05-29 Mark Mitchell <mark@markmitchell.com>
8998
8999 * decl.c (grokdeclarator): Don't complain about in-class
9000 initialization of static consts if we don't really know the type
9001 of the variable.
9002
9003 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
9004
9005 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9006 * method.c (build_destructor_name): New fn.
9007 * decl2.c (maybe_retrofit_in_chrg): Split out...
9008 (grokclassfn): From here. Reorganize.
9009 * decl.c (grok_ctor_properties): Make sure ctors for types with
9010 vbases have the in_chrg parm.
9011 * pt.c (instantiate_class_template): Update
9012 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
9013 grok_*_properties.
9014 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9015
9016 1998-05-28 Mark Mitchell <mark@markmitchell.com>
9017
9018 * pt.c (instantiate_decl): Make test for whether or not static
9019 variables should be instantiated early match its comment.
9020
9021 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
9022
9023 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9024 a member.
9025 (start_function): Call check_default_args.
9026 * decl2.c (grokfield): Don't call check_default_args.
9027 (check_default_args): Use cp_error_at.
9028 * lex.c (do_pending_defargs): Call check_default_args.
9029
9030 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
9031
9032 * call.c (build_method_call): Make sure get_type_value returns
9033 something before we try to use its TYPE_MAIN_VARIANT.
9034 (build_scoped_method_call): Likewise.
9035
9036 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
9037
9038 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9039 initialize an array.
9040
9041 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9042 DECL_VIRTUAL_P.
9043
9044 * friend.c (do_friend): Clarify template warning.
9045
9046 1998-05-27 Mark Mitchell <mark@markmitchell.com>
9047
9048 * decl.c (shadow_label): Don't treat decls as identifiers.
9049 (maybe_push_to_top_level): Clear shadowed_labels.
9050
9051 * pt.c (instantiate_decl): Reset lineno and filename after calling
9052 regenerate_decl_from_template.
9053
9054 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9055 error_mark_node.
9056
9057 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
9058
9059 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9060
9061 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9062
9063 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9064 (convert_nontype_argument): Handle cases when nontype template
9065 parameters become classes after substitution.
9066
9067 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9068
9069 * friend.c (is_friend): Use comptypes, rather than == to compare
9070 types. Modify for new representation of template friends.
9071 (make_friend_class): Likewise.
9072 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
9073 (instantiate_class_template): Deal with template friends.
9074
9075 * decl.c (store_parm_decls): Remove redundant call to
9076 expand_main_function.
9077
9078 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
9079
9080 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9081 DECL_USE_TEMPLATE.
9082
9083 1998-05-26 Per Bothner <bothner@cygnus.com>
9084
9085 * language_as_string: Handle lang_java.
9086
9087 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
9088
9089 * decl.c (pushdecl): Don't copy the type_decl.
9090
9091 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9092
9093 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9094 current_class_type.
9095 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9096
9097 * parse.y (complex_direct_notype_declarator): Use $1 to access
9098 scope of notype_qualified_id.
9099
9100 1998-05-26 Dave Brolley <brolley@cygnus.com>
9101
9102 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9103 (init_parse): Initialize cpplib interface.
9104
9105 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9106 empty continuation.
9107
9108 1998-05-26 Mark Mitchell <mark@markmitchell.com>
9109
9110 * decl.c (pushtag): Avoid crashing on erroneous input.
9111
9112 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9113
9114 * decl.c (push_namespace): Only produce one unique name for
9115 anonymous namespaces.
9116 (get_unique_name): Remove.
9117
9118 1998-05-25 Mark Mitchell <mark@markmitchell.com>
9119
9120 * call.c (tourney): Don't do any extra comparisons.
9121
9122 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9123
9124 * cp-tree.h (processing_template_parmlist): Declare.
9125 * decl.c (pushtag): Don't call push_template_decl when we
9126 shouldn't.
9127 * pt.c (processing_template_parmlist): New variable.
9128 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9129 (complete_template_args): Use it.
9130 (add_to_template_args): Likewise.
9131 (innermost_args): Likewise.
9132 (tsubst): Likewise.
9133 (begin_template_parm_list): Use processing_template_parmlist.
9134 (end_template_parm_list): Likewise.
9135
9136 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9137 * decl.c (grokdeclarator): Use it.
9138 * decl2.c (grok_x_components): Likewise.
9139 * init.c (initializing_context): Likewise.
9140 * method.c (do_build_copy_constructor): Likewise.
9141 (do_build_assign_ref): Likewise.
9142 * search.c (compute_access): Likewise.
9143 * typeck.c (build_component_ref): Likewise.
9144
9145 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9146 unnamed type a typedef name "for linkage purposes".
9147
9148 * pt.c (lookup_template_class): Don't look at
9149 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9150
9151 * method.c (build_overload_int): Handle error cases gracefully.
9152
9153 * pt.c (instantiate_decl): Handle static member variables
9154 correctly.
9155
9156 * pt.c (tsubst): Use the tsubst'd type when producing new
9157 TEMPLATE_PARM_INDEX nodes.
9158
9159 1998-05-24 Mark Mitchell <mark@markmitchell.com>
9160
9161 * tree.c (cp_tree_equal): Handle pointers to member functions.
9162
9163 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
9164 sure the type of the REF_BIND is a reference type.
9165 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9166 target_type for clarity.
9167
9168 * parse.y (xcond): Move call to condition_conversion ...
9169 * semantics.c (finish_for_cond): Here.
9170 * parse.c: Regenerated.
9171
9172 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
9173
9174 * decl.c (push_namespace): Namespaces have type void.
9175 * typeck2.c (incomplete_type_error): Complain about namespace
9176 used as expression.
9177 * typeck.c (decay_conversion): Likewise.
9178
9179 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9180
9181 * error.c (dump_expr): Support namespaces.
9182
9183 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
9184
9185 * cp-tree.def: Add SRCLOC.
9186 * cp-tree.h: Add struct tree_srcloc and accessor macros.
9187 * tree.c (build_srcloc, build_srcloc_here): New fns.
9188 * pt.c (add_pending_template): Use build_srcloc_here.
9189 (push_tinst_level): Update last_template_error_tick before erroring.
9190 (instantiate_decl): Restore lineno and input_filename before
9191 calling add_pending_template.
9192 * decl2.c (finish_file): Set up lineno and input_filename for
9193 pending templates.
9194
9195 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9196
9197 * decl.c (lang_print_error_function): New fn.
9198 (init_decl_processing): Set print_error_function to use it.
9199 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9200
9201 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9202 ICS_BAD_FLAG.
9203
9204 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9205 copy-initialization.
9206
9207 * class.c (build_vtable_entry): Use int_fits_type_p.
9208 (build_vtable): Pass a signed offset to build_vtable_entry.
9209 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9210 set_rtti_entry): Likewise.
9211
9212 1998-05-22 Per Bothner <bothner@cygnus.com>
9213
9214 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
9215 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
9216
9217 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
9218
9219 * pt.c (print_template_context): Use fprintf instead of cp_error.
9220
9221 * pt.c (determine_specialization): Just return an error_mark_node.
9222 Also print the decl we want in error messages. If we complain,
9223 return error_mark_node.
9224 (tsubst_friend_function): Set lineno and input_filename so
9225 error messages will be useful.
9226 (instantiate_template): Just return an error_mark_node.
9227 (check_explicit_specialization): Don't mess with a returned
9228 error_mark_node.
9229
9230 * pt.c (print_template_context): Add new argument.
9231 (maybe_print_template_context): New fn.
9232 (push_tinst_level): Increment tinst_level_tick.
9233 (pop_tinst_level): Likewise.
9234 * errfn.c (cp_thing): Call maybe_print_template_context. Use
9235 xrealloc instead of xmalloc.
9236
9237 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9238
9239 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9240
9241 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9242 if the template we looked up is the same as the one we already
9243 have.
9244
9245 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
9246
9247 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9248 (cpp_reader,parse_in): Add for cpplib.
9249 (check_newline): Call handle_sysv_pragma with new interface.
9250 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9251
9252 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9253 (sub_getch): Call GETC for cpplib.
9254
9255 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9256 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9257
9258 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9259
9260 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
9261
9262 * decl2.c (maybe_make_one_only): New fn.
9263 (import_export_vtable): Use it.
9264 (import_export_decl): Likewise.
9265 * pt.c (mark_decl_instantiated): Likewise.
9266
9267 1998-05-21 Mark Mitchell <mmitchell@usa.net>
9268
9269 * decl2.c (find_representative_member): Rename to ...
9270 (build_anon_union_vars): New function.
9271 (finish_anon_union): Fix stupidity of previous change.
9272
9273 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
9274
9275 * decl.c (grokfndecl): Handle definition of specialization in
9276 friend declaration.
9277
9278 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9279
9280 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9281
9282 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9283 to look for type declarations.
9284 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9285 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9286 (finish_member_class_template): Declare.
9287 * decl.c (pushtag): Put member class templates on the
9288 CLASSTYPE_TAGS list, just as for ordinary member classes.
9289 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9290 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9291 IDENTIFIER_NAMESPACE_VALUEs.
9292 * parse.y (component_decl): Move code to ...
9293 * semantics.c (finish_member_class_template): New function.
9294 Don't put member class templates on the list of components for a
9295 class.
9296 * parse.c: Regenerated.
9297 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9298 In fact, don't use DECL_CONTEXT at all here.
9299
9300 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
9301
9302 * decl.c (record_unknown_type): New function.
9303 (init_decl_processing): Call it for the unknown and global type
9304 nodes.
9305
9306 1998-05-20 Mark Mitchell <mmitchell@usa.net>
9307
9308 * decl2.c (find_representative_member): New function.
9309 (finish_anon_union): Use it.
9310
9311 * cp-tree.h (MAIN_NAME_P): New macro.
9312 (DECL_MAIN_P): Likwise.
9313 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9314 (grokfndecl): Use the new macros.
9315 (grokdeclarator): Likewise.
9316 (start_function): Likewise.
9317 (store_parm_decls): Likewise.
9318 (finsh_function): Likewise.
9319 * friend.c (do_friend): Likewise.
9320 * typeck.c (build_function_call_real): Likewise.
9321 (build_unary_op): Likewise.
9322
9323 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
9324
9325 * decl2.c (start_objects, finish_objects, do_dtors,
9326 do_ctors): Split out from...
9327 (finish_file): ...here.
9328
9329 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
9330
9331 * tree.c (is_overloaded_fn): Don't abort on placeholders from
9332 push_class_decls.
9333
9334 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
9335
9336 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9337
9338 * error.c (dump_expr): Handle an ARROW_EXPR.
9339
9340 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
9341
9342 * decl.c (saveable_obstack): Declare.
9343 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9344 declare, if necessary.
9345
9346 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
9347
9348 * call.c (compare_qual): Remove.
9349 (is_subseq): Tweak.
9350 (is_properly_derived_from): New function.
9351 (maybe_handle_ref_bind): Likewise.
9352 (maybe_handle_implicit_object): Likewise.
9353 (compare_ics): Modify substantially to bring into conformance with
9354 the standard.
9355 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9356 (comp_cv_qualification): Declare.
9357 (comp_cv_qual_signature): Likewise.
9358 * typeck.c (comp_cv_qualification): Likewise.
9359 (comp_cv_qual_signature): Likewise.
9360
9361 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9362
9363 * Makefile.in (parse.o): Depend on toplev.h.
9364
9365 * class.c (typecode_p): Remove prototype and definition.
9366
9367 * cp-tree.h (currently_open_class, is_empty_class, member_p):
9368 Add prototype.
9369
9370 * decl.c (push_overloaded_decl_top_level): Remove prototype and
9371 definition.
9372
9373 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9374 in call to `cp_thing'.
9375 (cp_warning): Likewise for function pointer `warning'.
9376
9377 * except.c (do_function_call): Remove prototype and definition.
9378 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9379
9380 * method.c (is_java_type): Add prototype and make it static.
9381
9382 * parse.y: Include toplev.h.
9383
9384 * pt.c (type_unification): Remove unused variable `arg'.
9385 (instantiate_decl): Likewise for `save_ti'.
9386
9387 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9388
9389 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
9390
9391 * init.c (build_member_call): Handle template_ids.
9392 * parse.y (primary): Add global_scope template_id.
9393
9394 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
9395
9396 * decl2.c (get_sentry): Use end_temporary_allocation.
9397 Don't declare permanent_obstack.
9398
9399 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
9400
9401 * parse.y (.finish_new_placement): New non-terminal.
9402 (unary_expr, new_type_id): Use it.
9403 * parse.c: Regenerated.
9404
9405 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
9406
9407 * pt.c (redeclare_class_template): Say where the original definition
9408 of the template-parameter's default argument appeared.
9409
9410 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
9411
9412 * call.c (build_over_call): Tweak empty class handling.
9413
9414 * decl.c (make_typename_type): Use currently_open_class.
9415
9416 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
9417
9418 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9419
9420 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
9421 for a type unless it is one.
9422
9423 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
9424
9425 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
9426
9427 * Makefile.in (program_transform_name, objdir): Define.
9428
9429 * Makefile.in (BISON): Use bison from the build tree if it exists.
9430 (FLEX): Likewise.
9431
9432 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9433
9434 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9435
9436 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9437
9438 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
9439
9440 * call.c (build_scoped_method_call): Likewise.
9441
9442 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
9443
9444 * init.c (build_new_1): Call suspend_momentary around the creation
9445 of values that must be saved for exception handling.
9446 * parse.y (.build_new_placement): New non-terminal.
9447 (unary_expr, new_placement): Use it.
9448 * parse.c: Regenerated.
9449
9450 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
9451
9452 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9453 old and new types.
9454
9455 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9456 canonical type.
9457
9458 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9459
9460 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
9461
9462 * decl.c (start_decl): Revert problem change.
9463
9464 * Makefile.in (CONFLICTS): Fix.
9465
9466 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9467
9468 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9469
9470 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9471
9472 * class.c (finish_struct_1): Use BINFO_SIZE.
9473
9474 * decl.c (start_decl): Use 'tem'.
9475
9476 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
9477
9478 * exception.cc: Include eh-common.h.
9479 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9480 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9481 (__cp_push_exception): Initialize eh_info struct as well.
9482 * except.c: Remove local structs and include eh-common.h.
9483 (init_exception_processing): Set language and version codes.
9484 (call_eh_info): Add presence of eh_info to runtime description of
9485 struct cp_eh_info.
9486 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9487 * semantics.c (finish_try_block): Call start_catch_block() and
9488 end_catch_block().
9489 * parse.y (function_try_block): Call start_catch_block() and
9490 end_catch_block().
9491
9492 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
9493
9494 * typeck.c (original_type): New function.
9495 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9496 to see if they're actually the same.
9497 * cp-tree.h (original_type): Declare.
9498
9499 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9500
9501 * Makefile.in (lex.o): Depend on output.h.
9502
9503 * call.c (add_function_candidate): Remove unused variable `cand'.
9504 (add_conv_candidate): Likewise.
9505 (build_builtin_candidate): Likewise.
9506
9507 * cp-tree.h: Add prototype for `types_overlap_p'.
9508
9509 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9510
9511 * decl2.c (merge_functions): Remove unused variables `tmp' and
9512 `tempn'.
9513
9514 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9515 (code_as_string): Likewise.
9516 (language_as_string): Likewise.
9517 (parm_as_string): Likewise.
9518 (op_as_string): Likewise.
9519 (assop_as_string): Likewise.
9520 (cv_as_string): Likewise.
9521
9522 * lex.c: Include output.h.
9523
9524 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9525
9526 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9527 ATTRIBUTE_UNUSED.
9528
9529 * tinfo.cc (__class_type_info::dcast): Change the type of variable
9530 `i' from int to size_t.
9531
9532 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9533 ATTRIBUTE_UNUSED.
9534
9535 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
9536
9537 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9538 DECL_NAMESPACE_SCOPE_P.
9539 (lang_decl_name): Likewise.
9540 * pt.c (tsubst_friend_function, tsubst): Likewise.
9541 * decl.c (pushdecl, redeclaration_error_message, start_decl,
9542 cp_finish_decl, start_function): Likewise.
9543 * class.c (finish_struct_1): Likewise.
9544 * call.c (build_over_call): Likewise.
9545 (compare_ics): Use DERIVED_FROM_P.
9546
9547 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
9548
9549 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9550 * method.c (build_mangled_name): Use it.
9551 (build_decl_overload_real): Likewise.
9552
9553 * error.c (dump_simple_decl): New function, broken out from ...
9554 (dump_decl): Use it.
9555
9556 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
9557
9558 * ptree.c (lang_print_xnode): Add missing `break'.
9559
9560 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9561
9562 * call.c (add_template_candidate): Adjust for changes to
9563 fn_type_unification.
9564 (add_template_candidate_real): Likewise.
9565 (add_template_conv_candidate): Likewise.
9566 (build_user_type_conversion_1): Likewise.
9567 (build_new_function_call): Likewise.
9568 (build_object_call): Likewise.
9569 (build_new_op): Likewise.
9570 (build_new_method_call): Likewise.
9571 * class.c (instantiate_type): Likewise.
9572 * cp-tree.h (unification_kind_t): New type.
9573 (fn_type_unification): Adjust prototype.
9574 (type_unificaiton): Likewise.
9575 * pt.c (UNIFY_ALLOW_NONE): New macro.
9576 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9577 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9578 (UNIFY_ALLOW_DERIVED): Likewise.
9579 (unify): Change prototype.
9580 (maybe_adjust_types_for_deduction): New function.
9581 (check_cv_quals_for_unify): Likewise.
9582 (determine_specialization): Adjust.
9583 (fn_type_unification): Likewise.
9584 (type_unification): Likewise.
9585 (type_unification_real): Likewise. Use
9586 maybe_adjust_types_for_deduction. Fix mishandling of
9587 back-unification of template functions passed as arguments. Pass
9588 appropriate combination of UNIFY_ALLOW_* to unify.
9589 (unify): Remove unused NTPARMS parameter. Use
9590 check_cv_quals_for_unify. Remove bogus code that allowed
9591 too-generous unification in order to adhere more closely to standard.
9592 (get_bindings_real): Adjust.
9593 (get_class_bindings): Likewise.
9594
9595 * method.c (build_overload_identifier): Only use the innermost
9596 template arguments when mangling.
9597 * pt.c (tsubst_template_argument_vector): New function.
9598 (complete_template_args): Deal with the situation where the
9599 extra_args contain more than one level of arguments.
9600 (lookup_template_class): Deal with member template classes, which
9601 may have more than one level of arguments.
9602 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9603 Improve handling of member template classes. Use
9604 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
9605 tsubst_template_argument_vector where appropriate.
9606 (regenerate_decl_from_template): Break out from ...
9607 (instantiate_decl): Here.
9608
9609 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9610 * parse.h: Regenerated.
9611 * parse.c: Really regenerated.
9612
9613 * cp-tree.h (finish_unary_op_expr): New function.
9614 (finish_id_expr): Likewise.
9615 (begin_new_placement): Likewise.
9616 (finish_new_placement): Likewise.
9617 (finish_declarator): Likewise.
9618 (finish_translation_unit): Likewise.
9619 (finish_parmlist): Likewise.
9620 (begin_class_definition): Likewise.
9621 (finish_class_definition): Likewise.
9622 (finish_default_args): Likewise.
9623 (finish_inline_definitions): Likewise.
9624 * parse.y (GCC_ASM_KEYWORD): Remove.
9625 (TYPENAME_ELLIPSIS): Likewise.
9626 * parse.c: Regenerated.
9627 Use new functions in semantics.c in the actions for many rules.
9628 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9629 * hash.h: Regenerated.
9630 * semantics.c (finish_expr_stmt): Allow NULL expr.
9631 (finish_unary_op_expr): New function, containing
9632 code previously in parse.y.
9633 (finish_id_expr): Likewise.
9634 (begin_new_placement): Likewise.
9635 (finish_new_placement): Likewise.
9636 (finish_declarator): Likewise.
9637 (finish_translation_unit): Likewise.
9638 (finish_parmlist): Likewise.
9639 (begin_class_definition): Likewise.
9640 (finish_class_definition): Likewise.
9641 (finish_default_args): Likewise.
9642 (finish_inline_definitions): Likewise.
9643
9644 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
9645
9646 * typeck.c (build_c_cast): Don't decay arrays and functions to
9647 pointer type when converting to a class type.
9648
9649 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
9650
9651 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9652 (DECL_CLASS_SCOPE_P): Likewise.
9653
9654 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
9655
9656 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9657 * decl2.c (constructor_name_full): Likewise.
9658
9659 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
9660
9661 * tree.c (mapcar): Add OVERLOAD support.
9662
9663 * init.c (resolve_offset_ref): We must use basetype_path before we
9664 destroy it with a call to convert_pointer_to.
9665
9666 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9667
9668 * class.c (currently_open_class): New fn.
9669 * decl.c (lookup_name_real): Use it.
9670 * search.c (lookup_field): Likewise.
9671
9672 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9673
9674 * cp-tree.def (OVERLOAD): New node.
9675 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9676 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9677 (NAMESPACE_BINDING): Remove.
9678 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9679 namespace_binding.
9680 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9681 Define.
9682 (tree_overload): New struct.
9683 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9684 (REAL_IDENTIFIER_TYPE_VALUE): Define.
9685 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9686 (lang_decl_flags): Remove in_namespace.
9687 (lang_decl): Remove chain.
9688 (DECL_CHAIN, DECL_NAMESPACE): Remove.
9689 (flag_honor_std): Declare extern.
9690 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9691 namespace_binding, set_namespace_binding,
9692 lookup_function_nonclass, cat_namespace_levels,
9693 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9694 scratch_ovl_cons, ovl_member, build_overload): Declare.
9695 (decl_list_length, get_namespace_id, current_namespace_id,
9696 overloaded_globals_p): Remove.
9697 (lookup_using_namespace, qualified_lookup_using_namespace): Change
9698 return type.
9699 (push_scratch_obstack): New macro.
9700 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9701 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9702 convs, fns.
9703 (build_new_function_call): Iterate using OVL_CHAIN.
9704 Print DECL_NAME in when reporting ambiguities.
9705 (build_object_call): Iterate using OVL_NEXT for fns, convs.
9706 (build_new_op): Call lookup_function_nonclass.
9707 Iterate using OVL_NEXT.
9708 (build_op_delete_call): Change detection of members.
9709 Do not wrap TREE_LIST around fields and single global functions.
9710 (build_over_call): Don't push a class level if the context is a
9711 namespace.
9712 (build_new_method_call): Iterate using OVL_NEXT.
9713 * class.c (add_method): Chain overloaded members using
9714 build_overload. Remove copying of method.
9715 (grow_method): When iterating through the obstack, expect OVERLOAD
9716 nodes. Chain overload members.
9717 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
9718 nodes in call to get_baselinks.
9719 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9720 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
9721 fdecls that are OVERLOAD nodes.
9722 (validate_lhs): New function.
9723 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
9724 code. Use DECL_NAME in error messages. Split code between global
9725 and member function processing.
9726 * decl.c (global_type_node): New static variable.
9727 (in_std): New global.
9728 (struct binding_level): New field usings.
9729 (resume_binding_level): Assert that we are not in a class.
9730 (toplevel_bindings_p): Just check for namespace_p or
9731 pseudo_global.
9732 (resume_level): Remove.
9733 (find_binding): New function.
9734 (binding_for_name): Call it.
9735 (namespace_binding, set_namespace_binding): New functions.
9736 (push_namespace): Associate binding level with new namespace,
9737 resume_binding_level for existing namespace. Remove old code.
9738 Fake std by counting.
9739 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9740 (maybe_push_to_top_level): Save current namespace.
9741 (pop_from_top_level): Restore saved namespace.
9742 (pop_namespace): Call suspend_binding_level. Remove old code.
9743 (cat_namespace_levels): New function.
9744 (set_identifier_type_value_with_scope): For namespace bindings,
9745 set BINDING_TYPE, and use global_type_node.
9746 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9747 (identifier_type_value): New function.
9748 (pushtag): If no context, use current_namespace.
9749 (duplicate_decls): Don't process DECL_CHAIN.
9750 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9751 already set. Never reset it to NULL_TREE. Lookup global variables
9752 in their namespace. Push overloaded templates if they are on
9753 namespace level.
9754 (pushdecl_namespace_level): New function.
9755 (pushdecl_top_level): Implement using pushdecl_namespace_level.
9756 (pushdecl_using_decl): New function.
9757 (overloaded_globals_p): Remove.
9758 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9759 them. Use namespace_binding and set_namespace_value.
9760 (redeclaration_error_message): Complain if the declarations come
9761 from different namespaces.
9762 (lookup_tag): On namespace level, look in the BINDING_TYPE.
9763 (lookup_namespace_name): Pass tree_bindings from stack. Remove
9764 old code.
9765 (select_decl): New function.
9766 (lookup_name_real): Call it for qualified and unqualified lookup.
9767 Pass tree_bindings from the stack.
9768 If prefer_type is 1, also accept namespaces.
9769 (lookup_function_nonclass): New function.
9770 (init_decl_processing): Set the binding level of the global
9771 namespace to global_binding_level.
9772 Build a proper type list for __builtin_apply.
9773 Initialize std_node to "fake std" if flag_honor_std is set.
9774 Initialize global_type_node.
9775 Allocated bad_alloc in namespace std if flag_honor_std.
9776 (define_function): Set the DECL_CONTEXT to the current_namespace.
9777 (start_decl): A namespace is not considered as a context here. If
9778 the DECL_CONTEXT is a namespace, push the decl.
9779 (cp_finish_decl): Check for namespaces used as initializers.
9780 (grokfndecl): Add namespace parameter. Remove processing of
9781 DECL_CHAIN.
9782 (grokvardecl): Add namespace parameter.
9783 (grokdeclarator): Process SCOPEs that are namespaces. For
9784 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9785 (start_function): Check for contexts that are namespaces.
9786 Set context for declarations that have not been pushed.
9787 (store_parm_decls): Check for ::main only.
9788 (finish_function): Likewise.
9789 (start_method): Check for contexts that are namespaces.
9790 (start_method): Remove DECL_CHAIN processing.
9791 * decl2.c (flag_honor_std): Declare.
9792 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9793 (decl_namespace_list): New static global.
9794 (grok_x_components): Ignore namespaces as type contexts.
9795 (check_classfn): Expect OVERLOAD nodes.
9796 (grokfield): Remove DECL_CHAIN processing.
9797 (finish_file): Call cat_namespace_levels.
9798 (merge_functions): New function.
9799 (ambiguous_decl): Rewrite.
9800 (lookup_using_namespace): Produce tree_bindings.
9801 (qualified_lookup_using_namespace): Likewise.
9802 (set_decl_namespace, decl_namespace, current_decl_namespace,
9803 push_decl_namespace, pop_decl_namespace): New functions.
9804 (arg_lookup): New struct.
9805 (add_function, arg_assoc_namespace, arg_assoc_class,
9806 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9807 New functions.
9808 (get_namespace_id, current_namespace_id): Remove.
9809 (do_toplevel_using_decl): Rewrite.
9810 (do_class_using_decl): Complain about namespace qualifiers.
9811 (do_using_directive): Sorry if not on namespace level. Complain
9812 about unknown namespaces.
9813 * error.c (dump_aggr_type): Check for namespace contexts.
9814 * except.c (init_exception_processing): Push terminate into std.
9815 * friend.c (is_friend): A namespace is not a context, here.
9816 * init.c (expand_member_init): Remove DECL_CHAIN processing.
9817 (build_offset_ref): Process OVERLOAD nodes.
9818 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9819 * lex.c (identifier_type): Loop using OVL_CHAIN.
9820 (see_typename): Set looking_for_typename to 2.
9821 (real_yylex): Likewise.
9822 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9823 (do_scoped_id): Expect OVERLOAD nodes.
9824 Change calling convention for qualified_lookup_using_namespace.
9825 (build_lang_decl): Don't set in_namespace anymore.
9826 * method.c (typevec_size): New global.
9827 (build_overload_nested_name): Return if global_namespace.
9828 Otherwise, always expect a declaration context.
9829 (build_qualified_name): Likewise.
9830 Make sure we don't write beyond typevec_size.
9831 (build_decl_overload_real): Likewise.
9832 Allocate one extra slot for the namespace.
9833 (hack_identifier): Mark code dead.
9834 Process OVERLOAD and NAMESPACE_DECL nodes.
9835 * parse.y (program): Pop namespaces until in global namespace.
9836 (extdef): In a using-declaration, don't discard the identifier if
9837 there is no declaration.
9838 (left_curly): Ignore type contexts which are namespaces.
9839 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9840 used as scope.
9841 * pt.c (template_class_depth): Expect types to be namespaces.
9842 (determine_specialization): Simplify by expecting OVERLOAD nodes.
9843 (push_template_decl): Push into namespace level.
9844 Reset ctx if it is a namespace.
9845 Set DECL_CONTEXT to current_namespace if not set already.
9846 Ignore real contexts that are namespaces.
9847 (mangle_class_name_for_template): Skip global_namespace.
9848 Mangle other namespaces as declarations.
9849 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9850 (lookup_template_class): Push into namespace of context.
9851 If the context is a namespace, set it to global_namespace.
9852 Use id_context for mangling.
9853 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9854 (tsubst_friend_function): Ignore namespace contexts.
9855 Push into namespace level.
9856 (tsubst): Handle NAMESPACE_DECL nodes.
9857 Remove DECL_CHAIN processing.
9858 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9859 * ptree.c (print_lang_identifier): Print bindings.
9860 (lang_print_xnode): Print OVERLOAD nodes.
9861 * rtti.c (init_rtti_processing): Push type_info into std.
9862 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9863 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9864 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9865 lookup_fnfields_here): Likewise.
9866 Process all nodes, instead of going through TREE_CHAIN.
9867 * sig.c (build_signature_pointer_or_reference_type): Set context
9868 to global_namespace.
9869 (build_signature_table_constructor): Expect OVERLOAD nodes.
9870 * spew.c (yylex): Save old setting of looking_for_typename.
9871 * tree.c (decl_list_length): Remove.
9872 (binding_init): New function.
9873 (count_functions): Rewrite.
9874 (is_overloaded_fn): Expect OVERLOAD nodes.
9875 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9876 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9877 ovl_member): New functions.
9878 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9879 (type_unknown_p): Likewise.
9880 (require_instantiated_type): Likewise.
9881 (build_component_ref): Declare code dead.
9882 (build_x_function_call): Create and expect OVERLOAD nodes.
9883 (build_function_call_real): Check for ::main only.
9884 (build_unary_op): Likewise. Expect OVERLOAD nodes.
9885 (convert_for_assignment): Check for TREE_LIST before accessing
9886 TREE_VALUE.
9887 * decl.c (duplicate_decls): Check for namespace bindings instead
9888 of global bindings.
9889 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9890 lookup_name_current_level, start_decl, xref_tag,
9891 finish_enum): Likewise.
9892 * init.c (build_offset_ref): Likewise.
9893 * search.c (lookup_field): Likewise.
9894 (lookup_fnfields): Likewise.
9895 (dfs_debug_mark): Likewise.
9896 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9897 (poplevel_class, pop_from_top_level): Likewise.
9898 * decl2.c (finish_method): Likewise.
9899 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9900 * decl.c (record_builtin_type): Likewise.
9901 (init_decl_processing, grokfndecl): Likewise.
9902 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9903 (make_lang_type): Likewise.
9904 * parse.y (make_thunk): Likewise.
9905 * pt.c (tsubst): Likewise.
9906 * tree.c (debug_binfo): Likewise.
9907 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9908 tinfo2.cc, inc/new.h: Add std qualifications.
9909 * inc/new: Wrap with namespace std if __HONOR_STD.
9910 * inc/typeinfo: Likewise.
9911
9912 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9913
9914 * call.c (build_user_type_conversion_1): Handle second_conv
9915 properly for templates.
9916
9917 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
9918
9919 * method.c (build_decl_overload_real): Set TREE_USED flag to
9920 zero for build_type_variants nodes as well.
9921
9922 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
9923
9924 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9925
9926 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
9927
9928 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9929 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9930 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9931 xref.o): Add toplev.h dependencies.
9932
9933 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
9934
9935 * errfn.c (cp_error, cp_warning): Remove declarations for
9936 error and warning respectively.
9937
9938 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9939
9940 * error.c: Convert to using ctype macros defined in system.h.
9941 * method.c: Likewise.
9942 * xref.c: Likewise.
9943 * lex.c: Likewise. Also remove redundant system header stuff.
9944
9945 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
9946
9947 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9948 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9949 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9950 xref.c: Add include of toplev.h.
9951
9952 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9953
9954 * tree.c (perm_manip): Also regenerate the RTL of an extern.
9955 (copy_to_permanent): Use end_temporary_allocation.
9956
9957 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
9958
9959 * init.c (expand_vec_init): The initialization of each array
9960 element is a full-expression.
9961
9962 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
9963
9964 * method.c (build_mangled_name): Add a call to build_type_variant
9965 to get the right type.
9966
9967 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
9968
9969 * Makefile.in: Add .SUFFIXES.
9970
9971 * cp-tree.def: Remove NAMESPACE_DECL.
9972
9973 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
9974
9975 * call.c (build_over_call): Do evaluate arg even if it has empty
9976 class type.
9977 * decl.c (start_function): Don't push a member function.
9978
9979 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
9980
9981 * Makefile.in (g++FAQ.info): Put -o option before input file.
9982
9983 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
9984
9985 * gxxint.texi: Add info for squangling codes K and B.
9986
9987 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
9988
9989 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9990 the expression in templates.
9991 (finish_stmt_expr): Likewise.
9992
9993 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
9994
9995 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9996
9997 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
9998
9999 * decl.c (maybe_push_to_top_level): Always clear
10000 current_template_parms and processing_template_decl.
10001 (pushtag): Remove check of current_class_type and some comments,
10002 since maybe_push_to_top_level no longer creates confusion.
10003
10004 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
10005
10006 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10007 (DECL_CLASS_TEMPLATE_P): Likewise.
10008 (DECL_PRIMARY_TEMPLATE): Likewise.
10009 (PRIMARY_TEMPLATE_P): Use it.
10010 (push_template_decl_real): New function.
10011 (redeclare_class_template): Take new template parameters as
10012 input.
10013 (is_specialization_of): New function.
10014 (comp_template_args): Declare.
10015 * decl.c (pushtag): Handle friend template classes.
10016 (xref_tag): Likewise. Use new calling convention for
10017 redeclare_class_template.
10018 * decl2.c (grok_x_components): Handle friend templates.
10019 * friend.c (is_friend): Use is_specialization_of where
10020 appropriate. Deal with friend class templates.
10021 (make_friend_class): Let a class template be friends with itself.
10022 * pt.c (comp_template_args): Remove declaration.
10023 (tsubst_friend_class): New function.
10024 (push_template_decl_real): New function.
10025 (push_template_decl): Use it.
10026 (redeclare_class_template): Adjust for new calling convention.
10027 (comp_template_args): Give it external linkage.
10028 (instantiate_class_type): Use tsubst_friend_class to deal
10029 with friend templates.
10030 * typeck.c (comptypes): Use comp_template_args, rather than
10031 expanding it inline.
10032 * parse.y (component_decl): Handle a nested template type
10033 like other component type declarations.
10034
10035 * pt.c (check_explicit_specialization): Handle overloaded
10036 constructors correctly.
10037
10038 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10039 (lookup_template_class): Use it.
10040
10041 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10042
10043 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
10044 * cp-tree.h: Add WRAPPER support.
10045 * call.c (add_candidate): Split out from add_*_candidate fns.
10046 (build_over_call): Take the candidate instead of function and args.
10047 Enforce access control here. Emit overload warnings here.
10048 (add_warning): New fn.
10049 (joust): Add WARN parm. If not set, call add_warning instead of
10050 printing a warning. Re-enable some warnings.
10051 (tourney): Pass it.
10052 (convert_like): Adjust.
10053 (build_new_op): Adjust.
10054 (build_new_function_call): Adjust.
10055 (build_user_type_conversion_1): Adjust.
10056 (USER_CONV_FN): Adjust.
10057 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10058 build_int_wrapper): New fns.
10059
10060 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
10061
10062 * pt.c (unify): Fix typo in previous change.
10063
10064 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10065
10066 * error.c (dump_type_real): Declare canonical_name.
10067
10068 * typeck.c (comp_target_types): Fix PMFs.
10069
10070 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
10071
10072 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10073 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10074 TEMPLATE_DECL.
10075
10076 * pt.c (tsubst): Decrease the template-level of
10077 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
10078 TEMPLATE_PARM_INDEX.
10079 (template_decl_level): New function.
10080 (unify): Make sure to record unifications for template
10081 parameters, even when the parameters exactly match the arguments.
10082 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10083 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
10084 aren't from the level we're currently working on.
10085
10086 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
10087
10088 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10089
10090 * decl2.c (check_member_template): Set DECL_IGNORED for member
10091 class templates, too.
10092
10093 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10094
10095 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10096
10097 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10098
10099 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
10100
10101 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10102 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10103 (init_decl_processing): Handle TI types.
10104 * typeck.c (unsigned_type, signed_type): Handle TI types.
10105
10106 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
10107
10108 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10109 New local added_libraries. Increment count when add library to
10110 arglist.
10111
10112 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
10113
10114 * cp-tree.h (type_as_string_real): New function.
10115 * pt.c (mangle_class_name_for_template): Use it.
10116 * error.c (dump_aggr_type): Change prototype.
10117 (dump_type_prefix): Likewise.
10118 (dump_type_suffix): Likewise.
10119 (dump_type_real): Convert from dump_type. If desired, the
10120 "canonica" name of a typedef, i.e., the name of the underlying
10121 type, can be printed.
10122 (dump_type): Call dump_type_real.
10123
10124 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
10125
10126 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10127
10128 * typeck.c (comp_target_types): Tweak pedantic case.
10129 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
10130 Return -1 or 1 instead of 1 or 2.
10131 (compparms): Remove STRICT handling.
10132 (convert_for_assignment): Fix handling of pmfs.
10133
10134 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
10135
10136 * typeck.c (comp_target_types): Handle references like pointers.
10137 (comp_target_parms): Note that return code from comp_target_types
10138 can be negative to indicate failure.
10139
10140 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10141
10142 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10143 which requires a working target compiler to build.
10144
10145 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
10146
10147 * tree.c (avoid_overlap): Add prototype.
10148
10149 * spew.c (num_tokens): Add prototype.
10150 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10151
10152 * search.c (dfs_check_overlap): Add prototype.
10153 (dfs_no_overlap_yet): Likewise.
10154
10155 * pt.c (original_template): Add prototype.
10156 (inline_needs_template_parms): Likewise.
10157 (push_inline_template_parms_recursive): Likewise.
10158 (retrieve_specialization, register_specialization): Likewise.
10159 (print_candidates, reduce_template_parm_level): Likewise.
10160 (build_template_decl, mark_template_parm): Likewise.
10161 (tsubst_friend_function, get_bindings_real): Likewise.
10162
10163 * method.c (start_squangling): Add prototype.
10164 (end_squangling, check_ktype, issue_ktype): Likewise.
10165 (build_overloaded_scope_ref, check_btype): Likewise.
10166 (build_mangled_template_parm_index): Likewise.
10167
10168 * lex.c (init_cpp_parse): Add prototype.
10169 (handle_cp_pragma, handle_sysv_pragma): Likewise.
10170 (reduce_cmp, token_cmp): Likewise.
10171
10172 * except.c (call_eh_info): Add prototype.
10173 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10174 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10175
10176 * decl2.c (is_namespace_ancestor): Add prototype.
10177 (namespace_ancestor, add_using_namespace): Likewise.
10178 (ambiguous_decl): Likewise.
10179
10180 * decl.c (indent): Add prototype.
10181
10182 * call.c (add_template_candidate_real): Add prototype.
10183
10184 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10185
10186 * decl2.c (build_expr_from_tree): Just return a PMF.
10187
10188 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
10189
10190 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10191 when doing initializations.
10192
10193 * pt.c (unify): Use comptypes to compare type args.
10194
10195 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
10196
10197 * decl.c (duplicate_decls): Fix check for when it's safe to free
10198 the new decl.
10199
10200 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10201 to type_as_string.
10202
10203 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
10204
10205 * pt.c (build_template_parm_index): Add prototype.
10206
10207 * search.c (my_tree_cons): Don't clear words outside the
10208 newly allocated node.
10209
10210 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
10211
10212 * lex.c (init_parse): Now returns char* containing the filename.
10213
10214 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
10215 Jeff Law <law@cygnus.com>
10216
10217 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10218 than a pointer.
10219
10220 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10221
10222 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10223
10224 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10225
10226 * decl.c (duplicate_decls): Don't warn for redundant decls if
10227 friend: let add_friend take care of it.
10228
10229 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10230
10231 * sig.c (build_signature_pointer_constructor): Don't set
10232 TREE_HAS_CONSTRUCTOR for a signature pointer.
10233 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10234 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10235 here, too.
10236 * typeck.c (build_unary_op): Only allow taking the address of a
10237 real constructor.
10238 * typeck2.c (digest_init): Simplify.
10239 (store_init_value): Don't pedwarn about using { } for pmfs.
10240
10241 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
10242
10243 * cp-tree.h (start_decl): Update prototype.
10244 * decl.c (start_decl): Like the C version, new parameters
10245 for the attributes. Call cplus_decl_attributes here,
10246 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
10247 (grokdeclarator): Pass NULL for new start_decl arguments.
10248 * pt.c (tsubst_expr): Likewise.
10249 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
10250 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10251 * lex.c (build_lang_decl): Add lang_name_java.
10252 * class.c (push_lang_context): Add lang_name_java.
10253 * method.c (build_mangled_name): Check for is_java_type.
10254
10255 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
10256
10257 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10258 * call.c (build_scoped_method_call): Check for TREE_CODE for
10259 VOID_TYPE instead of type == void_type_node.
10260 (build_method_call): Likewise.
10261 * decl.c (lookup_name_real): Likewise.
10262 (grokdeclarator): Likewise.
10263 (start_decl): Likewise.
10264 (grokparms): Likewise.
10265 (start_function): Likewise.
10266 (finish_function): Likewise.
10267 (start_method): Likewise.
10268
10269 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
10270
10271 * lex.c (finput): New variable.
10272 (init_cpp_parse): Renamed from init_parse.
10273 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
10274 (finish_parse): New function.
10275 * cp-tree.h (init_lex, init_parse): Remove declarations.
10276
10277 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
10278
10279 * call.c (build_call): Still evaluate the actual argument.
10280 * class.c (is_empty_class): Update for -fnew-abi.
10281
10282 * decl2.c: -fnew-abi implies -fsquangle.
10283
10284 * method.c (do_build_assign_ref): Don't do anything to copy
10285 an empty class.
10286 (do_build_copy_constructor): Likewise.
10287 * call.c (build_over_call): Likewise.
10288
10289 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10290
10291 * tree.c (avoid_overlap): Return a value.
10292
10293 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
10294
10295 * method.c (check_btype): Add missing argument to xrealloc.
10296 (check_ktype): Likewise.
10297
10298 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10299
10300 Implement empty base optimization.
10301 * class.c (finish_struct_1): Add vbase fields earlier. Set
10302 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
10303 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10304 (types_overlap_p): New fn.
10305 * tree.c (avoid_overlap): New fn.
10306 (build_base_fields): Use it to avoid overlapping empty bases.
10307 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10308
10309 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10310
10311 Re-implement allocation of base class subobjects.
10312 * tree.c (unshare_base_binfos): New fn.
10313 (layout_basetypes): Use it. Now handles offsets of both virtual and
10314 non-virtual bases, after layout_type.
10315 (layout_vbasetypes): Remove.
10316 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10317 (build_vbase_pointer_fields): Split out from old layout_basetypes.
10318 * class.c (finish_base_struct): Lose offset handling code.
10319 Move nonvdtor warning here. Don't mess with t_binfo anymore.
10320 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
10321 * cp-tree.h: Adjust.
10322
10323 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
10324
10325 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10326 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10327 * class.c (duplicate_tag_error): Likewise.
10328 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10329 * tree.c (layout_vbasetypes): Update from layout_record, remove
10330 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10331 (layout_basetypes): Likewise.
10332
10333 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
10334
10335 * class.c, Make sure system.h is included just after config.h.
10336 Delete lingering stdio and errno references too.
10337 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10338
10339 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
10340
10341 * friend.c (is_friend): Fix access control for local classes.
10342
10343 * class.c (is_empty_class): New fn.
10344 * call.c (build_call): Don't pass empty class objects to a function.
10345
10346 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
10347
10348 * call.c (build_over_call): Do name resolution for default
10349 arguments of function templates in the scope of the templates.
10350
10351 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
10352
10353 * call.c: Include system.h. Remove includes, declarations and
10354 defines provided by system.h.
10355 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10356 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10357 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10358 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10359 * typeck2.c, xref.c: Likewise.
10360 * Makefile.in: Dependencies updated as appropriate.
10361 * Make-lang.in: Likewise.
10362
10363 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
10364
10365 * pt.c (fn_type_unification): Allow incomplete unification without
10366 an immediate error message.
10367
10368 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10369
10370 * tree.c (member_p): New fn.
10371 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10372 initializing class members.
10373
10374 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10375 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10376
10377 * call.c (build_method_call): Handle non-scoped destructors, too.
10378 * pt.c (tsubst_copy): Likewise.
10379
10380 * pt.c (print_template_context): Split out...
10381 (push_tinst_level): ...from here.
10382
10383 * friend.c (is_friend): Don't pass a type to decl_function_context.
10384
10385 * typeck.c (convert_for_initialization): Always hand off
10386 conversions to class type.
10387
10388 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10389
10390 * friend.c (is_friend): Local classes have the same access as the
10391 enclosing function.
10392
10393 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
10394
10395 * typeck.c (expand_target_expr): Delete dead function.
10396
10397 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
10398
10399 * repo.c (save_string): Delete dead function.
10400
10401 * method.c (thunk_printable_name): Delete dead function.
10402
10403 * lex.c (yynextch): Delete dead function.
10404
10405 * expr.c (tree_extract_aggr_init): #if 0 out.
10406
10407 * except.c (do_unwind): Delete dead function.
10408 (easy_expand_asm): Likewise.
10409
10410 * cvt.c (build_conversion_type_1): Delete dead function.
10411
10412 * cp-tree.h (push_expression_obstack): Declare.
10413
10414 * call.c (source_type): #if 0 out.
10415
10416 * class.c (alter_access): Remove unused label. Add braces
10417 around empty else clause.
10418
10419 * lex.c (yyprint): Fix argument to printf.
10420
10421 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
10422
10423 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
10424
10425 * pt.c (instantiate_class_template): Make sure template
10426 arguments are permanent.
10427 * init.c (resolve_offset_ref): Don't go looking around in
10428 template types.
10429
10430 * semantics.c: Add routines to handle expressions, and some
10431 declaration processing.
10432 * parse.y: Use them.
10433 (current_class_depth): Move declaration to cp-tree.h.
10434 * parse.c: Regenerated.
10435 * cp-tree.h: Use them.
10436 (current_class_depth): Declare.
10437 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10438
10439 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
10440
10441 * error.c (dump_decl): Be a bit more explicit with template
10442 type arguments, when verbose.
10443
10444 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10445
10446 * inc/exception: Reorder closing braces.
10447
10448 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
10449
10450 * pt.c (redeclare_class_template): New function.
10451 * cp_tree.h (redeclare_class_template): Declare it.
10452 * decl.c (xref_tag): Use it.
10453
10454 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
10455
10456 * call.c (build_over_call): Check IS_AGGR_TYPE, not
10457 TYPE_LANG_SPECIFIC.
10458 * typeck.c (convert_arguments): Likewise.
10459
10460 * decl.c (grokdeclarator): Remove const and volatile from type after
10461 setting constp and volatilep.
10462
10463 * class.c (finish_struct_1): Don't warn about bool bitfield larger
10464 than one bit.
10465
10466 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
10467
10468 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10469
10470 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
10471
10472 * call.c (build_object_call): Complain about ambiguous operator(),
10473 rather that crashing.
10474 (build_new_op): Likewise.
10475 (build_op_delete_call): Likewise.
10476
10477 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
10478
10479 * cvt.c (perform_qualification_conversions): Use comp_target_types
10480 instead of comp_ptr_ttypes.
10481
10482 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
10483
10484 * cp-tree.h (enforce_access): Declare.
10485 * call.c (enforce_access): Make it extern, not static.
10486 * class.c (alter_access): Use enforce_access; modify code for ISO
10487 compliance, rather than ARM rules.
10488
10489 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10490
10491 * cp-tree.h: Fix typo.
10492
10493 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10494
10495 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10496 if (aggregate_value_p (type)).
10497
10498 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10499
10500 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
10501
10502 * tree.c (mapcar): When dealing with a DECL, use it's constant
10503 value, if any.
10504 * pt.c (lookup_template_class): Don't mangle the names of template
10505 classes whose arguments are unknown.
10506
10507 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10508
10509 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10510
10511 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10512
10513 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
10514
10515 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10516 boolean_type_node to 1.
10517
10518 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
10519
10520 * error.c (dump_expr): Remove unused variable `l'.
10521
10522 * pt.c (for_each_template_parm): New function, created by
10523 converting uses_template_parms.
10524 (tree_fn_t): New typedef.
10525 (uses_template_parms): Use it.
10526 (mark_template_parm): New function.
10527 (push_template_decl): Check that the argument list of a partial
10528 specialization uses all the template parameters.
10529
10530 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10531 with it; we might want it for debugging.
10532 * cp-tree.h (type_unification): Change interface.
10533 * class.c (finish_struct_1): Skip nested template types, just like
10534 ordinary nested types.
10535 (instantiate_type): Use new interface to type_unification.
10536 * lex.c (init_lex): Add __sz as opname for sizeof.
10537 * method.c (build_overload_scope_ref): New function.
10538 (build_overload_int): Handle complex expressions. Set
10539 numeric_output_need_bar if necessary.
10540 (build_overload_value): Handle non-PARM_DECL nodes; this
10541 routine is now used by build_overload_int. Remove some
10542 assignments to numeric_output_need_bar. Use
10543 build_overload_scope_ref.
10544 (build_qualified_name): Note that some template mangled names end
10545 with digits, and set numeric_output_need_bar appropriately. Use
10546 build_underscore_int.
10547 * pt.c (unify): Change interface.
10548 (type_unification_real): Likewise.
10549 (determine_specialization): Use new interfaces.
10550 (tsubst): Deal gracefully with situations in which the argument
10551 vector is not fully filled.
10552 (fn_type_unification): Use new interfaces.
10553 (type_unification): Likewise. Remove NOP_EXPR hack.
10554 (type_unification_real): Likewise.
10555 (unify): Likewise. Deal with unification of complex expressions.
10556
10557 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10558
10559 * pt.c (complete_template_args): Initialize skip properly.
10560
10561 * decl.c (make_typename_type): Revert.
10562 (make_implicit_typename): Remove.
10563 (lookup_name_real): Don't call it. Call lookup_field if we see a
10564 TYPE_DECL from a template base.
10565 * search.c (lookup_field): Do implicit typename stuff.
10566
10567 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
10568 Geoff Noer <noer@cygnus.com>
10569
10570 * Makefile.in: Various fixes for building cygwin32 native toolchains.
10571 * Make-lang.in: Likewise.
10572
10573 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10574
10575 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10576
10577 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
10578
10579 * decl.c (make_implicit_typename): Rewrite removed code.
10580 (make_typename_type): Call it if the type we look up comes from
10581 a base that uses template parms.
10582
10583 * pt.c (complete_template_args): Rewrite.
10584 (tsubst, FUNCTION_DECL): Use it.
10585
10586 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
10587
10588 * semantics.c (finish_asm_stmt): Fix combine strings. Call
10589 c_expand_asm_operands () if output_operands, input_operands or
10590 clobbers is not NULL_TREE.
10591
10592 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10593
10594 * pt.c (complete_template_args): New function.
10595 (get_bindings): Deal with specializations of function templates
10596 with return type containing parameters from outer class
10597 templates.
10598 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10599 substitute arguments and compose a new type.
10600
10601 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
10602
10603 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10604 FUNCTION_DECLs.
10605
10606 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10607
10608 * decl.c (make_implicit_typename): Lose useless code.
10609
10610 * call.c (standard_conversion): Handle A* -> const A* properly.
10611
10612 * pt.c (get_bindings_real): Rename from get_bindings. Add
10613 check_rettype parm.
10614 (get_bindings): Pass 1.
10615 (get_bindings_overload): Pass 0.
10616
10617 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
10618
10619 * pt.c (check_explicit_specialization): When reverting a static
10620 member function, also remove the `this' parameter from
10621 last_function_parms.
10622
10623 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10624
10625 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10626 a function context.
10627
10628 * decl.c (store_bindings): Use free_binding_vecs.
10629 (pop_from_top_level): Likewise.
10630
10631 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10632
10633 * decl.c (make_implicit_typename): Only change the type of a
10634 TYPENAME_TYPE.
10635
10636 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
10637
10638 * semantics.c: New file, containing routines to perform the
10639 semantic phase of parsing.
10640 * parse.y: Use it.
10641 * pt.c (tsubst_expr): Likewise.
10642 * cp-tree.h: Declare the various functions in semantics.c.
10643 Provide macros to access _STMT tree nodes.
10644 * cp-tree.def: Add ASM_STMT tree node.
10645 * Makefile.in, Make-lang.in: Add dependencies on and for
10646 semantics.c.
10647
10648 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
10649
10650 * pt.c (push_template_decl): Only check primary templates.
10651
10652 * pt.c (check_explicit_specialization): Complain about default args
10653 in explicit specialization.
10654
10655 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10656 constructor_declarator.
10657
10658 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
10659
10660 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10661 has no overloaded operator ->.
10662
10663 * call.c (build_field_call): Don't crash when presented with a
10664 field that is actually a nested type.
10665
10666 * decl.c (pushtag): Deal with friend class injection in local
10667 classes.
10668
10669 * call.c (build_object_call): Don't crash if OBJ is a
10670 pointer-to-member-function.
10671
10672 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10673
10674 * pt.c (push_template_decl): Complain about template with C linkage,
10675 anonymous template class.
10676
10677 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10678
10679 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10680 * search.c: Likewise.
10681
10682 * lex.c (do_pending_defargs): Only call
10683 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10684
10685 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10686
10687 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
10688
10689 * parse.y: Deal with CONSTRUCTORS in new_initializers.
10690
10691 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
10692
10693 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10694 closely mimics the behavior in parse.y.
10695 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10696 into a compound statement.
10697
10698 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10699
10700 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10701 * pt.c (inline_needs_template_parms): New fn.
10702 (original_template): New fn.
10703 (push_inline_template_parms_recursive): New fn.
10704 (maybe_begin_member_template_processing): Use them.
10705 (maybe_end_member_template_processing): Likewise.
10706 (is_member_or_friend_template): Rename to is_member_template.
10707 Member functions of local classes are never member templates.
10708
10709 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10710
10711 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10712 added in the class scope to catch redefinition error.
10713
10714 * pt.c (reduce_template_parm_level): Also copy
10715 the DECL_TEMPLATE_PARMS field.
10716
10717 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
10718
10719 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10720 reduced-level template type parameter.
10721
10722 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
10723
10724 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10725 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10726 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10727 * decl.c (duplicate_decls): Propagate it.
10728 * typeck2.c (abstract_virtuals_error): Use two loops to emit
10729 abstract virtual functions and virtual functions which need a
10730 final overrider separately.
10731
10732 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
10733
10734 * lang-specs.h: Properly put brackets around array elements in
10735 initializer.
10736
10737 * typeck.c (build_binary_op_nodefault): Correctly place parens around
10738 && and || in expression.
10739
10740 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
10741
10742 * call.c (default_parm_conversions): Remove prototype definition.
10743 (build_method_call): Remove unused variable result.
10744
10745 * cvt.c (ocp_convert): Remove unused variable conversion.
10746
10747 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10748
10749 * except.c (do_unwind): #if 0 definition of unused variables fcall
10750 and next_pc.
10751
10752 * expr.c (extract_scalar_init): #if 0 prototype and function
10753 definition.
10754
10755 * init.c (expand_aggr_init_1): Remove unused variable init_type.
10756 (build_new_1): Remove unused variable t.
10757
10758 * pt.c (instantiate_class_template): Remove unused variable newtag;
10759 cast called function return value to void.
10760 (do_decl_instantiation): Remove unused variables name and fn.
10761
10762 * tree.c (get_type_decl): Add default return to shut up compiler from
10763 complaining control reaches end of non-void function.
10764
10765 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10766
10767 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
10768
10769 * call.c (default_parm_conversions): Remove prototype definition.
10770 (build_method_call): Remove unused variable result.
10771 (build_over_call): Add default case in enumeration switch.
10772
10773 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
10774
10775 * decl2.c (lang_decode_option): Change j's type to size_t.
10776
10777 * tree.c (layout_vbasetypes): record_align and desired_align are of
10778 type unsigned int; const_size and nonvirtual_const_size likewise.
10779
10780 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
10781
10782 * parse.y (new_initializer): Make sure all initializers are
10783 lists.
10784
10785 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
10786
10787 * decl2.c (import_export_decl): Mark tinfo functions for
10788 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10789
10790 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
10791
10792 * method.c: Fix typo.
10793
10794 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10795
10796 * method.c: Include "system.h" to get stdlib.h, stdio.h,
10797 ctype.h, string.h, etc.
10798 (issue_nrepeats): Add default case in enumeration switch.
10799 (check_btype): Likewise.
10800 (process_overload_item): Likewise.
10801
10802 * Makefile.in (method.o): Depend on system.h.
10803
10804 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10805
10806 * lex.c (do_scoped_id): Fix parenthesizing.
10807
10808 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
10809
10810 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10811 FLAG_RTTI is unset, initialize type info machinery and continue
10812 with FLAG_RTTI enabled.
10813 (get_typeid): Likewise.
10814
10815 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10816
10817 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10818 from B.
10819
10820 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
10821
10822 * pt.c (finish_member_template_decl): Deal more gracefully with
10823 invalid declarations.
10824
10825 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
10826
10827 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10828 cp-tree.h: Clean up more old overloading code, old RTTI code, and
10829 some formatting quirks.
10830
10831 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10832 method.c, pt.c, ptree.c, typeck.c: Remove support for
10833 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10834 * class.h: Remove.
10835 * Makefile.in: Adjust.
10836
10837 * pt.c (unify): Don't allow reduced cv-quals when strict.
10838
10839 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10840 *type_unification* and unify.
10841
10842 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10843
10844 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10845 (nested_name_specifier): And add it before this use.
10846 (typename_sub0): And this use. Also add use without the keyword.
10847 (typename_sub1): Likewise.
10848 * pt.c (instantiate_class_template): Don't actually instantiate
10849 anything if our type uses template parms.
10850
10851 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
10852
10853 * decl.c (start_function): Don't call temporary_allocation for a
10854 nested function.
10855
10856 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10857
10858 * pt.c (instantiate_class_template): Don't mess with friends if
10859 our type uses template parms.
10860
10861 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10862
10863 * parse.y (nested_name_specifier): Use explicit_template_type.
10864 (typename_sub): Allow a template_type, an explicit_template_type,
10865 or an implicit template type at the end.
10866 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10867 * decl.c (make_typename_type): Handle template-id where the name
10868 is a TEMPLATE_DECL.
10869 * call.c (build_scoped_method_call): Handle member template
10870 destructor call.
10871 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10872 destructor is represented by the type.
10873
10874 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10875 * parse.y (nested_name_specifier): Add 'template' case.
10876 (explicit_template_type): New rule.
10877 (typename_sub): Use it.
10878 * decl.c (make_typename_type): Handle getting a template-id for NAME.
10879 * pt.c (tsubst): Likewise.
10880
10881 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10882
10883 * pt.c (add_to_template_args): Fix thinko.
10884 (instantiate_class_template): Call it later.
10885
10886 * pt.c (get_class_bindings): Add outer_args parm.
10887 (most_specialized_class): Likewise.
10888 (instantiate_class_template): Pass it.
10889 (more_specialized_class): Likewise.
10890 (lookup_template_class): Get context from template if none
10891 was specified.
10892 (finish_member_template_decl): Don't do anything with a
10893 partial specialization.
10894 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10895 AGGREGATE_TYPE_P.
10896 * class.c (finish_struct): Member class templates have already been
10897 checked for name clashes.
10898 * decl.c (pushdecl_with_scope): Handle pushing at class level.
10899
10900 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10901
10902 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10903 (tsubst, *_PARM): Support multiple levels of template classes.
10904 (instantiate_class_template): Look up the pattern from the
10905 original template.
10906 (lookup_template_class): Handle getting a template for d1.
10907 (push_template_decl): Correct setting of 'primary'.
10908 (reduce_template_parm_level): Add 'levels' parm.
10909 (finish_member_template_decl): Support member class templates.
10910 (template_class_depth): Handle multiple levels.
10911 * parse.y (component_decl_1, fn.def2): Remove member template case.
10912 (component_decl): Add member template cases.
10913 * decl2.c (check_member_template): We now handle member template
10914 classes.
10915 * decl.c (pushtag): Handle member templates.
10916 * method.c (do_inline_function_hair): Don't touch
10917 IDENTIFIER_GLOBAL_VALUE.
10918 * init.c (build_offset_ref): If name isn't an identifier, just
10919 return it.
10920 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10921
10922 * typeck.c (get_delta_difference): Do adjust for conversions to
10923 and from virtual base.
10924
10925 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
10926
10927 * typeck.c (get_delta_difference): Give hard error for conversion
10928 from virtual base.
10929
10930 * cp-tree.h: Tweak formatting.
10931
10932 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
10933
10934 * decl.c (push_namespace): Handle redeclaration error.
10935
10936 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10937 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10938 (NAMESPACE_BINDING): New macro.
10939 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10940 * *.c: Use them.
10941
10942 * pt.c (push_template_decl): Use innermost_args.
10943
10944 * decl.c (get_unique_name): Tweak from earlier in the name.
10945
10946 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10947
10948 * cp-tree.def: Add CPLUS_BINDING node.
10949 * cp-tree.h (tree_binding): New struct.
10950 (BINDING_SCOPE, BINDING_VALUE): New macros.
10951 (current_namespace, global_namespace): Declare extern.
10952 (struct lang_decl_flags): New field in_namespace.
10953 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10954 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10955 (TREE_INDIRECT_USING): New macro.
10956 * decl2.c (current_namespace, global_namespace): Declare. The
10957 value is a NAMESPACE_DECL now, not a TREE_LIST.
10958 (is_namespace_ancestor, namespace_ancestor): New static functions.
10959 (add_using_namespace, ambiguous_decl): Likewise.
10960 (lookup_using_namespace): New support function for lookup_name.
10961 (qualified_lookup_using_namespace): New support function for
10962 do_scoped_id and lookup_namespace_name.
10963 (get_namespace_id): Mark as obsolete.
10964 (current_namespace_id): Likewise.
10965 (do_namespace_alias): Implement.
10966 (do_using_directive): Implement as call to add_using_namespace.
10967 * decl.c (binding_for_name): New function.
10968 (push_namespace, pop_namespace): Implement.
10969 (push_decl): Don't install a FUNCTION_DECL in the global branch.
10970 (lookup_namespace_name): Implement using qualified lookup.
10971 (lookup_name_real): For global scoping, lookup in
10972 global_namespace. For namespace scoping, lookup in given
10973 namespace. For unscoped lookup, iterate over namespace,
10974 considering using directives.
10975 (init_decl_processing): Initialize global_namespace.
10976 (grokvardecl): Build assembler name as static name for globals.
10977 (grokdeclarator): Remove old namespace mangling.
10978 (xref_tag): When installing a global binding for the
10979 tag, make sure we have an identifier.
10980 * method.c (build_overload_nested_name): Mangle namespaces.
10981 (build_qualified_name): Likewise.
10982 (build_decl_overload_real): Likewise.
10983 * lex.c (build_lang_decl): Set namespace for new declaration to
10984 current_namespace.
10985 (do_scoped_id): Find global names in global or current
10986 namespace, or using qualified namespace lookup, depending on
10987 context.
10988 * init.c (build_member_call): When scope is namespace, use
10989 build_x_function_call instead.
10990 (build_offset_ref): When scope is namespace, collapse processing
10991 to lookup_namespace_name instead.
10992 * error.c (dump_decl): Support NAMESPACE_DECL.
10993 * decl.c (pushdecl): Bind globals to current namespace.
10994 (push_overloaded_decl): Likewise.
10995 (lookup_tag): Likewise.
10996 (lookup_name_current_level): Likewise.
10997 (xref_tag): Likewise.
10998 (start_function): Likewise.
10999 * lex.c (do_identifier): Likewise.
11000 (identifier_typedecl_value): Likewise.
11001 (real_yylex): Likewise.
11002 * method.c (do_inline_function_hair): Likewise.
11003 * parse.y (unscoped): Likewise.
11004 * pt.c (check_explicit_specialization): Likewise.
11005 (lookup_template_class): Likewise.
11006 * rtti.c (call_void_fn): Likewise.
11007 * sig.c (build_sigtable): Likewise.
11008 * ptree.c (lang_print_xnode): New function.
11009
11010 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
11011
11012 * pt.c (instantiate_class_template): Don't instantiate if pedantic
11013 and the args use template parms.
11014
11015 * pt.c (push_tinst_level): If the instantiation uses template parms,
11016 fail silently.
11017 * decl.c (xref_basetypes): Do call complete_type for basetypes
11018 that involve template parameters.
11019
11020 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
11021
11022 * typeck2.c (process_init_constructor): Fix labeled init check.
11023
11024 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
11025
11026 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11027 argument to tsubst and friends.
11028
11029 * pt.c (tsubst, FUNCTION_DECL): Tidy.
11030
11031 * typeck.c (build_x_function_call): Handle static member function
11032 templates like non-templates. Handle friend templates like normal
11033 function templates.
11034 * pt.c (tsubst, *_PARM): Don't use orig_level.
11035 (get_bindings): Don't call add_to_template_args.
11036 (instantiate_template): Likewise.
11037 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11038 * ptree.c (print_lang_type): Print index/level for template parms.
11039
11040 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
11041
11042 * Make-lang.in (cc1plus): Note that cc1plus depends on
11043 cp/cp-tree.h and cp/cp-tree.def.
11044
11045 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11046 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11047 position in a template parameter list.
11048 * cp-tree.h (template_parm_index): New structure, used as the tree
11049 structure for a TEMPLATE_PARM_INDEX.
11050 (TEMPLATE_PARM_IDX): New macro.
11051 (TEMPLATE_PARM_LEVEL): Likewise.
11052 (TEMPLATE_PARM_DESCENDANTS): Likewise.
11053 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11054 (TEMPLATE_PARM_DECL): Likewise.
11055 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11056 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11057 (TEMPLATE_TYPE_DECL): Likewise.
11058 (TEMPLATE_CONST_IDX): Remove.
11059 (TEMPLATE_CONST_LEVEL): Likewise.
11060 (TEMPLATE_CONST_SET_INFO): Likewise.
11061 (TEMPLATE_TYPE_SET_INFO): Likewise.
11062 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11063 node.
11064 (TEMPLATE_TYPE_LEVEL): Likewise.
11065 * decl.c (decls_match): Call comp_template_parms, rather than
11066 expanding it inline.
11067 (duplicate_decls): If two template declarations are being merged,
11068 then their TEMPLATE_INFOs should be merged as well.
11069 (grokfndecl): Save template-id information when declaring a friend
11070 with explicit template arguments. Pass arguments to
11071 check_explicit_specialization via correct convention; at some
11072 point check_explicit_specialization changed, but these call-sites
11073 did not.
11074 (grokdeclarator): Tidy up slightly.
11075 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
11076 two template functions with the same DECL_ASSEMBLER_NAME the same,
11077 since the names are not yet mangled.
11078 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11079 TEMPLATE_CONST_PARM.
11080 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
11081 decl for a non-type parameter, rather than printing `<tparm ...>'.
11082 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11083 (do_friend): Deal with template friends.
11084 * lex.c (do_pending_inlines): Call
11085 maybe_begin_member_template_processing, rather than
11086 conditionally calling begin_member_template_processing.
11087 (process_next_inline): Likewise. Call
11088 maybe_end_member_template_processing, rather than
11089 conditionally calling end_member_template_processing.
11090 (do_pending_defargs): Likewise.
11091 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11092 TEMPLATE_CONST_PARM.
11093 * method.c (build_mangled_template_parm_index): New function.
11094 (build_overload_value): Use it.
11095 (build_overload_name): Likewise.
11096 * pt.c (finish_member_template_decl): Allow friend declarations.
11097 (template_class_depth): New function.
11098 (is_member_template): Rename, and modify, to become...
11099 (is_member_or_friend_template): New function.
11100 (end_member_template_processing): Rename, and modify, to become...
11101 (maybe_end_member_template_processing).
11102 (build_template_parm_index): New function.
11103 (reduce_template_parm_level): New function.
11104 (process_template_parm): Modify to use build_template_parm_index.
11105 (push_template_decl): Deal with friend templates.
11106 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11107 TEMPLATE_CONST_PARM.
11108 (tsubst_friend_function): New function.
11109 (instantiate_class_template): Generate the DECL_FRIENDLIST
11110 for a new instantiation by using tsubst_friend_function rather
11111 than just tsubst.
11112 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11113 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11114 appropriate new macros. Use reduce_template_parm_level to
11115 generate lower-level template parameters. Handle tsubst'ing into
11116 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
11117 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11118 templates. Similarly for the template parameters for a new
11119 template.
11120 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
11121 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
11122 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11123 (get_bindings): Call add_to_template_args if necessary.
11124 (instantiate_decl): Handle instantiations of friend templates.
11125 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11126 TEMPLATE_TYPE_PARM as a list of fields; it's not!
11127 * spew.c (yylex): Do a little manual constant propagation to
11128 clarify the code.
11129
11130 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
11131
11132 * error.c: Include sys/types.h.
11133
11134 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
11135
11136 * method.c (build_mangled_name): Start CPP directives in column zero.
11137
11138 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
11139
11140 * typeck2.c (process_init_constructor): Sorry about non-trivial
11141 labeled initializers.
11142 * parse.y (initlist): Re-enable labeled initializers.
11143
11144 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11145
11146 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11147 all callers changed. Rely on the new parameter instead of arg
11148 being a TREE_LIST when determine whether we are working inside
11149 template template parameter. Clean up is_type test.
11150
11151 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
11152
11153 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11154 * typeck2.c (initializer_constant_valid_p): Allow conversions
11155 between pointers and references.
11156
11157 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
11158
11159 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11160 if pedantic || warn_pointer_arith.
11161
11162 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11163
11164 * pt.c (unify): Handle TEMPLATE_DECL.
11165
11166 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
11167
11168 * cp-tree.h (strip_attrs): Remove decl.
11169
11170 1998-02-18 Doug Evans <devans@cygnus.com>
11171
11172 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11173 Update olddecl's attributes too.
11174 (strip_attrs): Remove function.
11175 * typeck.c (common_type): Call merge_machine_type_attributes.
11176
11177 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
11178
11179 * parse.y (initdcl0_innards): New grammar symbol.
11180 (nomods_initdecls, nomods_initdcl0): Change type from itype to
11181 none, since the resulting value is never used.
11182 (parse_decl): New function.
11183 (datadef): Remove redundant actions.
11184 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11185 * parse.c: Regenerated.
11186
11187 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
11188
11189 * parse.y (simple_stmt): Use getdecls() to check for decl.
11190
11191 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
11192
11193 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11194 macros.
11195 (c++.install-common): Install c++filt properly as native or as cross
11196 variant.
11197 (c++.uninstall): Add c++filt.
11198
11199 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11200
11201 * call.c (standard_conversion): Fix multi-level ptr conversions.
11202
11203 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
11204
11205 * init.c (build_new): Propagate error_mark_node up.
11206
11207 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
11208
11209 * parse.y (simple_stmt): If the condition isn't a declaration,
11210 start the controlled block after the test.
11211
11212 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11213
11214 * call.c (build_over_call): Convert builtin abs, labs and fabs to
11215 tree-codes.
11216 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11217 builtins.
11218
11219 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11220
11221 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11222
11223 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
11224
11225 * cp-tree.h: Add access_protected_virtual_node.
11226 * class.c (init_class_processing): Initialize it.
11227 * decl.c (xref_basetypes): Use it.
11228 * parse.y (base_class_access_list): Likewise.
11229
11230 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11231 (c++.install-common): Install c++filt.
11232
11233 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11234
11235 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11236
11237 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
11238
11239 * call.c (reference_binding): Use comptypes when comparing
11240 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11241
11242 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
11243
11244 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11245 (really_overloaded_fn): Move check here from is_overloaded_fn.
11246 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11247
11248 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
11249
11250 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11251 conversions.
11252
11253 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
11254
11255 * cp-tree.h (push_template_decl): Return the decl passed in, or an
11256 equivalent duplicate.
11257 * decl.c (pushtag): Use the return value from push_template_decl.
11258 (duplicate_decls): When duplicating a template declaration, merge
11259 the DECL_TEMPLATE_RESULTs as well.
11260 (make_implicit_typename): Don't try to dive into typename types to
11261 find a context for making a new implicit typename.
11262 (start_decl): Use the return value from push_template_decl.
11263 (grokdeclarator): Complain about declarations list `const operator
11264 int'. Since we don't correctly handle in-class initializations of
11265 non-static data members, complain about this (now illegal)
11266 practice. Issue an error for initializations of non-const statics
11267 since that is illegal as well, and since we don't handle that case
11268 correctly either.
11269 (start_function): Use the return value from push_template_decl.
11270 (start_method): Likewise.
11271 * decl2.c (grokfield): Likewise. Since the change to
11272 grokdeclarator ensures that all initialized fields are in fact
11273 static, remove a redundant test for TREE_PUBLIC.
11274 * parse.y (initlist): Disable labeled initializers since they do
11275 not work as per the documentation, and since they do not use the
11276 same syntax as the C front end.
11277 * pt.c (push_template_decl): Return the decl passed in, or an
11278 equivalent duplicate.
11279 (lookup_template_class): When searching in a nested context,
11280 use the right arguments.
11281 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11282 * typeck.c (build_component_ref): Assign the correct type to the
11283 result of build_vfn_ref.
11284
11285 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
11286
11287 * pt.c (convert_nontype_argument): Fix typo.
11288 (check_explicit_specialization): Allow old-style specialization
11289 of class template members.
11290
11291 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
11292 Manfred Hollstein <manfred@s-direktnet.de>
11293
11294 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11295 when deciding to override DECL_ASSEMBLER_NAME.
11296
11297 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
11298
11299 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11300 * cp-tree.h (flag_do_squangling): Add declaration.
11301 * lang-options.h: Add -fsquangle and -fno-squangle.
11302 * method.c: Add macros and static variables for squangling.
11303 (build_overload_name): Rename to build_mangled_name, add logic for B
11304 compression, and split into process_modifiers and
11305 process_overload_item.
11306 (process_modifiers): New function, to handle constant, reference,
11307 and pointer types.
11308 (process_overload_item): New function, handles issue of type codes.
11309 (build_overload_name): New function, start squangling and call
11310 build_mangled_name.
11311 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11312 (start_squangling): New function to initialize squangling structs.
11313 (end_squangling): New function to destroy squangling structs.
11314 (nrepeats): Rename variable to Nrepeats.
11315 (issue_nrepeats): New function for issuing 'n' type repeats.
11316 (check_ktype): New function to check for type K name compression.
11317 (build_overload_nested_name): Add a check for K name compression.
11318 (build_qualified_name): Add a check for K name compression and don't
11319 use DECL_ASSEMBLER_NAME when squangling is on.
11320 (check_btype): New function, checks for B type compression.
11321 (build_static_name, build_decl_overload_real): Initiate squangling.
11322 (build_typename_overload, build_overload_with_type): Initiate
11323 squangling
11324
11325 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
11326
11327 * method.c (make_thunk): Avoid name buffer overflow.
11328
11329 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11330
11331 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11332 don't define them yet.
11333
11334 * parse.y (nomods_initdcl0): Add constructor_declarator case.
11335
11336 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11337
11338 * config-lang.in (diff_excludes): Use basename only.
11339
11340 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
11341
11342 * tinfo2.cc: Add tinfo for signed char.
11343
11344 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
11345
11346 * search.c (compute_access): Handle protected constructors in derived
11347 classes as accessible.
11348
11349 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
11350
11351 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11352 Call convert_from_reference sooner.
11353
11354 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
11355
11356 * cvt.c (ocp_convert): Obtain the constant values from constant
11357 decls even if the destination type is the same as the type of the
11358 decl.
11359
11360 * decl2.c (finish_file): Make sure that static inlines with
11361 definitions are not marked DECL_EXTERNAL before returning.
11362
11363 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
11364
11365 * decl.c: Lose arg_looking_for_template.
11366 (lookup_name_real): Likewise.
11367 * parse.y: Lose processing_template_arg, template_arg1.
11368 (primary): Likewise.
11369 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11370
11371 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11372
11373 * error.c (dump_decl): Fix type of default arguments for template
11374 template parameters and nontype template parameters.
11375 * parse.y (template_parm): Handle invalid default template
11376 template arguments here.
11377
11378 * parse.y (template_parm): Use template_arg instead of PTYPENAME
11379 for default template template argument.
11380 * pt.c (coerce_template_parms): Merge default template argument
11381 codes. Can treat RECORD_TYPE as template name if it is implicitly
11382 created. Fix argument index in error message.
11383 * typeck.c (comptypes): Merge template argument comparison codes in
11384 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11385
11386 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
11387
11388 * lex.c (file_name_nondirectory): Also check for '/'.
11389
11390 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
11391
11392 * parse.y (primary): Deal with statement-expressions in
11393 templates.
11394 * pt.c (tsubst_copy): Handle BIND_EXPR.
11395 * tree.c (mapcar): Likewise.
11396
11397 * call.c (add_template_candidate_real): Pass extra parameter to
11398 fn_type_unification.
11399 * cp-tree.h (fn_type_unification): Add parameter.
11400 * pt.c (fn_type_unification): Add additional parameter to deal with
11401 static member functions.
11402 (get_bindings): Deal with static member functions.
11403
11404 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
11405 (revert_static_member_fn): Declare.
11406 * decl.c (revert_static_member_fn): Remove declaration. Change
11407 linkage from internal to external.
11408 (cp_finish_decl): Deal with virtual functions in classes local to
11409 template functions.
11410 * decl2.c (finish_file): Don't forget to emit increment/decrement
11411 expressions in initializers for file-scope variables.
11412 * parse.y (typename_sub2): If the typename doesn't names a
11413 template, rather than a type, issue an error message.
11414 * pt.c (check_explicit_specialization): Handle specializations of
11415 static member functions.
11416 (coerce_template_parms): Handle offset references to lists of
11417 member functions.
11418 * search.c (note_debug_info_needed): Don't crash when handed a
11419 type which is being defined.
11420 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
11421 that can happen with some illegal code.
11422
11423 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11424
11425 * call.c (user_harshness): Initialize `code' to 0.
11426 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
11427 (null_ptr_cst_p): Add parentheses around && within ||.
11428 (standard_conversion): Likewise.
11429 (z_candidate): Likewise.
11430 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
11431 (build_object_call): Likewise for `mem_args'.
11432 (build_new_op): Likewise for `mem_arglist'. Add `return' from
11433 default case in enumeration switch.
11434
11435 * class.c (build_vtable_entry): Add explicit braces to avoid
11436 ambiguous `else'.
11437 (build_class_init_list): Likewise.
11438 (finish_struct_1): Initialize `width' to 0.
11439 (instantiate_type): Initialize `name' to NULL_TREE. Add
11440 explicit braces to avoid ambiguous `else'.
11441
11442 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11443 `else'.
11444
11445 * decl.c (grok_reference_init): Eliminate unused parameter, all
11446 callers changed.
11447 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11448 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11449 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11450 (grokdeclarator): Add parentheses around && within ||. Add
11451 explicit braces to avoid ambiguous `else'.
11452 (grokparms): Initialize `type' to NULL_TREE.
11453 (xref_tag): Remove unused label `just_return'.
11454 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11455 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11456 (hack_incomplete_structures): Add parentheses around assignment
11457 used as truth value.
11458
11459 * decl2.c (coerce_delete_type): Hide definition of `e3'.
11460
11461 * error.c: Include <stdlib.h>.
11462 (dump_expr): Change the type of `i' to size_t. Remove unused
11463 label `error'.
11464
11465 * except.c (init_exception_processing): Remove unused variable `d'.
11466 (expand_throw): Likewise for `label'.
11467
11468 * friend.c (add_friends): Add explicit braces to avoid ambiguous
11469 `else'.
11470
11471 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11472 (sort_base_init): Likewise for `binfo'.
11473 (expand_member_init): Likewise for `rval'.
11474 (build_member_call): Add parentheses around assignment used as
11475 truth value.
11476 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11477 (build_new): Initialize `nelts' to NULL_TREE. Initialize
11478 `old_immediate_size_expand' to 0.
11479 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11480 (build_vec_delete_1): Remove unused variable `block'.
11481 (expand_vec_init): Initialize `itype' to NULL_TREE.
11482
11483 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
11484 declaration of `index' and `rindex' with autoconf macros.
11485 (reinit_parse_for_expr): Remove unused variables
11486 `look_for_semicolon' and `look_for_lbrac'.
11487 (cons_up_default_function): Initialize `args' to NULL_TREE.
11488 (readescape): Initialize `firstdig' to 0.
11489 (real_yylex): Add parentheses around assignment used as truth value.
11490
11491 * method.c: Include <strings.h> if we don't have <string.h>.
11492 Protect declaration of `index' with autoconf macro.
11493
11494 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11495 Initialize `type' to NULL_TREE.
11496 (structsp): Remove unused variable `id'.
11497
11498 * pt.c (coerce_template_parms): Add explicit braces to avoid
11499 ambiguous `else'.
11500 (lookup_template_class): Initialize `template' to NULL_TREE.
11501 (instantiate_class_template): Remove unused variable `name' and `e'.
11502 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
11503 (do_poplevel): Initialize `saved_warn_unused' to 0.
11504 (type_unification): Remove unused varable `parm'.
11505 (unify): Likewise for `j'.
11506
11507 * repo.c (init_repo): Add parentheses around assignment used as
11508 truth value.
11509 (finish_repo): Remove unused varable `p'.
11510
11511 * search.c (get_binfo): Initialize `type' to NULL_TREE.
11512 (get_base_distance): Likewise.
11513 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11514 and `new_v' to NULL_TREE.
11515 (lookup_fnfields): Likewise for `rval_binfo_h'.
11516 (breadth_first_search): Add parentheses around assignment used as
11517 truth value.
11518 (get_template_base): Initialize `type' to NULL_TREE.
11519
11520 * sig.c (append_signature_fields): Initialize `last_mfptr' to
11521 NULL_TREE.
11522 (build_signature_table_constructor): Likewise for
11523 `last_rhs_field', `pfn' and `vt_off'.
11524 (build_sigtable): Likewise for `init'.
11525
11526 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11527 (propagate_binfo_offsets): Likewise for `delta'.
11528 (hash_tree_cons): Initialize hashcode to 0.
11529 (can_free): Likewise for `size'.
11530 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11531
11532 * typeck.c (convert_sequence): Hide prototype.
11533 (common_type): Add explicit braces to avoid ambiguous `else'.
11534 (comp_target_types): Likewise.
11535 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11536 (build_function_call_real): Add explicit braces to avoid ambiguous
11537 `else'.
11538 (convert_arguments): Initialize `called_thing' to 0.
11539 (convert_for_initialization): Initialize `savew' and `savee' to 0.
11540
11541 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11542 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11543 (build_x_arrow): Likewise for `last_rval'.
11544
11545 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11546
11547 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
11548
11549 * decl.c (init_decl_processing): Use set_sizetype.
11550 * decl2.c (sizetype): Don't declare.
11551 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11552 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11553 (build_component_addr, unary_complex_lvalue): Likewise.
11554 * rtti.c (expand_class_desc): Likewise.
11555 * class.c (get_vfield_offset): Likewise.
11556
11557 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
11558
11559 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11560 early to avoid bogus error. Handle overloaded function
11561 names provided as template arguments correctly.
11562 (coerce_template_parms): Don't mishandle overloaded functions when
11563 dealing with template template parameters.
11564 (lookup_template_class): Issue an error message, rather than
11565 crashing, when the TYPE_DECL provided is not a template type.
11566
11567 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
11568
11569 * class.c (instantiate_type): Don't just return a known type if
11570 it's wrong.
11571
11572 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
11573
11574 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11575 since that code could never be reached.
11576
11577 * error.c (dump_decl): Avoid aborting in the midst of printing an
11578 error message about an illegal template declaration.
11579
11580 * parse.y (structsp): Print an error message, rather than crashing,
11581 when a class-head does not name a class.
11582
11583 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
11584 template arguments as a g++ extension.
11585
11586 * cp-tree.def (ALIGNOF_EXPR): New tree code.
11587 * decl2.c (grok_alignof): If processing_template_decl, just store
11588 the expression.
11589 * typeck.c (c_alignof): Likewise.
11590 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11591 * error.c (dump_expr): Likewise.
11592 * pt.c (tsubst_copy): Likewise.
11593 * tree.c (cp_tree_equal): Likewise.
11594 * pt.c (uses_template_parms): Correctly determine whether or not a
11595 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11596 folding can be done.
11597
11598 * cp-tree.h (grok_enum_decls): Remove type parameter.
11599 * decl.c (grok_enum_decls): Likewise.
11600 * decl2.c (grok_x_components): Call grok_enum_decls
11601 unconditionally, since it will do nothing if there is no
11602 current_local_enum. Use the new calling sequence.
11603 * pt.c (tsubst_enum): Use the new calling sequence for
11604 grok_enum_decls.
11605
11606 * decl.c (start_function): Make member functions of local classes
11607 in extern inline functions have comdat linkage here...
11608 (grokdeclarator): Rather than here.
11609
11610 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
11611
11612 * pt.c (convert_nontype_argument): Use decl_constant_value.
11613
11614 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
11615
11616 * call.c (add_template_candidate_real): New function.
11617 (add_template_candidate): Use it.
11618 (add_template_conv_candidate): Likewise.
11619 (joust): Pass extra argument to more_specialized.
11620 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11621 (is_local_class): Remove.
11622 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11623 * cp-tree.h (is_local_class): Remove.
11624 (perform_array_to_pointer_conversion): Likewise.
11625 (finish_member_template_decl): Add.
11626 (check_explicit_specialization): Return a tree, not an int.
11627 (more_specialized): Take additional argument.
11628 (get_bindings): Likewise.
11629 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11630 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11631 (perform_array_to_pointer_conversion): Remove.
11632 * decl.c (saved_scope): Add processing_specialization,
11633 processing_explicit_instantiation fields.
11634 (maybe_push_to_top_level): Save them.
11635 (pop_from_top_level): Restore them.
11636 (grokfndecl): Use new return value from
11637 check_explicit_specialization.
11638 (start_decl): Don't check flag_guiding_decls before pushing
11639 decls.
11640 (cp_finish_decl): Remove previous (bogus) change.
11641 (grok_declarator): Use decl_function_context rather than
11642 is_local_class.
11643 * decl2.c (finish_file): Pass extra argument to get_bindings.
11644 (build_expr_from_tree): Let build_x_component_ref check
11645 validity of arguments rather than doing it here.
11646 * lex.c (cons_up_default_function): Remove code fooling with
11647 processing_specialization, processing_explicit_instantiation
11648 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11649 * method.c (build_overload_identifier): Mangle local classes in
11650 template functions correctly.
11651 * parse.y (finish_member_template_decl): Move to pt.c.
11652 * pt.c (finish_member_template_decl): Moved here from parse.y.
11653 (print_candidates): New function.
11654 (determine_specialization): Change interface. Properly look for
11655 most specialized versions of template candidates.
11656 (check_explicit_specialization): Fully process explicit
11657 instantiations.
11658 (push_template_decl): Avoid looking at CLASSTYPE fields in
11659 FUNCTION_DECLS.
11660 (determine_overloaded_function): Remove.
11661 (convert_nontype_argument): Change name from
11662 convert_nontype_parameter. Use determine_overloaded_function
11663 instead of instantiate_type.
11664 (mangle_class_name_for_template): Handle type contexts as well as
11665 function contexts.
11666 (classtype_mangled_name): Likewise.
11667 (lookup_template_class): Likewise.
11668 (tsubst): Likewise.
11669 (more_specialized): Take explict template arguments as a
11670 parameter.
11671 (most_specialized): Likewise.
11672 (get_bindings): Likewise. Check that return types match before
11673 proclaiming a function a match.
11674 (do_decl_instantiation): Remove code searching for function to
11675 instantiate; that is now done in check_explicit_specialization.
11676 (add_maybe_template): Pass extra argument to get_bindings.
11677 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11678 implementation.
11679 * typeck.c (build_component_ref): Check for invalid arguments.
11680
11681 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11682
11683 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11684 return_target and call_target are equivalent.
11685
11686 * pt.c (type_unification_real): Just accept function parms that
11687 don't use any template parms.
11688
11689 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11690
11691 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11692 unset DECL_NOT_REALLY_EXTERN.
11693
11694 * parse.y (typename_sub*): Fix std::.
11695
11696 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11697
11698 * error.c (dump_decl): Fix type default template args.
11699 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11700
11701 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
11702
11703 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11704 (file_name_nondirectory): Use.
11705
11706 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11707
11708 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11709 that are not really present. Substitute default arguments in
11710 template template arguments. Correctly convert TEMPLATE_DECL to
11711 TEMPLATE_TEMPLATE_PARM.
11712 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11713 are no longer treated specially here.
11714 * parse.y (template_template_parm): Fix copy error.
11715 * decl.c (grokdeclarator): Warn about missing `typename' for nested
11716 type created from template template parameters.
11717 * parse.y (bad_parm): Likewise
11718
11719 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11720 (push_nested_class): Likewise.
11721 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11722 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11723 (copy_template_template_parm): Declare.
11724 * decl.c (arg_looking_for_template): New variable.
11725 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11726 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11727 node if arg_looking_for_template is nonzero.
11728 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11729 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11730 (grokdeclarator): Handle TEMPLATE_DECL.
11731 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11732 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11733 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11734 (dump_decl): Handle unnamed template type parameters.
11735 Handle template template parameters.
11736 (dump_function_name): Handle template template parameters.
11737 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11738 Handle TEMPLATE_TEMPLATE_PARM.
11739 * method.c (build_template_template_parm_names): New function.
11740 (build_template_parm_names): Handle TEMPLATE_DECL.
11741 (build_overload_nested_name, build_overload_name):
11742 Handle TEMPLATE_TEMPLATE_PARM.
11743 * parse.y (maybe_identifier): New nonterminal.
11744 (template_type_parm): Use it.
11745 (template_template_parm, template_arg1): New nonterminal.
11746 (template_parm): Add template_template_parm rules.
11747 (template_arg): Set processing_template_arg.
11748 (template_arg1): Rules moved from template_arg.
11749 (primary, nonnested_type): Set arg_looking_for_template if we are
11750 processing template arguments.
11751 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11752 (process_template_parm): Handle template template parameters.
11753 (coerce_template_parms, comp_template_args): Likewise.
11754 (mangle_class_name_for_template, lookup_template_class): Likewise.
11755 (uses_template_parms): Handle TEMPLATE_DECL and
11756 TEMPLATE_TEMPLATE_PARM.
11757 (current_template_args): Handle TEMPLATE_DECL.
11758 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11759 * search.c (dfs_walk, dfs_record_inheritance):
11760 Handle TEMPLATE_TEMPLATE_PARM.
11761 * tree.c (copy_template_template_parm): New function.
11762 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11763 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11764
11765 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
11766
11767 * decl.c (start_decl): Don't allow duplicate definitions of static
11768 data members.
11769
11770 * call.c (build_user_type_conversion_1): Handle user-defined
11771 template conversion operators correctly.
11772
11773 * decl2.c (build_expr_from_tree): Issue an error message if the
11774 object in a COMPONENT_REF is a TEMPLATE_DECL.
11775
11776 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11777
11778 * class.c (is_local_class): New function.
11779 * cp-tree.h (is_local_class): Declare it.
11780 (last_tree): Likewise.
11781 (begin_tree): Likewise.
11782 (end_tree): Likewise.
11783 (lookup_template_class): Change prototype.
11784 * decl.c (cp_finish_decl): Check for NULL where necessary.
11785 Consider FUNCTION_DECLS to declare objects with top-level binding,
11786 when calling make_decl_rtl.
11787 (grokdeclarator): Give members of local classes internal linkage.
11788 (start_function): Remove declaration of last_tree.
11789 (finish_function): Set flag_keep_inline_functions around call to
11790 rest_of_compilation if we are processing a member function in a
11791 local class.
11792 (start_method): Call push_template_decl for member functions of
11793 local classes in template functions.
11794 * decl2.c (import_export_decl): Don't give external linkage to
11795 instantiations of templates with internal linkage.
11796 * parse.y (last_tree): Remove declaration.
11797 (template_type): Pass extra parameter to lookup_template_class.
11798 (self_template_type): Likewise.
11799 (structsp): Move call to reset_specialization into left_curly.
11800 (left_curly): Call reset_specialization, and begin_tree.
11801 * pt.c (saved_trees): New variable.
11802 (mangle_class_name_for_template): Change prototype. Use
11803 additional function context to name local classes in templates
11804 correctly.
11805 (classtype_mangled_name): Pass the context.
11806 (push_template_decl): Handle local classes and templates, and
11807 member functions for such classes.
11808 (convert_nontype_parameter): Fix handling of pointer-to-member
11809 constants.
11810 (lookup_template_class): Handle local classes in templates.
11811 (tsubst): Likewise. Don't assume that template instantiations
11812 have external linkage; pay attention to the template declaration.
11813 (mark_decl_instantiated): Likewise.
11814 (begin_tree): New function.
11815 (end_tree): Likewise.
11816
11817 * decl.c (xref_basetypes): Don't call complete_type for basetypes
11818 that involve template parameters; that can lead to infinite
11819 recursion unnecessarily.
11820
11821 * pt.c (register_specialization): Do not register specializations
11822 that aren't ready to be registered yet.
11823 (check_explicit_specialization): Handle explicit specialization of
11824 constructors and destructors.
11825 (build_template_decl): New function.
11826 (push_template_delc): Handle out-of-class specializations of
11827 member templates.
11828
11829 * pt.c (check_explicit_specialization): Set up the template
11830 information before registering the specialization.
11831 (coerce_template_parms): Fix thinko.
11832 (tsubst): Handle specializations of member templates correctly.
11833
11834 * class.c (finish_struct_methods): Remove calls to
11835 check_explicit_specialization from here.
11836 (finish_struct): And insert them here.
11837 * cp-tree.h (perform_qualification_conversions): New function.
11838 (perform_array_to_pointer_conversion): Likewise.
11839 (begin_explicit_instantiation): Likewise.
11840 (end_explicit_instantiation): Likewise.
11841 (determine_specialization): Renamed from
11842 determine_explicit_specialization.
11843 (comp_template_parms): New function.
11844 (processing_explicit_instantiation): New variable.
11845 * cvt.c (perform_qualification_conversions): New function.
11846 (perform_array_to_pointer_conversion): Likewise.
11847 * decl.c (duplicate_decls): Don't consider template functions
11848 alike unless they have the same parameters. Refine handling of
11849 instantiation/specialization mismatches.
11850 (start_decl): Don't call pushdecl for template specializations,
11851 since they don't affect overloading.
11852 (start_function): Likewise.
11853 (grokfndecl): Call check_explicit_specialization a little later.
11854 Don't call duplicate_decls for memberm template specializations.
11855 (grokdeclarator): Don't update template_count for classes that are
11856 themselves specializations. Remove use of `2' as parameter to
11857 grokfndecl since that value isn't used.
11858 * lex.c (cons_up_default_function): Save and restore
11859 processing_explicit_instantiation around calls to grokfield.
11860 * parse.y (finish_member_template_decl): New function.
11861 (component_decl_1): Use it.
11862 (fn.def2): Likewise.
11863 (template_arg_list_opt): New nonterminal.
11864 (template_type): Use it.
11865 (self_template_type): Likewise.
11866 (template_id): Likewise.
11867 (object_template_id): Likewise.
11868 (notype_template_declarator): Likwise.
11869 (begin_explicit_instantiation): Likewise.
11870 (end_explicit_instantiation): Likewise.
11871 (explicit_instantiation): Use them.
11872 * pt.c (coerce_template_parms): Add parameters.
11873 (processing_explicit_instantiation): New variable.
11874 (convert_nontype_parameter): New function.
11875 (determine_overloaded_function): Likewise.
11876 (begin_explicit_instantiation): Likewise.
11877 (end_explicit_instantiation): Likewise.
11878 (retrieve_specialization): Likewise.
11879 (register_specialization): Likewise.
11880 (processing_explicit_specialization): Removed.
11881 (determine_specialization): Handle specializations of member
11882 functions of template class instantiations.
11883 (check_explicit_specialization): Refine to conform to standard.
11884 (comp_template_parms): New function.
11885 (coerce_template_parms): Call convert_nontype_parameter.
11886 (tsubst): Refine handling of member templates. Use
11887 register_specialization.
11888 (instantiate_template): Use retrieve_specialization.
11889 (do_decl_instantiation): Likewise.
11890 (instantiate_decl): Likewise.
11891 (type_unification): Improve handling of explict template
11892 arguments.
11893 * tree.c (mapcar): Return error_mark_node, rather than aborting,
11894 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11895 * typeck.c (build_unary_op): Call determine_specialization, rather
11896 than determine_explicit_specialization.
11897
11898 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
11899
11900 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11901
11902 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11903
11904 * error.c (dump_decl): For enum tags, output the tag, not its value.
11905
11906 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
11907
11908 * decl.c (init_decl_processing): Only call init_rtti_processing
11909 FLAG_RTTI is set.
11910
11911 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
11912
11913 * init.c (build_new_1): Split out from build_new.
11914 (build_new): Just return a NEW_EXPR.
11915 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11916
11917 * decl2.c (get_temp_regvar): Tweak.
11918
11919 * cp-tree.h (TREE_CALLS_NEW): Comment out.
11920 * class.c (resolves_to_fixed_type_p): Remove use.
11921 * method.c (build_opfncall): Likewise.
11922 * call.c (build_new_op): Likewise.
11923
11924 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11925
11926 * exception.cc (__eh_alloc, __eh_free): New fns.
11927 (__cp_push_exception, __cp_pop_exception): Use them.
11928 (__uncatch_exception): Call terminate here if no exception.
11929 * except.c (build_terminate_handler): New fn.
11930 (expand_start_catch_block): Use it.
11931 (expand_exception_blocks): Likewise.
11932 (alloc_eh_object): New fn.
11933 (expand_throw): Use it. Protect exception init with terminate.
11934 * typeck.c (build_modify_expr): Remove code that ignores trivial
11935 methods.
11936
11937 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11938
11939 * call.c (add_builtin_candidate): Add default case in enumeration
11940 switch.
11941 (build_new_op): Likewise.
11942 (convert_like): Likewise.
11943 * cvt.c (build_expr_type_conversion): Likewise.
11944 * tree.c (real_lvalue_p): Likewise.
11945 (lvalue_p): Likewise.
11946 (cp_tree_equal): Likewise.
11947 * typeck.c (comptypes): Likewise.
11948 (build_component_ref): Likewise.
11949 (build_function_call_real): Likewise.
11950 (build_binary_op_nodefault): Likewise.
11951 (build_unary_op): Likewise.
11952 (build_modify_expr): Likewise.
11953 * typeck2.c (initializer_constant_valid_p): Likewise.
11954
11955 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
11956
11957 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11958
11959 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
11960
11961 * pt.c (coerce_template_parms): Make sure to digest_init if
11962 possible.
11963
11964 * decl.c (duplicate_decls): Make the newdecl virtual if the
11965 olddecl was, just as is done with other attributes of olddecl.
11966
11967 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11968
11969 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11970 address of an OFFSET_REF.
11971
11972 * cp-tree.def: Add AGGR_INIT_EXPR.
11973 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11974 AGGR_INIT_EXPR where appropriate.
11975 * expr.c (cplus_expand_expr): Likewise. Simplify.
11976
11977 * decl2.c (finish_file): Remove call to register_exception_table.
11978
11979 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11980
11981 * pt.c (instantiate_class_template): Don't do injection when
11982 processing_template_decl is true, as pollutes current_binding_level
11983 for base classes.
11984
11985 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
11986
11987 * pt.c (maybe_fold_nontype_arg): Add prototype.
11988
11989 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11990
11991 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11992 * error.c (dump_expr): Likewise.
11993
11994 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
11995
11996 * typeck.c (build_function_call_real): Remove "inline called before
11997 definition" pedwarn.
11998
11999 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12000
12001 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12002
12003 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12004
12005 * pt.c (type_unification_real): Change __null to type void* with
12006 a warning.
12007
12008 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
12009
12010 * call.c (implicit_conversion): Don't call
12011 build_user_type_conversion_1 with a NULL expr, since it will
12012 crash.
12013
12014 * pt.c (unify): Don't try to unify array bounds if either array is
12015 unbounded.
12016
12017 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12018
12019 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12020 Replace extern decls with casts.
12021
12022 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12023 Update last_parm_cleanup_insn.
12024 (store_after_parms): Remove.
12025 * cp-tree.h: Adjust.
12026
12027 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12028
12029 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12030 (finish_file): Check DECL_COMDAT instead of weak|one_only.
12031 (import_export_vtable): Use make_decl_one_only instead of
12032 comdat_linkage for win32 tweak.
12033 (import_export_decl): Likewise.
12034 * pt.c (mark_decl_instantiated): Likewise.
12035
12036 * decl2.c (finish_file): Lose handling of templates in pending_statics.
12037
12038 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12039
12040 * decl2.c (finish_file): Lose call to expand_builtin_throw.
12041 * except.c (expand_builtin_throw): Remove.
12042 * cp-tree.h: Remove ptr_ptr_type_node.
12043 * decl.c: Likewise.
12044
12045 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
12046
12047 * decl.c (ptr_ptr_type_node): Define.
12048 (init_decl_processing): Initialize it.
12049 * cp-tree.h: Declare it.
12050 * exception.cc (__cp_exception_info): Use __get_eh_info.
12051 (__cp_push_exception): Likewise.
12052 (__cp_pop_exception): Likewise.
12053
12054 From Scott Snyder <snyder@d0sgif.fnal.gov>:
12055 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12056 saved_pc.
12057 (init_exception_processing): Removed saved_pc initialization.
12058
12059 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
12060
12061 * pt.c (instantiate_decl): Defer all templates but inline functions.
12062
12063 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12064
12065 * init.c (expand_vec_init): Don't fold a list of parameters.
12066
12067 * decl.c (copy_args_p): Handle copy elision for types with virtual
12068 bases.
12069 * call.c (build_over_call): Likewise.
12070
12071 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
12072
12073 * pt.c (lookup_template_function): Copy the template arguments,
12074 not just the list containing them, to the permanent obstack.
12075
12076 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12077
12078 * except.c (expand_start_catch_block): suspend_momentary for the
12079 terminate handler.
12080
12081 * error.c (dump_decl): Handle LOOKUP_EXPR.
12082
12083 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
12084
12085 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12086 permanent obstack if we are processing a template decl.
12087 * typeck.c (build_static_cast): Likewise.
12088 (build_const_cast): Likewise.
12089 (build_reinterpret_cast): Likewise.
12090
12091 * pt.c (coerce_template_parms): Coerce some expressions, even
12092 when processing_template_decl.
12093
12094 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12095
12096 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12097 handling of pointer difference expressions.
12098
12099 * typeck.c (comp_target_types): Comparison of function/method types
12100 is independent of nptrs.
12101
12102 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
12103
12104 * pt.c (tsubst): Avoid creating pointer to reference and
12105 reference to reference types.
12106
12107 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12108
12109 * parse.y (do_id): New nonterminal.
12110 (template_id): Use it.
12111
12112 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12113
12114 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12115 * spew.c (yylex): Don't do_identifier here.
12116 * decl2.c (build_expr_from_tree): Revert last change.
12117
12118 * decl2.c (build_expr_from_tree): Expand the name for a method call.
12119 * parse.y (object_template_id): Don't try to take the DECL_NAME.
12120
12121 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12122
12123 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12124 alloc_expr.
12125 * call.c (build_op_delete_call): Adjust.
12126
12127 * except.c (expand_end_catch_block): Lose rethrow region.
12128 (expand_start_catch_block): Likewise.
12129 (expand_end_catch_block): Don't expand_leftover_cleanups.
12130
12131 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12132
12133 * pt.c (tsubst): Remove tree_cons call (places redundant info into
12134 DECL_TEMPLATE_INSTANTIATION).
12135
12136 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12137
12138 * tree.c (is_overloaded_fn): Handle getting a fn template.
12139 (really_overloaded_fn): Likewise.
12140 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12141 * pt.c (check_explicit_specialization): Tweak.
12142 (determine_explicit_specialization): Tweak.
12143
12144 * tree.c, cp-tree.h (get_target_expr): New fn.
12145
12146 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
12147
12148 * pt.c (check_explicit_specialization): Fix misspelling in
12149 diagnostic: `preceeded'.
12150 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12151 `conversiona'.
12152
12153 1997-12-02 Mark Mitchell <mmitchell@usa.net>
12154
12155 * pt.c (determine_explicit_specialization): Avoid an internal
12156 error for bad specializations.
12157
12158 * method.c (build_overload_value): Handle SCOPE_REF.
12159
12160 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
12161
12162 * class.c (prepare_fresh_vtable): Enable even more complex MI
12163 vtable names.
12164
12165 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12166
12167 * exception.cc (__check_eh_spec): Optimize a bit.
12168
12169 * exception.cc (__cp_pop_exception): Lose handler arg.
12170 * except.c (do_pop_exception): Likewise.
12171 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12172 (expand_end_catch_block): Likewise.
12173
12174 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12175
12176 * pt.c (check_explicit_specialization): Complain about using a
12177 template-id for a non-specialization.
12178
12179 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
12180
12181 * repo.c: Prototype rindex only if needed.
12182 * xref.c: Likewise.
12183
12184 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12185
12186 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12187
12188 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12189
12190 * typeck.c (build_const_cast): Handle references here instead of
12191 handing off to convert_to_reference.
12192
12193 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12194 TerminateFunctionCall.
12195 (init_exception_processing): Likewise. Terminate et al are now
12196 the fns, not ADDR_EXPRs.
12197 (various): Lose redundant assemble_external calls.
12198 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12199
12200 * cp-tree.h (struct lang_decl_flags): Add comdat.
12201 (DECL_COMDAT): New macro.
12202 * decl.c (duplicate_decls): Propagate it.
12203 (cp_finish_decl): Handle it.
12204 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12205
12206 * class.c: Remove static pending_hard_virtuals.
12207 (add_virtual_function): Take pointers to pending_virtuals
12208 and pending_hard_virtuals.
12209 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
12210
12211 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12212
12213 * decl2.c (import_export_vtable): If we support one_only but not
12214 weak symbols, mark instantiated template vtables one_only.
12215 (import_export_decl): Likewise for tinfo functions.
12216 (finish_vtable_vardecl): Also write out vtables from explicitly
12217 instantiated template classes.
12218 * pt.c (mark_class_instantiated): Revert last change.
12219
12220 * except.c (expand_throw): Call mark_used on the destructor.
12221
12222 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
12223
12224 * lex.c (lang_init): Enable flag_exceptions by default if no
12225 command line switch was specified.
12226
12227 1997-11-26 Mark Mitchell <mmitchell@usa.net>
12228
12229 * pt.c (unify): Handle `void' template parameters in
12230 specializations.
12231
12232 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
12233
12234 * rtti.c (build_dynamic_cast): Handle template case here.
12235 (build_dynamic_cast_1): Not here.
12236
12237 * typeck2.c (digest_init): Make copies where appropriate.
12238
12239 * decl2.c (delete_sanity): resolve_offset_ref.
12240
12241 * except.c: Call terminate without caching so many bits.
12242
12243 * except.c (expand_start_catch_block): Fix catching a reference
12244 to pointer.
12245
12246 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12247
12248 * init.c (build_new): Copy size to the saveable obstack.
12249
12250 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12251 TRY_CATCH_EXPR for now.
12252
12253 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12254
12255 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12256 has DECL_LANG_SPECIFIC.
12257
12258 * exception.cc (struct cp_eh_info): Add handlers field.
12259 (__cp_push_exception): Initialize it.
12260 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
12261 (__throw_bad_exception): Remove.
12262 * except.c (call_eh_info): Add handlers field.
12263 (get_eh_handlers): New fn.
12264 (push_eh_cleanup): Increment handlers.
12265
12266 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12267
12268 * except.c (expand_start_eh_spec): Use the try/catch code.
12269 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
12270 doing everything inline.
12271 (init_exception_processing): throw_type_match now takes
12272 const void pointers.
12273 * exception.cc (__check_eh_spec): New fn.
12274 * inc/exception: Neither terminate nor unexpected return.
12275 * decl.c: Make const_ptr_type_node public.
12276 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12277
12278 * except.c (expand_start_catch_block): We only need the rethrow
12279 region for non-sjlj exceptions.
12280 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
12281
12282 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
12283
12284 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12285 (various.o): Likewise.
12286 * inc/new: Add placement deletes. Add throw specs for default new.
12287 * new.cc (set_new_handler): Move here from libgcc2.
12288 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12289 (new): Move from libgcc2. Throw bad_alloc.
12290 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12291 * decl.c (init_decl_processing): Update exception specs on new and
12292 delete.
12293
12294 * method.c (build_decl_overload_real): Don't mess with global
12295 placement delete.
12296
12297 * init.c (build_new): Check for null throw spec, not nothrow_t.
12298
12299 * decl.c (duplicate_decls): Don't complain about different exceptions
12300 from an internal declaration.
12301
12302 * call.c (build_op_delete_call): Fix check for member fns again.
12303
12304 * decl2.c (import_export_decl): Interface hackery affects
12305 virtual synthesized methods.
12306
12307 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12308
12309 * decl.c (start_decl): Don't just complain about a mismatched
12310 scope, fix it.
12311
12312 * decl.c (make_implicit_typename): Handle case where t is not
12313 actually from context.
12314 * tree.c (get_type_decl): Lose identifier case.
12315 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12316 * parse.y (nonnested_type): Just use lookup_name.
12317 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12318
12319 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
12320
12321 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12322 T was built in C language context (for example, by
12323 output_func_start_profiler).
12324
12325 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12326
12327 * decl.c (make_implicit_typename): New fn.
12328 (lookup_name_real): Use it. Use current_class_type as the context.
12329
12330 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
12331
12332 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12333
12334 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12335
12336 * friend.c (do_friend): Warn about non-template friends in templates.
12337
12338 * call.c (build_op_delete_call): Fix handling of inherited delete.
12339
12340 * search.c (dfs_record_inheritance): Ignore template type parms.
12341
12342 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
12343
12344 * call.c (build_new_op): Fix copy error.
12345 (build_op_new_call): New fn.
12346 (build_op_delete_call): New fn.
12347 * cp-tree.h: Declare them.
12348 * init.c (build_new): Use them. Support placement delete.
12349 (build_x_delete): Use build_op_delete_call.
12350 (build_delete): Likewise.
12351 * decl2.c (delete_sanity): Likewise.
12352 (coerce_delete_type): Don't complain about placement delete.
12353
12354 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12355
12356 * call.c (build_new_function_call): Remove unused 'obj' parm.
12357 * cp-tree.h, typeck.c: Adjust.
12358
12359 * init.c (build_new): Make the cleanup last longer.
12360 (expand_vec_init): Call do_pending_stack_adjust.
12361
12362 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
12363
12364 * pt.c (do_type_instantiation): Fix typo.
12365 (mark_class_instantiated): If we support one_only but not weak
12366 symbols, don't mark this as known.
12367
12368 * init.c (build_new): Handle vec delete in EH cleanup.
12369
12370 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12371
12372 * call.c (build_method_call): Call complete_type before checking
12373 for destructor.
12374
12375 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
12376
12377 * decl.c (add_block_current_level): Delete.
12378 * init.c (build_vec_delete_1): Delete build_block and
12379 add_block_current_level calls.
12380
12381 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
12382
12383 * init.c (build_new): Handle freeing allocated memory when the
12384 constructor throws.
12385
12386 * call.c (build_new_method_call): Fix flags arg.
12387
12388 * pt.c (do_type_instantiation): Don't try to instantiate
12389 member templates.
12390 (mark_decl_instantiated): If we support one_only but not
12391 weak symbols, mark this one_only.
12392 * decl2.c (import_export_vtable): Don't defer handling of vtables
12393 if MULTIPLE_SYMBOL_SPACES.
12394
12395 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12396
12397 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
12398
12399 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
12400
12401 * except.c (do_pop_exception): Return a value.
12402
12403 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12404
12405 * call.c (build_new_method_call): Handle getting a
12406 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
12407 if we got template parms.
12408 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
12409 not just the args.
12410 * decl2.c (build_expr_from_tree): Tweak last change.
12411 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
12412 (maybe_fold_nontype_arg): Split out from tsubst_copy.
12413 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
12414
12415 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12416
12417 * pt.c (tsubst_copy): Handle explicit template arguments in
12418 function calls.
12419 * typeck.c (build_x_function_call): Likewise.
12420 * decl2.c (build_expr_from_tree): Lookup function name if it
12421 hasn't been done.
12422
12423 * pt.c (tsubst): Instantiate template functions properly when
12424 template parameter does not appear in function arguments and return
12425 type.
12426 (comp_template_args): Handle member templates required by tsubst.
12427
12428 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12429
12430 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12431 previous change.
12432
12433 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12434
12435 * pt.c (coerce_template_parms): Tweak error message.
12436
12437 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12438 return type defaults to `int', even if there are storage-class
12439 specifiers.
12440
12441 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12442
12443 Complete nested exception support.
12444 * except.c (do_pop_exception): Split out...
12445 (push_eh_cleanup): From here. Handle the EH region by hand.
12446 (expand_start_catch_block): Add a new level for the catch parm.
12447 Move the rethrow region outside the two cleanup regions.
12448 Protect the initializer for the catch parm with terminate.
12449 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
12450 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
12451 popping off the middle of the stack.
12452 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12453 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12454 (build_cplus_new): Only wrap CALL_EXPRs.
12455 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12456 the constructor call.
12457
12458 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12459
12460 * Make-lang.in (c++.distdir): Make inc subdirectory.
12461
12462 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12463
12464 * decl2.c (finish_file): Put back some code.
12465
12466 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12467
12468 * decl2.c (finish_file): Remove redundant code.
12469 * method.c (emit_thunk): Don't let the backend defer generic thunks.
12470
12471 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12472
12473 * except.c (call_eh_info): Split out...
12474 (push_eh_info): From here.
12475 (expand_builtin_throw): Use it.
12476 (expand_start_catch_block): Move region start back.
12477
12478 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
12479
12480 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12481 (real_yylex): Record wide strings using target endianness, not host.
12482
12483 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
12484
12485 * repo.c (rindex): Add decl unconditionally.
12486 (get_base_filename, open_repo_file): Don't cast rindex.
12487 * xref.c (rindex): Add decl unconditionally.
12488 (index): Remove unused decl.
12489 (open_xref_file): Don't cast rindex.
12490
12491 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12492
12493 * class.c (build_vbase_path): Propagate the result type properly.
12494
12495 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
12496
12497 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12498 remaining use of saved_throw_type with a call to get_eh_type.
12499
12500 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
12501
12502 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12503 (file_name_nondirectory): New function, doing the same as the macro.
12504 (set_typedecl_interface_info): Use it instead of the macro.
12505 (check_newline): Likewise.
12506 (handle_cp_pragma): Likewise.
12507
12508 * repo.c (get_base_filename): Cast result of rindex to char*.
12509 (open_repo_file): Likewise.
12510 * xref.c (open_xref_file): Likewise.
12511 * error.c (dump_char): Make its arg int, not char.
12512
12513 * except.c (push_eh_info): Pass the number of fields - 1 down, not
12514 the exact number of fields.
12515
12516 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12517
12518 Support for nested exceptions.
12519 * tinfo2.cc (__is_pointer): New fn.
12520 * exception.cc (struct cp_eh_info): Define.
12521 (__cp_exception_info, __uncatch_exception): New fns.
12522 (__cp_push_exception, __cp_pop_exception): New fns.
12523 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12524 Lose empty_fndecl.
12525 (init_exception_processing): Likewise. __eh_pc is now external.
12526 (push_eh_info): New fn.
12527 (get_eh_{info,value,type,caught}): New fns.
12528 (push_eh_cleanup): Just call __cp_pop_exception.
12529 (expand_start_catch_block): Use push_eh_info. Start the eh region
12530 sooner.
12531 (expand_end_eh_spec): Use push_eh_info.
12532 (expand_throw): Call __cp_push_exception to set up the exception info.
12533 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
12534 when we rethrow.
12535 (expand_builtin_throw): Don't refer to empty_fndecl.
12536
12537 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12538
12539 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12540
12541 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
12542
12543 * method.c (build_template_parm_names, build_decl_overload_real):
12544 Add static to definitions.
12545 * pt.c (add_to_template_args, note_template_header,
12546 processing_explicit_specialization, type_unification_real): Likewise.
12547 ({determine,check}_explicit_specialization): Use a single string for
12548 error messages.
12549
12550 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12551
12552 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12553 (expand_end_catch_block): Likewise.
12554 (expand_end_eh_spec): Likewise.
12555
12556 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
12557
12558 * decl.c (duplicate_decls): Handle template specializations
12559 correctly.
12560 * error.c (dump_function_name): Fix printing of specializations of
12561 member functions that are not member templates.
12562 * cp-tree.h (processing_specialization): Make global.
12563 * pt.c (processing_specialization): Likewise.
12564 * lex.c (cons_up_default_function): Save and restore
12565 processing_specialization to avoid confusion.
12566
12567 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12568
12569 * decl.c (init_decl_processing): Give null_node unknown* type.
12570 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12571 (common_type): Likewise.
12572 * error.c (args_as_string): Recognize null_node.
12573
12574 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12575
12576 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12577 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12578
12579 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12580
12581 * Make-lang.in (g++): Include prefix.o.
12582
12583 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
12584
12585 * pt.c (determine_explicit_specialization): Initialize "dummy"
12586 to keep Purify quiet.
12587
12588 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12589
12590 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12591 (build_overload_int): Not here.
12592
12593 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
12594
12595 * class.c (build_type_pathname): Remove.
12596 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12597
12598 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
12599
12600 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12601 &&label GNU extension.
12602
12603 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
12604
12605 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12606 so as to avoid incorrect manglings.
12607 * method.c (build_decl_overload_real): Don't mangle return types
12608 for constructors.
12609
12610 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12611
12612 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12613 scratch_tree_cons): Define as macros for now.
12614 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12615 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12616 typeck2.c: Use them and the expression_obstack variants.
12617
12618 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12619
12620 * decl.c (store_return_init): Allow classes with explicit ctors to
12621 be used with the named return values extension.
12622
12623 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
12624
12625 * pt.c (instantiate_decl): Fix previous change.
12626
12627 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12628
12629 * pt.c (tsubst): Fix thinko.
12630 (instantiate_decl): Really use the original template.
12631
12632 * call.c (build_new_method_call): Use simple constructor_name for
12633 error messages.
12634
12635 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
12636
12637 * method.c (build_underscore_int): Don't use ANSI specific
12638 features.
12639
12640 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12641
12642 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12643 for our key method; it might have been inlined by -O3.
12644
12645 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
12646
12647 * decl.c (make_typename_type): Do not try to call lookup_field for
12648 non-aggregate types.
12649
12650 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
12651
12652 * typeck.c (build_reinterpret_cast): Tweak.
12653
12654 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12655
12656 * typeck.c (build_reinterpret_cast): Converting a void pointer
12657 to function pointer with a reinterpret_cast produces a warning
12658 if -pedantic is issued.
12659
12660 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12661
12662 * typeck.c (c_expand_return): Don't warn about returning a
12663 reference-type variable as a reference.
12664
12665 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12666
12667 * method.c (build_static_name): Fix typo.
12668
12669 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
12670
12671 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12672 OLDDECL before we try to do DECL_USE_TEMPLATE.
12673
12674 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12675
12676 * decl.c (duplicate_decls): Don't warn about template instances.
12677
12678 * typeck.c (mark_addressable): Lose ancient code that unsets
12679 DECL_EXTERNAL.
12680
12681 * pt.c (do_decl_instantiation): Lose support for instantiating
12682 non-templates.
12683
12684 * call.c (build_new_function_call): Fix handling of null explicit
12685 template args.
12686 (build_new_method_call): Likewise.
12687
12688 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
12689
12690 * method.c (build_underscore_int): Fix typo.
12691
12692 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
12693
12694 * tree.c (print_lang_statistics): #if 0 call to
12695 print_inline_obstack_statistics until its definition is checked in.
12696
12697 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12698
12699 * decl2.c (finish_file): Move dump_tree_statistics to end.
12700
12701 * pt.c (instantiate_decl): Look for the original template.
12702 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12703 of member templates.
12704
12705 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12706
12707 * Makefile.in (g++FAQ.*): New rules.
12708 (CONFLICTS): Update.
12709 * g++FAQ.texi: Moved from libg++.
12710
12711 * parse.y (PFUNCNAME): Only specify the type once.
12712
12713 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
12714
12715 * lex.c (real_yylex): Clean up the code to fully behave the way
12716 the c-lex.c parser does for complex and real numbers.
12717
12718 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12719
12720 * method.c (build_decl_overload_real): Reformat.
12721
12722 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
12723
12724 * method.c (synthesize_method): If at_eof, determine our linkage.
12725
12726 1997-09-29 Paul Eggert <eggert@twinsun.com>
12727
12728 * lex.c (real_yylex): Treat `$' just like `_', except issue a
12729 diagnostic if !dollars_in_ident or if pedantic.
12730
12731 * lang-specs.h (@c++): -ansi no longer implies -$.
12732
12733 * decl2.c (lang_decode_option):
12734 -traditional and -ansi now do not mess with
12735 dollars_in_ident.
12736
12737 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
12738
12739 * Makefile.in (parse.o, decl.o): Also depend on
12740 $(srcdir)/../except.h $(srcdir)/../output.h.
12741 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12742 $(srcdir)/../except.h $(srcdir)/../output.h.
12743 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12744 ../insn-codes.h.
12745
12746 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12747
12748 * expr.c (cplus_expand_expr): Make it static.
12749
12750 * decl2.c, init.c, typeck.c: Include "expr.h".
12751 (expand_expr): Use proper values when calling the function.
12752
12753 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12754
12755 * lang-options.h: New -Wold-style-cast flag.
12756 * cp-tree.h (warn_old_style_cast): New variable.
12757 * decl2.c (warn_old_style_cast): Likewise.
12758 (lang_decode_option): Support -Wold-style-cast.
12759 (reparse_absdcl_as_casts): Produce old-style-cast warning.
12760
12761 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12762
12763 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12764 TREE_USED, reset value based on already_used.
12765
12766 * init.c (expand_member_init): Revert change.
12767
12768 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12769
12770 * cp-tree.h, decl.c, decl2.c, pt.c:
12771 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
12772
12773 * decl2.c (lang_decode_option): Add missing ;.
12774
12775 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12776
12777 * friend.c (do_friend): Disable injection for all template-derived
12778 decls.
12779 * decl2.c (lang_decode_option): Handle -fguiding-decls.
12780 * parse.y (notype_template_declarator): New nonterminal.
12781 (direct_notype_declarator): Use it.
12782 (complex_direct_notype_declarator): Likewise.
12783 (object_template_id): Accept any kind of identifier after TEMPLATE.
12784 (notype_qualified_id): Don't add template declarators here.
12785
12786 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
12787
12788 * call.c (add_template_candidate): Add explicit_targs parameter.
12789 (build_scoped_method_call): Use it.
12790 (build_overload_call_real): Likewise.
12791 (build_user_type_conversion_1): Likewise.
12792 (build_new_function_call): Likewise.
12793 (build_object_call): Likewise.
12794 (build_new_op): Likewise.
12795 (build_new_method_call): Likewise.
12796 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12797 (build_new_method_call): Likewise.
12798
12799 * class.c (finish_struct_methods): Add specialization pass to
12800 determine which methods were specializing which other methods.
12801 (instantiate_type): Handle TEMPLATE_ID_EXPR.
12802
12803 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12804
12805 * cp-tree.h (name_mangling_version): New variable.
12806 (flag_guiding_decls): Likewise.
12807 (build_template_decl_overload): New function.
12808 (begin_specialization): Likewise.
12809 (reset_specialization): Likewise.
12810 (end_specialization): Likewise.
12811 (determine_explicit_specialization): Likewise.
12812 (check_explicit_specialization): Likewise.
12813 (lookup_template_function): Likewise.
12814 (fn_type_unification): Add explicit_targs parameter.
12815 (type_unification): Likewise.
12816
12817 * decl.c (duplicate_decls): Add smarts for explicit
12818 specializations.
12819 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12820 specializations.
12821 (grokfndecl): Call check_explicit_specialization.
12822
12823 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12824 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12825 (check_classfn): Handle specializations.
12826
12827 * error.c (dump_function_name): Print specialization arguments.
12828
12829 * friend.c (do_friend): Don't call pushdecl for template
12830 instantiations.
12831
12832 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12833
12834 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12835 and -fno-guiding-decls.
12836
12837 * lex.c (identifier_type): Return PFUNCNAME for template function
12838 names.
12839
12840 * method.c (build_decl_overload_real): New function.
12841 (build_template_parm_names): New function.
12842 (build_overload_identifier): Use it.
12843 (build_underscore_int): New function.
12844 (build_overload_int): Use it. Add levels for template
12845 parameters.
12846 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
12847 (build_overload_nested_names): Handle template type parameters.
12848 (build_template_decl_overload): New function.
12849
12850 * parse.y (YYSTYPE): New ntype member.
12851 (nested_name_specifier): Use it.
12852 (nested_name_specifier_1): Likewise.
12853 (PFUNCNAME): New token.
12854 (template_id, object_template_id): New non-terminals.
12855 (template_parm_list): Note specializations.
12856 (template_def): Likewise.
12857 (structsp): Likewise.
12858 (fn.def2): Handle member template specializations.
12859 (component_decl_1): Likewise.
12860 (direct_notype_declarator): Handle template-ids.
12861 (component_decl_1): Likewise.
12862 (direct_notype_declarator): Handle template-ids.
12863 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12864
12865 * pt.c (processing_specializations): New variable.
12866 (template_header_count): Likewise.
12867 (type_unification_real): New function.
12868 (processing_explicit_specialization): Likewise.
12869 (note_template_header): Likewise.
12870 (is_member_template): Handle specializations.
12871 (end_template_decl): Call reset_specialization.
12872 (push_template_decl): Handle member template specializations.
12873 (tsubst): Likewise.
12874 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12875 (instantiate_template): Handle specializations.
12876 (instantiate_decl): Likewise.
12877 (fn_type_unification): Handle explicit_targs.
12878 (type_unification): Likewise. Allow incomplete unification
12879 without an error message, if allow_incomplete.
12880 (get_bindings): Use new calling sequence for fn_type_unification.
12881
12882 * spew.c (yylex): Handle PFUNCNAME.
12883
12884 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12885 (really_overloaded_fn): Likewise.
12886 (get_first_fn): Handle function templates.
12887
12888 * typeck.c (build_x_function_call): Use really_overloaded_fn.
12889 Handle TEMPLATE_ID_EXPR.
12890 (build_x_unary_op): Likewise.
12891 (build_unary_op): Likewise.
12892 (mark_addressable): Templates whose address is taken are marked
12893 as used.
12894
12895 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12896
12897 * decl.c (init_decl_processing): Declare __builtin_constant_p as
12898 accepting any kind of type, not only int.
12899
12900 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12901
12902 * search.c (get_matching_virtual): Notice virtual bases when sorrying
12903 about covariant returns.
12904
12905 * parse.y (member_init): Also imply typename here. Remove ancient
12906 extension for initializing base members.
12907
12908 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12909
12910 Handle multi-level typenames and implicit typename in base list.
12911 * parse.y (typename_sub{,[0-2]}): New rules.
12912 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12913 (nonnested_type): New rule.
12914 (complete_type_name): Use it.
12915 (base_class.1): Use typename_sub and nonnested_type.
12916 (nested_name_specifier): Don't elide std:: here.
12917 * decl.c (make_typename_type): Handle getting a type for NAME.
12918 (lookup_name_real): Turn std:: into :: here.
12919
12920 Rvalue conversions were removed in London.
12921 * call.c (is_subseq): Don't consider lvalue transformations.
12922 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12923 (joust): Re-enable ?: kludge.
12924
12925 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
12926
12927 * decl.c (start_function): Up warning of no return type to be a
12928 pedwarn.
12929
12930 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12931
12932 * init.c (expand_member_init): Don't set TREE_USED.
12933 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12934 set,don't clear TREE_USED wholesale.
12935
12936 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
12937
12938 * call.c (build_over_call): Do require_complete_type before
12939 build_cplus_new.
12940
12941 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12942
12943 * search.c (lookup_field): Call complete_type in all cases.
12944
12945 * decl.c (finish_function): Just warn about flowing off the end.
12946
12947 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12948
12949 * decl.c (grokparms): Don't bash a permanent list node if we're
12950 in a function.
12951
12952 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
12953
12954 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12955
12956 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12957
12958 * call.c (build_new_op): Give better error for syntactically
12959 correct, but semantically invalid, use of undeclared template.
12960
12961 * call.c (compare_qual): Handle pmfs.
12962
12963 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12964 after the exception spec.
12965
12966 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12967
12968 * call.c (null_ptr_cst_p): Integer type, not integral type.
12969
12970 * call.c (joust): Disable warnings until they can be moved to the
12971 right place.
12972
12973 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
12974
12975 * Makefile.in, config-lang.in: Convert to autoconf.
12976
12977 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12978
12979 * decl.c (lookup_name_real): Add implicit 'typename' to types from
12980 base classes.
12981
12982 * pt.c (most_specialized_class): Fix typo.
12983 (tsubst): Move constant folding to TREE_VEC case.
12984
12985 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
12986
12987 * pt.c (do_poplevel): Don't warn about unused local variables
12988 while processing_template_decl since we don't always know whether
12989 or not they will need constructing/destructing.
12990
12991 * pt.c (uses_template_parms): Check the values of an enumeration
12992 type to make sure they don't depend on template parms.
12993
12994 * decl.c (make_typename_type): Don't lookup the field if the
12995 context uses template parms, even if we're not
12996 processing_template_decl at the moment.
12997
12998 * pt.c (coerce_template_parms): Avoid looking at the
12999 TYPE_LANG_DECL portion of a typename type, since there won't be
13000 one.
13001 (tsubst): Do constant folding as necessary to make sure that
13002 arguments passed to lookup_template_class really are constants.
13003
13004 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
13005
13006 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13007 * decl2.c (finish_file): Only register exception tables if we
13008 need to.
13009
13010 * decl.c (init_decl_processing): Add __builtin_[fs]p.
13011
13012 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13013
13014 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13015
13016 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
13017
13018 * error.c (dump_decl): Avoid crashing when presented with a
13019 uninitialized constant, as can occur with a template parameter.
13020 (dump_expr): Make sure that there are enough levels of
13021 current_template_parms before we start diving through them.
13022
13023 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
13024
13025 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13026 c-typeck.c.
13027
13028 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13029
13030 * except.c (expand_throw): Call build_delete for all
13031 exception types, not just objects with destructors.
13032
13033 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
13034
13035 * decl.c (current_local_enum): Remove static.
13036 * pt.c (tsubst_enum): Save and restore value of current_local_enum
13037 in case template is expanded in enum decl.
13038 (instantiate_class_template): Use new tsubst_enum signature.
13039 (tsubst_expr): Likewise.
13040
13041 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
13042
13043 * pt.c (begin_member_template_processing): Take a function as
13044 argument, not a set of template arguments. Use the template
13045 parameters, rather than the arguments. Handle non-type parameters
13046 correctly. Push a binding level for the parameters so that multiple
13047 member templates using the same parameter names can be declared.
13048 (end_member_template_processing): Pop the binding level.
13049 (push_template_decl): Mark member templates as static when
13050 appropriate.
13051
13052 * lex.c (do_pending_inlines): Pass the function, not its template
13053 arguments, to begin_member_template_processing.
13054 (process_next_inline): Likewise.
13055 (do_pending_defargs): Likewise.
13056
13057 * error.c (dump_expr): Obtain the correct declaration for a
13058 TEMPLATE_CONST_PARM.
13059
13060 * call.c (add_template_conv_candidate): New function.
13061 (build_object_call): Handle member templates, as done in the other
13062 build_ functions.
13063
13064 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
13065
13066 * decl.c (replace_defag): Undo previous change.
13067 * lex.c (do_pending_defargs): Deal with member templates.
13068
13069 * pt.c (is_member_template): Avoid crashing when passed a
13070 non-function argument.
13071
13072 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
13073
13074 * class.c (grow_method): Remove check for redeclaration.
13075
13076 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
13077
13078 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13079 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13080 (PRIMARY_TEMPLATE_P): Use it.
13081 * call.c (build_overload_call_real): Use it.
13082 * class.c (instantiate_type): Likewise.
13083 * decl.c (decls_match): Likewise.
13084 * method.c (build_overload_identifier): Likewise.
13085 * pt.c (push_template_decl): Likewise.
13086 (classtype_mangled_name): Likewise.
13087 (lookup_template_class): Likewise.
13088
13089 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13090 DECL_NTPARMS to conform to usage elsewhere.
13091 * call.c (add_template_candidate): Likewise.
13092 * class.c (instantiate_type): Likewise.
13093 * pt.c (instantiate_template): Likewise.
13094 (get_bindings): Likewise.
13095
13096 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13097 is_member_template.
13098
13099 * pt.c (unify): Undo changes to allow multiple levels of template
13100 parameters.
13101 (type_unification): Likewise.
13102 (fn_type_unification): Likewise.
13103 (get_class_bindings): Likewise.
13104 * cp-tree.h (Likewise).
13105
13106 * decl.c (replace_defarg): Check that the type of the default
13107 parameter does not invlove a template type before complaining
13108 about the initialization.
13109
13110 * error.c (dump_expr): Deal with template constant parameters in
13111 member templates correctly.
13112
13113 * pt.c (is_member_template): Deal with class specializations
13114 correctly.
13115 (tsubst): Handle "partial instantiation" of member templates
13116 correctly.
13117
13118 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
13119
13120 * pt.c (type_unification): Change calling sequence to allow for
13121 multiple levels of template parameters.
13122 (tsubst_expr): Likewise.
13123 (tsubst): Likewise.
13124 (tsubst_copy): Likewise.
13125 (instantiate_template): Likewise.
13126 (unify): Likewise.
13127 * call.c (build_overload_call_real): Use it.
13128 (add_builtin_candidate): Use it.
13129 (build_new_method_call): Use it.
13130 * class.c (instantiate_type): Use it.
13131 * decl.c (grokdeclarator): Use it.
13132 * decl2.c (finish_file): Use it.
13133 * method.c (build_overload_identifier): Use it.
13134
13135 * call.c (add_template_candidate): Add additional parameter for
13136 the function return type. Call fn_type_unification istead of
13137 type_unification.
13138 (build_user_type_conversion_1): Handle member templates.
13139 (build_new_function_call): Likewise.
13140 (build_new_op): Likewise.
13141 (build_new_method_call): Likewise.
13142
13143 * class.c (grow_method): Don't give an error message indicating
13144 that two member templates with the same name are ambiguous.
13145 (finish_struct): Treat member template functions just like member
13146 functions.
13147
13148 * cp-tree.h (check_member_template): Add declaration.
13149 (begin_member_template_processing): Likewise.
13150 (end_member_template_processing): Likewise.
13151 (fn_type_unification): Likewise.
13152 (is_member_template): Likewise.
13153 (tsubst): Change prototype.
13154 (tsubst_expr): Likewise.
13155 (tsubst_copy): Likewise.
13156 (instantiate_template): Likewise.
13157 (get_bindings): Likewise.
13158
13159 * decl.c (decls_match): Handle multiple levels of template
13160 parameters.
13161 (pushdecl): Handle template type params just like other type
13162 declarations.
13163 (push_class_level_binding): Return immediately if the
13164 class_binding_level is NULL.
13165 (grokfndecl): If check_classfn() returns a member_template, use
13166 the result of the template, not the template itself.
13167
13168 * decl2.c (check_member_template): New function. Check to see
13169 that the entity declared to be a member template can be one.
13170 (check_classfn): Allow redeclaration of member template functions
13171 with different types; the new functions can be specializations or
13172 explicit instantiations.
13173
13174 * error.c (dump_decl): Handle multiple levels of template
13175 parameters.
13176 (dump_function_decl): Update to handle function templates.
13177
13178 * lex.c (do_pending_inlines): Set up template parameter context
13179 for member templates.
13180 (process_next_inline): Likewise.
13181
13182 * method.c (build_overload_identifier): Adjust for multiple levels
13183 of template parameters.
13184
13185 * parse.y (fn.def2): Add member templates.
13186 (component_decl_1): Likewise.
13187
13188 * pt.c (begin_member_template_processing): New function.
13189 (end_member_template_processing): Likewise.
13190 (is_member_template): Likewise.
13191 (fn_type_unification): Likewise.
13192 (current_template_parms): Return a vector of all the template
13193 parms, not just the innermost level of parms.
13194 (push_template_decl): Deal with the possibility of member
13195 templates.
13196 (lookup_template_class): Likewise.
13197 (uses_template_parms): Likewise.
13198 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13199 TEMPLATE_CONST_PARM to deal with multiple levels of template
13200 arguments. Add processing of TEMPLATE_DECL to produce new
13201 TEMPLATE_DECLs from old ones.
13202 (do_decl_instantiation): Handle member templates.
13203
13204 * search.c (lookup_fnfields_1): Handle member template conversion
13205 operators.
13206
13207 * tree.c (cp_tree_equal): Check the levels, as well as the
13208 indices, of TEMPLATE_CONST_PARMs.
13209
13210 * typeck.c (comptypes): Check the levels, as well as the indices,
13211 fo TEMPLATE_TYPE_PARMs.
13212 (build_x_function_call): Treat member templates like member
13213 functions.
13214
13215 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13216
13217 * typeck.c (c_expand_return): Always convert_for_initialization
13218 before checking for returning a pointer to local.
13219
13220 * pt.c (type_unification): If strict and the function parm doesn't
13221 use template parms, just compare types.
13222
13223 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
13224
13225 * method.c (build_overloaded_value): Replace direct call
13226 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13227
13228 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13229
13230 * typeck.c (convert_arguments): Don't arbitrarily choose the first
13231 of a set of overloaded functions.
13232
13233 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13234
13235 * lex.c (real_yylex): Don't elide __FUNCTION__.
13236
13237 * method.c (build_overload_value): Add in_template parm.
13238 (build_overload_int): Likewise.
13239 (build_overload_identifier): Pass it.
13240
13241 * decl.c (duplicate_decls): Don't bash a previous template
13242 definition with a redeclaration.
13243
13244 * pt.c (unify): float doesn't match double.
13245
13246 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13247 TYPE_DECL. Handle getting non-template types.
13248 * parse.y (explicit_instantiation): Use typespec instead of
13249 aggr template_type.
13250
13251 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
13252
13253 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13254
13255 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
13256
13257 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13258 (compare_ics): Likewise.
13259
13260 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13261
13262 * call.c (joust): Warn about choosing one conversion op over
13263 another because of 'this' argument when the other return type is
13264 better.
13265 (source_type): New fn.
13266
13267 * call.c (build_new_op): Strip leading REF_BIND from first operand
13268 to builtin operator.
13269
13270 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13271 use its RTL.
13272
13273 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13274
13275 * call.c (null_ptr_cst_p): Remove support for (void*)0.
13276
13277 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
13278
13279 * typeck.c (expand_target_expr): Make definition match declaration.
13280
13281 * class.c (get_basefndecls): Make definition match declaration.
13282
13283 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
13284
13285 * input.c (sub_getch): Eventually give up and release the input file.
13286
13287 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13288 right place.
13289
13290 * call.c (joust): Tweak message.
13291
13292 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
13293
13294 * error.c (type_as_string): Put const/volatile on template type
13295 parameters where appropriate.
13296
13297 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
13298
13299 * call.c (strictly_better): Make arguments unsigned ints.
13300
13301 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
13302
13303 * lex.c (real_yylex): Refer to __complex instead of complex.
13304
13305 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
13306
13307 * lex.c (real_yylex): Don't use getc directly.
13308
13309 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13310
13311 * call.c (is_subseq): Don't try to be clever.
13312
13313 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13314
13315 * parse.y, pt.c: Include "except.h".
13316 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13317 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13318 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13319 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13320 prototyping.
13321
13322 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13323
13324 * decl2.c (mark_vtable_entries): Instead of replacing pure
13325 virtuals with a reference to __pure_virtual, copy the decl and
13326 change the RTL.
13327
13328 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13329
13330 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13331
13332 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13333
13334 * pt.c (instantiate_class_template): Call repo_template_used
13335 before finish_prevtable_vardecl.
13336
13337 * call.c (is_subseq): New fn.
13338 (compare_ics): Use it.
13339
13340 * repo.c (finish_repo): Don't crash on no args.
13341
13342 * parse.y (named_complex_class_head_sans_basetype): Handle
13343 explicit global scope.
13344 * decl2.c (handle_class_head): New fn.
13345
13346 * pt.c (unify): Add CONST_DECL case.
13347
13348 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13349
13350 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13351
13352 * cp-tree.h (report_type_mismatch): Add prototype.
13353 * call.c (build_overload_call_real): Remove erroneous fourth
13354 argument to report_type_mismatch.
13355 (build_user_type_conversion_1): Remove erroneous second arg to
13356 tourney.
13357 (build_new_function_call): Likewise.
13358 (build_object_call): Likewise.
13359 (build_new_op): Likewise.
13360 (build_new_method_call): Likewise.
13361
13362 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13363
13364 * error.c (dump_decl): Don't bother processing a function with no
13365 DECL_LANG_SPECIFIC.
13366
13367 * method.c (emit_thunk): Call init_function_start in the macro case.
13368
13369 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
13370
13371 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13372 defined and used to set flag_vtable_thunks.
13373
13374 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13375
13376 * parse.y: Don't clear the inlines from their obstack until they've
13377 all been processed.
13378
13379 * decl.c (duplicate_decls): Don't complain about exception
13380 specification mismatch if flag_exceptions is off.
13381
13382 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
13383
13384 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13385
13386 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
13387
13388 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13389 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13390 Include <stdio.h> before include files that formerly used STDIO_PROTO.
13391
13392 * decl.c, g++spec.c, lex.c, method.c, repo.c:
13393 Include "config.h" first, as per autoconf manual.
13394
13395 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13396
13397 * decl.c (duplicate_decls): Tweak wording.
13398 * lex.c (do_pending_defargs): Don't die if we see a default arg
13399 that isn't a DEFAULT_ARG.
13400 * error.c (dump_expr): Handle DEFAULT_ARG.
13401
13402 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
13403 * lang-options.h: Add -fhandle-exceptions.
13404
13405 * class.c (build_vtable): Vtables are artificial.
13406 (prepare_fresh_vtable): Likewise.
13407
13408 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13409
13410 * cvt.c (ocp_convert): After converting to the target type, set
13411 LOOKUP_NO_CONVERSION.
13412
13413 * call.c (joust): Warn about potentially confusing promotion rules
13414 with -Wsign-promo.
13415 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
13416
13417 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
13418
13419 * exception.cc: Declare __terminate_func with noreturn attribute.
13420
13421 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13422
13423 * parse.y: Break out eat_saved_input, handle errors.
13424 (function_try_block): Use compstmt instead of compstmt_or_error.
13425
13426 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13427
13428 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
13429
13430 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13431
13432 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13433 existence of cc1plus check whether $(LANGUAGES) contains C++.
13434
13435 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13436
13437 * method.c (do_build_copy_constructor): When copying an anonymous
13438 union member loop around to handle nested anonymous unions. Use
13439 the offset of the member relative to the outer structure, not the
13440 union.
13441
13442 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13443
13444 * call.c (resolve_args): New fn.
13445 (build_new_function_call): Use it.
13446 (build_object_call): Likewise.
13447 (build_new_method_call): Likewise.
13448
13449 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13450
13451 * call.c (build_over_call): tsubst all default parms from templates.
13452
13453 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13454
13455 * decl.c (struct cp_function): Add static_labelno.
13456 (push_cp_function_context): Save it.
13457 (pop_cp_function_context): Restore it.
13458
13459 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13460
13461 * typeck.c (build_component_ref_1): Convert from reference.
13462
13463 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13464
13465 * parse.y (current_declspecs, prefix_attributes): Initialize to
13466 NULL_TREE.
13467
13468 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13469 before we try to force it to be a TREE_LIST.
13470 (decl): Make sure $1.t is non-nil.
13471
13472 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13473
13474 * pt.c (uses_template_parms): Handle template first-parse codes.
13475
13476 * decl.c (cp_finish_decl): Only warn about user-defined statics.
13477
13478 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13479
13480 * pt.c (unify): Handle BOOLEAN_TYPE.
13481
13482 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13483 * pt.c (tsubst): Don't set it.
13484 * call.c (build_over_call): Use uses_template_parms.
13485
13486 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13487
13488 * method.c (build_overload_nested_name): Use static_labelno
13489 instead of var_labelno.
13490 (build_qualified_name): New fn.
13491 (build_overload_name): Split out from here.
13492 (build_static_name): Use build_qualified_name.
13493 * decl.c (cp_finish_decl): Statics in extern inline functions
13494 have comdat linkage.
13495 (start_function): Initialize static_labelno.
13496
13497 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13498
13499 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13500 before "all member functions in class [] are private".
13501
13502 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13503
13504 * lex.c (do_scoped_id): convert_from_reference.
13505 * init.c (build_offset_ref): Likewise.
13506
13507 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13508
13509 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13510
13511 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13512
13513 * typeck.c (get_member_function_from_ptrfunc): Promote index
13514 before saving it.
13515
13516 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13517
13518 * tree.c (layout_basetypes): Move non-virtual destructor warning.
13519 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13520
13521 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13522
13523 * decl.c (grokdeclarator): Call add_defarg_fn for the function
13524 type, too.
13525 * lex.c (add_defarg_fn): Adjust.
13526 (do_pending_defargs): Adjust. Don't skip the first parm.
13527
13528 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13529
13530 * decl.c (build_enumerator): Global enumerators are also readonly.
13531
13532 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13533 (build_dynamic_cast): Call it and convert_from_reference.
13534
13535 * lex.c (add_defarg_fn): New fn.
13536 (snarf_defarg): Don't add to defarg_types.
13537 (do_pending_defargs): Lose defarg_types. All fns we process now
13538 have defargs.
13539 * decl.c (grokfndecl): Call add_defarg_fn.
13540
13541 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13542 * cp-tree.def: Add DEFAULT_ARG.
13543 * spew.c (yylex): Call snarf_defarg as appropriate.
13544 * parse.y: New tokens DEFARG and DEFARG_MARKER.
13545 (defarg_again, pending_defargs, defarg, defarg1): New rules.
13546 (structsp): Use pending_defargs.
13547 (parms, full_parm): Use defarg.
13548 * lex.c (init_lex): Initialize inline_text_firstobj.
13549 (do_pending_inlines): Never pass the obstack to feed_input.
13550 (process_next_inline): Call end_input instead of restore_pending_input.
13551 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13552 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13553 * input.c (end_input): New fn.
13554 (sub_getch): At the end of some fed input, just keep returning EOF
13555 until someone calls end_input.
13556 Remove 'obstack' field from struct input_source.
13557 * decl.c (grokparms): Handle DEFAULT_ARG.
13558 (replace_defarg): New fn.
13559 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13560
13561 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13562
13563 * call.c (implicit_conversion): If nothing else works, try binding
13564 an rvalue to a reference.
13565
13566 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
13567
13568 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13569 ifndef for Cygwin32 to include SIGSEGV.
13570
13571 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13572
13573 * class.c (finish_struct_1): Only complain about pointers without
13574 copy stuff if there are any constructors.
13575
13576 * rtti.c (build_dynamic_cast): Call complete_type on the types.
13577
13578 * decl.c (grokfndecl): If the function we chose doesn't actually
13579 match, die.
13580
13581 * decl2.c (grokclassfn): Don't specify 'const int' for the
13582 artificial destructor parm.
13583
13584 * pt.c (type_unification): If we are called recursively, nothing
13585 decays.
13586
13587 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
13588
13589 * decl.c (init_decl_processing): Stop trying to catch signals
13590 other than SIGABRT since the Cygwin32 library doesn't support
13591 them correctly yet. This fixes a situation in which g++ causes
13592 a hang on SIGSEGVs and other such signals in our Win32-hosted
13593 tools.
13594
13595 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
13596
13597 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13598
13599 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13600
13601 * typeck2.c (store_init_value): Always return the value if our
13602 type needs constructing.
13603
13604 * method.c (hack_identifier): Convert class statics from
13605 reference, too.
13606
13607 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13608
13609 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13610
13611 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
13612
13613 * typeck.c (c_expand_return): Make sure we clean up temporaries at
13614 the end of return x;
13615
13616 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13617
13618 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13619
13620 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
13621
13622 * except.c (expand_builtin_throw): Add support
13623 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13624
13625 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13626
13627 * repo.c (extract_string): Null-terminate.
13628
13629 * cp-tree.h (TI_SPEC_INFO): New macro.
13630 (CLASSTYPE_TI_SPEC_INFO): New macro.
13631 * pt.c (push_template_decl): Correctly determine # of template parms
13632 for partial specs.
13633
13634 * call.c (compare_ics): Really fix 'this' conversions.
13635
13636 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13637 non-template fn.
13638
13639 * pt.c (push_template_decl): Complain about mismatch in # of
13640 template parms between a class template and a member template.
13641
13642 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13643
13644 * method.c (synthesize_method): You can't call
13645 function_cannot_inline_p after finish_function.
13646 * decl.c (finish_function): Turn on flag_inline_functions and turn
13647 off DECL_INLINE before handing a synthesized method to the
13648 backend.
13649
13650 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13651
13652 * method.c (synthesize_method): Remove July 30 change to never set
13653 DECL_INLINE if at_eof.
13654
13655 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
13656
13657 * xref.c (GNU_xref_member): Ensure that the node has a
13658 decl_lang_specific part before checking DECL_FRIEND_P.
13659
13660 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13661
13662 * pt.c (instantiate_class_template): Diagnose non-class types used
13663 as bases.
13664
13665 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13666
13667 * typeck.c (build_conditional_expr): Use convert_for_initialization
13668 instead of convert_and_check.
13669
13670 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13671
13672 * parse.y (typespec): Don't pedwarn for typeof.
13673
13674 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13675
13676 * repo.c (finish_repo): Only check changes if we would write a
13677 repo file.
13678
13679 * call.c (compare_ics): Fix handling of 'this' conversions.
13680
13681 * pt.c (do_decl_instantiation): Support static data too. Rename
13682 from do_function_instantiation.
13683 * cp-tree.h: Adjust.
13684 * parse.y: Adjust.
13685
13686 * repo.c (extract_string): New fn.
13687 (get_base_filename): Use it.
13688 (init_repo): Compare old args with current args.
13689
13690 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
13691
13692 * Makefile.in, Make-lang.in: Protect C-ls with a comment
13693 character, idea from Paul Eggert <eggert@twinsun.com>.
13694
13695 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
13696
13697 * typeck.c (c_expand_return): Be more persistent in looking for
13698 returned temps.
13699
13700 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13701 pointer to reference.
13702
13703 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13704
13705 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13706
13707 * init.c (build_member_call, build_offset_ref):
13708 Use do_scoped_id instead of do_identifier.
13709
13710 * cvt.c (convert): Remove bogosity.
13711
13712 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13713
13714 * cvt.c (build_up_reference): Do checks of ARGTYPE and
13715 TARGET_TYPE before trying to use get_binfo.
13716
13717 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13718
13719 * cvt.c (build_up_reference): Call get_binfo to get access control.
13720
13721 * decl2.c (import_export_decl): If we don't support weaks, leave
13722 statics undefined.
13723
13724 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
13725
13726 * except.c (expand_builtin_throw): Add support for machines that
13727 cannot access globals after throw's epilogue when
13728 -fno-sjlj-exceptions is used.
13729
13730 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13731
13732 * parse.y: 'std::' becomes '::'.
13733 * lex.c (real_yylex): Remove 'namespace' warning.
13734 * init.c (build_member_call): Ignore 'std::'.
13735 (build_offset_ref): Likewise.
13736 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13737 (do_toplevel_using_decl): Ignore 'using std::whatever'.
13738 * decl.c (push_namespace): Just sorry.
13739 (pop_namespace): Nop.
13740 (init_decl_processing): Declare std namespace.
13741
13742 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13743
13744 * search.c (push_class_decls): A name which ambiguously refers to
13745 several instantiations of the same template just refers to the
13746 template.
13747
13748 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
13749
13750 * decl.c (build_enumerator): Fix problem with unsigned long
13751 enumerated values being smashed to ints, causing overflow
13752 when computing next enumerated value (for enum values around
13753 MAX_VAL).
13754
13755 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13756
13757 * typeck.c (build_component_ref): Only call mark_used on a decl.
13758
13759 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13760
13761 * typeck.c (build_c_cast): Make the check for a ptr to function
13762 more specific before possible default_conversion call.
13763
13764 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
13765
13766 * except.c (expand_exception_blocks): Simplify and fix and make
13767 sure we don't end a region in a sequence, as expand_end_bindings
13768 doesn't like it.
13769
13770 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
13771
13772 * except.c (init_exception_processing): Mark terminate as not
13773 returning so that the optimizer can optimize better.
13774
13775 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
13776
13777 * cvt.c (convert): Don't do any extra work, if we can avoid it
13778 easily.
13779
13780 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
13781
13782 * *.[chy]: Change cp_convert to ocp_convert, change convert to
13783 cp_convert. convert is now reserved for the backend, and doesn't
13784 have the semantics a frontend person should ever want.
13785
13786 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13787
13788 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13789 Lose -traditional support.
13790
13791 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13792
13793 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13794
13795 * parse.y (self_reference): Do it for templates, too.
13796 * class.c (pushclass): Don't overload_template_name; the alias
13797 generated by build_self_reference serves the same purpose.
13798
13799 * tree.c (list_hash): Make static, take more args.
13800 (list_hash_lookup): Likewise.
13801 (list_hash_add): Make static.
13802 (list_hash_canon): Lose.
13803 (hash_tree_cons): Only build a new node if one isn't already in the
13804 hashtable.
13805 (hash_tree_chain): Use hash_tree_cons.
13806 * cp-tree.h: Adjust.
13807 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13808 of calling lookup_name.
13809
13810 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13811
13812 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13813 doesn't refer to the CONST_DECLs.
13814
13815 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
13816
13817 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13818 is bigger.
13819 (expand_class_desc): Convert the last argument to a sizetype.
13820
13821 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13822
13823 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13824 __real__): Add reswords.
13825 * hash.h: Regenerate.
13826 * lex.h (rid): Add RID_COMPLEX.
13827 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13828 * lex.c (init_lex): Add building of RID_COMPLEX.
13829 (real_yylex): General cleanup in line with what c-lex.c also has,
13830 sans the cruft for traditional; add handling of SPEC_IMAG, complex
13831 types, and imaginary numeric constants.
13832 * parse.y (REALPART, IMAGPART): Add tokens.
13833 (unary_expr): Add REALPART and IMAGPART rules.
13834 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13835 * decl.c (complex_{integer,float,double,long}_type_node): Define
13836 types.
13837 (init_decl_processing): Set up the types.
13838 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
13839 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13840 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13841 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13842 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13843 COMPLEX_TYPE case.
13844 * method.c (build_overload_name): Add handling of the different
13845 COMPLEX_TYPEs, prefixing them with `J'.
13846 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13847 as a template parm.
13848 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13849 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13850 (mapcar): Handle COMPLEX_CST.
13851 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13852 (common_type): Add code for complex types.
13853 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13854 (convert_for_assignment): Likewise.
13855 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13856
13857 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13858
13859 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13860 tsubst_expr, as it might try to do overload resolution.
13861
13862 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13863
13864 * pt.c (instantiate_class_template): Oops.
13865
13866 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13867
13868 * cp-tree.def: Add TAG_DEFN.
13869 * pt.c (tsubst_enum): New fn.
13870 (instantiate_class_template): Use it.
13871 (tsubst_expr): Support TAG_DEFN.
13872 (tsubst): Support local enums.
13873 (tsubst_copy): Likewise.
13874 * decl.c (finish_enum): Likewise.
13875 (start_enum): If this is a local enum, switch to permanent_obstack.
13876
13877 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
13878
13879 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13880 (finish_function): Put the base init code for constructors just
13881 after the parm cleanup insns.
13882 (struct cp_function): Add last_parm_cleanup_insn.
13883 (push_cp_function_context): Likewise.
13884 (pop_cp_function_context): Likewise.
13885
13886 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13887
13888 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13889
13890 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13891
13892 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13893 for THUNK_FNDECL before we switch to temporary allocation.
13894
13895 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13896
13897 * call.c (build_new_op): Handle null arg2 for ?:.
13898
13899 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
13900
13901 * except.c (expand_exception_blocks): Ensure that we flow through
13902 the end of the exception region for the exception specification.
13903 Move exception region for the exception specification in, so that
13904 it doesn't protect the parm cleanup. Remove some obsolete code.
13905 * decl.c (store_parm_decls): Likewise.
13906 (finish_function): Likewise.
13907
13908 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13909
13910 * init.c (build_new): Fix nothrow handling.
13911
13912 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13913
13914 * init.c (emit_base_init): Don't warn about the initialization
13915 list for an artificial member.
13916
13917 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13918
13919 * expr.c (do_case): Handle !START case for the error msg.
13920
13921 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13922
13923 * decl2.c, lang-options.h: New option -Weffc++.
13924 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13925 to -Weffc++.
13926
13927 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13928 to MULTIPLE_SYMBOL_SPACES.
13929
13930 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13931
13932 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13933
13934 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13935
13936 * typeck.c (c_expand_return): Don't complain about returning void
13937 to void in an artificial function.
13938 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13939 don't set DECL_RESULT, set DECL_ARTIFICIAL.
13940 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13941
13942 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
13943
13944 * init.c (init_decl_processing): Add support for setjmp/longjmp based
13945 exception handling.
13946 * except.c (init_exception_processing): Likewise.
13947 (expand_end_catch_block): Likewise.
13948 (expand_exception_blocks): Likewise.
13949 (expand_throw): Likewise.
13950 * exception.cc (__default_terminate): Likewise.
13951
13952 * init.c (perform_member_init): Use new method of expr level
13953 cleanups, instead of cleanups_this_call and friends.
13954 (emit_base_init): Likewise.
13955 (expand_aggr_vbase_init_1): Likewise.
13956 (expand_vec_init): Likewise.
13957 * decl.c (cp_finish_decl): Likewise.
13958 (expand_static_init): Likewise.
13959 (store_parm_decls): Likewise.
13960 (cplus_expand_expr_stmt): Likewise.
13961 * decl2.c (finish_file): Likewise.
13962
13963 * Make-lang.in (exception.o): Ok to compile with -O now.
13964
13965 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13966 we know it will be done later by the backend.
13967
13968 * decl2.c (lang_f_options): Remove support for short temps.
13969 * lang-options.h: Likewise.
13970
13971 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13972
13973 * tree.c (varargs_function_p): New fn.
13974 * method.c (emit_thunk): Replace broken generic code with code to
13975 generate a heavyweight thunk function.
13976
13977 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
13978
13979 * pt.c (process_template_parm): pedwarn about floating-point parms.
13980
13981 * decl.c (grokdeclarator): inline no longer implies static.
13982
13983 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13984
13985 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13986
13987 * class.c (check_for_override): The signature of an overriding
13988 function is not changed.
13989
13990 * call.c (build_over_call): Move setting of conv into the loop.
13991 Note: this change, along with the related changes of the 18th thru
13992 the 20th of April, fix an infinite loop problem in conversions.
13993
13994 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13995
13996 * call.c (build_user_type_conversion_1): Really ignore rvalue
13997 conversions when looking for a REFERENCE_TYPE.
13998
13999 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14000 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14001 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14002 (build_unary_op): Likewise.
14003 * call.c (build_over_call): See through a CONVERT_EXPR around the
14004 ADDR_EXPR for on a temporary.
14005 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14006 the ADDR_EXPR for a local variable.
14007
14008 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
14009
14010 * call.c (build_user_type_conversion_1): If we're trying to
14011 convert to a REFERENCE_TYPE, only consider lvalue conversions.
14012 (build_new_function_call): Print candidates.
14013 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14014 (reference_binding): Binding a temporary of a reference-related type
14015 is BAD.
14016
14017 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14018
14019 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14020 * tinfo2.cc (type_info::before): Likewise.
14021
14022 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
14023
14024 * call.c (implicit_conversion): Oops.
14025
14026 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14027
14028 * call.c (implicit_conversion): Try to find a reference conversion
14029 before binding a const reference to a temporary.
14030
14031 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
14032
14033 * exception.cc (__default_unexpected): Call terminate by default,
14034 so that if the user overrides terminate, the correct function will
14035 be called.
14036
14037 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
14038
14039 * parse.y (left_curly): Avoid trying to use any fields of
14040 error_mark_node, as there aren't any.
14041
14042 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14043
14044 * lex.c (do_identifier): Avoid breaking on overloaded methods
14045 as default arguments.
14046
14047 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
14048
14049 * call.c (add_template_candidate): Initialize the variable "dummy".
14050
14051 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
14052
14053 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14054 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14055
14056 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14057
14058 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14059 (debug_binfo): Delete decl, not needed.
14060
14061 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14062 promotes_to_aggr_type): Delete fns.
14063 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14064 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14065 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14066
14067 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14068
14069 * friend.c (is_friend_type): Delete fn.
14070 * cp-tree.h (is_friend_type): Delete decl.
14071
14072 * decl.c (original_result_rtx, double_ftype_double,
14073 double_ftype_double_double, int_ftype_int, long_ftype_long,
14074 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14075 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14076
14077 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14078 fwd decls.
14079 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14080
14081 * decl.c (pushdecl_nonclass_level): #if 0, unused.
14082 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14083
14084 * lex.c (reinit_lang_specific): #if 0, unused.
14085 * cp-tree.h (reinit_lang_specific): #if 0 decl.
14086
14087 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14088 * cp-tree.h (revert_static_member_fn): Delete decl.
14089
14090 * class.c (root_lang_context_p): Delete fn.
14091 * cp-tree.h (root_lang_context_p): Delete decl.
14092
14093 * decl.c (set_current_level_tags_transparency): #if 0, unused.
14094 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14095
14096 * lex.c (set_vardecl_interface_info): Make static.
14097 * cp-tree.h (set_vardecl_interface_info): Delete decl.
14098
14099 * call.c (find_scoped_type): Make static.
14100 * cp-tree.h (find_scoped_type): Delete decl.
14101
14102 * search.c (convert_pointer_to_vbase): Make static.
14103 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14104
14105 * decl.c (const_ptr_type_node): Likewise.
14106 * cp-tree.h (const_ptr_type_node): Delete decl.
14107
14108 * typeck.c (common_base_type): Make static.
14109 * cp-tree.h (common_base_types): Delete erroneous decl.
14110
14111 * pt.c (classtype_mangled_name): Make static.
14112 * cp-tree.h (classtype_mangled_name): Delete decl.
14113
14114 * lex.c (check_newline): Make static.
14115 * cp-tree.h (check_newline): Delete decl.
14116
14117 * typeck.c (build_x_array_ref): Delete fn, same idea as
14118 grok_array_decl.
14119 * cp-tree.h (build_x_array_ref): Delete decl.
14120
14121 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14122 copy_lang_decl.
14123 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14124
14125 * class.c (build_vtable_entry): Make static.
14126 * cp-tree.h (build_vtable_entry): Delete decl.
14127
14128 * class.c (build_vbase_pointer): Make static.
14129 * cp-tree.h (build_vbase_pointer): Delete decl.
14130
14131 * sig.c (build_sptr_ref): Add forward decl and make static.
14132 * cp-tree.h (build_sptr_ref): Delete decl.
14133
14134 * call.c (build_new_method_call): Add forward decl and make static.
14135 * cp-tree.h (build_new_method_call): Delete decl.
14136
14137 * call.c (build_object_call): Make static.
14138 * class.c (check_for_override, complete_type_p, mark_overriders):
14139 Likewise.
14140 * decl.c (cp_function_chain): Likewise.
14141 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14142 Likewise.
14143 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14144 Likewise.
14145 * tree.c (build_cplus_array_type_1): Likewise.
14146 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14147 (comp_target_parms): Likewise.
14148
14149 * init.c (build_builtin_call): Make static.
14150 * cp-tree.h (build_builtin_call): Delete decl.
14151
14152 * typeck.c (binary_op_error): Delete decl.
14153 * cp-tree.h (binary_op_error): Likewise.
14154
14155 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14156
14157 * call.c (build_method_call): Compare against error_mark_node
14158 directly, rather than the ERROR_MARK tree code.
14159 * cvt.c (cp_convert): Likewise.
14160 * decl.c (print_binding_level): Likewise.
14161 (duplicate_decls): Likewise.
14162 (grokdeclarator): Likewise.
14163 (grokdeclarator): Likewise.
14164 * init.c (expand_aggr_init_1): Likewise.
14165 (decl_constant_value): Likewise.
14166 * method.c (build_opfncall): Likewise.
14167 (hack_identifier): Likewise.
14168 * typeck.c (build_modify_expr): Likewise.
14169
14170 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14171
14172 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14173
14174 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14175
14176 * pt.c (coerce_template_parms): Add new error message.
14177
14178 * method.c (build_overload_value): Implement name mangling for
14179 floating-point template arguments.
14180
14181 * method.c (build_overload_int, icat, dicat): Fix mangling of template
14182 arguments whose absolute value doesn't fit in a signed word.
14183
14184 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14185
14186 * friend.c: New file; put all of the friend stuff in here.
14187 * init.c: Instead of here.
14188 * Makefile.in (CXX_OBJS): Add friend.o.
14189 (friend.o): Add dependencies.
14190 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14191
14192 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
14193
14194 * call.c (build_scoped_method_call): Complain if the scope isn't a
14195 base.
14196
14197 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14198
14199 * parse.y (left_curly): Don't crash on erroneous type.
14200
14201 * init.c (build_delete): Fix type of ref.
14202
14203 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14204
14205 * search.c (get_vbase_1): Renamed from get_vbase.
14206 (get_vbase): Wrapper, now non-static.
14207 (convert_pointer_to_vbase): Now static.
14208
14209 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14210 * init.c (build_delete): Pass one.
14211 (build_partial_cleanup_for): Use build_scoped_method_call.
14212 * decl.c (finish_function): Pass a binfo.
14213
14214 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14215
14216 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14217
14218 * typeck.c (build_c_cast): Lose other reference to flag.
14219
14220 * call.c (build_field_call): Don't look for [cd]tor_identifier.
14221 * decl2.c (delete_sanity): Remove meaningless use of
14222 LOOKUP_HAS_IN_CHARGE.
14223 * decl.c (finish_function): Use build_scoped_method_call instead
14224 of build_delete for running vbase dtors.
14225 * init.c (build_delete): Call overload resolution code instead of
14226 duplicating it badly.
14227
14228 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
14229
14230 * call.c (build_over_call): Call mark_used before trying to elide
14231 the call.
14232
14233 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14234
14235 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14236
14237 * typeck.c (build_modify_expr): Always pedwarn for a cast to
14238 non-reference used as an lvalue.
14239
14240 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14241
14242 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14243
14244 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14245
14246 * parse.y (handler): Fix template typo.
14247
14248 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14249
14250 * error.c (lang_decl_name): New fn.
14251 * tree.c (lang_printable_name): Use it.
14252
14253 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
14254
14255 * g++spec.c: Include config.h so that we can catch bzero #defines
14256 from the config file.
14257
14258 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
14259
14260 * new1.cc: Include a declaration for malloc, to avoid warning, and
14261 avoid lossing on systems that require one (ones that define malloc
14262 in xm.h).
14263
14264 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14265
14266 * decl2.c (max_tinst_depth): New variable.
14267 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14268 option.
14269 * pt.c (max_tinst_depth): Variable moved.
14270 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14271 as legal.
14272
14273 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14274
14275 * decl.c (xref_basetypes): Allow a base class that depends on
14276 template parms to be incomplete.
14277
14278 * decl2.c (build_expr_from_tree): Support typeid(type).
14279 * rtti.c (get_typeid): Support templates.
14280 (expand_si_desc, expand_class_desc): Fix string length.
14281 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14282
14283 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14284
14285 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14286
14287 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14288
14289 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14290
14291 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14292 smashes together template and non-template decls of the same
14293 signature.
14294
14295 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14296
14297 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14298
14299 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14300
14301 * decl.c (duplicate_decls): Next route, pedwarn about different
14302 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14303
14304 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14305
14306 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14307 (struct lang_type): Delete has_default_implementation member.
14308 Increase dummy to 21.
14309 * decl.c (start_method): Delete usage.
14310
14311 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14312 store_after_parms, start_decl_1, auto_function): Add decls.
14313 (get_arglist_len_in_bytes, declare_implicit_exception,
14314 have_exceptions_p, make_type_decl, typedecl_for_tag,
14315 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14316 build_component_type_expr, cplus_exception_name,
14317 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14318 * call.c (build_this): Make static.
14319 (is_complete): Likewise.
14320 (implicit_conversion): Likewise.
14321 (reference_binding): Likewise.
14322 (standard_conversion): Likewise.
14323 (strip_top_quals): Likewise.
14324 (non_reference): Likewise.
14325 (build_conv): Likewise.
14326 (user_harshness): Likewise.
14327 (rank_for_ideal): Likewise.
14328 * decl.c (start_decl_1): Delete forward decl.
14329 (push_decl_level): Make static.
14330 (resume_binding_level): Make static.
14331 (namespace_bindings_p): Make static.
14332 (declare_namespace_level): Make static.
14333 (lookup_name_real): Make static.
14334 (duplicate_decls): Make static. Take register off NEWDECL and
14335 OLDDECL parm decls.
14336 * decl2.c (get_sentry): Make static.
14337 (temp_name_p): Delete fn.
14338 * except.c (auto_function): Delete decl.
14339 * lex.c (handle_{cp,sysv}_pragma): Make static.
14340 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14341 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14342 * pt.c (tsubst_expr_values): Make static.
14343 * rtti.c (combine_strings): Delete decl.
14344
14345 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
14346
14347 * pt.c (push_template_decl): Handle getting a typedef.
14348
14349 * call.c (build_new_function_call): Complain about void arg.
14350
14351 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14352
14353 * decl.c (duplicate_decls): Give pedwarn of different exceptions
14354 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14355
14356 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
14357
14358 * except.c (expand_throw): Don't expand the cleanup tree here,
14359 since we are not going to write the rtl out. Fixes problem with
14360 -g -O on SPARC.
14361
14362 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
14363
14364 * Make-lang.in: Add $(exeext) as necessary.
14365
14366 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
14367
14368 * parse.y (handler_seq): Must have at least one catch clause.
14369
14370 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
14371
14372 * call.c (add_builtin_candidate): Restore ?: hack.
14373
14374 * decl.c (grok_op_properties): More warnings.
14375
14376 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14377
14378 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14379 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14380
14381 * decl.c (duplicate_decls): Scale back to a warning, and only do
14382 'em if -pedantic.
14383
14384 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
14385
14386 * decl.c (duplicate_decls): pedwarn mismatched exception
14387 specifications.
14388
14389 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
14390
14391 * call.c (build_new_method_call): Don't display the invisible
14392 argument for controlling virtual bases.
14393
14394 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
14395
14396 * new: Add nothrow new and delete, bad_alloc and throw specifications
14397 for delete.
14398 * decl.c (init_decl_processing): Add throw specification for delete.
14399 * new.cc (nothrow): Define.
14400 * lex.c (real_yylex): Removing warning that throw and friends are
14401 keywords.
14402 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
14403 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
14404 * Make-lang.in: Add new{1,2}.{cc,o}.
14405
14406 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14407
14408 * lex.c (cons_up_default_function): Fix return type of synth op=.
14409
14410 * init.c (emit_base_init): Add warnings for uninitialized members
14411 and bases.
14412
14413 * decl.c (xref_basetypes): Add warning for non-polymorphic type
14414 with destructor used as base type.
14415
14416 * decl.c (grok_op_properties): Add warning for op= returning void.
14417 * typeck.c (c_expand_return): Add warning for op= returning anything
14418 other than *this.
14419
14420 * class.c (finish_struct_1): Add warning for class with pointers
14421 but not copy ctor or copy op=.
14422
14423 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
14424 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
14425 (instantiate_template): If -fexternal-templates, add this
14426 instantiation to pending_templates.
14427
14428 * decl2.c (copy_assignment_arg_p): Disable old hack to support
14429 Booch components.
14430
14431 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
14432
14433 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14434
14435 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14436
14437 * call.c (standard_conversion): Handle getting references. Tack
14438 on RVALUE_CONV here. Do it for non-class types, too.
14439 (reference_binding): Pass references to standard_conversion.
14440 (implicit_conversion): Likewise.
14441 (add_builtin_candidate): Disable one ?: kludge.
14442 (convert_like): Handle RVALUE_CONVs for non-class types.
14443 (joust): Disable the other ?: kludge.
14444
14445 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14446
14447 * decl.c (init_decl_processing): Add code to build up common
14448 function types beforehand, to avoid creation then removal of
14449 things already in the hash table.
14450
14451 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14452
14453 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14454 the arguments.
14455
14456 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14457 current_template_parms.
14458
14459 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
14460
14461 * search.c (lookup_field): Don't return a function, check want_type.
14462
14463 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14464
14465 * init.c (build_new): Make sure PLACEMENT has a type.
14466
14467 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14468
14469 * init.c (build_new): Support new (nothrow).
14470
14471 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14472
14473 * pt.c (instantiate_decl): Also do push_to_top_level before setting
14474 up DECL_INITIAL.
14475
14476 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14477 * pt.c (tsubst): Defer instantiation of default args.
14478 * call.c (build_over_call): Until here.
14479
14480 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14481
14482 * search.c (lookup_field): Make sure we have an
14483 IDENTIFIER_CLASS_VALUE before we try to return it.
14484
14485 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14486
14487 * call.c (build_method_call): Delete unused var PARM.
14488 (build_overload_call_real): Likewise.
14489 (build_object_call): Delete unused var P.
14490 (build_new_op): Likewise.
14491 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14492 var definitions, which are never used.
14493 (shadow_tag): Delete unused var FN.
14494 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14495 * init.c (build_new): Delete unused var ALLOC_TEMP.
14496 * method.c (hack_identifier): Delete unused var CONTEXT.
14497 (do_build_copy_constructor): Delete unused var NAME.
14498 (synthesize_method): Delete unused var BASE.
14499 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14500 * rtti.c (build_headof): Delete unused var VPTR.
14501 (get_typeid): Delete unused var T.
14502 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14503 and ORIG_OP2.
14504 (build_ptrmemfunc): Delete unused vars U and NINDEX.
14505 * typeck2.c (build_functional_cast): Delete unused var BINFO.
14506
14507 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
14508
14509 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14510 things in a type being defined.
14511 * decl.c (finish_enum): Reverse the values so that they are in
14512 the correct order.
14513
14514 * pt.c (instantiate_class_template): Don't initialize
14515 BINFO_BASETYPES until the vector is filled out.
14516 (unify): Don't abort on conflicting bindings, just fail.
14517 (instantiate_decl): Do push_tinst_level before any tsubsting.
14518
14519 * method.c (build_overload_value): Handle getting a
14520 TEMPLATE_CONST_PARM for a pointer.
14521
14522 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
14523
14524 * init.c (expand_member_init): Don't give 'not a base' error for
14525 templates.
14526
14527 * pt.c (instantiate_decl): Call import_export_decl later.
14528
14529 * pt.c (instantiate_class_template): Return a value.
14530
14531 * parse.y (extension): New rule for __extension__.
14532 (extdef, unary_expr, decl, component_decl): Use it.
14533
14534 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
14535
14536 * class.c (base_binfo): Remove unused base_has_virtual member.
14537 (finish_base_struct): Likewise.
14538 (finish_struct_1): Likewise.
14539
14540 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
14541
14542 * search.c (expand_upcast_fixups): Fix bogus code generation
14543 problem where the generated code uses the wrong index into the
14544 runtime built vtable on the stack. Old code could clobber random
14545 stack values.
14546
14547 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
14548
14549 * init.c (perform_member_init): Make sure the partial EH cleanups
14550 live on the function_obstack.
14551
14552 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
14553
14554 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14555 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14556
14557 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
14558
14559 * decl.c (grokvardecl): Avoid ANSI style initialization.
14560
14561 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14562
14563 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14564
14565 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14566
14567 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14568
14569 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14570
14571 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14572 arguments we compare against. Start the count of I at 1, not 0,
14573 since argv[0] is still the command.
14574
14575 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
14576
14577 * lang-specs.h: Accept .cp as an C++ extension.
14578
14579 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14580
14581 * cp-tree.h (ptr_reasonably_similar): Add decl.
14582
14583 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14584
14585 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14586 pointer. New local SPECBITS with the parm's value.
14587 (grokdeclarator): Pass &specbits down.
14588
14589 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14590 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14591
14592 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14593 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14594
14595 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14596 not an error_mark_node.
14597
14598 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14599
14600 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14601 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14602
14603 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14604
14605 * decl.c (grokdeclarator): When giving an anonymous struct a name,
14606 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14607 not affected).
14608
14609 * typeck2.c (build_m_component_ref): If component is a pointer
14610 to data member, resolve the OFFSET_REF now.
14611
14612 * call.c (convert_like): Don't go into infinite recursion.
14613
14614 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14615
14616 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14617 * tree.c (layout_basetypes): And on the vbase ptr.
14618
14619 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14620
14621 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14622 CHAR_TYPE_SIZE so bool is always the same size as another type.
14623
14624 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14625
14626 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
14627
14628 * decl2.c (grok_x_components): Remove synthesized methods from
14629 TYPE_METHODS of an anonymous union, complain about member
14630 functions.
14631 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14632 anonymous unions.
14633 (finish_function): Just clear the DECL_RTL of our arguments.
14634
14635 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14636
14637 * decl2.c (finish_file): Emit DWARF debugging info for static data
14638 members.
14639
14640 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14641
14642 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
14643
14644 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14645 IDENTIFIER_NODE.
14646
14647 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14648
14649 * Make-lang.in (g++-cross$(exeext)): Fix typo.
14650
14651 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14652
14653 Make the g++ driver now be a standalone program, rather than one
14654 that tries to run the gcc driver after munging up the options.
14655 * Make-lang.in (g++.c, g++spec.o): New rules.
14656 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14657 added.
14658 (g++$(exeext)): New rule, based on xgcc rule.
14659 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14660 * g++spec.c: New file.
14661 * g++.c: Removed file.
14662
14663 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
14664
14665 * cvt.c (build_up_reference): Arrange for any temporary values
14666 that have been keep in registers until now to be put into memory.
14667
14668 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14669
14670 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14671 that make -j3 bootstrap works better.
14672
14673 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14674
14675 * decl.c (pushtag): Do pushdecl for anon tags.
14676
14677 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14678
14679 * typeck.c (c_expand_return): Fix logic.
14680 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14681
14682 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
14683
14684 * g++.c (main): Make sure arglist has a final NULL entry. Add
14685 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14686 stdin/stdout of the invoked program are redirected to
14687 nowheresville.
14688
14689 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14690
14691 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14692
14693 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
14694
14695 * init.c (resolve_offset_ref): Handle obj.vfn better.
14696 * typeck.c (build_component_ref): Set TREE_TYPE on result from
14697 build_vfn_ref.
14698
14699 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
14700
14701 * typeck.c (convert_for_assignment): Also handle anachronistic
14702 implicit conversions from (::*)() to cv void*.
14703 * cvt.c (cp_convert_to_pointer): Likewise.
14704
14705 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14706
14707 * lex.c (handle_cp_pragma): Fix bogus warning.
14708
14709 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
14710
14711 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14712 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14713
14714 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14715
14716 * class.c (finish_struct_1): Support DWARF2_DEBUG.
14717 * search.c (dfs_debug_mark): Likewise.
14718 * decl2.c (finish_vtable_vardecl): Likewise.
14719 * decl.c (pushtag, finish_enum): Likewise.
14720 * lex.c (check_newline): Use debug_* instead of calling *out
14721 functions directly.
14722
14723 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14724
14725 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14726 on some picky hosts.
14727
14728 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14729
14730 * class.c (finish_struct_1): A class has a non-trivial copy
14731 constructor if it has virtual functions.
14732
14733 * cvt.c (cp_convert): Always call a constructor.
14734
14735 * call.c (reference_binding): Still tack on a REF_BIND
14736 for bad conversions.
14737 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14738
14739 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14740 (c_expand_return): Likewise.
14741 * typeck2.c (digest_init): Likewise for { }.
14742 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14743 * cvt.c (cp_convert): Handle failure better.
14744
14745 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14746
14747 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14748 of GCC be path-relative.
14749
14750 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14751
14752 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14753 it does need choose-temp.o and pexecute.o.
14754
14755 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14756
14757 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14758 that we still use it.
14759 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14760
14761 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14762
14763 * init.c (expand_default_init): Avoid calling constructors to
14764 initialize reference temps.
14765
14766 * cvt.c (convert_to_reference): Fix.
14767
14768 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14769
14770 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14771 (convert_to_reference): Likewise.
14772 * typeck.c (convert_for_initialization): Likewise.
14773 * init.c (expand_default_init): Likewise.
14774 (expand_aggr_init_1): Likewise.
14775 * cp-tree.h (CONV_NONCONVERTING): Lose.
14776 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14777 * *.c: Adjust.
14778 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14779
14780 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
14781
14782 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14783
14784 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14785
14786 * init.c (expand_aggr_init_1): Don't crash on non-constructor
14787 TARGET_EXPR.
14788
14789 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14790
14791 * g++.c: Include gansidecl.h.
14792 (VPROTO, PVPROTO, VA_START): Delete.
14793 (choose_temp_base_try, choose_temp_base, perror_exec,
14794 run_dos) [__MSDOS__]: Delete fns.
14795 (pfatal_with_name): Delete fn.
14796 (temp_filename): Declare like in gcc.c.
14797 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14798 (error_count, signal_count): Define.
14799 (error): Delete both definitions.
14800 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14801 (pfatal_pexecute): Add fn from gcc.c.
14802 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
14803 code to use the pexecute stuff also used by gcc.c.
14804 (MIN_FATAL_STATUS): Define.
14805 * Make-lang.in (g++): Add dependency on and linking with
14806 choose-temp.o and pexecute.o.
14807
14808 * cp-tree.h: Include gansidecl.h.
14809 (STDIO_PROTO): Delete #undef/#define.
14810 * cvt.c (NULL): Delete #undef/#define.
14811 * expr.c (NULL): Likewise.
14812 * init.c (NULL): Likewise.
14813 * rtti.c (NULL): Likewise.
14814 * xref.c (NULL): Likewise.
14815
14816 * cp-tree.h (build_user_type_conversion): Add prototype.
14817 * call.c (build_user_type_conversion): Delete prototype. Correct
14818 decl of FLAGS arg to be an int.
14819 * cvt.c (build_user_type_conversion): Likewise.
14820
14821 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
14822
14823 * cp-tree.def: Add TRY_BLOCK and HANDLER.
14824 * except.c (expand_start_catch_block): Support templates.
14825 * parse.y (try_block, handler_seq): Likewise.
14826 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14827
14828 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14829
14830 * pt.c (current_template_args): New fn.
14831 (push_template_decl): Use it.
14832 * decl.c (grokdeclarator): Use it.
14833
14834 * decl2.c (build_expr_from_tree): Dereference ref vars.
14835
14836 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14837 the decl-specifier-seq.
14838
14839 * decl.c (grok_op_properties): Don't force the type of a conversion
14840 op to be complete. Don't warn about converting to the same type
14841 for template instantiations.
14842
14843 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14844 methods.
14845
14846 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
14847
14848 * typeck.c (get_delta_difference): Remove previous bogusness.
14849 Don't give errors if force is set.
14850
14851 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14852
14853 * decl2.c (finish_file): Don't emit debug info.
14854 * decl.c (pushdecl): Lose obsolete code.
14855 (grokdeclarator): Still do the long long thing after complaining.
14856 * search.c (note_debug_info_needed): Don't do anything if we're in a
14857 template.
14858 * method.c (synthesize_method): For non-local classes,
14859 push_to_top_level first.
14860
14861 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
14862
14863 * typeck.c (get_delta_difference): Add no_error parameter.
14864 (build_ptrmemfunc): Call get_delta_difference with no_error set;
14865 we don't want error messages when converting unrelated
14866 pointer-to-member functions.
14867
14868 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
14869
14870 * error.c (dump_expr): Improve the wording on error messages that
14871 involve pointer to member functions.
14872
14873 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
14874
14875 * cvt.c (cp_convert_to_pointer): Move code for conversions from
14876 (::*)() to void* or (*)() up a bit, so that we can convert from
14877 METHOD_TYPEs as well.
14878
14879 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14880
14881 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14882 There are no 'member' types.
14883 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14884 (build_x_typeid): Handle errors.
14885
14886 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
14887
14888 * typeck.c (convert_for_assignment): Handle anachronistic implicit
14889 conversions from (::*)() to void* or (*)().
14890 * cvt.c (cp_convert_to_pointer): Likewise.
14891 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14892 conversions from here.
14893 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14894 * lang-options.h: Likewise.
14895 * decl2.c (warn_pmf2ptr): Define.
14896 * cp-tree.h: Declare it.
14897 * typeck2.c (digest_init): Allow pmfs down into
14898 convert_for_initialization.
14899
14900 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14901
14902 * typeck.c (c_expand_return): Fix for returning overloaded fn.
14903
14904 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14905
14906 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14907 * decl.c (grok_reference_init): Pass DIRECT_BIND.
14908 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
14909 DIRECT_BIND.
14910 * call.c (convert_like): Don't pass INDIRECT_BIND.
14911 * typeck.c (convert_arguments): Likewise.
14912 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14913
14914 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14915
14916 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14917 similar code in build_up_ref.
14918 * cvt.c (build_up_reference): Drastically simplify.
14919
14920 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
14921
14922 * typeck.c (signed_or_unsigned_type): If the given type already
14923 as the correct signedness, then just return it.
14924
14925 * typeck.c ({un,}signed_type): If can't do anything, call
14926 signed_or_unsigned_type.
14927
14928 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
14929
14930 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14931 current_class_type is NULL.
14932
14933 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
14934
14935 * class.c (finish_struct_1): Avoid empty structs by adding a field
14936 so layout_type gets the mode right.
14937
14938 * typeck.c (c_expand_return): Drastically simplify.
14939
14940 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14941
14942 * typeck.c (decay_conversion): Handle overloaded methods.
14943
14944 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14945
14946 * call.c (build_over_call): A TARGET_EXPR has side-effects.
14947
14948 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
14949
14950 * cvt.c (convert_to_pointer_force): Add code to support pointer to
14951 member function to pointer to function conversions.
14952 * init.c (resolve_offset_ref): Add code to allow faked up objects,
14953 ignoring them if they are not used, and giving an error, if they
14954 are needed.
14955 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14956 code, and so that we can give an error, if we needed an object,
14957 and one was not provided.
14958 (build_c_cast): Don't call default_conversion when we want to
14959 convert to pointer to function from a METHOD_TYPE.
14960
14961 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14962
14963 * Make-lang.in (cplib2.ready): Fix logic.
14964
14965 * decl.c (shadow_tag): Only complain about non-artificial function
14966 members.
14967
14968 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14969
14970 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14971
14972 * expr.c (cplus_expand_expr): Pre-tweak call_target like
14973 expand_inline_function would.
14974
14975 * pt.c (mark_decl_instantiated): If extern_p, call
14976 mark_inline_for_output.
14977
14978 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
14979
14980 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14981 pmd conversions.
14982
14983 * typeck.c (get_delta_difference): Fix wording, as we can be used
14984 for pointer to data members.
14985
14986 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
14987
14988 * pt.c (tsubst): If the function decl isn't a member of this
14989 template, return a copy of the decl (including copying the
14990 lang-specific part) so we don't hose ourselves later.
14991
14992 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14993
14994 * class.c (finish_struct): Remove DWARF-specific tag handling.
14995 * decl.c (pushtag): Likewise.
14996 (finish_function): Always clear DECL_ARGUMENTS on function decls with
14997 no saved RTX.
14998 * decl2.c (finish_file): Emit DWARF debugging info for static data
14999 members.
15000
15001 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
15002
15003 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15004 isn't the same as the new one before we whack it.
15005
15006 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
15007
15008 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15009 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15010 warn_traditional and warn_strict_prototypes; remove ancient
15011 'overload' code; remove references to flag_traditional.
15012
15013 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
15014
15015 * input.c (sub_getch): Handle 8-bit characters in string literals.
15016
15017 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
15018
15019 * tree.c (mapcar): Handle CONSTRUCTORs.
15020 (copy_to_permanent): Handle expression_obstack properly.
15021
15022 * Make-lang.in (cplib2.txt): Also depend on the headers.
15023
15024 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15025 INT_TYPE_SIZE.
15026 (expand_class_desc): Use USItype for offset field.
15027 * tinfo.h (struct __class_type_info): Likewise.
15028
15029 * method.c (build_overload_int): TYPE_PRECISION should be applied
15030 to types.
15031
15032 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15033
15034 * call.c (build_new_op): A COND_EXPR involving void must be a
15035 builtin.
15036
15037 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15038
15039 * typeck.c (build_x_component_ref): New fn.
15040 (build_object_ref): Use it.
15041 * parse.y (primary): Use it.
15042 * decl2.c (build_expr_from_tree): Use it.
15043 * cp-tree.h: Declare it.
15044
15045 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15046 * error.c (dump_type_suffix): Handle variable arrays.
15047
15048 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15049
15050 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15051
15052 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15053
15054 * decl.c (lookup_name_real): Don't try to look up anything in a
15055 TYPENAME_TYPE.
15056
15057 * tinfo2.cc (__throw_type_match_rtti): Oops.
15058
15059 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15060
15061 * Make-lang.in (exception.o): Use -fno-PIC for now.
15062
15063 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15064
15065 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15066 calling them.
15067 (get_tinfo_fn_dynamic): Extracted from build_typeid.
15068 * tinfo2.cc (__dynamic_cast): Adjust.
15069
15070 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15071 (build_x_typeid): Likewise.
15072
15073 * parse.y: Call build_x_typeid instead of build_typeid.
15074 * cp-tree.def: Add TYPEID_EXPR.
15075 * pt.c (tsubst_copy): Handle typeid.
15076 * decl2.c (build_expr_from_tree): Likewise.
15077 * rtti.c (build_x_typeid): Throw bad_typeid from here.
15078 (build_typeid): Not here.
15079 * cp-tree.h: Declare build_x_typeid.
15080
15081 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
15082
15083 * call.c (convert_like): Pull out constant values.
15084
15085 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15086
15087 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15088
15089 * decl.c (init_decl_processing): Create short int types before
15090 creating size_t in case a machine description needs to use
15091 unsigned short for size_t.
15092
15093 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15094
15095 * Make-lang.in (exception.o): Turn off pic.
15096
15097 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15098 type, multi-level ptr conversions.
15099
15100 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15101 (throw_bad_cast): Use it.
15102 (throw_bad_typeid): New fn.
15103 (build_typeid): Throw bad_typeid as needed.
15104 Use build_call.
15105 (synthesize_tinfo_fn): Handle functions and arrays before checking
15106 for cv-quals.
15107
15108 * Remove .h from standard C++ headers, add new.h, move into inc
15109 subdirectory.
15110
15111 * exception*: Remove pointer from object, constructors. Add
15112 default exception::what that uses type_info::name. Add
15113 __throw_bad_typeid.
15114
15115 * init.c (build_new): Don't add a cookie to new (void *) T[2].
15116
15117 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15118
15119 * Make-lang.in: Building C++ code depends on cc1plus.
15120
15121 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15122
15123 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15124 a HOST_WIDE_INT, not a tree.
15125
15126 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15127
15128 * exception.cc: Don't include <stdlib.h>.
15129
15130 * Make-lang.in (c++.clean): Remove cplib2.*.
15131
15132 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
15133
15134 * parse.y (component_decl_1, component_costructor_declarator case):
15135 Pass attributes/prefix_attributes in tree list.
15136
15137 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
15138
15139 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15140
15141 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15142
15143 * lex.c (do_identifier): Don't do deferred lookup in a template
15144 header.
15145
15146 * typeck2.c (store_init_value): Oops.
15147
15148 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15149 New files for C++ lang-support library.
15150 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15151 (CXX_LIB2FUNCS): Define.
15152 And rules for building the C++ lang-support code.
15153 * config-lang.in (headers): Define.
15154 (lib2funcs): Define.
15155
15156 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15157
15158 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15159 digest_init.
15160 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15161 * typeck2.c (store_init_value): Check for initializing pmf with { }
15162 here.
15163 (process_init_constructor): Not here.
15164
15165 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15166
15167 * pt.c (begin_template_parm_list): Increment
15168 processing_template_decl here.
15169 (end_template_parm_list): Not here.
15170 (process_template_parm): No need to add 1 to it now.
15171 * *.c: Use processing_template_decl instead of current_template_parms
15172 to check for being in a template.
15173
15174 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
15175 (tsubst_copy): Handle CONSTRUCTOR.
15176 (instantiate_decl): Set up context properly for variables.
15177 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15178 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15179
15180 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15181
15182 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15183
15184 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15185
15186 * method.c (make_thunk): Call comdat_linkage before setting the
15187 TREE_CODE.
15188
15189 * decl2.c (comdat_linkage): Use make_decl_one_only.
15190 (import_export_decl): Likewise.
15191 * decl.c (init_decl_processing): Check supports_one_only instead of
15192 SUPPORTS_WEAK.
15193
15194 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15195
15196 * decl2.c (grokfield): Tighten checking for access decls.
15197
15198 * decl.c (make_typename_type): Resolve references to
15199 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
15200 (lookup_name_real): Types that depend on a template parameter get
15201 an implicit 'typename' unless they're in the current scope.
15202 (start_decl_1): We don't care about incomplete types that depend
15203 on a template parm.
15204 (grokdeclarator): Resolve 'typename's in the type specifier that
15205 refer to members of the current scope.
15206
15207 * call.c (build_over_call): Remove 'inline called before
15208 definition' diagnostic.
15209 (build_method_call): Likewise.
15210 * decl.c (duplicate_decls): Downgrade 'used before declared
15211 inline' to a warning, only with -Winline.
15212
15213 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
15214
15215 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15216
15217 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15218
15219 * call.c (build_method_call): When calling a signature
15220 default implementation, as in other cases, let instance_ptr simply
15221 be instance.
15222
15223 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
15224
15225 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15226
15227 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
15228
15229 * except.c (expand_start_catch_block): Add a pushlevel so that -g
15230 works on hppa and SPARC.
15231
15232 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15233
15234 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15235
15236 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15237
15238 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15239 before testing whether it's a signature.
15240
15241 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
15242
15243 * call.c (build_new_method_call): Don't complain about signature
15244 pointers and references not being an aggr type.
15245 (build_this): If a signature pointer or reference was passed in,
15246 just return it.
15247 (build_new_method_call): If instance is a signature pointer, set
15248 basetype to the signature type of instance.
15249 * sig.c (build_signature_method_call): Deleted basetype and
15250 instance parameters, they can be found as the DECL_CONTEXT of
15251 function and as the first argument passed in.
15252 * cp-tree.h: Changed declaration of build_signature_method_call.
15253 * call.c (build_method_call): Deleted first two arguments in call
15254 of build_signature_method_call.
15255 (build_over_call): Added call to build_signature_method_call.
15256
15257 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15258
15259 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15260 target_expr.
15261
15262 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15263
15264 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15265
15266 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
15267
15268 * except.c (expand_start_try_stmts): Move to except.c in the backend.
15269 (expand_end_try_stmts): Remove.
15270
15271 * init.c (perform_member_init): Use add_partial_entry () instead
15272 of directly manipulating lists.
15273 (emit_base_init): Likewise.
15274
15275 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
15276
15277 * except.c (expand_exception_blocks): Always make sure USE and
15278 CLOBBER insns that came at the end still do, the backend relies
15279 upon this.
15280
15281 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
15282
15283 * call.c (build_over_call): We can only use a TARGET_EXPR of the
15284 right type.
15285
15286 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15287
15288 * cvt.c (convert_to_reference): Revert last change, don't complain
15289 about temp without target decl.
15290
15291 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
15292
15293 * decl.c (grokdeclarator): Don't core dump when void() is given.
15294
15295 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15296
15297 * decl.c (copy_args_p): Don't crash.
15298
15299 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
15300
15301 * pt.c (tsubst): And support template args inside the exception
15302 specification.
15303
15304 * pt.c (tsubst): Add support for exception specifications in
15305 template functions.
15306
15307 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
15308
15309 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15310 fields now.
15311 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15312 (start_function): Likewise.
15313 (start_method): Likewise.
15314 (grokfield): Likewise.
15315 (make_call_declarator): Add throw spec parameter.
15316 (set_quals_and_spec): Add routine.
15317 * lex.c (set_quals_and_spec): Likewise.
15318 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15319 * decl.c (shadow_tag): Eliminate the throw spec parameter to
15320 grokdeclarator.
15321 (groktypename): Likewise.
15322 (start_decl): Eliminate the throw spec parameter. Eliminate the
15323 throw spec parameter to grokdeclarator. Eliminate the throw spec
15324 field in DECL_STMT.
15325 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15326 (grokfndecl): Remove useless set of raises.
15327 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
15328 the throw spec parameter to start_decl. Pull the throw spec out
15329 of the call declarator.
15330 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15331 (start_function): Eliminate the throw spec parameter. Eliminate
15332 the throw spec parameter to grokdeclarator.
15333 (start_method): Likewise.
15334 * decl2.c (grokfield): Likewise.
15335 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15336 (grokoptypename): Likewise.
15337 (finish_file): Eliminate the throw spec parameter to
15338 start_function. Add throw spec to make_call_declarator.
15339 * except.c (init_exception_processing): Add throw spec to
15340 make_call_declarator. Eliminate the throw spec parameter to
15341 start_decl.
15342 (expand_start_catch_block): Eliminate the throw spec parameter to
15343 grokdeclarator.
15344 (expand_builtin_throw): Add throw spec to make_call_declarator.
15345 Eliminate the throw spec parameter to start_function.
15346 (start_anon_func): Likewise.
15347 * lex.c (make_call_declarator): Add throw spec parameter.
15348 (set_quals_and_spec): New routine.
15349 (cons_up_default_function): Add throw spec to make_call_declarator.
15350 Eliminate the throw spec parameter to grokfield.
15351 * method.c (synthesize_method): Eliminate the throw spec parameter
15352 to start_function.
15353 * pt.c (process_template_parm): Eliminate the throw spec parameter
15354 to grokdeclarator.
15355 (tsubst): Add throw spec to make_call_declarator.
15356 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15357 (do_function_instantiation): Eliminate the throw spec parameter to
15358 grokdeclarator. Eliminate the throw spec parameter to
15359 start_function.
15360 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15361 to start_function.
15362 * parse.y (datadef): Remove non-winning optimization.
15363 (decl): Likewise.
15364 (fndef): Remove ambiguous error productions uncovered by grammar
15365 fixing.
15366 (constructor_declarator): Add exception_specification_opt here.
15367 (component_constructor_declarator): Likewise.
15368 (direct_after_type_declarator): Likewise.
15369 (complex_direct_notype_declarator): Likewise.
15370 (direct_abstract_declarator): Likewise.
15371 (fn.def1): Remove exception_specification_opt.
15372 (fn.def2): Likewise.
15373 (condition): Likewise.
15374 (initdcl0): Likewise.
15375 (initdcl): Likewise.
15376 (notype_initdcl0): Likewise.
15377 (nomods_initdcl0): Likewise.
15378 (component_decl_1): Likewise.
15379 (component_declarator): Likewise.
15380 (after_type_component_declarator0): Likewise.
15381 (after_type_component_declarator): Likewise.
15382 (notype_component_declarator): Likewise.
15383
15384 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15385
15386 * call.c (build_over_call): Also use an INIT_EXPR when
15387 initializing anything from an rvalue.
15388
15389 * call.c (build_over_call): Call stabilize_reference when building
15390 an INIT_EXPR instead of calling the copy ctor.
15391
15392 * call.c (joust): Extend the previous change to all comparisons.
15393
15394 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
15395 NO_LINKAGE_HEURISTICS.
15396
15397 * decl2.c (finish_file): Emit any statics that weren't already.
15398
15399 * typeck.c (build_static_cast): Implement.
15400 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
15401 * decl.c (grokparms): Use can_convert_arg instead of
15402 implicit_conversion directly.
15403 (copy_args_p): New fn.
15404 * cvt.c (convert_to_reference): Don't complain about temp with
15405 static_cast.
15406 (build_up_reference): Handle TARGET_EXPRs.
15407 * call.c (build_over_call): Elide unnecessary temps.
15408 (can_convert*): Use new overloading code.
15409
15410 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15411
15412 * call.c: Move TYPE_PTR*_MACROS ...
15413 * cp-tree.h: To here.
15414 * typeck.c (build_reinterpret_cast): Implement.
15415
15416 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
15417 ptr_complete_ob.
15418 (joust): If we're comparing a function to a builtin and the worst
15419 conversion for the builtin is worse than the worst conversion for the
15420 function, take the function.
15421
15422 * typeck.c (build_const_cast): Implement.
15423 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
15424 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
15425
15426 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
15427
15428 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
15429 too early. Make sure we explode if exprtype turns out to be a
15430 NULL_TREE when it shouldn't be.
15431
15432 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
15433
15434 * cp-tree.h: New routine make_call_declarator.
15435 * lex.c (make_call_declarator): Define it.
15436 * except.c (init_exception_processing): Use it.
15437 (expand_builtin_throw): Likewise.
15438 (start_anon_func): Likewise.
15439 * decl2.c (finish_file): Likewise.
15440 * lex.c (cons_up_default_function): Likewise.
15441 * parse.y: Likewise.
15442 * pt.c (tsubst): Likewise.
15443
15444 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
15445
15446 * decl2.c (groktypefield): Remove unused code.
15447
15448 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
15449
15450 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15451 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
15452 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
15453 nonempty_cv_qualifiers.
15454 * hash.h: Rebuild.
15455
15456 * lex.c (make_pointer_declarator): Change type_quals into
15457 cv_qualifiers.
15458 (make_reference_declarator): Likewise.
15459
15460 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15461
15462 * decl.c (start_function): Only check interface_* for templates
15463 with flag_alt_external_templates.
15464
15465 * call.c (build_new_op): Check for comparison of different enum types.
15466 (build_over_call): Fix arg # output.
15467
15468 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15469
15470 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15471
15472 * call.c (build_new_op): Check for erroneous args.
15473
15474 * call.c (build_new_method_call): Add missing args to cp_error.
15475
15476 * tree.c (error_type): Don't print reference-to-array.
15477
15478 * typeck.c (convert_for_assignment): Don't say contravariance for
15479 removing const.
15480
15481 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15482
15483 * call.c (build_over_call): Diagnose bad convs for `this'.
15484
15485 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15486 on _ctor_arg.
15487
15488 * call.c (convert_like): Handle bad convs.
15489 (build_over_call): Handle bad convs better.
15490
15491 * decl2.c: -fansi-overloading is now the default.
15492
15493 * call.c (build_new_method_call): Check for erroneous args.
15494
15495 * pt.c (instantiate_class_template): Propagate
15496 TYPE_USES_MULTIPLE_INHERITANCE.
15497
15498 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
15499
15500 * call.c (enforce_access): Add static to routine.
15501
15502 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15503
15504 * call.c (build_user_type_conversion_1): Fix bad handling.
15505 (compare_ics): Likewise.
15506
15507 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15508
15509 * call.c (standard_conversion): Oops.
15510
15511 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
15512
15513 * g++.c: Update test for win32 (&& ! cygwin32).
15514
15515 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15516
15517 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15518 (ptr_reasonably_similar): New fn.
15519 * call.c (BAD_RANK): New rank.
15520 (ICS_BAD_FLAG): New macro.
15521 (standard_conversion): Handle almost-right pointer conversions.
15522 (reference_binding): Handle bad rvalue bindings.
15523 (add_*_candidate): Stuff.
15524 (build_over_call): Pass bad conversions to convert_for_initialization.
15525 (compare_ics): Handle bad convs.
15526 (joust): Likewise.
15527
15528 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
15529
15530 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15531 integer_type_node when computing pointer offsets.
15532
15533 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15534
15535 * tree.c (lvalue_type): New fn.
15536 (error_type): New fn.
15537 * call.c (op_error): Use error_type.
15538 (add_conv_candidate): Use lvalue_type.
15539 (add_builtin_candidates): Likewise.
15540 * error.c (args_as_string): Use error_type.
15541
15542 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15543
15544 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15545 (tsubst): Not here.
15546
15547 * decl.c (init_decl_processing): With -ansi, __null's type is the
15548 signed integral type with the same number of bits as a pointer.
15549 Introduce a new variable null_node for it.
15550 * cp-tree.h: Adjust.
15551 * call.c (null_ptr_cst_p): Adjust.
15552
15553 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
15554
15555 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15556 optimize.
15557
15558 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15559
15560 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15561 fns of classes without virtual functions.
15562
15563 * call.c (add_function_candidate): Handle `this' specially.
15564 (compare_ics): Likewise.
15565
15566 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
15567
15568 * typeck.c (build_conditional_expr): Fix handling of __null.
15569
15570 * decl2.c (comdat_linkage): New fn.
15571 (import_export_vtable): Use it.
15572 (import_export_decl): Use it.
15573 * method.c (make_thunk): Use it.
15574
15575 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15576
15577 * pt.c (end_template_decl): If we don't actually have parms, return.
15578 * parse.y (template_header): Accept 'template <>'.
15579
15580 * errfn.c: Allow 5 args.
15581
15582 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15583
15584 * tree.c (make_temp_vec): New fn.
15585 * pt.c (push_template_decl): Handle partial specs.
15586 (instantiate_class_template): Likewise.
15587 (more_specialized): Use get_bindings.
15588 (more_specialized_class): New fn.
15589 (get_class_bindings): New fn.
15590 (most_specialized_class): New fn.
15591 (do_function_instantiation): List candidates for ambiguous case.
15592 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15593 (shadow_tag): Call push_template_decl for partial specializations.
15594 * parse.y: Likewise.
15595 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15596 DECL_TEMPLATE_MEMBERS.
15597 * call.c (print_z_candidates): Reduce duplication.
15598
15599 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15600
15601 * decl2.c (lang_decode_option): Allow -fansi-overloading.
15602
15603 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15604
15605 * pt.c (get_bindings): New fn.
15606 (most_specialized): Likewise.
15607 (do_function_instantiation): Use them.
15608 (add_maybe_template): New fn.
15609 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15610 * call.c (build_new_op): Handle guiding decls.
15611 (build_new_function_call): Likewise.
15612 * decl2.c (finish_file): Likewise.
15613
15614 * decl2.c (mark_used): Do synthesis here.
15615 * call.c (build_method_call): Not here.
15616 (build_over_call): Or here.
15617 * typeck.c (build_function_call_real): Or here.
15618 * tree.c (bot_manip): Call mark_used on functions used in default
15619 args.
15620
15621 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15622
15623 * decl2.c (import_export_vtable): Delete code that disabled vtable
15624 heuristic on systems with ASM_OUTPUT_EXTERNAL.
15625
15626 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15627
15628 * typeck.c (build_x_function_call): Handle static call context
15629 better.
15630
15631 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15632 the function, not its outer block.
15633
15634 * call.c (build_field_call): Pass fields on to build_opfncall
15635 regardless of TYPE_OVERLOADS_CALL_EXPR.
15636 (build_method_call): Pass on to build_new_method_call sooner.
15637
15638 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15639 gives us.
15640 * class.c (instantiate_type): Don't put a POINTER_TYPE to
15641 METHOD_TYPE on an expression. Also make a copy of rhs instead of
15642 modifying it.
15643
15644 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15645
15646 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15647 (add_builtin_candidate): Don't take enums for ++.
15648 (build_new_method_call): Handle non-aggregates and field calls.
15649 Move new overloading code from...
15650 * cvt.c: Here.
15651
15652 * decl.c (grokparms): Don't check default args in templates.
15653
15654 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
15655
15656 * cvt.c (build_new_op): Fix args to build_unary_op.
15657 (add_builtin_candidates): Don't call type_promotes_to on float.
15658
15659 * decl.c (grokparms): Check the type of the default arg.
15660
15661 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15662 returning NULL_TREE.
15663
15664 * typeck.c (build_x_binary_op): Avoid doing extra work.
15665 (build_x_unary_op): Likewise.
15666 (build_x_conditional_expr): Likewise.
15667 * cvt.c (build_over_call): Return.
15668 (add_builtin_candidate): Fix MEMBER_REF.
15669 (build_new_op): Likewise.
15670
15671 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
15672
15673 * method.c (build_overload_name): Put bug fix into code but leave
15674 disabled for now so we can be bug compatible with older releases
15675 that do repeats incorrectly. In the future, we can enable it.
15676
15677 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15678
15679 * cvt.c (convert_like): Don't call build_cplus_new twice.
15680
15681 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15682 Control new overloading code with -fansi-overloading.
15683
15684 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15685
15686 * cvt.c (build_over_call): Call build_cplus_new.
15687 * call.c (build_method_call): Likewise.
15688 * typeck.c (build_function_call_real): Likewise.
15689 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15690 the COND_EXPR in a TARGET_EXPR so they use the same slot.
15691
15692 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15693 recursive calls.
15694 * typeck.c (complete_type): Propagate
15695 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15696
15697 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15698
15699 * cvt.c (joust): More ?: kludging. Sigh.
15700 (build_over_call): Don't try to synthesize global fns.
15701
15702 * search.c (lookup_conversions): Use binfo marking.
15703
15704 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
15705
15706 * search.c (build_mi_matrix): Use the correct value of cid
15707 when determining the new mi_size.
15708
15709 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15710
15711 * cvt.c (add_builtin_candidates): Do consider type conversion ops
15712 for the first parms of += et al.
15713 (strip_top_quals): New fn.
15714 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15715 (implicit_conversion): Likewise.
15716 (add_builtin_candidates): Be careful about arrays.
15717 (build_new_method_call): Handle vtable optimization.
15718
15719 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15720
15721 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15722 * cvt.c (reference_binding): Use it.
15723 (implicit_conversion): Use it.
15724 (add_builtin_candidate, COND_EXPR): Use it.
15725
15726 * cvt.c (build_new_function_call): Check for error args.
15727
15728 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15729
15730 * gxx.gperf: Add __null.
15731 * hash.h: Regenerate.
15732 * lex.h: Add RID_NULL.
15733 * lex.c (init_lex): Create null_pointer_node here, stick it in
15734 RID_NULL.
15735 * decl.c (init_decl_processing): Still set its type here.
15736 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15737 (convert_to_pointer_force): Likewise.
15738 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15739 if (! pedantic).
15740 * call.c (convert_harshness): Use null_ptr_cst_p.
15741 * typeck.c (convert_for_assignment): Likewise. Don't produce
15742 null_pointer_node.
15743
15744 * error.c (args_as_string): Handle lists of actual args, too.
15745 * cvt.c (null_ptr_cst): Support (void*)0 for now.
15746 (build_user_type_conversion_1): Improve diagnostics.
15747 (build_new_function_call): Likewise.
15748 (build_object_call): Likewise.
15749 (build_new_method_call): Likewise. Move call before def diagnostic...
15750 (build_over_call): Here.
15751
15752 * cvt.c (build_new_method_call): Don't complain about no match if
15753 LOOKUP_SPECULATIVELY.
15754 (build_over_call): Fix 'this' for virtual fn.
15755 (build_new_method_call): Add diagnostic.
15756
15757 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15758
15759 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15760 constructors to be passed in.
15761 (build_over_call): Likewise.
15762 (build_user_type_conversion_1): Pass them in.
15763 (convert_like): Likewise.
15764 (build_object_call): Handle overloaded conversions.
15765 (build_over_call): Pass the right args to build_vfn_ref.
15766 (standard_conversion): Fix pmf convs.
15767 (joust): Handle comparing statics and non-statics.
15768 (build_new_method_call): New fn.
15769 * call.c (build_method_call): Call it if NEW_OVER.
15770
15771 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
15772
15773 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15774 %D instead.
15775
15776 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
15777
15778 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15779 instead of just maybe_build_cleanup so that we deallocate the
15780 thrown object.
15781
15782 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15783
15784 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15785 * cp-tree.h (finish_prevtable_vardecl): Add decl.
15786
15787 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
15788
15789 * pt.c (instantiate_class_template): Call complete_type. Also, if
15790 we're at the end of the file and we just instantiated a template
15791 class with a vtable, call finish_prevtable_vardecl.
15792
15793 * error.c (dump_decl): Don't explode (or explode more gracefully
15794 as appropriate) if the object being dumped has a null type.
15795 (dump_expr): Likewise.
15796
15797 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15798 by counting the number of nodes that we'll need before allocating
15799 the array.
15800 (lookup_fnfields): Fix comment.
15801 (breadth_first_search): Fix comment.
15802
15803 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15804
15805 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15806 TYPE_ALIGN.
15807 * class.c (finish_struct): Call cplus_decl_attributes here.
15808 (finish_struct_1): Not here.
15809 * cp-tree.h: Adjust.
15810
15811 * pt.c (type_unification): New parameter STRICT.
15812 (unify): If STRICT, don't allow cv addition or base deduction.
15813 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15814
15815 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15816
15817 * search.c (get_template_base{_recursive}): New fns.
15818 * pt.c (more_specialized): New fn.
15819 (do_function_instantiation): Use it.
15820 (unify): Handle base deduction.
15821 * cvt.c (joust): Use more_specialized.
15822 Don't arbitrarily choose between non-builtin candidates.
15823 (build_over_call): Call require_complete_type.
15824
15825 * decl.c (start_function): Statics are static even in a #pragma
15826 interface file.
15827
15828 * decl2.c (import_export_vtable): Disable vtable heuristic on
15829 systems with ASM_OUTPUT_EXTERNAL.
15830
15831 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15832 (standard_conversion): No std conv to enum type.
15833
15834 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15835 for ptm's.
15836
15837 * cvt.c (reference_binding): Bind directly to a base subobject of
15838 a class rvalue.
15839
15840 * cvt.c (build_new_op): Enforce access control.
15841
15842 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
15843
15844 * typeck2.c (process_init_constructor): When scanning the
15845 union for a named field, skip things that aren't FIELD_DECLs.
15846
15847 * method.c (synthesize_method): Don't scan fndecl's rtl if
15848 we're at the end of the file; just assume the function can't
15849 be inlined.
15850
15851 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15852
15853 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15854 it failed.
15855
15856 * cvt.c (build_user_type_conversion_1): Handle overloaded
15857 conversion ops.
15858
15859 * cvt.c (add_builtin_candidates): Don't consider type conversion
15860 operators for the first parameter of operator=.
15861
15862 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
15863
15864 * typeck.c (complete_type): Only call layout_type if we're not
15865 expanding a template.
15866
15867 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15868
15869 * cvt.c (compare_ics): Oops.
15870
15871 * cvt.c (op_error): Oops.
15872
15873 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15874 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
15875 (build_conv): Use them.
15876 (implicit_conversion): Use them.
15877 (convert_like): Handle them.
15878 (build_new_op): Handle builtin COND_EXPR again.
15879 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
15880 in lists of types for COND_EXPR.
15881 (add_builtin_candidate): Add enum candidates for COND_EXPR.
15882
15883 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
15884
15885 * typeck.c (build_modify_expr): Always attempt to build a call to
15886 the assignment operator, even if we're using a default one.
15887 (convert_for_initialization): Call complete_type.
15888
15889 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15890
15891 * cvt.c (reference_binding): A REF_BIND gets the reference type.
15892 (implicit_conversion): Likewise.
15893 (convert_like): Likewise.
15894 (compare_ics): Likewise.
15895 (compare_qual): Likewise.
15896 (print_z_candidates): Handle no candidates.
15897 (build_new_op): Don't handle builtin COND_EXPR for now.
15898
15899 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
15900
15901 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15902
15903 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15904
15905 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15906
15907 * cvt.c (build_builtin_candidate): Oops.
15908 (build_new_op): Oops.
15909
15910 * method.c (build_opfncall): Pass COND_EXPR on.
15911 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15912 (add_builtin_candidate{,s}): Likewise.
15913 (add_builtin_candidates): Likewise.
15914 (print_z_candidates, op_error, build_new_op): Likewise.
15915 (type_decays_to): New fn.
15916 * lex.c (init_lex): Just say ?: for COND_EXPR.
15917
15918 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15919
15920 * typeck.c (complete_type): Call layout_type rather than building
15921 a new array type.
15922
15923 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15924 only use ptrdiff_t.
15925
15926 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15927
15928 * cvt.c: Always compile the new overloading code (but don't use it).
15929 (implicit_conversion): Add a BASE_CONV when converting to
15930 the same class type.
15931 (convert_like): Handle BASE_CONV.
15932
15933 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15934
15935 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15936 (add_builtin_candidate): Likewise.
15937
15938 NEW_OVER changes:
15939 * typeck.c (build_x_function_call): Try an operator function
15940 whenever we call an object of class type.
15941 * method.c (build_opfncall): Pass CALL_EXPRs through.
15942 * cvt.c (implicit_conversion): Do const-ref case first.
15943 (add_conv_candidate, build_object_call, op_error): New fns.
15944 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15945 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15946 builtin candidates.
15947 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
15948 Fall back on preincrement handling. Use op_error.
15949 Handle warn_synth.
15950 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
15951 an error_mark_node.
15952 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15953 properly.
15954
15955 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
15956
15957 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15958
15959 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
15960
15961 * typeck.c (build_component_ref_1): Use build_component_ref
15962 instead of open coding it here.
15963
15964 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15965
15966 * g++.c (main): Don't link with -lg++.
15967
15968 NEW_OVER changes:
15969 * cvt.c (convert_to_reference): Don't use convert_from_reference on
15970 result of build_type_conversion.
15971 (cp_convert): Only call build_method_call for ctors if
15972 build_type_conversion failed.
15973 (ptr_complete_ob): New function.
15974 (TYPE_PTR{,OB,MEM}_P): New macros.
15975 ({add,build}_builtin_candidate{,s}): New functions.
15976 (print_z_candidates): Handle builtins.
15977 (build_user_type_conversion_1): Don't use conversion fns for
15978 converting to a base type.
15979 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15980 (build_user_type_conversion): Use convert_from_reference.
15981 (build_new_op): New function.
15982 (build_over_call): Fix handling of methods.
15983 (compare_ics): Handle AMBIG_CONV properly.
15984 * typeck2.c: Increment abort count.
15985 * method.c (build_opfncall): Forward most requests to build_new_op.
15986 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15987
15988 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15989
15990 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15991 invalid second argument to dump_expr_list.
15992
15993 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
15994
15995 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15996
15997 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
15998
15999 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16000 ASSEMBLE_EXTERNAL.
16001
16002 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
16003
16004 * typeck2.c (process_init_constructor): New pedwarn for using { }
16005 to initialize a pointer to member function.
16006 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16007 we can avoid the new error.
16008
16009 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
16010
16011 * typeck.c (build_ptrmemfunc1): New function to hide details of
16012 pointer to member functions better.
16013
16014 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
16015
16016 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16017 methods into the actual method, as we know the implied object is
16018 not used.
16019
16020 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16021
16022 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16023 inside a system header.
16024
16025 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
16026
16027 * call.c (build_method_call): Call complete_type on the
16028 instance type.
16029
16030 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
16031
16032 * typeck.c (build_component_ref): Always build up an OFFSET_REF
16033 for obj_ptr->func so that we can know which object to use in a
16034 method call.
16035
16036 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
16037
16038 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16039 around things. Also improve maintainability.
16040
16041 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
16042
16043 * decl.c (grokdeclarator): Check for overflow when evaluating an
16044 array dimension.
16045
16046 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16047
16048 * cvt.c (cp_convert): Don't check for ambiguity with constructor
16049 if NEW_OVER.
16050
16051 * typeck.c (build_x_function_call): Pass function overload
16052 questions to new overloading code if NEW_OVER.
16053 * init.c (expand_aggr_init_1): Only check for type conversion ops
16054 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16055 Don't check for ambiguity with constructor if NEW_OVER.
16056 * cvt.c (convert_to_reference): Dereference the result of a type
16057 conversion operator.
16058 (build_conv): Propagate ICS_USER_FLAG.
16059 (implicit_conversion): Call instantiate_type.
16060 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16061 (add_function_candidate): Fix cv-quals on argtype.
16062 (print_z_candidates): New function.
16063 (build_new_function_call): Call it.
16064 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16065 consider non-converting constructors.
16066 Call print_z_candidates.
16067 Return an AMBIG_CONV for an ambiguous conversion.
16068 (build_user_type_conversion): Handle AMBIG_CONV.
16069 (convert_like): Fix test for building TARGET_EXPR.
16070 Call instantiate_type.
16071 Handle AMBIG_CONV and LVALUE_CONV.
16072 (build_over_call): Handle 0 args and ellipsis.
16073 * cp-tree.def: Add AMBIG_CONV.
16074
16075 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
16076
16077 * decl.c (lookup_name_real): If we find mem in obj when parsing
16078 `obj->mem', make sure we return the right value.
16079
16080 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
16081
16082 * search.c (get_base_distance): Call complete_type.
16083
16084 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
16085
16086 * decl.c (store_bindings): Make static.
16087
16088 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16089
16090 * init.c (expand_aggr_init_1): Don't check type conversions if
16091 NEW_OVER.
16092
16093 * cvt.c (z_candidate): Put back template field.
16094 (add_function_candidate): Set it.
16095 (add_template_candidate): Likewise.
16096 (joust): Use it.
16097 (compare_qual): Handle references and pointers to members.
16098 (compare_ics): Handle reference bindings.
16099
16100 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16101
16102 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
16103
16104 * call.c (compute_conversion_costs): Call complete_type.
16105
16106 * tree.c (vec_binfo_member): Use comptypes instead of comparing
16107 pointers, so we can handle template parameters.
16108
16109 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
16110
16111 * cvt.c (cp_convert_to_pointer): We have to call complete_type
16112 here; let's make it explicit instead of a side effect of an
16113 error check.
16114
16115 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16116
16117 * cvt.c (z_candidate): Remove template field.
16118 (reference_binding): Handle binding to temporary.
16119 (implicit_conversion): Likewise.
16120 (add_function_candidate): Handle artificial constructor parms.
16121 Handle functions with too few parms.
16122 (add_template_candidate): New function.
16123 (build_user_type_conversion_1): Handle constructors.
16124 (convert_like): Likewise.
16125 (build_over_call): Likewise.
16126 (build_new_function_call): Support templates.
16127 (compare_ics): Fix reference, inheritance handling.
16128
16129 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
16130
16131 * decl.c: Add signed_size_zero_node.
16132 (init_decl_processing): Build it.
16133 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16134 when we're trying to make a negative delta.
16135
16136 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16137
16138 Stop doing this damn index==strchr variable name confusion.
16139 * class.c (add_virtual_function): Change local var INDEX to be
16140 named IDX.
16141 (add_method): Likewise.
16142 * lex.c (print_parse_statistics): Likewise.
16143 * search.c (make_memoized_table_entry): Likewise.
16144 (lookup_fnfields_here): Likewise.
16145 (lookup_field): Likewise.
16146 (lookup_fnfields): Likewise.
16147 (get_baselinks): Likewise.
16148 * sig.c (build_signature_table_constructor): Likewise.
16149 (build_signature_method_call): Likewise.
16150 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16151 (get_member_function_from_ptrfunc): Likewise.
16152 (build_ptrmemfunc): Change local var INDEX to be IDX.
16153 (c_expand_start_case): Likewise.
16154
16155 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16156
16157 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16158 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16159 (convert_to_reference): Use build_type_conversion to convert to
16160 the reference type directly.
16161 (standard_conversion): Fix void* case, non-conversions.
16162 (reference_binding): Fix expr == 0 case, non-conversions.
16163 (convert_like): Support REF_BIND.
16164 (compare_qual): Split out from compare_ics.
16165 (compare_ics): Use it, handle icses with only a qual_conv.
16166
16167 * init.c (expand_vec_init): Don't crash if decl is NULL.
16168
16169 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
16170
16171 * mpw-config.in: New file, configury for Mac MPW.
16172 * mpw-make.sed: New file, makefile editing for MPW.
16173
16174 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16175
16176 * pt.c (instantiate_class_template): Call repo_template_used.
16177
16178 * search.c (lookup_conversions): Only lookup conversions in
16179 complete types.
16180
16181 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16182
16183 * cp-tree.def: Renamed from tree.def, to avoid confusion with
16184 gcc's tree.def.
16185 * cp-tree.h, lex.c: Include cp-tree.def.
16186 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16187
16188 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
16189
16190 * init.c (build_vec_delete_1): Call complete_type.
16191
16192 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
16193
16194 * except.c (start_anon_func): Make sure anonymous functions are
16195 never external.
16196
16197 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16198
16199 * decl.c (finish_function): If function_depth > 1, set nested.
16200
16201 * decl2.c (grokbitfield): Revert Bob's change.
16202 * class.c (finish_struct_1): Fix handling of named bitfield widths.
16203
16204 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
16205
16206 * pt.c (add_pending_template): Handle types.
16207 (lookup_template_class): With -fexternal-templates, just add the class
16208 to pending_templates instead of instantiating it now.
16209 * decl2.c (finish_file): Handle types in pending_templates.
16210
16211 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
16212
16213 * decl2.c (grokbitfield): Handle constant decls appropriately.
16214 Give an appropriate error message now instead of spewing core
16215 later.
16216
16217 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16218
16219 * decl2.c: Don't turn on thunks by default for now.
16220
16221 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
16222
16223 * typeck.c (complete_type): Handle error_mark_node.
16224 (common_type, OFFSET_TYPE): Handle template_type_parms.
16225
16226 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16227
16228 * pt.c (instantiate_decl): If at_eof, call import_export_decl
16229 regardless of DECL_INLINE.
16230
16231 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16232
16233 * class.c (finish_struct_bits): Copy TYPE_SIZE.
16234
16235 * rtti.c (build_dynamic_cast): Support templates.
16236 * tree.def: Support DYNAMIC_CAST_EXPR.
16237 * pt.c (tsubst_copy): Likewise.
16238 * decl2.c (build_expr_from_tree): Likewise.
16239
16240 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16241
16242 * typeck.c (build_static_cast): Support templates.
16243 (build_const_cast): Likewise.
16244 * tree.def: Support CONST/STATIC_CAST_EXPR.
16245 * pt.c (tsubst_copy): Likewise.
16246 * decl2.c (build_expr_from_tree): Likewise.
16247
16248 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16249
16250 * decl2.c (finish_vtable_vardecl): Don't trust
16251 TREE_SYMBOL_REFERENCED for vtables of local classes.
16252
16253 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16254
16255 * pt.c (tsubst_copy): Handle operator T.
16256
16257 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16258
16259 * init.c (build_delete): Move creation of PARMS inside test of
16260 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16261
16262 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
16263
16264 * typeck.c (build_conditional_expr): Don't assume that
16265 the arguments to ?: are always pointers or records.
16266
16267 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16268
16269 * decl2.c (import_export_decl): Still emit static/weak/comdat
16270 copies of inline template functions with -fno-implicit-templates.
16271
16272 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
16273
16274 * init.c (build_delete): Determine the complete basetype
16275 path to the destructor we're calling.
16276
16277 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
16278
16279 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16280 initialize the enum, because we really and truly don't know where
16281 it came from.
16282 (start_enum): Don't copy integer_zero_node because
16283 build_enumerator will do it.
16284
16285 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16286
16287 * decl.c (finish_function): Do access control on base destructors.
16288
16289 * pt.c (tsubst, case FUNCTION_DECL): Set up
16290 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16291 hose us.
16292
16293 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
16294
16295 * cvt.c (build_up_reference): If we have already extended the
16296 lifetime of the temporary, don't try it again.
16297 * typeck.c (c_expand_return): Don't try and convert the return
16298 value twice when we want a reference, once is enough.
16299
16300 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
16301
16302 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16303 LOOKUP_ONLYCONVERTING at all for now.
16304
16305 * search.c (add_conversions): Put the conversion function in
16306 TREE_VALUE, the basetype in TREE_PURPOSE.
16307 * cvt.c (build_type_conversion): Adjust.
16308 * cvt.c (build_expr_type_conversion): Adjust.
16309 * call.c (user_harshness): Adjust.
16310
16311 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16312
16313 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16314 backend's benefit.
16315
16316 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
16317
16318 * except.c (expand_start_catch_block): Add a dummy region, if we
16319 get an error, so that we can avoid core dumping later.
16320
16321 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
16322
16323 * cp-tree.h (OFFSET_REF): Remove.
16324 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16325 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16326 * init.c (expand_aggr_init_1): Likewise.
16327 (build_new): Likewise.
16328 * typeck.c (expand_target_expr): Likewise.
16329
16330 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16331
16332 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16333 TARGET_EXPR.
16334
16335 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
16336
16337 * cvt.c (build_up_reference): Redo how and when temporaries are
16338 created.
16339 * decl.c (grok_reference_init): Don't try and be smart about
16340 running cleanups.
16341
16342 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
16343
16344 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16345 (TARGET_EXPR...), now that it has 4 arguments.
16346 * tree.c (build_cplus_new): Likewise.
16347
16348 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16349
16350 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16351
16352 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16353 * decl.c (struct saved_scope): Remove named_labels,
16354 {base,member}_init_list.
16355 (maybe_push_to_top_level): Don't set them. Call
16356 push_cp_function_context if appropriate.
16357 (pop_from_top_level): Likewise.
16358
16359 * method.c (do_build_assign_ref): Remove obsolete check of
16360 TYPE_HAS_ASSIGN_REF (basetype).
16361
16362 * decl.c (grokfndecl): Diagnose user definition of
16363 implicitly-declared methods.
16364
16365 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
16366
16367 * method.c (do_build_copy_constructor): Add code to give
16368 meaningful error messages instead of crashing.
16369 (do_build_assign_ref): Don't synthesize assignment operators for
16370 classes containing reference or const members.
16371
16372 * class.c (struct base_info): Remove cant_synth_copy_ctor
16373 and cant_synth_asn_ref.
16374 (finish_base_struct): Remove the code that tries to conditionalize
16375 synthesis of copy constructors & assignment operators based on
16376 access permissions. Instead, let it fail when it tries to
16377 synthesize the copy constructor. This will give meaningful error
16378 messages instead of silently generating code to perform a bitcopy.
16379
16380 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
16381
16382 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16383 determining types for constant values.
16384
16385 * decl.c (struct named_label_list): Use instead of stuffing
16386 random items into a TREE_LIST node.
16387 (named_label_uses): Use the new struct.
16388 (poplevel): Likewise.
16389 (lookup_label): Likewise.
16390 (define_label): Add an error message to tell the user the line
16391 where the goto is located in addition to the destination of the
16392 goto.
16393 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
16394 named_label_uses.
16395 (finish_function): Likewise.
16396
16397 (start_decl): Complain about defining a static data member
16398 in a different type from which it was declared.
16399
16400 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16401
16402 * cvt.c (build_expr_type_conversion): Adjust.
16403
16404 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16405
16406 * call.c (build_method_call): Always convert 'this' to the
16407 appropriate type.
16408
16409 * search.c (add_conversions): Put the conversion function in
16410 TREE_VALUE, the type in TREE_PURPOSE.
16411 * cvt.c (build_type_conversion): Adjust.
16412 * call.c (user_harshness): Adjust.
16413
16414 * method.c (emit_thunk): Call temporary_allocation and
16415 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
16416
16417 * tree.c (build_cplus_array_type): Handle tweaking of
16418 TYPE_MAIN_VARIANT here.
16419 * typeck.c (common_type): Not here.
16420
16421 * typeck.c (complete_type): Only try to complete an array type if
16422 it has a domain.
16423
16424 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
16425
16426 * decl.c (grokvardecl): Call complete_type.
16427 (grokdeclarator): Call complete_type for PARM_DECLs.
16428
16429 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
16430
16431 * pt.c (instantiate_class_template): Re-set
16432 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16433
16434 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
16435
16436 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16437 smart enough to do it right.
16438 * tree.c (cp_expand_decl_cleanup): Likewise.
16439 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16440 cp_expand_decl_cleanup.
16441 (store_parm_decls): Likewise.
16442 (hack_incomplete_structures): Likewise.
16443 * except.c (push_eh_cleanup): Likewise.
16444
16445 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
16446
16447 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16448 frontend to the backend where it belongs.
16449 * tree.c (unsave_expr): Likewise.
16450 (unsave_expr_now): Likewise.
16451 * tree.def (UNSAVE_EXPR): Likewise.
16452 * cp-tree.h (unsave_expr): Likewise.
16453 (unsave_expr_now): Likewise.
16454
16455 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
16456
16457 * init.c (emit_base_init): Make sure the partial EH cleanups live
16458 on the function_obstack.
16459
16460 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
16461
16462 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16463 when checking for pointer types.
16464
16465 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16466
16467 * pt.c (instantiate_class_template): Remove obsolete check for
16468 access declarations.
16469
16470 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
16471
16472 * call.c (build_overload_call): Simplify calls to
16473 build_overload_call by removing last parameter.
16474 (build_method_call): Likewise.
16475 * cp-tree.h: Likewise.
16476 * method.c (build_opfncall): Likewise.
16477 * typeck.c (build_x_function_call): Likewise.
16478
16479 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
16480
16481 * call.c (default_parm_conversions): Factor out common code.
16482 (build_method_call): Use it.
16483 (build_overload_call_real): Use it.
16484
16485 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
16486
16487 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16488 but pedwarn as the code is bogus.
16489 * typeck.c (decay_conversion): Likewise.
16490 (build_function_call_real): Use build_addr_func instead of
16491 default_conversion. Don't allow pointer-to-method functions down
16492 here.
16493 (build_unary_op): Use real pointer-to-member functions instead of
16494 fake ones.
16495 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16496 (convert_for_assignment): Removed some obsolete code.
16497 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16498 build_x_function_call instead of current_class_ptr. Only call
16499 digest_init once on an initializer, we do this just checking
16500 TREE_TYPE.
16501 (build_expr_from_tree): Pass current_class_ref to
16502 build_x_function_call instead of current_class_ptr.
16503 * init.c (build_member_call): Likewise.
16504 * pase.y: Likewise.
16505 * error.c (dump_expr): Handle OFFSET_REFs better.
16506 * pt.c (unify): Handle pointer-to-member functions better.
16507 * decl.c (finish_function): Clear out current_class_ref just like
16508 we do for current_class_ptr.
16509
16510 * typeck.c (get_delta_difference): Handle virtual bases better.
16511
16512 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
16513
16514 * sig.c (build_signature_table_constructor): Use the delta for
16515 the original basetype for this virtual function with thunks.
16516 (build_signature_method_call): We still need to adjust 'this'
16517 with thunks.
16518
16519 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
16520
16521 * call.c (build_addr_func): New routine. Used to get the `real'
16522 address of a function or a method. Needed to avoid getting a
16523 pointer-to-member function.
16524 (build_call): New routine to build CALL_EXPRs.
16525 (build_method_call): Use it.
16526 * cvt.c (convert_to_aggr): Likewise.
16527 * typeck.c (build_function_call_real): Likewise.
16528 * sig.c (build_signature_table_constructor): Use build_addr_func.
16529 * cp-tree.h (build_call, build_addr_func): Declare them.
16530
16531 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
16532
16533 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16534 * parse.y: Remove uses of LOOKUP_AGGR.
16535
16536 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
16537
16538 * *.[chy]: Rename current_class_decl to current_class_ptr, and
16539 C_C_D to current_class_ref.
16540
16541 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16542
16543 * call.c (convert_harshness): Tighten up pointer conversions.
16544
16545 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
16546
16547 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16548 (finish_file): Likewise.
16549
16550 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16551
16552 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16553
16554 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16555 code.
16556
16557 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16558
16559 * decl2.c: Turn on thunks by default where supported.
16560
16561 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
16562
16563 * cp-tree.h (build_overload_call_maybe): Removed.
16564 * call.c (build_overload_call_real): Invert meaning of last arg to
16565 be require_complete.
16566 (build_overload_call): Likewise.
16567 * typeck.c (build_x_function_call): Use build_overload_call_real
16568 instead of build_overload_call_maybe.
16569
16570 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16571
16572 * decl2.c (finish_file): Don't try to emit functions that haven't
16573 been compiled.
16574
16575 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16576
16577 * decl2.c (finish_vtable_vardecl): Oops.
16578
16579 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16580 Also store the bindings from previous_class_values.
16581 (pop_from_top_level): Restore them.
16582
16583 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16584
16585 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16586 symbol has been referenced.
16587 (finish_file): Re-join synthesis/vtable loop with inline emission
16588 loop, disable inlining when an inline is output.
16589
16590 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
16591
16592 * except.c (init_exception_processing): Setup saved_in_catch.
16593 (push_eh_cleanup): Reset __eh_in_catch.
16594 (expand_start_catch_block): Set __eh_in_catch.
16595
16596 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
16597
16598 * except.c (push_eh_cleanup): Add tracking for whether or not we
16599 have an active exception object.
16600 (expand_builtin_throw): Use it to make sure a rethrow without an
16601 exception object is caught.
16602
16603 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
16604
16605 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16606 cache.
16607
16608 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16609
16610 * decl2.c (finish_file): Also use sentries for vars with
16611 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16612 created).
16613
16614 * lex.c (handle_cp_pragma): Disable #pragma
16615 interface/implementation if SUPPORTS_ONE_ONLY > 1.
16616
16617 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16618
16619 * method.c (emit_thunk): Wrap default case in
16620 temporary/permanent_allocation.
16621
16622 * method.c (make_thunk): Use DECL_ONE_ONLY.
16623 (emit_thunk): Call assemble_end_function.
16624
16625 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16626
16627 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16628 (import_export_decl): Likewise.
16629 (finish_prevtable_vardecl): Disable vtable hack if
16630 SUPPORTS_ONE_ONLY > 1.
16631
16632 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
16633
16634 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16635 PREDECREMENT_EXPRs take two arguments, not one.
16636
16637 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
16638
16639 * class.c (build_vtable_entry): Don't build thunks for abstract
16640 virtuals.
16641
16642 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16643 frontend.
16644
16645 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16646
16647 * class.c (set_rtti_entry): Use size_zero_node.
16648 (build_vtable): Likewise.
16649
16650 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
16651
16652 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16653 (prepare_fresh_vtable): Likewise.
16654
16655 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16656
16657 * method.c (emit_thunk): Call mark_used on the target function.
16658
16659 * call.c (build_method_call): Don't warn about pending templates.
16660
16661 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16662
16663 * decl2.c (finish_file): Fix list walking logic.
16664
16665 * typeck2.c (check_for_new_type): Only warn if -pedantic.
16666
16667 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
16668
16669 * class.c (finish_struct_1): Remove old code for
16670 dont_allow_type_definitions.
16671 * cp-tree.h: Likewise.
16672 * spew.c: Make sure cp-tree.h is included before parse.h, so the
16673 definition of flagged_type_tree is found before it is used.
16674 * lex.c: Likewise.
16675 * parse.y: Added the ftype member to the type union, and changed a
16676 number of rules to use it instead of ttype. Added calls to
16677 check_for_new_type() as appropriate.
16678 * typeck2.c (check_for_new_type): New function for checking
16679 if a newly defined type appears in the specified tree.
16680 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
16681 for check_for_new_type().
16682
16683 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16684
16685 * decl2.c (finish_file): Only use a sentry if the decl is public.
16686
16687 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16688 don't pass LOOKUP_ONLYCONVERTING.
16689
16690 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
16691
16692 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16693 properly keeps track of const and volatile type modifiers.
16694
16695 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16696
16697 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16698 * pt.c (comp_template_args): Use it.
16699
16700 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16701 assemble_external for artificial function decls.
16702
16703 * decl.c (cp_finish_decl): Oops.
16704
16705 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16706
16707 * decl2.c (import_export_decl): Put static data member templates
16708 into common storage, or make them weak, depending on whether they
16709 are dynamically or statically initialized.
16710 (get_sentry): New function.
16711 (finish_file): Do import_export_decl for static data members before
16712 building the init/fini functions. Don't init/fini a variable that's
16713 EXTERNAL. Use a sentry for variables in common. Fix mismatching
16714 push/pop_temp_slots.
16715 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16716 expand_static_init thang.
16717 * method.c (get_id_2): New function.
16718
16719 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
16720
16721 * parse.y (empty_parms): Make sure we use C++-style prototypes
16722 when we're declaring member functions.
16723
16724 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16725
16726 * Makefile.in (CONFLICTS): 16 s/r conflicts.
16727 * parse.y (self_template_type): New nonterminal.
16728
16729 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16730
16731 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16732 name.
16733 * parse.y (base_class.1): Allow 'typename foo::bar'.
16734
16735 * lex.c (check_newline): Remove #pragma code that plays with the
16736 input stream, since we now deal with tokens. Clear nextchar when
16737 we're done.
16738 (handle_cp_pragma): Use real_yylex.
16739 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
16740 in one place.
16741
16742 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16743
16744 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16745
16746 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16747
16748 * parse.y: New token SELFNAME for potential constructor.
16749 * spew.c (yylex): Handle it.
16750 * lex.c (identifier_type): Produce it.
16751
16752 * parse.y (complete_type_name): In :: case, don't push class binding.
16753 (complex_type_name): Likewise.
16754
16755 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
16756
16757 * typeck.c (build_reinterpret_cast): Handle pointer to member
16758 functions.
16759
16760 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16761
16762 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16763 pragmas.
16764 (check_newline): Put the vtable/unit/implementation/interface pragma
16765 code into handle_cp_pragma, replacing it with a call.
16766 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16767 args. Get the next token after handling the pragma token.
16768
16769 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16770
16771 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16772 (convert_to_pointer_force): Likewise.
16773
16774 * init.c (build_new): Fix array new without -fcheck-new.
16775
16776 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16777
16778 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16779 tree.c: Lose TYPE_NESTED_NAME.
16780
16781 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16782 as identifiers.
16783
16784 * tree.def: Add VEC_INIT_EXPR.
16785 * expr.c (cplus_expand_expr): Handle it.
16786 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16787 the extra file-scope symbol nastiness.
16788
16789 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16790
16791 * method.c (make_thunk): Thunks are static.
16792 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16793
16794 * decl2.c (mark_vtable_entries): Emit thunks as needed.
16795 (finish_file): Don't emit them here.
16796
16797 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16798
16799 * rtti.c (build_dynamic_cast): Handle null pointers.
16800 (ifnonnull): New function.
16801
16802 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
16803
16804 * call.c (build_method_call): Remember the original basetype we
16805 were called with. Give an error message instead of trying
16806 (incorrectly) to call a non-static member function through a
16807 non-inherited class.
16808
16809 * search.c (expand_upcast_fixups): Mark the new fixup as
16810 DECL_ARTIFICIAL.
16811
16812 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16813
16814 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16815
16816 * class.c (set_rtti_entry): Fix for thunks.
16817
16818 * decl2.c (import_export_decl): Still emit typeinfo fns for
16819 cv-variants of builtin types.
16820
16821 * rtti.c (expand_class_desc): Set up base_info_type_node here.
16822 (init_rtti_processing): Instead of here.
16823
16824 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16825
16826 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16827 (build_typeid): Only complain about taking dynamic typeid without
16828 -frtti.
16829
16830 * decl2.c: flag_rtti defaults to 1.
16831
16832 * rtti.c (get_tinfo_var): The general class case is now smaller.
16833 (init_rtti_processing): Pack the latter three fields of base_info
16834 into 32 bits.
16835
16836 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
16837
16838 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16839
16840 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
16841
16842 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16843 (push_memoized_context): Split out code to undefer pop_type_level to
16844 (clear_memoized_cache): here.
16845 (pop_memoized_context): We can only handle one layer of deferral of
16846 pop_type_level so clear the cache, if there was a previous level.
16847
16848 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16849
16850 * rtti.c (init_rtti_processing): Build up base_info_type_node.
16851 (expand_class_desc): Use one pointer to an array of base_info
16852 structs, passed using a CONSTRUCTOR.
16853
16854 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
16855
16856 * class.c (build_vbase_path): Remove block extern for
16857 flag_assume_nonnull_objects here.
16858 (build_vfn_ref): Split out functionality into build_vtbl_ref.
16859 (build_vtbl_ref): New routine.
16860 (build_vtable): Set up rtti info here.
16861 (add_virtual_function): Note in CLASSTYPE_RTTI the best
16862 place where we can get the rtti pointers from to avoid having to
16863 search around for a place.
16864 (finish_base_struct): Likewise.
16865 (finish_struct_1): Likewise. Never create totally new vtables
16866 with totally new vtable pointers for rtti. Disable code to layout
16867 vtable pointers better until we want to break binary
16868 compatibility.
16869 * rtti.c (build_headof_sub): New routine to convert down to a
16870 sub-object that has an rtti pointer in the vtable.
16871 (build_headof): Use it. Also, use build_vtbl_ref now to be more
16872 maintainable.
16873 (build_dynamic_cast): Make sure we have saved it, if we need to.
16874 * search.c (dfs_init_vbase_pointers): Disable code that deals with
16875 a more efficient vtable layout, enable later.
16876 * call.c (flag_assume_nonnull_objects): Moved declaration to
16877 * cp-tree.h: here. Declare build_vtbl_ref.
16878 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16879 function calls that want a tree.
16880
16881 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16882
16883 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16884 other X subobjects in the most derived type. Ack.
16885
16886 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16887 get_typeid will do it for us.
16888 (get_typeid_1): Break out call-building for expand_*_desc to use.
16889 (get_typeid): Call it.
16890 (expand_*_desc): Likewise.
16891 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16892 and void *.
16893 (init_decl_processing): Lose builtin_type_tdescs lossage.
16894 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16895
16896 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
16897
16898 * pt.c (tsubst): When calling set_nested_typename, use
16899 TYPE_NESTED_NAME (current_class_type) instead of
16900 current_class_name.
16901
16902 * decl.c (pushdecl): Likewise.
16903 (pushdecl_class_level): Likewise.
16904 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16905 set_nested_typename.
16906
16907 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16908
16909 * rtti.c (synthesize_tinfo_fn): Handle arrays.
16910
16911 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16912
16913 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16914
16915 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16916 (init_rtti_processing): Lose bad_cast_type.
16917 (build_dynamic_cast): Use throw_bad_cast.
16918
16919 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16920
16921 * decl2.c (finish_file): Don't synthesize artificial functions
16922 that are external and not inline.
16923
16924 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16925
16926 * decl2.c (finish_file): Handle having new inlines added to
16927 saved_inlines by synthesis.
16928
16929 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16930
16931 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16932
16933 RTTI rewrite to initialize nodes as needed, not require that
16934 users #include <typeinfo>, complete functionality and reduce wasted
16935 space.
16936 * rtti.c (init_rtti_processing): New fn.
16937 (build_typeid): The vtable entry is now a function.
16938 (get_tinfo_var): New fn.
16939 (get_tinfo_fn): Likewise.
16940 (get_typeid): Use it.
16941 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16942 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16943 points __rtti_*.
16944 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16945 (synthesize_tinfo_fn): New fn.
16946 * method.c (build_t_desc_overload): Lose.
16947 (build_overload_with_type): More generic.
16948 * decl.c (init_decl_processing): Call init_rtti_processing.
16949 * class.c (set_rtti_entry): Use get_tinfo_fn.
16950 * decl2.c (mark_vtable_entries): Mark the rtti function.
16951 (finish_prevtable_vardecl): Don't build_t_desc.
16952 (import_export_decl): Handle tinfo functions.
16953 (finish_file): Likewise.
16954 * typeck.c (inline_conversion): New fn.
16955 (build_function_call_real): Use it.
16956 * cp-tree.h: Add decls.
16957
16958 * method.c (hack_identifier): Also convert component_refs from
16959 references.
16960
16961 * lex.c (cons_up_default_function): Use the type, not the name, in
16962 declspecs.
16963
16964 * decl2.c (import_export_vtable): Fix weak vtables.
16965
16966 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
16967
16968 * search.c (get_base_distance_recursive): Fix access checks for
16969 protected bases.
16970
16971 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16972
16973 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16974 cp-tree.h.
16975 (convert_harshness): Add prototypes wrapped by PROTO.
16976 * decl2.c (grok_function_init): Likewise.
16977 (do_toplevel_using_decl): Change to void return type.
16978 * class.c (build_vtable_entry): Remove decl of make_thunk.
16979 (merge_overrides): Fix order of arg definitions.
16980 (finish_vtbls): Likewise.
16981 (fixup_vtable_deltas): Likewise.
16982 (modify_all_direct_vtables): Likewise.
16983 (modify_all_indirect_vtables): Likewise.
16984 * search.c (get_base_distance_recursive): Likewise.
16985 (get_abstract_virtuals_1): Likewise.
16986 (fixup_virtual_upcast_offsets): Likewise.
16987 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16988 * init.c (perform_member_init): Fix order of arg definitions.
16989 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16990 * cp-tree.h (make_thunk): Add decl.
16991 (overload_template_name, push_template_decl): Add decls.
16992 (do_toplevel_using_decl): Change to void return type.
16993 (vec_binfo_member): Add decl.
16994
16995 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16996
16997 * typeck.c (mark_addressable, convert_for_assignment,
16998 convert_for_initialization, pointer_int_sum, pointer_diff,
16999 unary_complex_lvalue): Add prototypes wrapped by PROTO.
17000 (convert_sequence): #if 0 fn decl, since definition also is.
17001
17002 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
17003
17004 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17005 cast to pointer types for type searching.
17006
17007 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17008
17009 * typeck.c (get_delta_difference): Use cp_error, not error, in the
17010 case where BINFO == 0.
17011
17012 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
17013
17014 * call.c (build_method_call): Fix wording of error messages so
17015 constructors come out right.
17016
17017 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
17018
17019 * decl.c (push_overloaded_decl): Don't warn about hidden
17020 constructors when both the type and the function are declared
17021 in a system header file.
17022
17023 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
17024
17025 * class.c (finish_struct_1): Propagate the TYPE_PACKED
17026 flag for the type to the type's fields.
17027
17028 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17029
17030 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17031
17032 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
17033
17034 * class.c (base_info, finish_base_struct): Replace
17035 needs_virtual_dtor with base_has_virtual.
17036
17037 (finish_struct_1): Remove the old code that tried to make default
17038 destructors virtual. Use base_has_virtual when checking if we need
17039 to add a vtable entry for the rtti code.
17040
17041 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17042
17043 * pt.c (push_template_decl): Complain about template decl with
17044 inappropriate declaration.
17045
17046 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
17047
17048 * typeck.c (build_x_unary_op): Remove bogus check for taking
17049 the address of a member function.
17050
17051 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17052
17053 * parse.y (constructor_declarator): Only push the class if
17054 we are not already in the class.
17055
17056 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
17057
17058 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17059 Add additional argument to INIT_CUMULATIVE_ARGS.
17060
17061 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
17062
17063 * decl.c (shadow_tag): Fix error about anon union with methods.
17064
17065 * parse.y (self_reference): Only generate a self-reference if this
17066 is a non-template class.
17067 (opt.component_decl_list): Only use it if it was generated.
17068
17069 * parse.y (component_decl_1): Use constructor_declarator.
17070 (fn.def2): Likewise.
17071 (notype_component_declarator0): Likewise.
17072
17073 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
17074
17075 * typeck.c (build_x_unary_op): Add checks for taking the address
17076 of a TARGET_EXPR or of a member function, and give appropriate
17077 warnings.
17078
17079 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
17080
17081 * pt.c (process_template_parm): Allow template type parms to be
17082 used as types for template const parms.
17083
17084 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
17085
17086 * init.c (expand_vec_init): Ensure the eh cleanups are on the
17087 function_obstack.
17088
17089 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
17090
17091 * decl.c (lookup_name_real): Be even more picky about the
17092 ambiguous lookup warning.
17093 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17094 * parse.y (constructor_declarator): Rather than here.
17095
17096 * parse.y (constructor_declarator): New nonterminal.
17097 (fn.def1): Use it.
17098 (explicit_instantiation): Likewise.
17099
17100 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17101
17102 Add implicit declaration of class name at class scope.
17103 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17104 * parse.y (self_reference): New nonterminal.
17105 (opt.component_decl_list): Use it.
17106 (fn.def1): Add nested_name_specifier type_name cases.
17107 * class.c (build_self_reference): New function.
17108 (finish_struct): Handle access_default later, move self-reference
17109 decl to the end.
17110 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17111 * cp-tree.h: Adjust.
17112
17113 * pt.c (do_function_instantiation): Separate handling of member
17114 functions and non-member functions properly.
17115
17116 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17117
17118 * pt.c (process_template_parm): Improve error for 'volatile class K'.
17119
17120 * class.c (finish_struct_1): Check the right slot for destructors.
17121
17122 * decl.c (start_enum): Complain about enum templates.
17123
17124 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
17125
17126 * init.c (resolve_offset_ref): Offset pointers to member data by one.
17127 * typeck.c (unary_complex_lvalue): Likewise.
17128
17129 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
17130
17131 * typeck.c (c_expand_return): Check for a returned local
17132 array name, similar to the check for an ADDR_EXPR.
17133
17134 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17135
17136 * decl.c (cp_finish_decl): Don't build cleanups for static
17137 variables here.
17138
17139 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
17140
17141 * typeck.c (build_modify_expr): Fix error messages to be more
17142 accurate.
17143 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17144 assignment operators.
17145 * error.c (assop_as_string): Likewise. Add support for `%Q' for
17146 assignment operators.
17147
17148 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
17149
17150 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
17151 give an error if initialized. pedwarn about nested type with the
17152 same name as its enclosing class.
17153
17154 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17155
17156 * typeck.c (require_complete_type): Be sure to instantiate the
17157 MAIN_VARIANT of the type.
17158
17159 * decl2.c (finish_file): Instantiate pending templates before
17160 processing static constructors and destructors.
17161
17162 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17163 unless at_eof.
17164
17165 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
17166
17167 * decl2.c (delete_sanity): If error_mark_node is passed
17168 in as an expression, quit while we're ahead.
17169
17170 * decl.c (grokdeclarator): Give an error message if `friend'
17171 is combined with any storage class specifiers.
17172
17173 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
17174
17175 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17176 definition of nonexistent nested type.
17177
17178 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17179 not to say 'typedef'.
17180
17181 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17182
17183 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17184 * search.c (dfs_walk, dfs_init_vbase_pointers,
17185 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17186 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17187
17188 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17189
17190 * except.c (build_throw): Support minimal parse.
17191 * pt.c (tsubst_copy): Support THROW_EXPR.
17192 * decl2.c (build_expr_from_tree): Likewise.
17193
17194 * pt.c (mangle_class_name_for_template): Always allocate
17195 scratch_firstobj.
17196
17197 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
17198
17199 * cvt.c (cp_convert_to_pointer): Give an appropriate error
17200 when trying to cast from an incomplete type.
17201
17202 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17203
17204 * pt.c (instantiate_class_template): Don't bother setting up
17205 CLASSTYPE_TAGS explicitly, as the nested types will add
17206 themselves.
17207
17208 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
17209
17210 * decl.c (shadow_tag): Remove old error check for usage of
17211 an enum without a previous declaration.
17212 (xref_tag): Add error message about usage of enums without a
17213 previous declaration.
17214
17215 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17216
17217 * lex.c (do_identifier): Only do name consistency check if we're
17218 parsing.
17219
17220 * pt.c (push_template_decl): Don't crash if we get a member defn
17221 that doesn't match.
17222
17223 * decl.c (xref_tag_from_type): New function to do an xref without
17224 always having to figure out code_type_node.
17225 * cp-tree.h: Declare it.
17226 * pt.c (instantiate_class_template): Use it for friend classes.
17227 (lookup_template_class): Use it.
17228
17229 * typeck2.c (build_functional_cast): Pull out a single parm before
17230 passing it to build_c_cast.
17231
17232 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
17233
17234 * expr.c (do_case): Give an error message if a pointer is
17235 given as a case value.
17236
17237 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
17238
17239 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17240 an overload list.
17241
17242 * lex.c (cons_up_default_function): Really, now, interface hackery
17243 does not apply to synthesized methods.
17244
17245 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
17246
17247 * call.c (build_method_call): Ctors and dtors now have special names
17248 with respect to lookups.
17249 * class.c (add_method): Likewise.
17250 (grow_method): Likewise.
17251 (finish_struct_methods): Likewise.
17252 (warn_hidden): Likewise.
17253 (finish_struct_1): Likewise.
17254 * cvt.c (convert_to_reference): Likewise.
17255 (convert_to_aggr): Likewise.
17256 (cp_convert): Likewise.
17257 * decl2.c (check_classfn): Likewise.
17258 * init.c (expand_member_init): Likewise.
17259 (expand_default_init): Likewise.
17260 (expand_aggr_init_1): Likewise.
17261 (build_offset_ref): Likewise.
17262 (build_new): Likewise.
17263 (build_delete): Likewise.
17264 * lex.c (do_inline_function_hair): Likewise.
17265 * search.c (lookup_field_1): Likewise.
17266 (lookup_fnfields_here): Likewise.
17267 (lookup_field): Likewise.
17268 (lookup_fnfields): Likewise.
17269 (get_virtual_destructor): Likewise.
17270 (dfs_debug_mark): Likewise.
17271 (dfs_pushdecls): Likewise.
17272 (dfs_compress_decls): Likewise.
17273 * tree.c (layout_basetypes): Likewise.
17274 * typeck.c (build_component_ref): Likewise.
17275 (build_x_function_call): Likewise.
17276 (build_modify_expr): Likewise.
17277 (convert_for_initialization): Likewise.
17278 (build_functional_cast): Likewise.
17279 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17280 (CTOR_NAME): New.
17281 (DTOR_NAME): New.
17282 * decl.c (ctor_identifier): New.
17283 (dtor_identifier): New.
17284 (init_decl_processing): Set them.
17285
17286 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
17287
17288 * typeck.c (build_component_ref): Don't get confused by fields whose
17289 context has no type name, like pointer to member functions.
17290
17291 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
17292
17293 * decl.c (grokdeclarator): Handle typedef without declarator.
17294
17295 * pt.c (tsubst): Handle SCOPE_REF in declarator.
17296
17297 * parse.y (bad_parm): Catch another case of missing `typename'.
17298
17299 * lex.c (yyprint): Handle TYPE_DECLs.
17300
17301 * decl.c (start_function): Don't try to be clever.
17302
17303 * lex.c: Lose compiler_error_with_decl.
17304 * typeck2.c: Lose error_with_aggr_type.
17305 (incomplete_type_error): Use cp_* instead of old functions.
17306 (readonly_error): Likewise.
17307 * typeck.c (convert_arguments): Likewise.
17308 * search.c (lookup_nested_field): Likewise.
17309 * method.c (make_thunk): Likewise.
17310 * decl.c (grokparms): Likewise.
17311 * cp-tree.h: Update.
17312
17313 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17314 and value.
17315
17316 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
17317
17318 * method.c (build_opfncall): When deleting a pointer to an
17319 array, build a new pointer to the tree past any ARRAY_TYPE
17320 nodes.
17321
17322 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17323
17324 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17325
17326 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
17327
17328 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17329 and ! DECL_INLINE.
17330
17331 * decl.c (finish_function): Don't set nested based on
17332 hack_decl_function_context.
17333 * parse.y (function_try_block): Check for nested function.
17334 (pending_inlines): Likewise.
17335
17336 * decl2.c (build_expr_from_tree): If a unary op already has a
17337 type, just return it.
17338
17339 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17340
17341 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17342 (finish_file): Check the return value of walk_vtables.
17343 (finish_prevtable_vardecl): Return int.
17344 (finish_vtable_vardecl): Likewise.
17345 (prune_vtable_vardecl): Likewise.
17346 * lex.c (set_vardecl_interface_info): Likewise.
17347 * cp-tree.h: Adjust return types.
17348
17349 * class.c (delete_duplicate_fields_1): Don't complain about
17350 duplicate nested types if they're the same type.
17351 (finish_struct): Remove check for duplicate.
17352 * decl2.c (grokfield): Don't check for typedef of anonymous type.
17353
17354 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17355
17356 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17357
17358 * decl.c (grokdeclarator): Lose special handling of class-level
17359 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
17360 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17361
17362 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17363
17364 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17365
17366 * search.c (compute_access): Fix handling of anonymous union
17367 members.
17368 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17369 from anonymous unions to their members.
17370
17371 * typeck.c (build_x_function_call): For static member functions,
17372 hand off to build_member_call.
17373
17374 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
17375
17376 * typeck.c (build_component_ref): Handle OFFSET_REFs.
17377
17378 * init.c (expand_vec_init): Fix init == 0 case.
17379
17380 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
17381
17382 * init.c (build_new): pedwarn about init and array new.
17383 (expand_vec_init): Handle lists, use convert_for_initialization.
17384
17385 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17386 when converting to an aggregate type.
17387 * cvt.c (cp_convert): Pass it through.
17388
17389 * typeck.c (build_conditional_expr): Handle user-defined
17390 conversions to slightly different types.
17391
17392 * decl.c (grokdeclarator): Force an array type in a parm to be
17393 permanent.
17394
17395 * decl2.c (do_using_directive): Sorry.
17396 (do_namespace_alias): Likewise.
17397 * lex.c (real_yylex): Warn about using the `namespace' keyword.
17398
17399 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
17400
17401 * parse.y (datadef): Move call to note_list_got_semicolon up.
17402
17403 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
17404
17405 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
17406
17407 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
17408
17409 * decl.c (cp_finish_decl): The exception regions have to be
17410 nested, not overlapping. We start the exception region for a
17411 decl, after it has been fully built, and all temporaries for it
17412 have been cleaned up.
17413
17414 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
17415
17416 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
17417
17418 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
17419
17420 * tree.def: Add RETURN_INIT.
17421 * pt.c (instantiate_decl): Handle RETURN_INIT.
17422 * decl.c (store_return_init): Handle minimal_parse_mode.
17423
17424 * tree.c (cp_build_type_variant): Just return an error_mark_node.
17425 * decl.c (make_typename_type): Don't try to get the file and line
17426 of an identifier.
17427 * typeck.c (comptypes): Handle TYPENAME_TYPE.
17428
17429 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
17430
17431 * decl.c (poplevel): Make sure we clear out and restore old local
17432 non-VAR_DECL values by default when they go out of scope.
17433
17434 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17435
17436 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17437 referring to addresses of variables and functions.
17438
17439 * error.c (dump_expr): Support SIZEOF_EXPR.
17440
17441 * init.c (do_friend): Use the return value of check_classfn.
17442
17443 * typeck.c (convert_arguments): Call complete_type.
17444
17445 * method.c (hack_identifier): After giving an error, set value to
17446 error_mark_node.
17447
17448 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17449
17450 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17451 lossage for local classes.
17452 * cp-tree.h: Declare it.
17453 * decl.c (lookup_name_real): Evil, painful hack for local classes.
17454 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17455 Use hack_decl_function_context.
17456 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17457 (start_function): Use hack_decl_function_context.
17458 (finish_function): Likewise.
17459 * method.c (synthesize_method): Likewise.
17460 * lex.c (process_next_inline): Likewise.
17461 (do_pending_inlines): Likewise.
17462 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17463 done with it.
17464
17465 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
17466
17467 * sig.c (build_signature_pointer_or_reference_type): Align
17468 signature pointers/references on 8-byte boundaries so they can be
17469 grabbed 2 words at a time on a Sparc.
17470
17471 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
17472
17473 * method.c (hack_identifier): Requiring a static chain is now a
17474 hard error.
17475 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17476 functions.
17477
17478 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17479
17480 * init.c (build_offset_ref): Call complete_type.
17481
17482 * decl.c (pop_from_top_level): Always pop previous_class_type.
17483
17484 * parse.y: Handle multiple decls in a for-init-statement.
17485 * pt.c (tsubst_expr): Likewise.
17486
17487 * pt.c (tsubst): Use tsubst_expr for the second operand of an
17488 ARRAY_REF.
17489
17490 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17491 (poplevel_class): Set it here.
17492 (pop_from_top_level): Pop it here if we're returning to class scope.
17493 * class.c (pushclass): Don't set it here.
17494
17495 * decl.c (maybe_push_to_top_level): Save current_template_parms,
17496 and clear it if !pseudo.
17497 (pop_from_top_level): Restore it.
17498
17499 * decl2.c (finish_file): Push the dummy each time we walk the list
17500 of vtables.
17501
17502 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17503 something for CAST_EXPR.
17504
17505 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17506
17507 * cvt.c (cp_convert): Warn about implicit conversion of the
17508 address of a function to bool, as it is always true.
17509
17510 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17511
17512 * typeck.c (c_expand_return): Fix warning for local externs returned.
17513
17514 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
17515
17516 * tree.c (mapcar): Propagate const and volatile properly.
17517
17518 * typeck.c (complete_type): Be sure to instantiate the
17519 MAIN_VARIANT of the type.
17520
17521 * method.c (synthesize_method): Class interface hackery does not
17522 apply to synthesized methods.
17523
17524 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
17525
17526 * pt.c (comp_template_args): Use comptypes rather than just
17527 checking for TEMPLATE_TYPE_PARM equivalence.
17528
17529 * typeck.c (build_x_function_call): Call complete_type before
17530 checking TYPE_OVERLOADS_CALL_EXPR.
17531
17532 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
17533
17534 * g++.c (main): Check also for new define ALT_LIBM.
17535
17536 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17537
17538 * pt.c (instantiate_class_template): If we don't have a pattern
17539 yet, that's OK.
17540 (coerce_template_parms): If we see a local class, bail.
17541
17542 * decl.c (grok_reference_init): Make sure there's a type before
17543 checking its code.
17544
17545 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17546 (push_template_decl): Likewise.
17547
17548 * parse.y (named_class_head): Set
17549 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17550
17551 * decl.c (xref_tag): Diagnose redeclaration of template
17552 type-parameter name.
17553
17554 * error.c (dump_type): Handle anonymous template type parms.
17555
17556 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17557 TYPE_STUB_DECL.
17558 (coerce_template_parms): Likewise.
17559
17560 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
17561
17562 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17563 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17564
17565 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17566
17567 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17568 before trying to get its STUB_DECL.
17569 (coerce_template_parms): Likewise.
17570
17571 * parse.y (template_type_parm): If they didn't use 'class',
17572 pretend they did after giving an error.
17573
17574 * pt.c (coerce_template_parms): Diagnose use of local class.
17575
17576 * decl.c (grok_reference_init): Use instantiate_type.
17577
17578 * error.c (dump_expr): Handle TEMPLATE_DECLs.
17579
17580 * parse.y (named_class_head): Diagnose mismatching types and tags.
17581
17582 * decl.c (pushdecl): Type decls and class templates clash with
17583 artificial type decls, not hide them.
17584
17585 * decl.c (redeclaration_error_message): Diagnose redefinition of
17586 templates properly.
17587 (duplicate_decls): Diagnose disallowed overloads for template
17588 functions, too.
17589
17590 * decl.c (start_decl): Call complete_type before checking for a
17591 destructor.
17592
17593 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17594
17595 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17596
17597 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17598
17599 * decl.c (grok_op_properties): Don't check for operator++(int) in
17600 a template.
17601
17602 * tree.c (perm_manip): Return a copy of variable and function
17603 decls with external linkage.
17604
17605 * tree.def: Change some of the min tree codes to type "1".
17606 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17607 * method.c (build_overload_int): Emit something arbitrary for
17608 anything but an INTEGER_CST if we're in a template.
17609
17610 * decl.c (cp_finish_decl): Call complete_type before deciding
17611 whether or not to lay out the decl.
17612
17613 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17614
17615 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17616
17617 * typeck2.c (build_x_arrow): Call complete_type.
17618
17619 * pt.c (add_pending_template): Broken out.
17620 (lookup_template_class): If -fexternal-templates, call it for all
17621 the methods of implemented types.
17622 (instantiate_class_template): Instead of instantiating them here.
17623 (instantiate_decl): Handle -fexternal-templates earlier.
17624
17625 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17626
17627 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17628 memoized lookup stuff inside GATHER_STATISTICS.
17629
17630 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17631
17632 * decl.c (start_decl): Complain about array of incomplete type
17633 here.
17634 (grokdeclarator): Not here.
17635
17636 * parse.y (template_parm): Expand full_parm inline so we can set
17637 the rule's precedence.
17638
17639 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17640 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17641 * decl2.c (grokbitfield): Don't check for integer constant here.
17642 * class.c (finish_struct_1): Check here.
17643
17644 * decl.c (define_label): Make the min decl go on permanent_obstack.
17645
17646 * pt.c (unify): Don't handle CONST_DECLs.
17647 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17648 (tsubst_copy): Likewise.
17649
17650 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17651 CONST_DECL for a template parm.
17652
17653 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
17654
17655 * decl.c (grokdeclarator): Complain about array of incomplete type
17656 here.
17657 (start_decl_1): Not here.
17658
17659 * pt.c (tsubst): Handle pointer-to-function declarators.
17660
17661 * method.c (hack_identifier): If pedantic, diagnose local class
17662 methods that require a static chain.
17663
17664 * decl.c (grok_op_properties): No longer static.
17665 * cp-tree.h: Declare it.
17666 * pt.c (tsubst): Call it for operators.
17667 Use tsubst_copy for TREE_VECs.
17668
17669 * parse.y (template_arg): The expr has precedence like '>'.
17670
17671 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
17672
17673 * pt.c (coerce_template_parms): Don't coerce an expression using
17674 template parms.
17675 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17676 (tsubst): Don't use build_index_2_type if the max_value uses template
17677 parms.
17678 * method.c (build_overload_int): Emit something arbitrary for an
17679 expression using template parms.
17680
17681 * parse.y (template_close_bracket): New non-terminal to catch use
17682 of '>>' instead of '> >' in template class names.
17683 (template_type): Use it.
17684 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17685
17686 * tree.def: Add CAST_EXPR.
17687 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17688 CONVERT_EXPR for minimal_parse_mode.
17689 * typeck.c (build_c_cast): Likewise.
17690 * pt.c (tsubst_copy): Likewise.
17691 * decl2.c (build_expr_from_tree): Likewise.
17692 * error.c (dump_expr): Likewise.
17693
17694 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17695
17696 * except.c (SetTerminate, SetUnexpected): Put back global vars.
17697 (init_exception_processing): Put back decl/init of
17698 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17699 fns from libstdc++.
17700
17701 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17702 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17703 Delete unused fns.
17704 * cp-tree.h (declare_uninstantiated_type_level,
17705 uninstantiated_type_level_p): Delete prototypes.
17706
17707 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17708
17709 * pt.c (tsubst_expr): Add default return.
17710
17711 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17712
17713 * error.c (fndecl_as_string): Delete unused arg CNAME.
17714 * sig.c (build_signature_table_constructor,
17715 build_signature_method_call): Fix calls.
17716
17717 * class.c (the_null_vtable_entry): Delete var definition.
17718 (init_class_processing): Delete tree the_null_vtable_entry init.
17719 * decl.c (no_print_{functions, builtins}): Declare as static.
17720 (__tp_desc_type_node): #if 0 var definition.
17721 (init_type_desc): #if 0 init of __tp_desc_type_node.
17722 (vb_off_identifier): Move var decl into init_decl_processing.
17723 (current_function_assigns_this): Declare as static.
17724 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17725 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17726 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17727 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17728 * init.c (BI_header_type, BI_header_size): Declare as static.
17729 * pt.c (template_classes): Delete unused var.
17730 (add_pending_template): Delete decl for non-existent fn.
17731 (lookup_template_class): Delete vars CODE and TAG_CODE.
17732 (instantiate_template): Delete unused var TARGS.
17733 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17734 Delete decls.
17735 (__tp_desc_type_node): #if 0 var decl.
17736 (fndecl_as_string): Fix prototype.
17737
17738 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17739
17740 * tree.def: Add GOTO_STMT.
17741 * pt.c (tsubst_expr): Support goto and labels.
17742 * decl.c (define_label): Support minimal parsing.
17743 * parse.y (simple_stmt): Likewise.
17744
17745 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17746
17747 * xref.c (GNU_xref_member): Only define/set var I if
17748 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17749 used.
17750 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17751 (GNU_xref_end): Fix call.
17752 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17753 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17754
17755 * tree.c (build_exception_variant): Delete unused vars I, A, T,
17756 T2, and CNAME.
17757 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17758 (mapcar): Delete unused var CODE.
17759 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17760 (break_out_cleanups): Fix call.
17761 (bot_manip): Likewise.
17762 * call.c (build_method_call): Likewise.
17763 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17764 Likewise.
17765 * typeck.c (unary_complex_lvalue, build_modify_expr,
17766 convert_for_initialization): Likewise.
17767 * typeck2.c (build_functional_cast): Likewise.
17768 * cp-tree.h (build_cplus_new): Fix prototype.
17769
17770 * repo.c (open_repo_file): Delete unused var Q.
17771 (repo_compile_flags, repo_template_declared,
17772 repo_template_defined, repo_class_defined, repo_inline_used,
17773 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17774 (repo_get_id, repo_vtable_used): Declare as static.
17775 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17776 prototypes.
17777
17778 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17779
17780 * parse.y (pending_inlines): Add function_try_block case.
17781
17782 * pt.c (unify): Fix for template const parms.
17783
17784 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17785
17786 * lex.c (extract_interface_info): Delete forward decl.
17787 (default_copy_constructor_body, default_assign_ref_body): Delete
17788 decls for non-existent functions.
17789 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17790 (init_lex): Delete setting them.
17791 (cons_up_default_function): Delete unused vars FUNC_BUF,
17792 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
17793 #if 0'd synth code.
17794 (toplevel, expression_obstack): Delete unused extern decls.
17795 (tree_node_kind): Delete unused enum.
17796 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17797 GATHER_STATISTICS.
17798 (tree_node_kind_names): Delete unused extern decl.
17799 (synth_obstack): Delete unused var.
17800 (init_lex): Don't set it.
17801 (init_parse): Add decl before use.
17802 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17803 (current_unit_{name, language}): Delete unused vars.
17804 (check_newline): Don't bother setting them, just accept the #pragma.
17805 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17806 (current_unit_{name, language}): Delete decls.
17807
17808 * search.c: Wrap all of the memoized functions, macros, and
17809 variables inside #ifdef GATHER_STATISTICS.
17810 (lookup_field, lookup_fnfields): Likewise.
17811 (init_search_processing): Likewise.
17812 (reinit_search_statistics): Wrap whole function.
17813 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17814
17815 * decl.c (finish_function): Only call pop_memoized_context if
17816 GATHER_STATISTICS is defined.
17817 (start_function): Likewise for push_memoized_context.
17818 * class.c (pushclass, popclass): Likewise.
17819
17820 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17821 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17822
17823 * cvt.c (cp_convert): Delete unused local var FORM.
17824 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17825 prototypes.
17826
17827 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17828
17829 * pt.c (do_poplevel): Oops; really return what we get from
17830 poplevel this time.
17831
17832 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17833
17834 * cp-tree.h (is_aggr_type): Add prototype.
17835
17836 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17837 * method.c ({push,pop}_cp_function_context): Delete decls.
17838 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17839 (SetUnexpected, SetTerminate): Delete unused vars.
17840 (init_exception_processing): Don't set SetUnexpected or
17841 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17842 (output_exception_table_entry): Delete unused array LABEL.
17843 (expand_internal_throw): Delete unused var PARAMS.
17844 (expand_start_catch_block): Delete unused var CLEANUP.
17845 (emit_exception_table): Delete unused var EH_NODE_DECL.
17846 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17847 GOTO_UNWIND_AND_THROW. Don't set them.
17848 (end_eh_unwinder): Add top decl.
17849 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17850 (exception_section, push_rtl_perm, do_function_call,
17851 lang_interim_eh, push_eh_cleanup, eh_outer_context,
17852 expand_end_eh_spec, end_eh_unwinder): Declare as static.
17853 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17854 throw_used): Likewise.
17855 * cp-tree.h (expand_end_eh_spec): Delete prototype.
17856
17857 * search.c (dfs_mark, dfs_mark_vtable_path,
17858 dfs_unmark_vtable_path, dfs_mark_new_vtable,
17859 dfs_unmark_new_vtable, dfs_clear_search_slot,
17860 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17861 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17862 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17863 functions.
17864 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17865 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17866 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17867 Only define #ifdef GATHER_STATISTICS.
17868 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17869 is defined.
17870 (vbase_decl): Delete var definition.
17871 (init_search): Delete old decl.
17872 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17873 never actually used.
17874 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17875 (get_base_distance_recursive): Delete unused fourth arg
17876 BASETYPE_PATH. Fix call .
17877 (get_base_distance): Fix call.
17878 (push_class_decls): Delete unused var ID.
17879 (make_memoized_table_entry): Declare as static.
17880 (breadth_first_search): Declare as static.
17881 (tree_has_any_destructor_p): Declare as static.
17882 (pop_class_decls): Delete unused arg pop_class_decls.
17883 * class.c (popclass): Fix call to pop_class_decls.
17884 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17885 tree_has_any_destructor_p): Delete prototypes.
17886
17887 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17888 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
17889 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17890 (build_user_desc): Delete unused var T.
17891 (build_class_desc): Delete unused vars T and OFF.
17892 (build_t_desc): Delete unused var NAME_STRING.
17893 (build_headof): Make static.
17894 (get_bad_cast_node): Likewise.
17895 (get_def_to_follow): Likewise.
17896 * cp-tree.h (init_type_desc): Add prototype.
17897 (build_headof): Remove prototype.
17898
17899 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17900
17901 * pt.c (tsubst): Only look for matching decls at file scope for
17902 non-member functions.
17903
17904 * call.c (build_scoped_method_call): Handle scoped destructor
17905 calls in templates.
17906
17907 * decl.c (*_top_level): Also save previous_class_values.
17908
17909 * pt.c (tsubst_expr): Support do {} while loops.
17910 * parse.y (simple_stmt): Likewise.
17911 * tree.def: Likewise.
17912
17913 * method.c (build_overload_identifier): For a class nested in a
17914 template class, don't mangle in the template parms from our
17915 context.
17916
17917 * lex.c, cp-tree.h: Remove support for template instantiations in
17918 the pending_inlines code.
17919 * pt.c: Remove dead functions and unused arguments.
17920 (uses_template_parms): TYPENAME_TYPEs always use template parms.
17921 * parse.y: Stop passing anything to end_template_decl.
17922 * tree.c (print_lang_statistics): Only print tinst info #ifdef
17923 GATHER_STATISTICS.
17924
17925 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17926
17927 * init.c (expand_recursive_init{,_1}): Delete decls.
17928 (sort_member_init): Delete unused var INIT.
17929 (emit_base_init): Delete unused var X.
17930 (build_offset_ref): Delete unused var CNAME.
17931 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17932 (emit_base_init): Delete unused local var BASE. Delete extern
17933 decl of IN_CHARGE_IDENTIFIER.
17934 (build_delete): Delete unused local var VIRTUAL_SIZE.
17935
17936 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17937 (build_delete): Fix call.
17938 * decl2.c (delete_sanity): Likewise.
17939 * cp-tree.h (build_vec_delete): Update prototype.
17940
17941 * typeck.c (common_base_type): Delete unused var TMP.
17942 (build_binary_op): Delete local var ARGS_SAVE.
17943 (build_array_ref): Delete unused var ITYPE.
17944 (c_expand_return): Delete unused var USE_TEMP.
17945
17946 * typeck.c (compexcepttypes): Delete unused arg STRICT.
17947 (comptypes): Fix calls.
17948 * decl.c (duplicate_decls): Likewise.
17949 * cp-tree.h (compexcepttypes): Delete extra arg.
17950
17951 * decl2.c (check_classfn): Delete unused second arg CNAME.
17952 * decl.c (start_decl, grokfndecl): Fix calls.
17953 * init.c (do_friend): Likewise.
17954 * cp-tree.h (check_classfn): Update prototype.
17955
17956 * cp-tree.h (signature_error, import_export_vtable,
17957 append_signature_fields, id_in_current_class, mark_used,
17958 copy_assignment_arg_p): Add decls.
17959 * decl2.c (mark_used): Delete decl.
17960
17961 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17962
17963 * class.c (get_vtable_entry): Disable unused function.
17964 (doing_hard_virtuals): Delete unused static global var.
17965 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17966 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17967 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17968 (modify_one_vtable): Delete unused var OLD_RTTI.
17969 (finish_struct_anon): Delete unused vars OFFSET and X.
17970 (finish_struct_bits): Delete unused var METHOD_VEC.
17971 (get_basefndecls): Delete unused var PURPOSE. Delete unused
17972 for-scope local variable METHODS.
17973
17974 * call.c (user_harshness): Delete unused/unneeded arg PARM.
17975 (ideal_candidate): Delete unused args BASETYPE and PARMS.
17976 (build_method_call): Delete unused args passed into ideal_candidate.
17977 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
17978 * cp-tree.h (synthesize_method): Add decl.
17979
17980 * decl.c (note_level_for_for): Give void return type.
17981 (pushdecl_nonclass_level): Likewise.
17982 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17983 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17984 (suspend_binding_level): Delete unused var LEVEL.
17985 (duplicate_decls): Delete unused var CTYPE.
17986 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17987 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17988 PTR_ENDLINK.
17989 (grokdeclarator): Delete unused var C.
17990 (grokdeclarator): Delete unused var SIZE_VARIES.
17991 (grokparms): Delete unused var SAW_VOID.
17992 (start_function): Delete unused var OLDDECL.
17993 (cplus_expand_expr_stmt): Delete unused var
17994 REMOVE_IMPLICIT_IMMEDIATELY.
17995
17996 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17997
17998 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17999
18000 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
18001
18002 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18003 (build_min_nt): Likewise.
18004 * pt.c (do_pushlevel): Emit line note.
18005 (do_poplevel): Return what we get from poplevel.
18006 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18007 * parse.y: Use do_pushlevel and do_poplevel.
18008 * cp-tree.h: Declare do_poplevel.
18009
18010 * cp-tree.h: Declare at_eof.
18011 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18012 * decl2.c (import_export_decl): Renamed from import_export_inline.
18013 (finish_file): Call it to do interface handling for statics.
18014 * pt.c (tsubst_copy): Call mark_used on variables and functions
18015 used here.
18016
18017 * decl2.c (finish_file): Don't emit statics we can't generate.
18018 * pt.c (instantiate_decl): Don't set interface on instantiations
18019 we can't generate.
18020
18021 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18022 * tree.c (print_lang_statistics): Print max template depth.
18023 * pt.c (push_tinst_level): Dump entire instantiation context.
18024 (instantiate_class_template): Use it and pop_tinst_level.
18025 (instantiate_decl): Likewise.
18026
18027 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18028 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18029
18030 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
18031
18032 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18033 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18034 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18035 the new template implementation.
18036
18037 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18038
18039 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18040
18041 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
18042
18043 * decl.c (cp_finish_decl): Delay emitting the debug information for
18044 a typedef that has been installed as the canonical typedef, if the
18045 type has not yet been defined.
18046
18047 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
18048
18049 * decl2.c (grokfield): Still call pop_nested_class for access decls.
18050
18051 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18052
18053 * decl.c (lookup_label): Call label_rtx.
18054
18055 * decl.c (make_binding_level): New function.
18056 (pushlevel, pushlevel_class): Call it instead of explicit
18057 duplicate calls to xmalloc.
18058
18059 * decl.c (init_decl_processing): Delete useless build_pointer_type
18060 call.
18061
18062 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18063 (sizet_ftype_string): Delete variable.
18064 (init_decl_processing): Add built-in functions fabsf, fabsl,
18065 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
18066 variable strlen_ftype, used for strlen.
18067
18068 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
18069
18070 * decl.c (push_to_top_level): Start from current_binding_level
18071 again for now; the stl hacks depend on g++ being broken in this
18072 way, and it'll be fixed in the template rewrite.
18073
18074 * tree.def: Add USING_DECL.
18075 * decl2.c (do_class_using_decl): Implement.
18076 (grokfield): Pass access decls off to do_class_using_decl instead of
18077 grokdeclarator.
18078 * error.c (dump_decl): Handle USING_DECLs.
18079 * decl.c (grokdeclarator): Remove code for handling access decls.
18080 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18081 as access decls for now.
18082 (finish_struct): Don't check USING_DECLs for other uses of the name.
18083
18084 * search.c (get_matching_virtual): Use cp_error_at.
18085
18086 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18087
18088 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18089 match c-typeck.c.
18090 (self_promoting_args_p): Move the check that TYPE is non-nil
18091 before trying to look at its main variant.
18092 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18093
18094 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18095 Delete macros.
18096 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18097 (do_friend): Delete call to xref_friend.
18098 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18099
18100 * typeck.c (convert_sequence): #if 0 unused function.
18101
18102 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18103 be in decl_in_memory_p.
18104 (decl_in_memory_p): Delete decl.
18105 * expr.c (decl_in_memory_p): Delete fn.
18106 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18107
18108 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18109
18110 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
18111
18112 * class.c (finish_struct_1): Check for a pure-specifier on a
18113 non-virtual function here.
18114
18115 * decl2.c (grok_function_init): Don't check whether the function
18116 is virtual here.
18117 (grokfield): Don't call check_for_override here.
18118
18119 * decl.c (push_to_top_level): Start from inner_binding_level,
18120 check class_shadowed in class levels.
18121
18122 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
18123
18124 * decl.c (resume_level): Ignore things that don't have names, instead
18125 of core dumping.
18126
18127 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18128
18129 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18130
18131 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
18132
18133 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18134 synthesized dtor.
18135
18136 * parse.y (complete_type_name): Bind global_scope earlier.
18137 (complex_type_name): Likewise.
18138 (qualified_type_name): Remove.
18139
18140 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
18141
18142 * decl.c (grokfndecl): Move code that looks for virtuals in base
18143 classes...
18144 * class.c (check_for_override): ... to a new function.
18145 (finish_struct_1): Call it.
18146
18147 * cp-tree.h: Declare warn_sign_compare.
18148
18149 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18150 rather than extra_warnings to decide whether to warn about
18151 comparison of signed and unsigned.
18152
18153 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
18154 implies -Wsign-compare. -Wall doesn't imply -W.
18155
18156 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
18157
18158 * typeck.c (build_component_ref): Fix to handle anon unions in base
18159 classes as well.
18160
18161 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18162
18163 * class.c (resolves_to_fixed_type_p): Delete code dealing with
18164 a WITH_CLEANUP_EXPR, since we don't generate them any more.
18165 * cvt.c (build_up_reference): Likewise.
18166 * decl.c (grok_reference_init): Likewise.
18167 (cp_finish_decl): Likewise.
18168 * error.c (dump_expr): Likewise.
18169 * tree.c (real_lvalue_p): Likewise.
18170 (lvalue_p): Likewise.
18171 (build_cplus_new): Likewise.
18172 (unsave_expr_now): Likewise.
18173 * typeck.c (unary_complex_lvalue, build_modify_expr,
18174 c_expand_return): Likewise.
18175
18176 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18177
18178 Make the C++ front-end pay attention to attributes for structures.
18179 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18180 finish_struct_1.
18181 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18182 Take out old round_up_size use and setting the DECL_ALIGN possibly
18183 using it. Take out setting of TYPE_ALIGN to round_up_size, which
18184 can override what the attribute set.
18185 * cp-tree.h (finish_struct): Update prototype.
18186 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18187 attributes to finish_struct.
18188 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18189 value down into finish_struct.
18190 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18191
18192 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
18193
18194 * decl.c (poplevel): Re-word dead for local handling.
18195 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
18196 (cp_finish_decl): If is_for_scope, check for duplicates so
18197 we can disable is_for_scope. Otherwise, preserve_temp_slots.
18198
18199 * lex.c (do_identifier): Use global binding in preference of
18200 dead for local variable.
18201
18202 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
18203
18204 * init.c (initializing_context): Handle anon union changes, the
18205 context where fields of anon unions can be initialized now has to be
18206 found by walking up the TYPE_CONTEXT chain.
18207
18208 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
18209
18210 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18211 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18212 (obscure_complex_init): If bss is supported, always set
18213 DECL_INITIAL to error_mark_node.
18214
18215 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18216
18217 * init.c (is_friend): Make sure there's a context before we see if
18218 it's an aggr type.
18219
18220 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
18221
18222 * init.c (is_friend): Classes are not friendly with nested classes.
18223
18224 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
18225
18226 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18227 and record its result.
18228
18229 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
18230
18231 * class.c (finish_struct_anon): Switch around code to not move anon
18232 union elements around, nor mess up their contexts, nor offsets,
18233 instead we now build up the right number of COMPONENT_REFs for all
18234 the anon unions that may be present at build_component_ref time.
18235 * typeck.c (lookup_anon_field): New routine to handle field lookup
18236 on fields without names. We find them, based upon their unique type
18237 instead.
18238 * typeck.c (build_component_ref): Allow FIELD_DECL components.
18239 Handle finding components in anonymous unions, and ensure that a
18240 COMPONENT_REF is built for each level as necessary.
18241
18242 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
18243
18244 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18245 code that ensures that copy ctors are used if appropriate.
18246
18247 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18248
18249 * init.c (build_vec_delete): Only give an error if base isn't an
18250 error_mark_node.
18251
18252 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
18253
18254 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18255 (yylex): If we see `new', keep slurping.
18256
18257 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
18258
18259 * class.c (finish_struct_1): Move code for handling anon unions...
18260 (finish_struct_anon): to here. Fixup so that we do the offset
18261 calculations right, and so that the fields are physically moved to
18262 the containers's chain.
18263
18264 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18265
18266 * decl.c (grokdeclarator): Avoid trying to get an operand off an
18267 identifier node.
18268
18269 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
18270
18271 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18272 POINTER_SIZE to agree with expr.c.
18273
18274 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
18275
18276 * search.c (lookup_field): Don't report ambiguities if protect is 0,
18277 instead return NULL_TREE.
18278
18279 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
18280
18281 * class.c (finish_struct_1): Call warn_hidden if we want warnings
18282 about overloaded virtual functions.
18283 (warn_hidden): New routine to warn of virtual functions that are
18284 hidden by other virtual functions, that are not overridden.
18285 (get_basefndecls): New routine, used by warn_hidden.
18286 (mark_overriders): New routine, used by warn_hidden.
18287 * search.c (get_matching_virtual): Remove old warning that just
18288 isn't very useful.
18289
18290 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18291
18292 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18293
18294 * typeck.c (null_ptr_cst_p): Delete unused fn.
18295 (build_function_call_maybe): Delete unused fn.
18296
18297 * expr.c (extract_init): #if 0 the code after unconditional return 0
18298 for now.
18299
18300 Delete old cadillac code.
18301 * edsel.c: Remove file.
18302 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18303 * Makefile.in (CXX_OBJS): Delete edsel.o.
18304 (edsel.o): Delete rule.
18305 * cp-tree.h (flag_cadillac): Delete var decl.
18306 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18307 * decl2.c (flag_cadillac): Delete var definition.
18308 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18309 (grokfield): Delete code depending on flag_cadillac.
18310 (finish_anon_union): Likewise.
18311 * class.c (finish_struct_1): Likewise.
18312 (pushclass): Likewise.
18313 (popclass): Likewise.
18314 (push_lang_context): Likewise.
18315 (pop_lang_context): Likewise.
18316 * decl.c (init_decl_processing): Likewise.
18317 (start_decl): Likewise.
18318 (cp_finish_decl): Likewise.
18319 (xref_tag): Likewise.
18320 (finish_enum): Likewise.
18321 (start_function): Likewise.
18322 (finish_function): Likewise.
18323 (finish_stmt): Likewise.
18324 * lex.c (lang_init): Likewise.
18325 (check_newline): Likewise.
18326
18327 * lex.c (do_pending_inlines): Delete synthesized method kludge.
18328
18329 Delete defunct, ancient garbage collection implementation.
18330 * rtti.c: New file with the RTTI stuff from gc.c.
18331 * gc.c: Removed file (moved the remaining stuff into rtti.c).
18332 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18333 (rtti.o): New rule, replacing gc.o.
18334 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18335 * cp-tree.h: Delete gc-related fn decls.
18336 (DECL_GC_OFFSET): Delete macro.
18337 (flag_gc): Delete extern decl.
18338 * decl.c (current_function_obstack_index): Delete var decl.
18339 (current_function_obstack_usage): Delete var decl.
18340 (start_function): Delete clearing of current_function_obstack_index
18341 and current_function_obstack_usage.
18342 (init_decl_processing): Delete code relying on -fgc.
18343 Delete call to init_gc_processing.
18344 (cp_finish_decl): Delete calls to build_static_gc_entry and
18345 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
18346 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18347 and to expand_expr of a __gc_main call.
18348 (maybe_gc_cleanup): Delete var decl.
18349 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18350 * decl2.c (flag_gc): Delete var decl.
18351 (lang_f_options): Delete offering of -fgc.
18352 (lang_decode_option): Delete -fgc and -fno-gc handling.
18353 (get_temp_regvar): Delete gc code.
18354 * init.c (build_new): Delete gc code.
18355 * lex.c (init_lex): Delete checking of flag_gc.
18356
18357 * typeck.c (convert_arguments): Delete gc code.
18358 (build_component_addr): Delete -fgc warning.
18359 (build_modify_expr): Delete gc code.
18360
18361 * decl2.c (build_push_scope): Delete fn.
18362 * cp-tree.h (build_push_scope): Delete decl.
18363
18364 * search.c (clear_search_slots): Delete fn.
18365 * cp-tree.h (clear_search_slots): Delete decl.
18366
18367 * search.c (tree_needs_constructor_p): Delete fn.
18368 * cp-tree.h (tree_needs_constructor_p): Delete decl.
18369
18370 * tree.c (id_cmp): Delete fn.
18371
18372 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18373 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18374
18375 * tree.c (decl_value_member): Delete fn.
18376 * cp-tree.h (decl_value_member): Delete decl.
18377
18378 * tree.c (list_hash_lookup_or_cons): Delete fn.
18379 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18380
18381 * method.c (cplus_exception_name): Delete fn.
18382 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18383
18384 * spew.c (shift_tokens): Delete fn.
18385
18386 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18387
18388 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18389 to cp_finish_decl.
18390 * parse.y: Likewise.
18391
18392 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18393
18394 * tree.c (build_cplus_staticfn_type): Delete function definition;
18395 never used.
18396 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
18397
18398 * tree.c (virtual_member): Delete function definition; never used.
18399 * cp-tree.h (virtual_member): Delete decl.
18400
18401 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
18402
18403 * typeck.c (build_component_ref): Handle getting vbase pointers
18404 out of complex multiple inheritance better.
18405
18406 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
18407
18408 * typeck.c (build_object_ref): Make sure we use the real type, not
18409 any reference type.
18410
18411 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
18412
18413 * tree.c (build_exception_variant): Don't create new types if we
18414 don't have to, also build new types on the right obstack.
18415
18416 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
18417
18418 * decl.c (store_bindings): Split out from push_to_top_level.
18419 (push_to_top_level): Call it for b->type_shadowed on class binding
18420 levels.
18421
18422 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
18423
18424 * search.c (expand_upcast_fixups): Fix so that offsets stored in
18425 vbase_offsets are always right. Fixes a problem where virtual base
18426 upcasting and downcasting could be wrong during conversions on this
18427 during virtual function dispatch at ctor/dtor time when dynamic
18428 vtable fixups for deltas are needed. This only sounds easier than
18429 it is. :-)
18430 (fixup_virtual_upcast_offsets): Change to reflect new calling
18431 convention for expand_upcast_fixups.
18432
18433 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18434
18435 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18436 check that it's usable as the bitfield width.
18437
18438 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18439
18440 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18441 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18442 only ever used for functions in it.
18443
18444 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18445
18446 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18447 (nested_type): Likewise.
18448 (nested_name_specifier): Use lastiddecl.
18449
18450 * decl.c (grokdeclarator): Adjust accordingly.
18451 * init.c (expand_member_init): Likewise.
18452 * parse.y (base_class): Likewise.
18453 * typeck2.c (build_functional_cast): Likewise.
18454
18455 * typeck2.c (build_functional_cast): Fill in name after we've
18456 checked for non-aggr type.
18457
18458 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
18459
18460 * decl2.c (warn_pointer_arith): Default to on.
18461
18462 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18463
18464 * lex.c (is_rid): New function.
18465 * decl.c (grokdeclarator): Diagnose reserved words used as
18466 declarator-ids.
18467
18468 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18469
18470 * tree.c (get_decl_list): Don't lose cv-quals.
18471
18472 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18473 typespecs used as declarator-ids.
18474
18475 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
18476
18477 * decl.c (poplevel): When poping a level, don't give a warning for
18478 any subblocks that already exist.
18479
18480 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18481
18482 * typeck.c (build_object_ref): Finish what I started.
18483
18484 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18485
18486 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18487
18488 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18489 scope.
18490
18491 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18492
18493 * decl.c (xref_tag): Handle passing a type in directly.
18494
18495 * parse.y (qualified_type_name): Pull out the type.
18496 (nested_type): Likewise.
18497 Take types directly instead of as identifiers.
18498 * call.c (build_scoped_method_call): Take types directly instead of
18499 as identifiers.
18500 * decl.c (xref_basetypes): Likewise.
18501 * init.c (expand_member_init): Likewise.
18502 (build_member_call): Likewise.
18503 (build_offset_ref): Likewise.
18504 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18505 * method.c (do_build_assign_ref): Likewise.
18506 * decl.c (grokdeclarator): Handle a type appearing as the
18507 declarator-id for constructors.
18508 * method.c (do_build_copy_constructor): current_base_init_list now
18509 uses the types directly, not their names.
18510 * init.c (sort_base_init): Likewise.
18511 (expand_member_init): Likewise.
18512 * init.c (is_aggr_type): New function, like is_aggr_typedef.
18513
18514 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
18515
18516 * tree.c (layout_basetypes): Call build_lang_field_decl instead
18517 of build_lang_decl if first arg is a FIELD_DECL.
18518
18519 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18520
18521 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18522 non-empty.
18523 * except.c (expand_start_catch_block): Set TREE_USED to avoid
18524 warnings about the catch handler.
18525
18526 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
18527
18528 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18529 expand_target_expr.
18530
18531 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18532
18533 Fix access control to use trees rather than integers.
18534 * class.c (access_{default, public, protected, private,
18535 default_virtual, public_virtual, private_virtual}_node): Add
18536 definitions.
18537 (init_class_processing): Do creation of those nodes.
18538 * cp-tree.h (access_type): Delete enum decl.
18539 (access_{default, public, protected, private, default_virtual,
18540 public_virtual, private_virtual}_node): Add decls.
18541 (compute_access): Change return type.
18542 * search.c (compute_access): Have tree return type, instead of enum.
18543 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18544 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18545 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18546 * parse.y (VISSPEC): Make ttype rather than itype.
18547 (base_class_access_list): Likewise.
18548 * *.[cy]: Change all refs of `access_public' to `access_public_node',
18549 etc.
18550 * call.c (build_method_call): Make ACCESS be a tree.
18551 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18552 * cvt.c (convert_to_aggr): Likewise.
18553 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18554 Likewise.
18555 * method.c (hack_identifier): Likewise.
18556 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18557
18558 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
18559
18560 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18561 frontend, and make it more consistent with respect to
18562 warn_pointer_arith.
18563
18564 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
18565
18566 * decl.c (pushdecl): Check for duplicate parameter names.
18567
18568 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
18569
18570 * decl.c (expand_static_init): Call assemble_external for atexit.
18571
18572 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
18573
18574 * except.c (do_unwind): Remove some generated dead code.
18575 (eh_outer_context): New routine, factor out some common code from
18576 expand_builtin_throw and end_eh_unwinder. Add code to do return
18577 address masking for the PA.
18578 (expand_builtin_throw): Use eh_outer_context instead of open coding
18579 it here.
18580 (end_eh_unwinder): Likewise.
18581
18582 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
18583
18584 * except.c (expand_throw): Call assemble_external for __empty, if we
18585 use it.
18586
18587 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
18588
18589 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18590 NORMAL_RETURN_ADDR_OFFSET.
18591 (end_eh_unwinder): Likewise.
18592
18593 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
18594
18595 * gc.c (build_dynamic_cast): Make sure we don't cast away const
18596 when dealing with references, and make sure we handle dynamic
18597 casting to a cv qualified reference.
18598
18599 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
18600
18601 * except.c (struct eh_context): New structure top hold eh context
18602 information.
18603 (push_eh_context): New routine.
18604 (pop_eh_context): Likewise.
18605 * decl.c (push_cp_function_context): Use them.
18606 (pop_cp_function_context): Likewise.
18607
18608 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
18609
18610 * decl2.c (finish_file): Also prune uninteresting functions in the
18611 inline emission loop.
18612
18613 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
18614
18615 * sig.c (build_signature_table_constructor): Mark functions
18616 in the signature as referenced.
18617
18618 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
18619
18620 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18621 the inline emission stuff.
18622
18623 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
18624
18625 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18626 weak symbols.
18627 * lang-options.h: Add -f{no-,}weak.
18628 * decl.c (init_decl_processing): If the target does not support weak
18629 symbols, don't use them.
18630 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18631
18632 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18633
18634 * init.c (expand_member_init): warning for base init after members.
18635
18636 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
18637
18638 * cvt.c (build_expr_type_conversion): Don't convert to a reference
18639 type.
18640
18641 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
18642
18643 * method.c (report_type_mismatch): Improve wording for volatile
18644 mismatches.
18645
18646 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
18647
18648 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18649 expand_assignment, as the later doesn't handle things that have
18650 copy constructors well. The compiler would do bitwise copying,
18651 instead of ctor calling in some cases.
18652
18653 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
18654
18655 * g++.c (my_strerror): Return "cannot access" if errno is 0.
18656 (pfatal_with_name, perror_exec): Don't assume that
18657 the returned value from my_strerror contains no '%'s.
18658 (concat): Remove.
18659 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18660
18661 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
18662
18663 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18664 TYPE_METHODS/TREE_CHAIN mean what they used to.
18665 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18666 instead of TYPE_METHODS.
18667 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18668 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18669 * cp-tree.h (CLASSTYPE_METHODS): Lose.
18670 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18671 TYPE_METHODS.
18672 (struct lang_decl): Lose next_method field.
18673 (DECL_NEXT_METHOD): Lose.
18674 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18675 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18676 anymore.
18677 (finish_struct_methods): Don't mess with the TREE_CHAINs in
18678 fn_fields.
18679
18680 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18681 vector.
18682
18683 * call.c (build_method_call): Synthesize here even when not inlining.
18684 * typeck.c (build_function_call_real): Likewise.
18685
18686 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
18687
18688 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18689 == DBX_DEBUG, call dbxout_start_new_source_file and
18690 dbxout_resume_previous_source_file when appropriate.
18691
18692 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
18693
18694 * except.c (start_anon_func): Push to the top level.
18695 (end_anon_func): Pop from the top level.
18696
18697 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
18698
18699 * cp-tree.h (build_cleanup): New routine to build cleanups.
18700 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18701 call at ctor time and use atexit to run it later.
18702 * decl2.c (build_cleanup): New routine, taken from finish_file.
18703 (finish_file): Use build_cleanup instead, and don't put function
18704 local statics in global dtor list.
18705
18706 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
18707
18708 * except.c (expand_throw): Ensure that we have cleanups, if we try
18709 and expand cleanups.
18710
18711 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
18712
18713 * except.c (expand_throw): Add logic to manage dynamic cleanups for
18714 the EH object.
18715 (expand_end_catch_block): Use the magic of expand_goto, instead of
18716 emit_jump so that we get the cleanup for any catch clause parameter
18717 and the cleanup for the exception object. Update to reflect label
18718 changes.
18719 (push_eh_cleanup): New routine to register a cleanup for an
18720 exception object.
18721 (empty_fndecl): Used to default cleanup actions to
18722 nothing.
18723 (init_exception_processing): Setup empty_fndecl. Setup
18724 saved_cleanup.
18725 (expand_start_catch_block): Update to reflect label changes. Call
18726 push_eh_object to register the cleanup for the EH object.
18727 (start_anon_func): New routine to start building lambda expressions
18728 from trees.
18729 (end_anon_func): New routine to end them.
18730 (struct labelNode): Change so that we can use tree labels, or rtx
18731 labels.
18732 (saved_cleanup): Object to check for dynamic cleanups for the
18733 exception handling object.
18734 (push_label_entry): Change so that we can use tree labels, or rtx
18735 labels.
18736 (pop_label_entry): Likewise.
18737 (top_label_entry): Likewise.
18738 (expand_start_all_catch): Use tree label instead of rtx label, so
18739 that we can get the magic of expand_goto.
18740 (expand_end_all_catch): Update to reflect label changes.
18741
18742 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18743 use UNSAVE_EXPRs.
18744 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18745 building_cleanup logic, as we now use UNSAVE_EXPRs.
18746 * cp-tree.h (unsave_expr): Declare it.
18747 * decl.c (building_cleanup): Remove.
18748 (maybe_build_cleanup): Remove building_cleanup logic, and use
18749 UNSAVE_EXPR instead.
18750
18751 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
18752
18753 * gc.c (build_t_desc): Update error message to say <typeinfo>.
18754
18755 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18756
18757 * decl.c (pushdecl): Only warn about shadowing a local variable if
18758 warn_shadow is true.
18759
18760 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18761
18762 * typeck.c (build_binary_op_nodefault): Added warning about
18763 comparisons between different enum types with -Wall, unless
18764 -fenum-int-equiv set.
18765
18766 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
18767
18768 * class.c (finish_struct_1): Skip down to the inner type in
18769 multidimensional arrays. Ensures ctors will be made for types that
18770 need constructing.
18771
18772 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
18773
18774 * decl.c (last_dtor_insn): New to track the last compiler generated
18775 insn in a dtor.
18776 (store_parm_decls): Set it.
18777 (finish_function): Use it to see if the dtor is empty. Avoid doing
18778 vtable setup all the time, if we can.
18779 (struct cp_function): Add last_dtor_insn.
18780 (push_cp_function_context): Save it.
18781 (pop_cp_function_context): Restore it.
18782
18783 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
18784
18785 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18786 warnings.
18787
18788 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
18789
18790 * typeck.c (expand_target_expr): Make sure targets get put into the
18791 current temp_slot_level, so that the free_temp_slots call will reuse
18792 them.
18793
18794 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
18795
18796 * class.c (finish_struct_1): Delay delta fixups for virtual bases
18797 until after we have done the hard virtuals, to avoid a bogus `every
18798 virtual function must have a unique final overrider' for virtual
18799 functions that are only overridden by hard virtuals.
18800
18801 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18802
18803 * pt.c (do_function_instantiation): Don't try to find a file-scope
18804 template for a member function.
18805
18806 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
18807
18808 * g++.c (main): Add handling of -nodefaultlibs.
18809
18810 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
18811
18812 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18813 distinguish between direct bindings of reference variables, and
18814 indirect bindings of reference variables.
18815 * cvt.c (build_up_reference): Use it.
18816 * typeck.c (convert_arguments): Use it to indicate this is an
18817 indirect binding.
18818 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18819 as they are unused.
18820 (expand_static_init): Likewise.
18821 (cplus_expand_expr_stmt): Likewise.
18822 * decl2.c (finish_file): Likewise.
18823 * init.c (perform_member_init): Likewise.
18824 (emit_base_init): Likewise.
18825 (expand_aggr_vbase_init_1): Likewise.
18826
18827 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18828
18829 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18830 get a DECL_LANG_SPECIFIC node.
18831 * cp-tree.h (lang_decl_flags): Add new member `level'.
18832 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18833 decl_flags level member.
18834
18835 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18836
18837 * call.c (build_method_call): Make sure instance has a
18838 TYPE_LANG_SPECIFIC node before we dive into it.
18839
18840 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
18841
18842 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18843
18844 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
18845
18846 * decl.c (duplicate_decls): When smashing decls, smash staticness in
18847 the usual way.
18848
18849 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
18850
18851 * decl.c (poplevel): Handle the merging of subblocks of cleanups
18852 when finishing blocks that have already been created (usually due to
18853 the fixup goto code). Fixes bad debugging information.
18854
18855 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
18856
18857 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18858 that's not a list of overloaded functions.
18859
18860 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18861
18862 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18863 before trying to use DECL_ABSTRACT_VIRTUAL_P.
18864
18865 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
18866
18867 * decl2.c (mark_used): New function for hooking into setting of
18868 TREE_USED on decls.
18869 * call.c (build_method_call): Use it.
18870 * class.c (instantiate_type): Likewise.
18871 * init.c (build_offset_ref): Likewise. Don't call assemble_external
18872 for all like-named functions.
18873 * method.c (hack_identifier): Likewise.
18874 (emit_thunk): Don't call assemble_external.
18875 (make_thunk): Create thunk as a FUNCTION_DECL so that it
18876 gets the right mode and ENCODE_SECTION_INFO works.
18877
18878 * parse.y: Use mark_used. Pass operator names to do_identifier.
18879 * lex.c (do_identifier): Handle operator names.
18880
18881 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18882
18883 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18884
18885 * errfn.c: Include stdio.h.
18886 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18887
18888 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
18889
18890 * typeck2.c (digest_init): Always convert initializers to the
18891 right type.
18892
18893 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
18894
18895 * init.c (member_init_ok_or_else): Don't allow member initializers
18896 for indirect members, as it is invalid.
18897
18898 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18899
18900 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18901
18902 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
18903
18904 * parse.y (for.init.statement): Catch compound statements inside for
18905 initializations, if we're being pedantic.
18906
18907 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
18908
18909 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18910 looking for.
18911
18912 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
18913
18914 * error.c (dump_expr): Don't core dump when a boolean expression is
18915 used as a default argument.
18916
18917 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18918
18919 * class.c (finish_struct_bits): Check aggregate_value_p instead of
18920 RETURN_IN_MEMORY.
18921
18922 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
18923
18924 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18925 BLKmode type that would otherwise be returned in registers.
18926
18927 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18928
18929 * g++.c (WITHLIBC): New macro.
18930 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
18931 saw_libc and pass it at the end if it was set.
18932
18933 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18934
18935 * parse.y (fn.def1): Call split_specs_attrs in
18936 declmods notype_declarator case.